Particle Universe  1.2
ParticleUniverse::ParticleSystem Class Reference

#include <ParticleUniverseSystem.h>

Inheritance diagram for ParticleUniverse::ParticleSystem:

Public Types

enum  ParticleSystemState { PSS_PREPARED, PSS_STARTED, PSS_STOPPED, PSS_PAUSED }
 
typedef vector< RealLodDistanceList
 
typedef LodDistanceList::iterator LodDistanceIterator
 
typedef LodDistanceList::const_iterator LodDistanceConstIterator
 
typedef vector< ParticleTechnique * > ParticleTechniqueList
 
typedef ParticleTechniqueList::iterator ParticleTechniqueIterator
 
typedef ParticleTechniqueList::const_iterator ParticleTechniqueConstIterator
 
typedef vector< ParticleSystemListener * >::iterator ParticleSystemListenerIterator
 
typedef vector< ParticleSystemListener * > ParticleSystemListenerList
 
- Public Types inherited from Ogre::MovableObject
typedef vector< ShadowRenderable * >::type ShadowRenderableList
 
typedef VectorIterator< ShadowRenderableListShadowRenderableListIterator
 
- Public Types inherited from Ogre::ShadowCaster
typedef vector< ShadowRenderable * >::type ShadowRenderableList
 
typedef VectorIterator< ShadowRenderableListShadowRenderableListIterator
 
- Public Types inherited from ParticleUniverse::Particle
enum  ParticleType {
  PT_VISUAL, PT_TECHNIQUE, PT_EMITTER, PT_AFFECTOR,
  PT_SYSTEM
}
 
enum  ReservedParticleEventFlags { PEF_EXPIRED = 1<<0, PEF_EMITTED = 1<<1, PEF_COLLIDED = 1<<2 }
 
typedef vector< ParticleBehaviour * > ParticleBehaviourList
 
typedef ParticleBehaviourList::const_iterator ParticleBehaviourIterator
 

Public Member Functions

 ParticleSystem (const String &name)
 
 ParticleSystem (const String &name, const String &resourceGroupName)
 
virtual ~ParticleSystem (void)
 
virtual const Vector3getDerivedPosition (void)
 
virtual const QuaterniongetDerivedOrientation (void) const
 
const QuaterniongetLatestOrientation (void) const
 
bool hasRotatedBetweenUpdates (void) const
 
void rotationOffset (Vector3 &pos)
 
bool isSmoothLod (void) const
 
void setSmoothLod (bool smoothLod)
 
Real getTimeElapsedSinceStart (void) const
 
ParticleSystemoperator= (const ParticleSystem &ps)
 
const StringgetResourceGroupName (void) const
 
void setResourceGroupName (const String &resourceGroupName)
 
ParticleTechniquecreateTechnique (void)
 
void addTechnique (ParticleTechnique *technique)
 
void removeTechnique (ParticleTechnique *technique)
 
ParticleTechniquegetTechnique (size_t index) const
 
ParticleTechniquegetTechnique (const String &name) const
 
size_t getNumTechniques (void) const
 
void destroyTechnique (ParticleTechnique *particleTechnique)
 
void destroyTechnique (size_t index)
 
void destroyAllTechniques (void)
 
void _notifyAttached (Ogre::Node *parent, bool isTagPoint=false)
 
virtual void _notifyCurrentCamera (Camera *cam)
 
const StringgetMovableType (void) const
 
const AxisAlignedBoxgetBoundingBox (void) const
 
virtual Real getBoundingRadius (void) const
 
virtual void _updateRenderQueue (Ogre::RenderQueue *queue)
 
virtual void setRenderQueueGroup (uint8 queueId)
 
void _update (Real timeElapsed)
 
size_t _updateTechniques (Real timeElapsed)
 
const Real getNonVisibleUpdateTimeout (void) const
 
void setNonVisibleUpdateTimeout (Real timeout)
 
void prepare (void)
 
void start (void)
 
void start (Real stopTime)
 
void startAndStopFade (Real stopTime)
 
void stop (void)
 
void stop (Real stopTime)
 
void stopFade (void)
 
bool isStopFade (void)
 
void stopFade (Real stopTime)
 
void pause (void)
 
void pause (Real pauseTime)
 
void resume (void)
 
ParticleSystemState getState (void) const
 
const Real getFastForwardTime (void) const
 
const Real getFastForwardInterval (void) const
 
void setFastForward (Real time, Real interval)
 
const StringgetMainCameraName (void) const
 
CameragetMainCamera (void)
 
bool hasMainCamera (void)
 
void setMainCameraName (String cameraName)
 
void setMainCamera (Camera *camera)
 
CameragetCurrentCamera (void)
 
void fastForward (void)
 
bool isParentIsTagPoint (void)
 
const LodDistanceListgetLodDistances (void) const
 
void clearLodDistances (void)
 
void addLodDistance (Real distance)
 
void setLodDistances (const LodDistanceList &lodDistances)
 
size_t getNumEmittedTechniques (void) const
 
void _markForEmission (void)
 
void _resetMarkForEmission (void)
 
void suppressNotifyEmissionChange (bool suppress)
 
void _notifyEmissionChange (void)
 
const Real getIterationInterval (void) const
 
void setIterationInterval (const Real iterationInterval)
 
const Real getFixedTimeout (void) const
 
void setFixedTimeout (const Real fixedTimeout)
 
void setBoundsAutoUpdated (bool autoUpdate, Real stopIn=0.0f)
 
void _resetBounds (void)
 
const Vector3getScale (void) const
 
void setScale (const Vector3 &scale)
 
void _notifyRescaled (void)
 
const RealgetScaleVelocity (void) const
 
void setScaleVelocity (const Real &scaleVelocity)
 
void _notifyVelocityRescaled (void)
 
const RealgetScaleTime (void) const
 
void setScaleTime (const Real &scaleTime)
 
virtual void _initForEmission (void)
 
virtual void _initForExpiration (ParticleTechnique *technique, Real timeElapsed)
 
virtual void _process (ParticleTechnique *technique, Real timeElapsed)
 
bool isKeepLocal (void) const
 
void setKeepLocal (bool keepLocal)
 
bool makeParticleLocal (Particle *particle)
 
bool hasTightBoundingBox (void) const
 
void setTightBoundingBox (bool tightBoundingBox)
 
void addParticleSystemListener (ParticleSystemListener *particleSystemListener)
 
void removeParticleSystemListener (ParticleSystemListener *particleSystemListener)
 
void pushEvent (ParticleUniverseEvent &particleUniverseEvent)
 
virtual void visitRenderables (Ogre::Renderable::Visitor *visitor, bool debugRenderables=false)
 
Real getPauseTime (void) const
 
void setPauseTime (Real pauseTime)
 
const StringgetTemplateName (void) const
 
void setTemplateName (const String &templateName)
 
virtual void setEnabled (bool enabled)
 
Ogre::SceneManagergetSceneManager (void)
 
void setSceneManager (Ogre::SceneManager *sceneManager)
 
void setUseController (bool useController)
 
bool hasExternType (const String &externType) const
 
size_t getNumberOfEmittedParticles (void)
 
size_t getNumberOfEmittedParticles (Particle::ParticleType particleType)
 
const StringgetCategory (void) const
 
void setCategory (const String &category)
 
- Public Member Functions inherited from Ogre::MovableObject
 MovableObject ()
 
 MovableObject (const String &name)
 
virtual ~MovableObject ()
 
MovableObjectFactory_getCreator (void) const
 
LightList_getLightList ()
 
SceneManager_getManager (void) const
 
virtual const Matrix4_getParentNodeFullTransform (void) const
 
virtual void _notifyCreator (MovableObjectFactory *fact)
 
virtual void _notifyManager (SceneManager *man)
 
virtual void _notifyMoved (void)
 
virtual void _releaseManualHardwareResources ()
 
virtual void _restoreManualHardwareResources ()
 
void addQueryFlags (uint32 flags)
 
void addVisibilityFlags (uint32 flags)
 
virtual AnimableValuePtr createAnimableValue (const String &valueName)
 
void detachFromParent (void)
 
const StringVectorgetAnimableValueNames (void) const
 
bool getCastShadows (void) const
 
const AxisAlignedBoxgetDarkCapBounds (const Light &light, Real dirLightExtrusionDist) const
 
EdgeDatagetEdgeList (void)
 
const AxisAlignedBoxgetLightCapBounds (void) const
 
uint32 getLightMask () const
 
ListenergetListener (void) const
 
const StringgetName (void) const
 
NodegetParentNode (void) const
 
SceneNodegetParentSceneNode (void) const
 
Real getPointExtrusionDistance (const Light *l) const
 
uint32 getQueryFlags (void) const
 
bool getReceivesShadows ()
 
Real getRenderingDistance (void) const
 
Real getRenderingMinPixelSize () const
 
uint8 getRenderQueueGroup (void) const
 
ShadowRenderableListIterator getShadowVolumeRenderableIterator (ShadowTechnique shadowTechnique, const Light *light, HardwareIndexBufferSharedPtr *indexBuffer, size_t *indexBufferUsedSize, bool extrudeVertices, Real extrusionDist, unsigned long flags=0)
 
virtual uint32 getTypeFlags (void) const
 
const AnygetUserAny (void) const
 
UserObjectBindingsgetUserObjectBindings ()
 
const UserObjectBindingsgetUserObjectBindings () const
 
uint32 getVisibilityFlags (void) const
 
bool getVisible (void) const
 
virtual const AxisAlignedBoxgetWorldBoundingBox (bool derive=false) const
 
virtual const SpheregetWorldBoundingSphere (bool derive=false) const
 
bool hasEdgeList (void)
 
bool isAttached (void) const
 
bool isDebugDisplayEnabled (void) const
 
virtual bool isInScene (void) const
 
bool isParentTagPoint () const
 
virtual bool isVisible (void) const
 
const LightListqueryLights (void) const
 
void removeQueryFlags (uint32 flags)
 
void removeVisibilityFlags (uint32 flags)
 
void setCastShadows (bool enabled)
 
void setDebugDisplayEnabled (bool enabled)
 
void setLightMask (uint32 lightMask)
 
void setListener (Listener *listener)
 
void setQueryFlags (uint32 flags)
 
void setRenderingDistance (Real dist)
 
void setRenderingMinPixelSize (Real pixelSize)
 
virtual void setRenderQueueGroupAndPriority (uint8 queueID, ushort priority)
 
void setUserAny (const Any &anything)
 
void setVisibilityFlags (uint32 flags)
 
void setVisible (bool visible)
 
- Public Member Functions inherited from Ogre::ShadowCaster
virtual ~ShadowCaster ()
 
- Public Member Functions inherited from Ogre::AnimableObject
 AnimableObject ()
 
virtual ~AnimableObject ()
 
const StringVectorgetAnimableValueNames (void) const
 
- Public Member Functions inherited from ParticleUniverse::Particle
 Particle (void)
 
virtual ~Particle (void)
 
bool _isMarkedForEmission (void) const
 
void _setMarkedForEmission (bool markedForEmission)
 
virtual bool isEnabled (void) const
 
void _setOriginalEnabled (bool originalEnabled)
 
bool _getOriginalEnabled (void) const
 
bool isFreezed (void) const
 
void setFreezed (bool freezed)
 
void setEventFlags (uint32 flags)
 
void addEventFlags (uint32 flags)
 
void removeEventFlags (uint32 flags)
 
uint32 getEventFlags (void) const
 
bool hasEventFlags (uint32 flags) const
 
void copyBehaviours (ParticleBehaviourList &behaviours)
 
ParticleBehaviourgetBehaviour (const String &behaviourType)
 
Real calculateVelocity (void) const
 
virtual void copyAttributesTo (Particle *particle)
 
- Public Member Functions inherited from ParticleUniverse::IElement
 IElement (void)
 
virtual ~IElement (void)
 

Static Public Attributes

static const bool DEFAULT_KEEP_LOCAL
 
static const Real DEFAULT_ITERATION_INTERVAL
 
static const Real DEFAULT_FIXED_TIMEOUT
 
static const Real DEFAULT_NON_VISIBLE_UPDATE_TIMEOUT
 
static const bool DEFAULT_SMOOTH_LOD
 
static const Real DEFAULT_FAST_FORWARD_TIME
 
static const char * DEFAULT_MAIN_CAMERA_NAME
 
static const Real DEFAULT_SCALE_VELOCITY
 
static const Real DEFAULT_SCALE_TIME
 
static const Vector3 DEFAULT_SCALE
 
static const bool DEFAULT_TIGHT_BOUNDINGBOX
 
- Static Public Attributes inherited from ParticleUniverse::Particle
static Real DEFAULT_TTL
 
static Real DEFAULT_MASS
 

Protected Member Functions

unsigned short _getLodIndex (Real distance) const
 
unsigned short _getLodIndexSquaredDistance (Real squaredDistance) const
 
void calulateRotationOffset (void)
 
void _pushSystemEvent (EventType eventType)
 

Protected Attributes

ParticleSystemState mState
 
AxisAlignedBox mAABB
 
Real mBoundingRadius
 
ParticleTechniqueList mTechniques
 
Controller< Real > * mTimeController
 
Real mTimeSinceLastVisible
 
unsigned long mLastVisibleFrame
 
Real mNonvisibleUpdateTimeout
 
bool mNonvisibleUpdateTimeoutSet
 
Real mTimeElapsedSinceStart
 
String mResourceGroupName
 
LodDistanceList mLodDistanceList
 
bool mSmoothLod
 
bool mSuppressNotifyEmissionChange
 
Real mIterationInterval
 
bool mIterationIntervalSet
 
Real mTimeSinceLastUpdate
 
Real mFixedTimeout
 
bool mFixedTimeoutSet
 
bool mBoundsAutoUpdate
 
Real mBoundsUpdateTime
 
Real mOriginalBoundsUpdateTime
 
bool mFastForwardSet
 
bool mOriginalFastForwardSet
 
Real mFastForwardTime
 
Real mFastForwardInterval
 
String mMainCameraName
 
bool mMainCameraNameSet
 
CameramCurrentCamera
 
Vector3 mParticleSystemScale
 
Real mParticleSystemScaleVelocity
 
Real mParticleSystemScaleTime
 
bool mKeepLocal
 
bool mTightBoundingBox
 
ParticleSystemListenerList mParticleSystemListenerList
 
Real mPauseTime
 
bool mPauseTimeSet
 
Real mPauseTimeElapsed
 
String mTemplateName
 
bool mStopFadeSet
 
Ogre::SceneManagermSceneManager
 
Quaternion mLatestOrientation
 
Quaternion mRotationOffset
 
Vector3 mRotationCentre
 
bool mUseController
 
bool mAtLeastOneParticleEmitted
 
unsigned short mLastLodIndex
 
String mCategory
 
- Protected Attributes inherited from ParticleUniverse::Particle
uint32 mEventFlags
 
bool mMarkedForEmission
 
bool mEnabled
 
bool mFreezed
 
bool mOriginalEnabled
 
bool mOriginalEnabledSet
 
Vector3 mDerivedPosition
 
ParticleBehaviourList mBehaviours
 

Additional Inherited Members

- Static Public Member Functions inherited from Ogre::MovableObject
static void clearShadowRenderableList (ShadowRenderableList &shadowRenderables)
 
static void extrudeVertices (const HardwareVertexBufferSharedPtr &vertexBuffer, size_t originalVertexCount, const Vector4 &lightPos, Real extrudeDist)
 
static uint32 getDefaultQueryFlags ()
 
static uint32 getDefaultVisibilityFlags ()
 
static void setDefaultQueryFlags (uint32 flags)
 
static void setDefaultVisibilityFlags (uint32 flags)
 
- Static Public Member Functions inherited from Ogre::ShadowCaster
static void clearShadowRenderableList (ShadowRenderableList &shadowRenderables)
 
static void extrudeVertices (const HardwareVertexBufferSharedPtr &vertexBuffer, size_t originalVertexCount, const Vector4 &lightPos, Real extrudeDist)
 
- Public Attributes inherited from ParticleUniverse::Particle
ParticleEmitterparentEmitter
 
Vector3 position
 
Vector3 direction
 
Real mass
 
Real timeToLive
 
Real totalTimeToLive
 
Real timeFraction
 
ParticleType particleType
 
Any mUserDefinedObject
 
PhysicsActorphysicsActor
 
IVisualDatavisualData
 
Vector3 originalPosition
 
Vector3 originalDirection
 
Real originalVelocity
 
Real originalDirectionLength
 
Real originalScaledDirectionLength
 
Vector3 latestPosition
 

Detailed Description

A ParticleSystem is the most top level of a particle structure, that consists of Particles, ParticleEmitters, ParticleAffectors, ParticleObservers, etc.

Remarks
The ParticleSystem can be seen as the container that includes the components that are needed to create, display and move particles.

Member Typedef Documentation

typedef LodDistanceList::const_iterator ParticleUniverse::ParticleSystem::LodDistanceConstIterator
typedef LodDistanceList::iterator ParticleUniverse::ParticleSystem::LodDistanceIterator

Distance list used to specify LOD

typedef ParticleTechniqueList::const_iterator ParticleUniverse::ParticleSystem::ParticleTechniqueConstIterator
typedef ParticleTechniqueList::iterator ParticleUniverse::ParticleSystem::ParticleTechniqueIterator

Member Enumeration Documentation

Enumerator
PSS_PREPARED 
PSS_STARTED 
PSS_STOPPED 
PSS_PAUSED 

Constructor & Destructor Documentation

ParticleUniverse::ParticleSystem::ParticleSystem ( const String name)
ParticleUniverse::ParticleSystem::ParticleSystem ( const String name,
const String resourceGroupName 
)
virtual ParticleUniverse::ParticleSystem::~ParticleSystem ( void  )
virtual

Member Function Documentation

unsigned short ParticleUniverse::ParticleSystem::_getLodIndex ( Real  distance) const
protected

Gets the LOD index to use at the given distance.

unsigned short ParticleUniverse::ParticleSystem::_getLodIndexSquaredDistance ( Real  squaredDistance) const
protected

Gets the LOD index to use at the given squared distance.

virtual void ParticleUniverse::ParticleSystem::_initForEmission ( void  )
virtual

Perform initialising activities as soon as the particle is emitted.

Reimplemented from ParticleUniverse::Particle.

virtual void ParticleUniverse::ParticleSystem::_initForExpiration ( ParticleTechnique technique,
Real  timeElapsed 
)
virtual

Perform some action if the particle expires.

Remarks
Note, that this function applies to all particle types (including Particle Techniques, Emitters and Affectors).

Reimplemented from ParticleUniverse::Particle.

void ParticleUniverse::ParticleSystem::_markForEmission ( void  )

Mark all emitted objects (ParticleTechniques and all the objects registered at each ParticleTechnique).

void ParticleUniverse::ParticleSystem::_notifyAttached ( Ogre::Node parent,
bool  isTagPoint = false 
)
virtual

Overridden from MovableObject

See also
MovableObject

Reimplemented from Ogre::MovableObject.

virtual void ParticleUniverse::ParticleSystem::_notifyCurrentCamera ( Camera cam)
inlinevirtual

Overridden from MovableObject

See also
MovableObject

Reimplemented from Ogre::MovableObject.

void ParticleUniverse::ParticleSystem::_notifyEmissionChange ( void  )

Is called as soon as a new technique is added or deleted, which leads to a re-evaluation of the emitted objects.

void ParticleUniverse::ParticleSystem::_notifyRescaled ( void  )

Notify registered ParticleTechniques.

void ParticleUniverse::ParticleSystem::_notifyVelocityRescaled ( void  )

Notify registered ParticleTechniques.

virtual void ParticleUniverse::ParticleSystem::_process ( ParticleTechnique technique,
Real  timeElapsed 
)
virtual

Perform actions on the particle itself during the update loop of a ParticleTechnique.

Remarks
Active particles may want to do some processing themselves each time the ParticleTechnique is updated. One example is to perform actions by means of the registered ParticleBehaviour objects. ParticleBehaviour objects apply internal behaviour of each particle individually. They add both data and behaviour to a particle, which means that each particle can be extended with functionality.

Reimplemented from ParticleUniverse::Particle.

void ParticleUniverse::ParticleSystem::_pushSystemEvent ( EventType  eventType)
protected

Convenient function to generate events.

Remarks
This is only for internal use and may not be used outside the particle system.
void ParticleUniverse::ParticleSystem::_resetBounds ( void  )

Reset the bounding box of the particle system to the most minimal value.

void ParticleUniverse::ParticleSystem::_resetMarkForEmission ( void  )

Reset mark for emission indication for all techniques.

void ParticleUniverse::ParticleSystem::_update ( Real  timeElapsed)

Updates the particle system based on time elapsed.

Remarks
This is called automatically every frame by OGRE.
Parameters
timeElapsedThe amount of time, in seconds, since the last frame.
virtual void ParticleUniverse::ParticleSystem::_updateRenderQueue ( Ogre::RenderQueue queue)
inlinevirtual

Overridden from MovableObject

See also
MovableObject

Implements Ogre::MovableObject.

size_t ParticleUniverse::ParticleSystem::_updateTechniques ( Real  timeElapsed)

Update all techniques and return the number of emitted particles for any function who is interested.

Parameters
timeElapsedThe amount of time, in seconds, since the last frame.
void ParticleUniverse::ParticleSystem::addLodDistance ( Real  distance)

Adds a distance at which level-of-detail (LOD) levels come into effect.

void ParticleUniverse::ParticleSystem::addParticleSystemListener ( ParticleSystemListener particleSystemListener)

Add a ParticleSystemListener, which gets called as soon as a ParticleSystem is started or stopped.

void ParticleUniverse::ParticleSystem::addTechnique ( ParticleTechnique technique)

Add a technique to the list.

Remarks
It must be possible to add a previously created technique to the list. This is the case with techniques that were created outside the particle system. An example is the creation of techniques by means of a script. The technique will be placed under control of the particle system. The Particle System Manager however, deletes the techniques (since they are also created by the Particle System Manager).
Parameters
techniquePointer to a previously created technique.
void ParticleUniverse::ParticleSystem::calulateRotationOffset ( void  )
inlineprotected

Calculate rotation of the node.

void ParticleUniverse::ParticleSystem::clearLodDistances ( void  )

Clears the list with distances.

ParticleTechnique* ParticleUniverse::ParticleSystem::createTechnique ( void  )

Create a ParticleTechnique and add it to this ParticleSystem.

void ParticleUniverse::ParticleSystem::destroyAllTechniques ( void  )

Destroy all ParticleTechniques of this ParticleSystem.

void ParticleUniverse::ParticleSystem::destroyTechnique ( ParticleTechnique particleTechnique)

Destroy a ParticleTechnique.

void ParticleUniverse::ParticleSystem::destroyTechnique ( size_t  index)

Destroy a ParticleTechnique identified by means of an index.

void ParticleUniverse::ParticleSystem::fastForward ( void  )
const AxisAlignedBox& ParticleUniverse::ParticleSystem::getBoundingBox ( void  ) const
virtual

Overridden from MovableObject

See also
MovableObject

Implements Ogre::MovableObject.

virtual Real ParticleUniverse::ParticleSystem::getBoundingRadius ( void  ) const
virtual

Overridden from MovableObject

See also
MovableObject

Implements Ogre::MovableObject.

const String& ParticleUniverse::ParticleSystem::getCategory ( void  ) const
inline

Get/set a category. See 'mCategory' for a description of its use.

Camera* ParticleUniverse::ParticleSystem::getCurrentCamera ( void  )

Returns a pointer to the current camera (the one that gets updated/notified).

virtual const Quaternion& ParticleUniverse::ParticleSystem::getDerivedOrientation ( void  ) const
virtual

Gets the derived orientation of the particle system (i.e derived from the parent node, if available).

virtual const Vector3& ParticleUniverse::ParticleSystem::getDerivedPosition ( void  )
virtual

Gets the derived position of the particle system (i.e derived from the parent node, if available).

const Real ParticleUniverse::ParticleSystem::getFastForwardInterval ( void  ) const
const Real ParticleUniverse::ParticleSystem::getFastForwardTime ( void  ) const
const Real ParticleUniverse::ParticleSystem::getFixedTimeout ( void  ) const
const Real ParticleUniverse::ParticleSystem::getIterationInterval ( void  ) const
const Quaternion& ParticleUniverse::ParticleSystem::getLatestOrientation ( void  ) const

Gets the latest orientation of the particle system before update.

const LodDistanceList& ParticleUniverse::ParticleSystem::getLodDistances ( void  ) const

Returns the distances at which level-of-detail (LOD) levels come into effect.

Camera* ParticleUniverse::ParticleSystem::getMainCamera ( void  )
const String& ParticleUniverse::ParticleSystem::getMainCameraName ( void  ) const

Get the main camera (name).

const String& ParticleUniverse::ParticleSystem::getMovableType ( void  ) const
virtual

Overridden from MovableObject

See also
MovableObject

Implements Ogre::MovableObject.

const Real ParticleUniverse::ParticleSystem::getNonVisibleUpdateTimeout ( void  ) const
size_t ParticleUniverse::ParticleSystem::getNumberOfEmittedParticles ( void  )
inline

Return number of all emitted particles

size_t ParticleUniverse::ParticleSystem::getNumberOfEmittedParticles ( Particle::ParticleType  particleType)
inline

Return number of emitted particles of a certain type

size_t ParticleUniverse::ParticleSystem::getNumEmittedTechniques ( void  ) const

Returns the number of emitted ParticleTechniques.

Remarks
Emitted ParticleTechniques are determined by means of the _markForEmission() function.
size_t ParticleUniverse::ParticleSystem::getNumTechniques ( void  ) const

Get the number of ParticleTechniques of this ParticleSystem.

Real ParticleUniverse::ParticleSystem::getPauseTime ( void  ) const

Returns the time of a pause (if set)

const String& ParticleUniverse::ParticleSystem::getResourceGroupName ( void  ) const
inline

Get the name of the resource group that is assigned to this ParticleSystem.

const Vector3& ParticleUniverse::ParticleSystem::getScale ( void  ) const

Returns the scale.

const Real& ParticleUniverse::ParticleSystem::getScaleTime ( void  ) const

Get the time scale.

const Real& ParticleUniverse::ParticleSystem::getScaleVelocity ( void  ) const

Returns the velocity scale.

Ogre::SceneManager* ParticleUniverse::ParticleSystem::getSceneManager ( void  )

Get the SceneManager with which the ParticleSystem is created

ParticleSystemState ParticleUniverse::ParticleSystem::getState ( void  ) const
inline

Returns the state of the particle system.

ParticleTechnique* ParticleUniverse::ParticleSystem::getTechnique ( size_t  index) const

Get a ParticleTechnique given a certain index.

ParticleTechnique* ParticleUniverse::ParticleSystem::getTechnique ( const String name) const

Get a ParticleTechnique. Search by ParticleTechnique name.

const String& ParticleUniverse::ParticleSystem::getTemplateName ( void  ) const

Returns the name of the template which acted as a blueprint for creation of this Particle System.

Real ParticleUniverse::ParticleSystem::getTimeElapsedSinceStart ( void  ) const
inline

Returns the time since the ParticleSystem was started.

bool ParticleUniverse::ParticleSystem::hasExternType ( const String externType) const

Returns 'true' if one of externs is of a certain type.

Remarks
All techniques are searched.
bool ParticleUniverse::ParticleSystem::hasMainCamera ( void  )

True if the main camera has been set.

bool ParticleUniverse::ParticleSystem::hasRotatedBetweenUpdates ( void  ) const

Returns true if the particle system has rotated between updates.

bool ParticleUniverse::ParticleSystem::hasTightBoundingBox ( void  ) const

Is 'true' when the bounding box is wrapped tight around the particle system or 'false' when the bounding box is only increasing and doesn´t shrink when the particle system shrinks.

bool ParticleUniverse::ParticleSystem::isKeepLocal ( void  ) const
bool ParticleUniverse::ParticleSystem::isParentIsTagPoint ( void  )
inline

Determines whether the parent is a TagPoint or a SceneNode.

bool ParticleUniverse::ParticleSystem::isSmoothLod ( void  ) const
inline

Is smooth Lod set?.

bool ParticleUniverse::ParticleSystem::isStopFade ( void  )

if stopFade is set, then this will return true.

bool ParticleUniverse::ParticleSystem::makeParticleLocal ( Particle particle)

Transforms the particle position in a local position relative to the system

ParticleSystem& ParticleUniverse::ParticleSystem::operator= ( const ParticleSystem ps)

Assignment operator.

void ParticleUniverse::ParticleSystem::pause ( void  )

Pauses the particle system.

void ParticleUniverse::ParticleSystem::pause ( Real  pauseTime)

Pauses the particle system for a period of time. After this time, the Particle System automatically resumes.

void ParticleUniverse::ParticleSystem::prepare ( void  )

Prepares the particle system.

Remarks
This optional state can be used to prepare the particle system, so that initial actions are preformed before the particle system is started.
void ParticleUniverse::ParticleSystem::pushEvent ( ParticleUniverseEvent particleUniverseEvent)

This function is called as soon as an event withing the Particle System occurs.

void ParticleUniverse::ParticleSystem::removeParticleSystemListener ( ParticleSystemListener particleSystemListener)

Removes the ParticleSystemListener, but it the ParticleSystemListener isn't destroyed.

void ParticleUniverse::ParticleSystem::removeTechnique ( ParticleTechnique technique)

Remove a technique from the system, but don't destroy it.

void ParticleUniverse::ParticleSystem::resume ( void  )

Resumes the particle system.

void ParticleUniverse::ParticleSystem::rotationOffset ( Vector3 pos)

If the orientation of the particle system has been changed since the last update, the passed vector is rotated accordingly.

void ParticleUniverse::ParticleSystem::setBoundsAutoUpdated ( bool  autoUpdate,
Real  stopIn = 0.0f 
)

Sets whether the bounds will be automatically updated for the life of the particle system.

void ParticleUniverse::ParticleSystem::setCategory ( const String category)
inline
virtual void ParticleUniverse::ParticleSystem::setEnabled ( bool  enabled)
virtual
void ParticleUniverse::ParticleSystem::setFastForward ( Real  time,
Real  interval 
)
void ParticleUniverse::ParticleSystem::setFixedTimeout ( const Real  fixedTimeout)
void ParticleUniverse::ParticleSystem::setIterationInterval ( const Real  iterationInterval)
void ParticleUniverse::ParticleSystem::setKeepLocal ( bool  keepLocal)

If this attribute is set to 'true', the particles are emitted relative to the system

void ParticleUniverse::ParticleSystem::setLodDistances ( const LodDistanceList lodDistances)

Sets the distance at which level-of-detail (LOD) levels come into effect.

Remarks
You should only use this if you have assigned LOD indexes to the ParticleTechnique instances attached to this ParticleSystem.
Parameters
lodDistancesA vector of Reals which indicate the distance at which to switch to another ParticleTechnique.
void ParticleUniverse::ParticleSystem::setMainCamera ( Camera camera)
void ParticleUniverse::ParticleSystem::setMainCameraName ( String  cameraName)

Set the main camera (name).

Remarks
By setting the main camera, the number of cameras for which un update is performed, is narrowed. Particle System LOD for example only really works with a 1-camera setup, so setting a camera (name) basicly prevents that LODding isn't screwed up if the scene contains multiple cameras.
void ParticleUniverse::ParticleSystem::setNonVisibleUpdateTimeout ( Real  timeout)
void ParticleUniverse::ParticleSystem::setPauseTime ( Real  pauseTime)

Set the pause time. This is used to pause the ParticleSystem for a certain amount of time.

virtual void ParticleUniverse::ParticleSystem::setRenderQueueGroup ( uint8  queueId)
virtual

Overridden from MovableObject

See also
MovableObject

Reimplemented from Ogre::MovableObject.

void ParticleUniverse::ParticleSystem::setResourceGroupName ( const String resourceGroupName)
inline

Set the name of the resource group for this ParticleSystem.

void ParticleUniverse::ParticleSystem::setScale ( const Vector3 scale)

Set the scale independant from the node to which it is attached.

void ParticleUniverse::ParticleSystem::setScaleTime ( const Real scaleTime)

Set the time scale.

void ParticleUniverse::ParticleSystem::setScaleVelocity ( const Real scaleVelocity)

Set the velocity scale.

void ParticleUniverse::ParticleSystem::setSceneManager ( Ogre::SceneManager sceneManager)

Set the SceneManager with which the ParticleSystem is created

void ParticleUniverse::ParticleSystem::setSmoothLod ( bool  smoothLod)
inline

Set smooth Lod.

void ParticleUniverse::ParticleSystem::setTemplateName ( const String templateName)

Set the name of the template which acts as a blueprint for creation of this Particle System.

void ParticleUniverse::ParticleSystem::setTightBoundingBox ( bool  tightBoundingBox)

Set mTightBoundingBox.

void ParticleUniverse::ParticleSystem::setUseController ( bool  useController)

Set the indication to false if you want to update the particle system yourself

void ParticleUniverse::ParticleSystem::start ( void  )

Starts the particle system.

Remarks
Only if a particle system has been attached to a SceneNode it can be started.
void ParticleUniverse::ParticleSystem::start ( Real  stopTime)

Starts the particle system and stops after a period of time.

void ParticleUniverse::ParticleSystem::startAndStopFade ( Real  stopTime)

Convenient function to start and stop (gradually) in one step.

Remarks
This function uses the stopFade(void) funtion; see stopFade(void).
void ParticleUniverse::ParticleSystem::stop ( void  )

Stops the particle system.

Remarks
Only if a particle system has been attached to a SceneNode and started it can be stopped.
void ParticleUniverse::ParticleSystem::stop ( Real  stopTime)

Stops the particle system after a period of time.

Remarks
This is basicly the same as calling setFixedTimeout().
void ParticleUniverse::ParticleSystem::stopFade ( void  )

Stops emission of all particle and really stops the particle system when all particles are expired.

void ParticleUniverse::ParticleSystem::stopFade ( Real  stopTime)

Stops emission of all particle after a period of time and really stops the particle system when all particles are expired.

void ParticleUniverse::ParticleSystem::suppressNotifyEmissionChange ( bool  suppress)

Function to suppress notification of an emission change.

Remarks
This function is typically used when notification isn´t needed anymore. An example for this situation is for instance in case the ParticleTechnique is destroyed, which also causes the emitters to be destroyed.
virtual void ParticleUniverse::ParticleSystem::visitRenderables ( Ogre::Renderable::Visitor visitor,
bool  debugRenderables = false 
)
inlinevirtual
See also
MovableObject

Implements Ogre::MovableObject.

Member Data Documentation

const Real ParticleUniverse::ParticleSystem::DEFAULT_FAST_FORWARD_TIME
static
const Real ParticleUniverse::ParticleSystem::DEFAULT_FIXED_TIMEOUT
static
const Real ParticleUniverse::ParticleSystem::DEFAULT_ITERATION_INTERVAL
static
const bool ParticleUniverse::ParticleSystem::DEFAULT_KEEP_LOCAL
static
const char* ParticleUniverse::ParticleSystem::DEFAULT_MAIN_CAMERA_NAME
static
const Real ParticleUniverse::ParticleSystem::DEFAULT_NON_VISIBLE_UPDATE_TIMEOUT
static
const Vector3 ParticleUniverse::ParticleSystem::DEFAULT_SCALE
static
const Real ParticleUniverse::ParticleSystem::DEFAULT_SCALE_TIME
static
const Real ParticleUniverse::ParticleSystem::DEFAULT_SCALE_VELOCITY
static
const bool ParticleUniverse::ParticleSystem::DEFAULT_SMOOTH_LOD
static
const bool ParticleUniverse::ParticleSystem::DEFAULT_TIGHT_BOUNDINGBOX
static
AxisAlignedBox ParticleUniverse::ParticleSystem::mAABB
protected
bool ParticleUniverse::ParticleSystem::mAtLeastOneParticleEmitted
protected

Flag, used to determine whether a particle has been emitted.

Real ParticleUniverse::ParticleSystem::mBoundingRadius
protected
bool ParticleUniverse::ParticleSystem::mBoundsAutoUpdate
protected

Determines whether the recalculation of the bounding box is performed automatically.

Real ParticleUniverse::ParticleSystem::mBoundsUpdateTime
protected

Time that indicates how long the AABB must be calculated before it is fixed.

String ParticleUniverse::ParticleSystem::mCategory
protected

Used to define to which category the particle system belongs. This is pure for administration and can be used in an editor. There is no technical reason to set this attribute.

Camera* ParticleUniverse::ParticleSystem::mCurrentCamera
protected
Real ParticleUniverse::ParticleSystem::mFastForwardInterval
protected
bool ParticleUniverse::ParticleSystem::mFastForwardSet
protected

Fastforward settings

Real ParticleUniverse::ParticleSystem::mFastForwardTime
protected
Real ParticleUniverse::ParticleSystem::mFixedTimeout
protected

If set, the ParticleSystem automatically stops after ´mFixedTimeout´ seconds.

bool ParticleUniverse::ParticleSystem::mFixedTimeoutSet
protected

Indication to determine whether mFixedTimeout has been set.

Real ParticleUniverse::ParticleSystem::mIterationInterval
protected

Value that determines in which intervals the system must be the updated.

bool ParticleUniverse::ParticleSystem::mIterationIntervalSet
protected

Indication to determine whether updating of the technique must be done in predefined intervals.

bool ParticleUniverse::ParticleSystem::mKeepLocal
protected

Determines whether particle positions should be kept local in relation to the system.

unsigned short ParticleUniverse::ParticleSystem::mLastLodIndex
protected

Used to determine whether a LOD transition occured.

unsigned long ParticleUniverse::ParticleSystem::mLastVisibleFrame
protected

Last frame in which known to be visible

Quaternion ParticleUniverse::ParticleSystem::mLatestOrientation
protected

To keep track of rotation between updates, the latest rotation must be kept.

LodDistanceList ParticleUniverse::ParticleSystem::mLodDistanceList
protected

List with LOD (= Level Of Detail) distances.

Remarks
The distance between a ParticleTechnique and the camera corresponds with a certain index. If the value of that index correponds with the index set in the ParticleTechnique, the ParticleTechnique is enabled.
If no ParticleTechnique with a corresponding index can be found, nothing is shown. An example: mLodDistanceList contains the values 300, 600 and 1200. If 2 techniques are defined with index 0 (distance 0-300) and index 1 (300-600), all distances beyond 600 doesn't display a ParticleTechnique.
String ParticleUniverse::ParticleSystem::mMainCameraName
protected

If the mainCameraName has been set, the number of updates for other cameras is limited.

bool ParticleUniverse::ParticleSystem::mMainCameraNameSet
protected
Real ParticleUniverse::ParticleSystem::mNonvisibleUpdateTimeout
protected

Update timeout when nonvisible (0 for no timeout)

bool ParticleUniverse::ParticleSystem::mNonvisibleUpdateTimeoutSet
protected

Update timeout when nonvisible set?

Real ParticleUniverse::ParticleSystem::mOriginalBoundsUpdateTime
protected

Original value of mBoundsUpdateTime.

bool ParticleUniverse::ParticleSystem::mOriginalFastForwardSet
protected
ParticleSystemListenerList ParticleUniverse::ParticleSystem::mParticleSystemListenerList
protected

List of ParticleSystemListeners

Vector3 ParticleUniverse::ParticleSystem::mParticleSystemScale
protected

Scale the Particle Systems´ relative positions and size.

Remarks
Scaling is done on a Particle System level and is independent of the scaling of the SceneNode
Real ParticleUniverse::ParticleSystem::mParticleSystemScaleTime
protected

Scale time.

Remarks
Makes the Particle System speed up or slow down.
Real ParticleUniverse::ParticleSystem::mParticleSystemScaleVelocity
protected

Scale velocity.

Remarks
Scaling of the particle velocity is independant from scaling the positions and size.
Real ParticleUniverse::ParticleSystem::mPauseTime
protected

The Particle System can be paused for a specific time

Real ParticleUniverse::ParticleSystem::mPauseTimeElapsed
protected
bool ParticleUniverse::ParticleSystem::mPauseTimeSet
protected
String ParticleUniverse::ParticleSystem::mResourceGroupName
protected

Name of the resource group that is assigned to this ParticleSystem.

Vector3 ParticleUniverse::ParticleSystem::mRotationCentre
protected

The rotation centre.

Quaternion ParticleUniverse::ParticleSystem::mRotationOffset
protected

Rotation offset between 2 updates.

Ogre::SceneManager* ParticleUniverse::ParticleSystem::mSceneManager
protected

The SceneManager with which the Particle System is created.

bool ParticleUniverse::ParticleSystem::mSmoothLod
protected

Determines whether Lodding is performed instantly of smoothly.

Remarks
Setting this value to 'true' causes techniques (that are disabled because they come outside their Lod distance) to handle already emitted particles. New particles aren't emitted anymore, but the already emitted particles are still processed. This prevents an abrupt transition between one technique and another. Note, that the tradeoff for using Smooth Lod is, that it only works correct with 1 camera.
ParticleSystemState ParticleUniverse::ParticleSystem::mState
protected

State of the particle system.

Remarks
Possible states are started, stopped, paused and resumed.
bool ParticleUniverse::ParticleSystem::mStopFadeSet
protected

The stopFade() function is called if set to true.

bool ParticleUniverse::ParticleSystem::mSuppressNotifyEmissionChange
protected

Indication whether _notifyEmissionChange() must be suppressed or not.

Remarks
Default is true
ParticleTechniqueList ParticleUniverse::ParticleSystem::mTechniques
protected
String ParticleUniverse::ParticleSystem::mTemplateName
protected

The name of the template on which this Particle System is derived.

bool ParticleUniverse::ParticleSystem::mTightBoundingBox
protected

Determines whether the bounding box is tight around the particle system or whether the bounding is growing and never shrinks.

Controller<Real>* ParticleUniverse::ParticleSystem::mTimeController
protected

Controller for time update

Real ParticleUniverse::ParticleSystem::mTimeElapsedSinceStart
protected

Counts the time since the ParticleSystem was started.

Real ParticleUniverse::ParticleSystem::mTimeSinceLastUpdate
protected

Attribute used to calculate the time since the last update.

Real ParticleUniverse::ParticleSystem::mTimeSinceLastVisible
protected

Amount of time non-visible so far

bool ParticleUniverse::ParticleSystem::mUseController
protected

Set the mUseController to false if you want to call the _update() function yourself.


The documentation for this class was generated from the following file: