Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Ogre::ParticleSystem Class Reference

Class defining particle system based special effects. More...

#include <OgreParticleSystem.h>

Inheritance diagram for Ogre::ParticleSystem:

Ogre::BillboardSet Ogre::StringInterface Ogre::MovableObject Ogre::Renderable List of all members.

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 StringgetName (void) const
 Gets the name of this particle system. More...

ParticleEmitteraddEmitter (const String &emitterType)
 Adds an emitter to this particle system. More...

ParticleEmittergetEmitter (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...

ParticleAffectoraddAffector (const String &affectorType)
 Adds an affector to this particle system. More...

ParticleAffectorgetAffector (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...

BillboardcreateBillboard (const Vector3 &position, const ColourValue &colour=ColourValue::White)
 Creates a new billboard and adds it to this set. More...

BillboardcreateBillboard (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 BillboardgetBillboard (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 StringgetMaterialName (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 AxisAlignedBoxgetBoundingBox (void) const
 Overridden from MovableObject. More...

virtual void _updateRenderQueue (RenderQueue *queue)
 Overridden from MovableObject. More...

virtual MaterialgetMaterial (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...

ParamDictionarygetParamDictionary (void)
 Retrieves the parameter dictionary for this class. More...

const ParameterListgetParameters (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 SceneNodegetParentNode (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 UserDefinedObjectgetUserObject (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...

ParticleaddParticle (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...

MaterialmpMaterial
 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...

RealmpPositions
 The vertex position data for all billboards in this set. More...

RGBAmpColours
 The vertex colour data for all billboards in this set. More...

RealmpTexCoords
 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...

SceneNodemParentNode
 node to which this object is attached. More...

bool mVisible
 Is this object visible? More...

UserDefinedObjectmUserObject
 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...


Detailed Description

Class defining particle system based special effects.

Remarks:
Particle systems are special effects generators which are based on a number of moving points which are rendered perhaps using billboards (quads which always face the camera) to create the impression of things like like sparkles, smoke, blood spurts, dust etc.

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.


Member Typedef Documentation

typedef std::list<Billboard*> Ogre::BillboardSet::ActiveBillboardList [protected, inherited]
 

typedef std::vector<Billboard*> Ogre::BillboardSet::BillboardPool [protected, inherited]
 

typedef std::deque<Billboard*> Ogre::BillboardSet::FreeBillboardQueue [protected, inherited]
 

typedef std::vector<ParticleAffector*> Ogre::ParticleSystem::ParticleAffectorList [protected]
 

typedef std::vector<ParticleEmitter*> Ogre::ParticleSystem::ParticleEmitterList [protected]
 


Constructor & Destructor Documentation

Ogre::ParticleSystem::ParticleSystem  
 

Default constructor required for STL creation in manager.

Ogre::ParticleSystem::ParticleSystem const String   name
 

Creates a particle system with no emitters or affectors.

Remarks:
You should use the ParticleSystemManager to create particle systems rather than creating them directly.

Ogre::ParticleSystem::~ParticleSystem   [virtual]
 


Member Function Documentation

void Ogre::ParticleSystem::_applyMotion Real    timeElapsed [protected]
 

Updates existing particle based on their momentum.

void Ogre::ParticleSystem::_expire Real    timeElapsed [protected]
 

Internal method used to expire dead particles.

ParticleIterator Ogre::ParticleSystem::_getIterator void   
 

Returns an iterator for stepping through all particles in this system.

Remarks:
This method is designed to be used by people providing new ParticleAffector subclasses, this is the easiest way to step through all the particles in a system and apply the changes the affector wants to make.

void Ogre::MovableObject::_notifyAttached SceneNode   parent [virtual, inherited]
 

Internal method called to notify the object that it has been attached to a node.

Reimplemented in Ogre::SimpleRenderable.

void Ogre::BillboardSet::_notifyBillboardResized void    [virtual, inherited]
 

Internal callback used by Billboards to notify their parent that they have been resized.

void Ogre::BillboardSet::_notifyCurrentCamera Camera   cam [virtual, inherited]
 

Overridden from MovableObject.

See also:
MovableObject

Implements Ogre::MovableObject.

void Ogre::ParticleSystem::_triggerAffectors Real    timeElapsed [protected]
 

Applies the effects of affectors.

void Ogre::ParticleSystem::_triggerEmitters Real    timeElapsed [protected]
 

Spawn new particles based on free quota and emitter requirements.

void Ogre::ParticleSystem::_update Real    timeElapsed
 

Updates the particles in the system based on time elapsed.

Remarks:
This is called automatically every frame by OGRE.
Parameters:
timeElapsed  The amount of time, in seconds, since the last frame.

void Ogre::ParticleSystem::_updateBounds void    [virtual]
 

Overridden from BillboardSet.

Reimplemented from Ogre::BillboardSet.

void Ogre::BillboardSet::_updateRenderQueue RenderQueue   queue [virtual, inherited]
 

Overridden from MovableObject.

See also:
MovableObject

Implements Ogre::MovableObject.

ParticleAffector * Ogre::ParticleSystem::addAffector const String   affectorType
 

Adds an affector to this particle system.

Remarks:
Particles are modified over time in a particle system by affectors - see the ParticleAffector class for more details.
Parameters:
affectorType  String identifying the affector type to create. Affector types are defined by registering new factories with the manager - see ParticleAffectorFactory for more details. Affector types can be extended by OGRE, plugin authors or application developers.

ParticleEmitter * Ogre::ParticleSystem::addEmitter const String   emitterType
 

Adds an emitter to this particle system.

Remarks:
Particles are created in a particle system by emitters - see the ParticleEmitter class for more details.
Parameters:
emitterType  String identifying the emitter type to create. Emitter types are defined by registering new factories with the manager - see ParticleEmitterFactory for more details. Emitter types can be extended by OGRE, plugin authors or application developers.

Particle * Ogre::ParticleSystem::addParticle void    [protected]
 

Internal method for adding a new active particle.

bool Ogre::BillboardSet::billboardVisible Camera   cam,
ActiveBillboardList::iterator    bill
[inline, protected, inherited]
 

Internal method for culling individual billboards.

void Ogre::BillboardSet::clear   [virtual, inherited]
 

Empties this set of all billboards.

virtual void Ogre::StringInterface::copyParametersTo StringInterface   dest [inline, virtual, inherited]
 

Method for copying this object's parameters to another object.

Remarks:
This method takes the values of all the object's parameters and tries to set the same values on the destination object. This provides a completely type independent way to copy parameters to other objects. Note that because of the String manipulation involved, this should not be regarded as an efficient process and should be saved for times outside of the rendering loop.

Any unrecognised parameters will be ignored as with setParameter method.

Parameters:
dest  Pointer to object to have it's parameters set the same as this object.

Billboard * Ogre::BillboardSet::createBillboard Real    x,
Real    y,
Real    z,
const ColourValue   colour = ColourValue::White
[inherited]
 

Creates a new billboard and adds it to this set.

Remarks:
Behaviour once the billboard pool has been exhausted depends on the BillboardSet::setAutoextendPool option.
Parameters:
x 
y 
z  The position of the new billboard realtive to the certer of the set
colour  Optional base colour of the billboard.
Returns:
On success, a pointer to a newly created Billboard is returned.

On failiure (i.e. no more space and can't autoextend), NULL is returned.

See also:
BillboardSet::setAutoextend

Billboard * Ogre::BillboardSet::createBillboard const Vector3   position,
const ColourValue   colour = ColourValue::White
[inherited]
 

Creates a new billboard and adds it to this set.

Remarks:
Behaviour once the billboard pool has been exhausted depends on the BillboardSet::setAutoextendPool option.
Parameters:
position  The position of the new billboard realtive to the certer of the set
colour  Optional base colour of the billboard.
Returns:
On success, a pointer to a newly created Billboard is returned.

On failiure (i.e. no more space and can't autoextend), NULL is returned.

See also:
BillboardSet::setAutoextend

bool Ogre::StringInterface::createParamDictionary const String   className [inline, protected, inherited]
 

Internal method for creating a parameter dictionary for the class, if it does not already exist.

Remarks:
This method will check to see if a parameter dictionary exist for this class yet, and if not will create one. NB you must supply the name of the class (RTTI is not used or performance).
Parameters:
className  the name of the class using the dictionary
Returns:
true if a new dictionary was created, false if it was already there

void Ogre::ParticleSystem::fastForward Real    time,
Real    interval = 0.1
 

Fast-forwards this system by the required number of seconds.

Remarks:
This method allows you to fast-forward a system so that it effectively looks like it has already been running for the time you specify. This is useful to avoid the 'startup sequence' of a system, when you want the system to be fully populated right from the start.
Parameters:
time  The number of seconds to fast-forward by.
interval  The sampling interval used to generate particles, apply affectors etc. The lower this is the more realistic the fast-forward, but it takes more iterations to do it.

void Ogre::ParticleSystem::genBillboardAxes Camera   cam,
Vector3   pX,
Vector3   pY,
const Billboard   pBill = 0
[protected, virtual]
 

Overidden from BillboardSet.

See also:
BillboardSet

Reimplemented from Ogre::BillboardSet.

void Ogre::BillboardSet::genVertices Real **    pPos,
RGBA **    pCol,
const Vector3   offsets,
const Billboard   pBillboard
[inline, protected, inherited]
 

Internal method for generating vertex data.

Parameters:
pPos  Pointer to pointer to vertex positions, will be updated
pCol  Pointer to pointer to vertex colours, will be updated
offsets  Array of 4 Vector3 offsets
pBillboard  Pointer to billboard
Returns:
new vertex index

void Ogre::BillboardSet::genVertOffsets Real    inleft,
Real    inright,
Real    intop,
Real    inbottom,
Real    width,
Real    height,
const Vector3   x,
const Vector3   y,
Vector3   pDestVec
[inline, protected, inherited]
 

Internal method generates vertex offsets.

Remarks:
Takes in parametric offsets as generated from getParametericOffsets, width and height values and billboard x and y axes as generated from genBillboardAxes. Fills output array of 4 vectors with vector offsets from origin for left-top, right-top, left-bottom, right-bottom corners.

ParticleAffector * Ogre::ParticleSystem::getAffector unsigned short    index const
 

Retrieves an affector by it's index (zero-based).

Remarks:
Used to retrieve a pointer to an affector for a particle system to procedurally change affector parameters etc. You should check how many affectors are registered against this system before calling this method with an arbitrary index using getNumAffectors.
Parameters:
index  Zero-based index of the affector to retrieve.

bool Ogre::BillboardSet::getAutoextend void    const [virtual, inherited]
 

Returns true if the billboard pool automatically extends.

See also:
BillboardSet::setAutoextend

Billboard * Ogre::BillboardSet::getBillboard unsigned int    index const [virtual, inherited]
 

Returns a pointer to the billboard at the supplied index.

Note:
This method requires linear time since the billboard list is a linked list.
Parameters:
index  The index of the billboard that is requested.
Returns:
On success, a valid pointer to the requested billboard is returned.

On failiure, NULL is returned.

BillboardOrigin Ogre::BillboardSet::getBillboardOrigin void    const [virtual, inherited]
 

Gets the point which acts as the origin point for all billboards in this set.

Returns:
A member of the BillboardOrigin enum specifying the origin for all the billboards in this set.

BillboardType Ogre::BillboardSet::getBillboardType void    [virtual, inherited]
 

Returns the billboard type in use.

const AxisAlignedBox & Ogre::BillboardSet::getBoundingBox void    const [virtual, inherited]
 

Overridden from MovableObject.

See also:
MovableObject

Implements Ogre::MovableObject.

Vector3 Ogre::BillboardSet::getCommonDirection void    [virtual, inherited]
 

Gets the common direction for all billboards (BBT_ORIENTED_COMMON).

bool Ogre::BillboardSet::getCullIndividually void    [virtual, inherited]
 

Returns whether or not billbards in this are tested individually for culling.

Real Ogre::BillboardSet::getDefaultHeight void    [virtual, inherited]
 

See setDefaultDimensions - this gets 1 component individually.

Real Ogre::BillboardSet::getDefaultWidth void    [virtual, inherited]
 

See setDefaultDimensions - this gets 1 component individually.

ParticleEmitter * Ogre::ParticleSystem::getEmitter unsigned short    index const
 

Retrieves an emitter by it's index (zero-based).

Remarks:
Used to retrieve a pointer to an emitter for a particle system to procedurally change emission parameters etc. You should check how many emitters are registered against this system before calling this method with an arbitrary index using getNumEmitters.
Parameters:
index  Zero-based index of the emitter to retrieve.

Material * Ogre::BillboardSet::getMaterial void    const [virtual, inherited]
 

Overridden from MovableObject.

See also:
MovableObject

Implements Ogre::Renderable.

const String & Ogre::BillboardSet::getMaterialName void    const [virtual, inherited]
 

Sets the name of the material to be used for this billboard set.

Returns:
The name of the material that is used for this set.

const String Ogre::BillboardSet::getMovableType void    const [virtual, inherited]
 

Overridden from MovableObject.

Implements Ogre::MovableObject.

const String & Ogre::ParticleSystem::getName void    const [virtual]
 

Gets the name of this particle system.

Reimplemented from Ogre::BillboardSet.

unsigned short Ogre::ParticleSystem::getNumAffectors void    const
 

Returns the number of affectors for this particle system.

int Ogre::BillboardSet::getNumBillboards void    const [virtual, inherited]
 

Returns the number of active billboards which currently make up this set.

unsigned short Ogre::ParticleSystem::getNumEmitters void    const
 

Returns the number of emitters for this particle system.

unsigned int Ogre::ParticleSystem::getNumParticles void    const
 

Gets the number of individual particles in the system right now.

Remarks:
The number of particles active in a system at a point in time depends on the number of emitters, their emission rates, the time-to-live (TTL) each particle is given on emission (and whether any affectors modify that TTL) and the maximum number of particles allowed in this system at once (particle quota).

virtual unsigned short Ogre::Renderable::getNumWorldTransforms void    [inline, virtual, inherited]
 

Returns the number of world transform matrices this renderable requires.

Remarks:
When a renderable uses vertex blending, it uses multiple world matrices instead of a single one. Each vertex sent to the pipeline can reference one or more matrices in this list with given weights. If a renderable does not use vertex blending this method returns 1, which is the default for simplicity.

Reimplemented in Ogre::SubEntity.

ParamDictionary* Ogre::StringInterface::getParamDictionary void    [inline, inherited]
 

Retrieves the parameter dictionary for this class.

Remarks:
Only valid to call this after createParamDictionary.
Returns:
Pointer to ParamDictionary shared by all instances of this class which you can add parameters to, retrieve parameters etc.

virtual String Ogre::StringInterface::getParameter const String   name [inline, virtual, inherited]
 

Generic parameter retrieval method.

Remarks:
Call this method with the name of a parameter to retrieve a string-format value of the parameter in question. If in doubt, check the parameter definition in the list returned from getParameters for the type of this parameter. If you like you can use StringConverter to convert this string back into a native type.
Parameters:
name  The name of the parameter to get
Returns:
String value of parameter, blank if not found

const ParameterList& Ogre::StringInterface::getParameters void    [inline, inherited]
 

Retrieves a list of parameters valid for this object.

Returns:
A reference to a static list of ParameterDef objects.

void Ogre::BillboardSet::getParametricOffsets Real   left,
Real   right,
Real   top,
Real   bottom
[inline, protected, inherited]
 

Internal method, generates parametric offsets based on origin.

SceneNode * Ogre::MovableObject::getParentNode void    [virtual, inherited]
 

Returns the node to which this object is attached.

Remarks:
An object is not visible in the scene unless attached to a SceneNode.

Attaching an object is done via the SceneNode::attachObject method.

Reimplemented in Ogre::SimpleRenderable.

unsigned int Ogre::ParticleSystem::getParticleQuota void    const
 

Returns the maximum number of particles this system is allowed to have active at once.

Remarks:
See ParticleSystem::setParticleQuota for more info.

unsigned int Ogre::BillboardSet::getPoolSize void    const [virtual, inherited]
 

Returns the current size of the billboard pool.

Returns:
The current size of the billboard pool.
See also:
BillboardSet::setAutoextend

virtual SceneDetailLevel Ogre::Renderable::getRenderDetail   [inline, virtual, inherited]
 

Returns the preferred rasterisation mode of this renderable.

Reimplemented in Ogre::SubEntity.

void Ogre::BillboardSet::getRenderOperation RenderOperation   rend [virtual, inherited]
 

Overridden from MovableObject.

See also:
MovableObject

Implements Ogre::Renderable.

RenderQueueGroupID Ogre::MovableObject::getRenderQueueGroup void    [virtual, inherited]
 

Gets the queue group for this entity, see setRenderQueueGroup for full details.

Real Ogre::BillboardSet::getSquaredViewDepth const Camera   cam const [virtual, inherited]
 

Overridden, see Renderable.

Implements Ogre::Renderable.

virtual UserDefinedObject* Ogre::MovableObject::getUserObject void    [inline, virtual, inherited]
 

Retrieves a pointer to a custom application object associated with this movable by an earlier call to setUserObject.

void Ogre::ParticleSystem::getWorldTransforms Matrix4   xform [virtual]
 

Overridden from MovableObject.

See also:
MovableObject

Reimplemented from Ogre::BillboardSet.

void Ogre::ParticleSystem::increasePool unsigned int    size [protected, virtual]
 

Overridden from BillboardSet to create Particle instead of Billboard.

Reimplemented from Ogre::BillboardSet.

void Ogre::ParticleSystem::initParameters void    [protected]
 

Internal method for initialising string interface.

bool Ogre::MovableObject::isAttached void    const [virtual, inherited]
 

Returns true if this object is attached to a SceneNode.

bool Ogre::MovableObject::isVisible void    const [virtual, inherited]
 

Returns whether or not this object is supposed to be visible or not.

ParticleSystem & Ogre::ParticleSystem::operator= const ParticleSystem &    rhs
 

Assignment operator for copying.

Remarks:
This operator deep copies all particle emitters and effectors, but not particles. The system's name is also not copied.

void Ogre::ParticleSystem::removeAffector unsigned short    index
 

Removes an affector from the system.

Remarks:
Drops the affector with the index specified from this system. You should check how many affectors are registered against this system before calling this method with an arbitrary index using getNumAffectors.
Parameters:
index  Zero-based index of the affector to retrieve.

void Ogre::ParticleSystem::removeAllAffectors void   
 

Removes all the affectors from this system.

void Ogre::ParticleSystem::removeAllEmitters void   
 

Removes all the emitters from this system.

void Ogre::BillboardSet::removeBillboard Billboard   pBill [virtual, inherited]
 

Removes a billboard from the set.

Note:
This version is more efficient than removing by index.

void Ogre::BillboardSet::removeBillboard unsigned int    index [virtual, inherited]
 

Removes the billboard at the supplied index.

Note:
This method requires linear time since the billboard list is a linked list.

void Ogre::ParticleSystem::removeEmitter unsigned short    index
 

Removes an emitter from the system.

Remarks:
Drops the emitter with the index specified from this system. You should check how many emitters are registered against this system before calling this method with an arbitrary index using getNumEmitters.
Parameters:
index  Zero-based index of the emitter to retrieve.

void Ogre::BillboardSet::setAutoextend bool    autoextend [virtual, inherited]
 

Tells the set whether to allow automatic extension of the pool of billboards.

Remarks:
A BillboardSet stores a pool of pre-constructed billboards which are used as needed when a new billboard is requested. This allows applications to create / remove billboards efficiently without incurring construction / destruction costs (a must for sets with lots of billboards like particle effects). This method allows you to configure the behaviour when a new billboard is requested but the billboard pool has been exhausted.

The default behaviour is to allow the pool to extend (typically this allocates double the current pool of billboards when the pool is expended), equivalent to calling this method with autoExtend = true. If you set the parameter to false however, any attempt to create a new billboard when the pool has expired will simply fail silently, returning a null pointer.

Parameters:
autoextend  true to double the pool every time it runs out, false to fail silently.

void Ogre::BillboardSet::setBillboardOrigin BillboardOrigin    origin [virtual, inherited]
 

Sets the point which acts as the origin point for all billboards in this set.

Remarks:
This setting controls the fine tuning of where a billboard appears in relation to it's position. It could be that a billboard's position represents it's center (e.g. for fireballs), it could mean the center of the bottom edge (e.g. a tree which is positioned on the ground), the top-left corner (e.g. a cursor).

The default setting is BBO_CENTER.

Parameters:
origin  A member of the BillboardOrigin enum specifying the origin for all the billboards in this set.

void Ogre::BillboardSet::setBillboardType BillboardType    bbt [virtual, inherited]
 

Sets the type of billboard to render.

Remarks:
The default sort of billboard (BBT_POINT), always has both x and y axes parallel to the camera's local axes. This is fine for 'point' style billboards (e.g. flares, smoke, anything which is symmetrical about a central point) but does not look good for billboards which have an orientation (e.g. an elongated raindrop). In this case, the oriented billboards are more suitable (BBT_ORIENTED_COMMON or BBT_ORIENTED_SELF) since they retain an independant Y axis and only the X axis is generated, perpendicular to both the local Y and the camera Z.
Parameters:
bbt  The type of billboard to render

void Ogre::BillboardSet::setCommonDirection const Vector3   vec [virtual, inherited]
 

Use this to specify the common direction given to billboards of type BBT_ORIENTED_COMMON.

Remarks:
Use BBT_ORIENTED_COMMON when you want oriented billboards but you know they are always going to be oriented the same way (e.g. rain in calm weather). It is faster for the system to calculate the billboard vertices if they have a common direction.
Parameters:
vec  The direction for all billboards.

void Ogre::BillboardSet::setCullIndividually bool    cullIndividual [virtual, inherited]
 

Sets whether culling tests billboards in this individually as well as in a group.

Remarks:
Billboard sets are always culled as a whole group, based on a bounding box which encloses all billboards in the set. For fairly localised sets, this is enough. However, you can optionally tell the set to also cull individual billboards in the set, i.e. to test each individual billboard before rendering. The default is not to do this.

This is useful when you have a large, fairly distributed set of billboards, like maybe trees on a landscape. You probably still want to group them into more than one set (maybe one set per section of landscape), which will be culled coarsely, but you also want to cull the billboards individually because they are spread out. Whilst you could have lots of single-tree sets which are culled separately, this would be inefficient to render because each tree would be issued as it's own rendering operation.

By calling this method with a parameter of true, you can have large billboard sets which are spaced out and so get the benefit of batch rendering and coarse culling, but also have fine-grained culling so unnecessary rendering is avoided.

Parameters:
cullIndividual  If true, each billboard is tested before being sent to the pipeline as well as the whole set having to pass the coarse group bounding test.

void Ogre::BillboardSet::setDefaultDimensions Real    width,
Real    height
[virtual, inherited]
 

Sets the default dimensions of the billboards in this set.

Remarks:
All billboards in a set are created with these default dimensions. The set will render most efficiently if all the billboards in the set are the default size. It is possible to alter the size of individual billboards at the expense of extra calculation. See the Billboard class for more info.
Parameters:
width  The new default width for the billboards in this set.
height  The new default height for the billboards in this set.

void Ogre::BillboardSet::setDefaultHeight Real    height [virtual, inherited]
 

See setDefaultDimensions - this sets 1 component individually.

void Ogre::BillboardSet::setDefaultWidth Real    width [virtual, inherited]
 

See setDefaultDimensions - this sets 1 component individually.

void Ogre::BillboardSet::setMaterialName const String   name [virtual, inherited]
 

Sets the name of the material to be used for this billboard set.

Parameters:
name  The new name of the material to use for this set.

bool Ogre::StringInterface::setParameter const String   name,
const String   value
[virtual, inherited]
 

Generic parameter setting method.

Remarks:
Call this method with the name of a parameter and a string version of the value to set. The implementor will convert the string to a native type internally. If in doubt, check the parameter definition in the list returned from StringInterface::getParameters.
Parameters:
name  The name of the parameter to set
value  String value. Must be in the right format for the type specified in the parameter definition. See the StringConverter class for more information.
Returns:
true if set was successful, false otherwise (NB no exceptions thrown - tolerant method)

void Ogre::ParticleSystem::setParticleQuota unsigned int    quota
 

Sets the maximum number of particles this system is allowed to have active at once.

Remarks:
Particle systems all have a particle quota, i.e. a maximum number of particles they are allowed to have active at a time. This allows the application to set a keep particle systems under control should they be affected by complex parameters which alter their emission rates etc. If a particle system reaches it's particle quota, none of the emitters will be able to emit any more particles. As existing particles die, the spare capacity will be allocated equally across all emitters to be as consistent to the origina particle system style as possible.
Parameters:
quota  The maximum number of particles this system is allowed to have.

void Ogre::BillboardSet::setPoolSize unsigned int    size [virtual, inherited]
 

Adjusts the size of the pool of billboards available in this set.

Remarks:
See the BillboardSet::setAutoextend method for full details of the billboard pool. This method adjusts the preallocated size of the pool. If you try to reduce the size of the pool, the set has the option of ignoring you if too many billboards are already in use. Bear in mind that calling this method will incur significant construction / destruction calls so should be avoided in time-critical code. The same goes for auto-extension, try to avoid it by estimating the pool size correctly up-front.
Parameters:
size  The new size for the pool.

void Ogre::MovableObject::setRenderQueueGroup RenderQueueGroupID    queueID [virtual, inherited]
 

Sets the render queue group this entity will be rendered through.

Remarks:
Render queues are grouped to allow you to more tightly control the ordering of rendered objects. If you do not call this method, all Entity objects default to RENDER_QUEUE_MAIN which is fine for most objects. You may want to alter this if you want this entity to always appear in front of other objects, e.g. for a 3D menu system or such.

See RenderQueue for more details.

Parameters:
queueID  Enumerated value of the queue group to use.

virtual void Ogre::MovableObject::setUserObject UserDefinedObject   obj [inline, virtual, inherited]
 

Call this to associate your own custom user object instance with this MovableObject.

Remarks:
By simply making your game / application object a subclass of UserDefinedObject, you can establish a link between an OGRE instance of MovableObject and your own application classes. Call this method to establish the link.

void Ogre::MovableObject::setVisible bool    visible [virtual, inherited]
 

Tells this object whether to be visible or not, if it has a renderable component.

Reimplemented in Ogre::Light.

virtual bool Ogre::Renderable::useIdentityProjection void    [inline, virtual, inherited]
 

Returns whether or not to use an 'identity' projection.

Remarks:
Usually Renderable objects will use a projection matrix as determined by the active camera. However, if they want they can cancel this out and use an identity projection, which effectively projects in 2D using a {-1, 1} view space. Useful for overlay rendering. Normal renderables need not override this.

Reimplemented in Ogre::GuiElement.

virtual bool Ogre::Renderable::useIdentityView void    [inline, virtual, inherited]
 

Returns whether or not to use an 'identity' projection.

Remarks:
Usually Renderable objects will use a view matrix as determined by the active camera. However, if they want they can cancel this out and use an identity matrix, which means all geometry is assumed to be relative to camera space already. Useful for overlay rendering. Normal renderables need not override this.

Reimplemented in Ogre::GuiElement.


Member Data Documentation

AxisAlignedBox Ogre::BillboardSet::mAABB [protected, inherited]
 

Bounds of all billboards in this set.

ActiveBillboardList Ogre::BillboardSet::mActiveBillboards [protected, inherited]
 

Active billboard list.

Remarks:
This is a linked list of pointers to billboards in the billboard pool.

This allows very fast instertions and deletions from anywhere in the list to activate / deactivate billboards (required for particle systems etc) as well as resuse of Billboard instances in the pool without construction & destruction which avoids memory thrashing.

ParticleAffectorList Ogre::ParticleSystem::mAffectors [protected]
 

List of particle affectors, ie modifiers of particles.

bool Ogre::BillboardSet::mAllDefaultSize [protected, inherited]
 

True if no billboards in this set have been resized - greater efficiency.

bool Ogre::BillboardSet::mAutoExtendPool [protected, inherited]
 

Flag indicating whether to autoextend pool.

BillboardPool Ogre::BillboardSet::mBillboardPool [protected, inherited]
 

Pool of billboard instances for use and reuse in the active billboard list.

Remarks:
This vector will be preallocated with the estimated size of the set,and will extend as required.

BillboardType Ogre::BillboardSet::mBillboardType [protected, inherited]
 

The type of billboard to render.

Vector3 Ogre::BillboardSet::mCommonDirection [protected, inherited]
 

Common direction for billboards of type BBT_ORIENTED_COMMON.

bool Ogre::BillboardSet::mCullIndividual [protected, inherited]
 

Flag indicating whether each billboard should be culled separately (default: false).

Real Ogre::BillboardSet::mDefaultHeight [protected, inherited]
 

Default height of each billboard.

Real Ogre::BillboardSet::mDefaultWidth [protected, inherited]
 

Default width of each billboard.

ParticleEmitterList Ogre::ParticleSystem::mEmitters [protected]
 

List of particle emitters, ie sources of particles.

FreeBillboardQueue Ogre::BillboardSet::mFreeBillboards [protected, inherited]
 

Free billboard queue.

Remarks:
This contains a list of the billboards free for use as new instances as required by the set. Billboard instances are preconstructed up to the estimated size in the mBillboardPool vector and are referenced on this deque at startup. As they get used this deque reduces, as they get released back to to the set they get added back to the deque.

String Ogre::BillboardSet::mMaterialName [protected, inherited]
 

Name of the material to use.

String Ogre::ParticleSystem::mName [protected]
 

Name of the particle system instance.

Reimplemented from Ogre::BillboardSet.

unsigned short Ogre::BillboardSet::mNumVisibleBillboards [protected, inherited]
 

BillboardOrigin Ogre::BillboardSet::mOriginType [protected, inherited]
 

Origin of each billboard.

String Ogre::StringInterface::mParamDictName [protected, inherited]
 

Class name for this instance to be used as a lookup (must be initialised by subclasses).

SceneNode* Ogre::MovableObject::mParentNode [protected, inherited]
 

node to which this object is attached.

RGBA* Ogre::BillboardSet::mpColours [protected, inherited]
 

The vertex colour data for all billboards in this set.

unsigned short* Ogre::BillboardSet::mpIndexes [protected, inherited]
 

The vertex index data for all billboards in this set (1 set only).

Material* Ogre::BillboardSet::mpMaterial [protected, inherited]
 

Pointer to the material to use.

Real* Ogre::BillboardSet::mpPositions [protected, inherited]
 

The vertex position data for all billboards in this set.

Real* Ogre::BillboardSet::mpTexCoords [protected, inherited]
 

The texture coordinates for all billboards in this set.

RenderQueueGroupID Ogre::MovableObject::mRenderQueueID [protected, inherited]
 

The render queue to use when rendering this object.

ParticleSystem::CmdBillboardType Ogre::ParticleSystem::msBillboardTypeCmd [static, protected]
 

ParticleSystem::CmdCommonDirection Ogre::ParticleSystem::msCommonDirectionCmd [static, protected]
 

ParticleSystem::CmdCull Ogre::ParticleSystem::msCullCmd [static, protected]
 

Command objects.

ParamDictionaryMap Ogre::StringInterface::msDictionary [static, protected, inherited]
 

Dictionary of parameters.

ParticleSystem::CmdHeight Ogre::ParticleSystem::msHeightCmd [static, protected]
 

ParticleSystem::CmdMaterial Ogre::ParticleSystem::msMaterialCmd [static, protected]
 

String Ogre::BillboardSet::msMovableType = "BillboardSet" [static, protected, inherited]
 

Shared class-level name for Movable type.

ParticleSystem::CmdQuota Ogre::ParticleSystem::msQuotaCmd [static, protected]
 

ParticleSystem::CmdWidth Ogre::ParticleSystem::msWidthCmd [static, protected]
 

UserDefinedObject* Ogre::MovableObject::mUserObject [protected, inherited]
 

User defined object which is linked to this object.

bool Ogre::MovableObject::mVisible [protected, inherited]
 

Is this object visible?

Copyright © 2002 by The OGRE Team