#include <OgreParticleSystem.h>
Inheritance diagram for Ogre::ParticleSystem:
Public Methods | |
ParticleSystem () | |
Default constructor required for STL creation in manager. More... | |
ParticleSystem (const String &name) | |
Creates a particle system with no emitters or affectors. More... | |
virtual | ~ParticleSystem () |
virtual const String & | getName (void) const |
Gets the name of this particle system. More... | |
ParticleEmitter * | addEmitter (const String &emitterType) |
Adds an emitter to this particle system. More... | |
ParticleEmitter * | getEmitter (unsigned short index) const |
Retrieves an emitter by it's index (zero-based). More... | |
unsigned short | getNumEmitters (void) const |
Returns the number of emitters for this particle system. More... | |
void | removeEmitter (unsigned short index) |
Removes an emitter from the system. More... | |
void | removeAllEmitters (void) |
Removes all the emitters from this system. More... | |
ParticleAffector * | addAffector (const String &affectorType) |
Adds an affector to this particle system. More... | |
ParticleAffector * | getAffector (unsigned short index) const |
Retrieves an affector by it's index (zero-based). More... | |
unsigned short | getNumAffectors (void) const |
Returns the number of affectors for this particle system. More... | |
void | removeAffector (unsigned short index) |
Removes an affector from the system. More... | |
void | removeAllAffectors (void) |
Removes all the affectors from this system. More... | |
unsigned int | getNumParticles (void) const |
Gets the number of individual particles in the system right now. More... | |
unsigned int | getParticleQuota (void) const |
Returns the maximum number of particles this system is allowed to have active at once. More... | |
void | setParticleQuota (unsigned int quota) |
Sets the maximum number of particles this system is allowed to have active at once. More... | |
ParticleSystem & | operator= (const ParticleSystem &rhs) |
Assignment operator for copying. More... | |
void | _update (Real timeElapsed) |
Updates the particles in the system based on time elapsed. More... | |
ParticleIterator | _getIterator (void) |
Returns an iterator for stepping through all particles in this system. More... | |
void | getWorldTransforms (Matrix4 *xform) |
Overridden from MovableObject. More... | |
void | _updateBounds (void) |
Overridden from BillboardSet. More... | |
void | fastForward (Real time, Real interval=0.1) |
Fast-forwards this system by the required number of seconds. More... | |
Billboard * | createBillboard (const Vector3 &position, const ColourValue &colour=ColourValue::White) |
Creates a new billboard and adds it to this set. More... | |
Billboard * | createBillboard (Real x, Real y, Real z, const ColourValue &colour=ColourValue::White) |
Creates a new billboard and adds it to this set. More... | |
virtual int | getNumBillboards (void) const |
Returns the number of active billboards which currently make up this set. More... | |
virtual void | setAutoextend (bool autoextend) |
Tells the set whether to allow automatic extension of the pool of billboards. More... | |
virtual bool | getAutoextend (void) const |
Returns true if the billboard pool automatically extends. More... | |
virtual void | setPoolSize (unsigned int size) |
Adjusts the size of the pool of billboards available in this set. More... | |
virtual unsigned int | getPoolSize (void) const |
Returns the current size of the billboard pool. More... | |
virtual void | clear () |
Empties this set of all billboards. More... | |
virtual Billboard * | getBillboard (unsigned int index) const |
Returns a pointer to the billboard at the supplied index. More... | |
virtual void | removeBillboard (unsigned int index) |
Removes the billboard at the supplied index. More... | |
virtual void | removeBillboard (Billboard *pBill) |
Removes a billboard from the set. More... | |
virtual void | setBillboardOrigin (BillboardOrigin origin) |
Sets the point which acts as the origin point for all billboards in this set. More... | |
virtual BillboardOrigin | getBillboardOrigin (void) const |
Gets the point which acts as the origin point for all billboards in this set. More... | |
virtual void | setDefaultDimensions (Real width, Real height) |
Sets the default dimensions of the billboards in this set. More... | |
virtual void | setDefaultWidth (Real width) |
See setDefaultDimensions - this sets 1 component individually. More... | |
virtual Real | getDefaultWidth (void) |
See setDefaultDimensions - this gets 1 component individually. More... | |
virtual void | setDefaultHeight (Real height) |
See setDefaultDimensions - this sets 1 component individually. More... | |
virtual Real | getDefaultHeight (void) |
See setDefaultDimensions - this gets 1 component individually. More... | |
virtual void | setMaterialName (const String &name) |
Sets the name of the material to be used for this billboard set. More... | |
virtual const String & | getMaterialName (void) const |
Sets the name of the material to be used for this billboard set. More... | |
virtual void | _notifyCurrentCamera (Camera *cam) |
Overridden from MovableObject. More... | |
virtual const AxisAlignedBox & | getBoundingBox (void) const |
Overridden from MovableObject. More... | |
virtual void | _updateRenderQueue (RenderQueue *queue) |
Overridden from MovableObject. More... | |
virtual Material * | getMaterial (void) const |
Overridden from MovableObject. More... | |
virtual void | getRenderOperation (RenderOperation &rend) |
Overridden from MovableObject. More... | |
virtual void | _notifyBillboardResized (void) |
Internal callback used by Billboards to notify their parent that they have been resized. More... | |
virtual bool | getCullIndividually (void) |
Returns whether or not billbards in this are tested individually for culling. More... | |
virtual void | setCullIndividually (bool cullIndividual) |
Sets whether culling tests billboards in this individually as well as in a group. More... | |
virtual void | setBillboardType (BillboardType bbt) |
Sets the type of billboard to render. More... | |
virtual BillboardType | getBillboardType (void) |
Returns the billboard type in use. More... | |
virtual void | setCommonDirection (const Vector3 &vec) |
Use this to specify the common direction given to billboards of type BBT_ORIENTED_COMMON. More... | |
virtual Vector3 | getCommonDirection (void) |
Gets the common direction for all billboards (BBT_ORIENTED_COMMON). More... | |
virtual const String | getMovableType (void) const |
Overridden from MovableObject. More... | |
Real | getSquaredViewDepth (const Camera *cam) const |
Overridden, see Renderable. More... | |
ParamDictionary * | getParamDictionary (void) |
Retrieves the parameter dictionary for this class. More... | |
const ParameterList & | getParameters (void) |
Retrieves a list of parameters valid for this object. More... | |
virtual bool | setParameter (const String &name, const String &value) |
Generic parameter setting method. More... | |
virtual String | getParameter (const String &name) |
Generic parameter retrieval method. More... | |
virtual void | copyParametersTo (StringInterface *dest) |
Method for copying this object's parameters to another object. More... | |
virtual SceneNode * | getParentNode (void) |
Returns the node to which this object is attached. More... | |
virtual void | _notifyAttached (SceneNode *parent) |
Internal method called to notify the object that it has been attached to a node. More... | |
virtual bool | isAttached (void) const |
Returns true if this object is attached to a SceneNode. More... | |
virtual void | setVisible (bool visible) |
Tells this object whether to be visible or not, if it has a renderable component. More... | |
virtual bool | isVisible (void) const |
Returns whether or not this object is supposed to be visible or not. More... | |
virtual void | setUserObject (UserDefinedObject *obj) |
Call this to associate your own custom user object instance with this MovableObject. More... | |
virtual UserDefinedObject * | getUserObject (void) |
Retrieves a pointer to a custom application object associated with this movable by an earlier call to setUserObject. More... | |
virtual void | setRenderQueueGroup (RenderQueueGroupID queueID) |
Sets the render queue group this entity will be rendered through. More... | |
virtual RenderQueueGroupID | getRenderQueueGroup (void) |
Gets the queue group for this entity, see setRenderQueueGroup for full details. More... | |
virtual unsigned short | getNumWorldTransforms (void) |
Returns the number of world transform matrices this renderable requires. More... | |
virtual bool | useIdentityProjection (void) |
Returns whether or not to use an 'identity' projection. More... | |
virtual bool | useIdentityView (void) |
Returns whether or not to use an 'identity' projection. More... | |
virtual SceneDetailLevel | getRenderDetail () |
Returns the preferred rasterisation mode of this renderable. More... | |
Protected Types | |
typedef std::vector< ParticleEmitter * > | ParticleEmitterList |
typedef std::vector< ParticleAffector * > | ParticleAffectorList |
typedef std::list< Billboard * > | ActiveBillboardList |
typedef std::deque< Billboard * > | FreeBillboardQueue |
typedef std::vector< Billboard * > | BillboardPool |
Protected Methods | |
void | _expire (Real timeElapsed) |
Internal method used to expire dead particles. More... | |
void | _triggerEmitters (Real timeElapsed) |
Spawn new particles based on free quota and emitter requirements. More... | |
void | _applyMotion (Real timeElapsed) |
Updates existing particle based on their momentum. More... | |
void | _triggerAffectors (Real timeElapsed) |
Applies the effects of affectors. More... | |
void | increasePool (unsigned int size) |
Overridden from BillboardSet to create Particle instead of Billboard. More... | |
Particle * | addParticle (void) |
Internal method for adding a new active particle. More... | |
void | genBillboardAxes (Camera &cam, Vector3 *pX, Vector3 *pY, const Billboard *pBill=0) |
Overidden from BillboardSet. More... | |
void | initParameters (void) |
Internal method for initialising string interface. More... | |
bool | billboardVisible (Camera *cam, ActiveBillboardList::iterator bill) |
Internal method for culling individual billboards. More... | |
void | getParametricOffsets (Real &left, Real &right, Real &top, Real &bottom) |
Internal method, generates parametric offsets based on origin. More... | |
void | genVertices (Real **pPos, RGBA **pCol, const Vector3 *offsets, const Billboard *pBillboard) |
Internal method for generating vertex data. More... | |
void | genVertOffsets (Real inleft, Real inright, Real intop, Real inbottom, Real width, Real height, const Vector3 &x, const Vector3 &y, Vector3 *pDestVec) |
Internal method generates vertex offsets. More... | |
bool | createParamDictionary (const String &className) |
Internal method for creating a parameter dictionary for the class, if it does not already exist. More... | |
Protected Attributes | |
String | mName |
Name of the particle system instance. More... | |
ParticleEmitterList | mEmitters |
List of particle emitters, ie sources of particles. More... | |
ParticleAffectorList | mAffectors |
List of particle affectors, ie modifiers of particles. More... | |
AxisAlignedBox | mAABB |
Bounds of all billboards in this set. More... | |
BillboardOrigin | mOriginType |
Origin of each billboard. More... | |
Real | mDefaultWidth |
Default width of each billboard. More... | |
Real | mDefaultHeight |
Default height of each billboard. More... | |
String | mMaterialName |
Name of the material to use. More... | |
Material * | mpMaterial |
Pointer to the material to use. More... | |
bool | mAllDefaultSize |
True if no billboards in this set have been resized - greater efficiency. More... | |
bool | mAutoExtendPool |
Flag indicating whether to autoextend pool. More... | |
ActiveBillboardList | mActiveBillboards |
Active billboard list. More... | |
FreeBillboardQueue | mFreeBillboards |
Free billboard queue. More... | |
BillboardPool | mBillboardPool |
Pool of billboard instances for use and reuse in the active billboard list. More... | |
Real * | mpPositions |
The vertex position data for all billboards in this set. More... | |
RGBA * | mpColours |
The vertex colour data for all billboards in this set. More... | |
Real * | mpTexCoords |
The texture coordinates for all billboards in this set. More... | |
unsigned short * | mpIndexes |
The vertex index data for all billboards in this set (1 set only). More... | |
bool | mCullIndividual |
Flag indicating whether each billboard should be culled separately (default: false). More... | |
BillboardType | mBillboardType |
The type of billboard to render. More... | |
Vector3 | mCommonDirection |
Common direction for billboards of type BBT_ORIENTED_COMMON. More... | |
unsigned short | mNumVisibleBillboards |
String | mParamDictName |
Class name for this instance to be used as a lookup (must be initialised by subclasses). More... | |
SceneNode * | mParentNode |
node to which this object is attached. More... | |
bool | mVisible |
Is this object visible? More... | |
UserDefinedObject * | mUserObject |
User defined object which is linked to this object. More... | |
RenderQueueGroupID | mRenderQueueID |
The render queue to use when rendering this object. More... | |
Static Protected Attributes | |
CmdCull | msCullCmd |
Command objects. More... | |
CmdHeight | msHeightCmd |
CmdMaterial | msMaterialCmd |
CmdQuota | msQuotaCmd |
CmdWidth | msWidthCmd |
CmdBillboardType | msBillboardTypeCmd |
CmdCommonDirection | msCommonDirectionCmd |
String | msMovableType = "BillboardSet" |
Shared class-level name for Movable type. More... | |
ParamDictionaryMap | msDictionary |
Dictionary of parameters. More... |
This class simply manages a single collection of particles with a shared local center point and a bounding box. The visual aspect of the particles is handled by the base BillboardSet class which the ParticleSystem manages automatically.
Particle systems are created using the ParticleSystemManager::createParticleSystem method, never directly. In addition, like all subclasses of MovableObject, the ParticleSystem will only be considered for rendering once it has been attached to a SceneNode.
|
|
|
|
|
|
|
|
|
|
|
Default constructor required for STL creation in manager.
|
|
Creates a particle system with no emitters or affectors.
|
|
|
|
Updates existing particle based on their momentum.
|
|
Internal method used to expire dead particles.
|
|
Returns an iterator for stepping through all particles in this system.
|
|
Internal method called to notify the object that it has been attached to a node.
Reimplemented in Ogre::SimpleRenderable. |
|
Internal callback used by Billboards to notify their parent that they have been resized.
|
|
Overridden from MovableObject.
Implements Ogre::MovableObject. |
|
Applies the effects of affectors.
|
|
Spawn new particles based on free quota and emitter requirements.
|
|
Updates the particles in the system based on time elapsed.
|
|
Overridden from BillboardSet.
Reimplemented from Ogre::BillboardSet. |
|
Overridden from MovableObject.
Implements Ogre::MovableObject. |
|
Adds an affector to this particle system.
|
|
Adds an emitter to this particle system.
|
|
Internal method for adding a new active particle.
|
|
Internal method for culling individual billboards.
|
|
Empties this set of all billboards.
|
|
Method for copying this object's parameters to another object.
|
|
Creates a new billboard and adds it to this set.
|
|
Creates a new billboard and adds it to this set.
|
|
Internal method for creating a parameter dictionary for the class, if it does not already exist.
|
|
Fast-forwards this system by the required number of seconds.
|
|
Overidden from BillboardSet.
Reimplemented from Ogre::BillboardSet. |
|
Internal method for generating vertex data.
|
|
Internal method generates vertex offsets.
|
|
Retrieves an affector by it's index (zero-based).
|
|
Returns true if the billboard pool automatically extends.
|
|
Returns a pointer to the billboard at the supplied index.
|
|
Gets the point which acts as the origin point for all billboards in this set.
|
|
Returns the billboard type in use.
|
|
Overridden from MovableObject.
Implements Ogre::MovableObject. |
|
Gets the common direction for all billboards (BBT_ORIENTED_COMMON).
|
|
Returns whether or not billbards in this are tested individually for culling.
|
|
See setDefaultDimensions - this gets 1 component individually.
|
|
See setDefaultDimensions - this gets 1 component individually.
|
|
Retrieves an emitter by it's index (zero-based).
|
|
Overridden from MovableObject.
Implements Ogre::Renderable. |
|
Sets the name of the material to be used for this billboard set.
|
|
Overridden from MovableObject.
Implements Ogre::MovableObject. |
|
Gets the name of this particle system.
Reimplemented from Ogre::BillboardSet. |
|
Returns the number of affectors for this particle system.
|
|
Returns the number of active billboards which currently make up this set.
|
|
Returns the number of emitters for this particle system.
|
|
Gets the number of individual particles in the system right now.
|
|
Returns the number of world transform matrices this renderable requires.
Reimplemented in Ogre::SubEntity. |
|
Retrieves the parameter dictionary for this class.
|
|
Generic parameter retrieval method.
|
|
Retrieves a list of parameters valid for this object.
|
|
Internal method, generates parametric offsets based on origin.
|
|
Returns the node to which this object is attached.
Reimplemented in Ogre::SimpleRenderable. |
|
Returns the maximum number of particles this system is allowed to have active at once.
|
|
Returns the current size of the billboard pool.
|
|
Returns the preferred rasterisation mode of this renderable.
Reimplemented in Ogre::SubEntity. |
|
Overridden from MovableObject.
Implements Ogre::Renderable. |
|
Gets the queue group for this entity, see setRenderQueueGroup for full details.
|
|
Overridden, see Renderable.
Implements Ogre::Renderable. |
|
Retrieves a pointer to a custom application object associated with this movable by an earlier call to setUserObject.
|
|
Overridden from MovableObject.
Reimplemented from Ogre::BillboardSet. |
|
Overridden from BillboardSet to create Particle instead of Billboard.
Reimplemented from Ogre::BillboardSet. |
|
Internal method for initialising string interface.
|
|
Returns true if this object is attached to a SceneNode.
|
|
Returns whether or not this object is supposed to be visible or not.
|
|
Assignment operator for copying.
|
|
Removes an affector from the system.
|
|
Removes all the affectors from this system.
|
|
Removes all the emitters from this system.
|
|
Removes a billboard from the set.
|
|
Removes the billboard at the supplied index.
|
|
Removes an emitter from the system.
|
|
Tells the set whether to allow automatic extension of the pool of billboards.
|
|
Sets the point which acts as the origin point for all billboards in this set.
|
|
Sets the type of billboard to render.
|
|
Use this to specify the common direction given to billboards of type BBT_ORIENTED_COMMON.
|
|
Sets whether culling tests billboards in this individually as well as in a group.
|
|
Sets the default dimensions of the billboards in this set.
|
|
See setDefaultDimensions - this sets 1 component individually.
|
|
See setDefaultDimensions - this sets 1 component individually.
|
|
Sets the name of the material to be used for this billboard set.
|
|
Generic parameter setting method.
|
|
Sets the maximum number of particles this system is allowed to have active at once.
|
|
Adjusts the size of the pool of billboards available in this set.
|
|
Sets the render queue group this entity will be rendered through.
|
|
Call this to associate your own custom user object instance with this MovableObject.
|
|
Tells this object whether to be visible or not, if it has a renderable component.
Reimplemented in Ogre::Light. |
|
Returns whether or not to use an 'identity' projection.
Reimplemented in Ogre::GuiElement. |
|
Returns whether or not to use an 'identity' projection.
Reimplemented in Ogre::GuiElement. |
|
Bounds of all billboards in this set.
|
|
Active billboard list.
|
|
List of particle affectors, ie modifiers of particles.
|
|
True if no billboards in this set have been resized - greater efficiency.
|
|
Flag indicating whether to autoextend pool.
|
|
Pool of billboard instances for use and reuse in the active billboard list.
|
|
The type of billboard to render.
|
|
Common direction for billboards of type BBT_ORIENTED_COMMON.
|
|
Flag indicating whether each billboard should be culled separately (default: false).
|
|
Default height of each billboard.
|
|
Default width of each billboard.
|
|
List of particle emitters, ie sources of particles.
|
|
Free billboard queue.
|
|
Name of the material to use.
|
|
Name of the particle system instance.
Reimplemented from Ogre::BillboardSet. |
|
|
|
Origin of each billboard.
|
|
Class name for this instance to be used as a lookup (must be initialised by subclasses).
|
|
node to which this object is attached.
|
|
The vertex colour data for all billboards in this set.
|
|
The vertex index data for all billboards in this set (1 set only).
|
|
Pointer to the material to use.
|
|
The vertex position data for all billboards in this set.
|
|
The texture coordinates for all billboards in this set.
|
|
The render queue to use when rendering this object.
|
|
|
|
|
|
Command objects.
|
|
Dictionary of parameters.
|
|
|
|
|
|
Shared class-level name for Movable type.
|
|
|
|
|
|
User defined object which is linked to this object.
|
|
Is this object visible?
|
Copyright © 2002 by The OGRE Team