OGRE 14.3
Object-Oriented Graphics Rendering Engine
|
Class defining particle system based special effects. More...
#include <OgreParticleSystem.h>
Public Member Functions | |
ParticleSystem () | |
Default constructor required for STL creation in manager. | |
ParticleSystem (const String &name, const String &resourceGroupName) | |
Creates a particle system with no emitters or affectors. | |
virtual | ~ParticleSystem () |
const std::vector< Particle * > & | _getActiveParticles () |
Returns all active particles in this system. | |
void | _notifyAttached (Node *parent, bool isTagPoint=false) override |
Internal method called to notify the object that it has been attached to a node. | |
void | _notifyCurrentCamera (Camera *cam) override |
Internal method to notify the object of the camera to be used for the next rendering operation. | |
void | _notifyOrigin (const String &origin) |
Notify this particle system of it's origin. | |
void | _update (Real timeElapsed) |
Updates the particles in the system based on time elapsed. | |
void | _updateBounds (void) |
Internal method for updating the bounds of the particle system. | |
void | _updateRenderQueue (RenderQueue *queue) override |
Internal method by which the movable object must add Renderable subclass instances to the rendering queue. | |
ParticleAffector * | addAffector (const String &affectorType) |
Adds an affector to this particle system. | |
ParticleEmitter * | addEmitter (const String &emitterType) |
Adds an emitter to this particle system. | |
void | clear () |
Empties this set of all particles. | |
Particle * | createEmitterParticle (const String &emitterName) |
Manually add an emitter particle to the system. | |
Particle * | createParticle (void) |
Manually add a particle to the system. | |
void | fastForward (Real time, Real interval=0.1f) |
Fast-forwards this system by the required number of seconds. | |
ParticleAffector * | getAffector (unsigned short index) const |
Retrieves an affector by it's index (zero-based). | |
const AxisAlignedBox & | getBoundingBox (void) const override |
Retrieves the local axis-aligned bounding box for this object. | |
Real | getBoundingRadius (void) const override |
Retrieves the radius of the origin-centered bounding sphere for this object. | |
virtual bool | getCullIndividually (void) const |
Returns whether or not particles in this are tested individually for culling. | |
virtual Real | getDefaultHeight (void) const |
See setDefaultDimensions - this gets 1 component individually. | |
virtual Real | getDefaultWidth (void) const |
See setDefaultDimensions - this gets 1 component individually. | |
size_t | getEmittedEmitterQuota (void) const |
Returns the maximum number of emitted emitters this system is allowed to have active at once. | |
ParticleEmitter * | getEmitter (unsigned short index) const |
Retrieves an emitter by it's index (zero-based). | |
bool | getEmitting () const |
Returns true if the particle system emitting flag is turned on. | |
Real | getIterationInterval (void) const |
Gets a 'iteration interval' on this particle system. | |
bool | getKeepParticlesInLocalSpace (void) const |
Gets whether particles (and any affector effects) remain relative to the node the particle system is attached to. | |
virtual const String & | getMaterialName (void) const |
Sets the name of the material to be used for this billboard set. | |
const String & | getMovableType (void) const override |
Returns the type name of this object. | |
Real | getNonVisibleUpdateTimeout (void) const |
Gets when the particle system should stop updating after it hasn't been visible for a while. | |
unsigned short | getNumAffectors (void) const |
Returns the number of affectors for this particle system. | |
unsigned short | getNumEmitters (void) const |
Returns the number of emitters for this particle system. | |
size_t | getNumParticles (void) const |
Gets the number of individual particles in the system right now. | |
const String & | getOrigin (void) const |
Get the origin of this particle system, e.g. | |
Particle * | getParticle (size_t index) |
Retrieve a particle from the system for manual tweaking. | |
size_t | getParticleQuota (void) const |
Returns the maximum number of particles this system is allowed to have active at once. | |
ParticleSystemRenderer * | getRenderer (void) const |
Gets the ParticleRenderer to be used to render this particle system. | |
const String & | getRendererName (void) const |
Gets the name of the ParticleRenderer to be used to render this particle system. | |
virtual const String & | getResourceGroupName (void) const |
Return the resource group to be used to load dependent resources. | |
bool | getSortingEnabled (void) const |
Gets whether particles are sorted relative to the camera. | |
Real | getSpeedFactor (void) const |
Gets the 'speed factor' on this particle system. | |
uint32 | getTypeFlags (void) const override |
Override to return specific type flag. | |
ParticleSystem & | operator= (const ParticleSystem &rhs) |
Assignment operator for copying. | |
void | removeAffector (unsigned short index) |
Removes an affector from the system. | |
void | removeAllAffectors (void) |
Removes all the affectors from this system. | |
void | removeAllEmitters (void) |
Removes all the emitters from this system. | |
void | removeEmitter (ParticleEmitter *emitter) |
Removes an emitter from the system. | |
void | removeEmitter (unsigned short index) |
Removes an emitter from the system. | |
void | setBounds (const AxisAlignedBox &aabb) |
Set the (initial) bounds of the particle system manually. | |
void | setBoundsAutoUpdated (bool autoUpdate, Real stopIn=0.0f) |
Sets whether the bounds will be automatically updated for the life of the particle system. | |
virtual void | setCullIndividually (bool cullIndividual) |
Sets whether culling tests particles in this individually as well as in a group. | |
void | setDefaultDimensions (Real width, Real height) |
Sets the default dimensions of the particles in this set. | |
virtual void | setDefaultHeight (Real height) |
See setDefaultDimensions - this sets 1 component individually. | |
virtual void | setDefaultWidth (Real width) |
See setDefaultDimensions - this sets 1 component individually. | |
void | setEmittedEmitterQuota (size_t quota) |
Sets the maximum number of emitted emitters this system is allowed to have active at once. | |
void | setEmitting (bool v) |
This is used to turn on or off particle emission for this system. | |
void | setIterationInterval (Real iterationInterval) |
Sets a 'iteration interval' on this particle system. | |
void | setKeepParticlesInLocalSpace (bool keepLocal) |
Sets whether particles (and any affector effects) remain relative to the node the particle system is attached to. | |
virtual void | setMaterialName (const String &name, const String &groupName=ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME) |
Sets the name of the material to be used for this billboard set. | |
void | setNonVisibleUpdateTimeout (Real timeout) |
Sets when the particle system should stop updating after it hasn't been visible for a while. | |
void | setParticleQuota (size_t quota) |
Sets the maximum number of particles this system is allowed to have active at once. | |
void | setRenderer (const String &typeName) |
Sets the ParticleRenderer to be used to render this particle system. | |
void | setRenderQueueGroup (uint8 queueID) override |
Sets the render queue group this entity will be rendered through. | |
void | setRenderQueueGroupAndPriority (uint8 queueID, ushort priority) override |
Sets the render queue group and group priority this entity will be rendered through. | |
void | setSortingEnabled (bool enabled) |
Set whether or not particles are sorted according to the camera. | |
void | setSpeedFactor (Real speedFactor) |
Sets a 'speed factor' on this particle system, which means it scales the elapsed real time which has passed by this factor before passing it to the emitters, affectors, and the particle life calculation. | |
void | visitRenderables (Renderable::Visitor *visitor, bool debugRenderables=false) override |
Method to allow a caller to abstractly iterate over the Renderable instances that this MovableObject will add to the render queue when asked, if any. | |
Public Member Functions inherited from Ogre::StringInterface | |
StringInterface () | |
virtual | ~StringInterface () |
Virtual destructor, see Effective C++. | |
void | copyParametersTo (StringInterface *dest) const |
Method for copying this object's parameters to another object. | |
ParamDictionary * | getParamDictionary (void) |
Retrieves the parameter dictionary for this class. | |
const ParamDictionary * | getParamDictionary (void) const |
String | getParameter (const String &name) const |
Generic parameter retrieval method. | |
const ParameterList & | getParameters (void) const |
Retrieves a list of parameters valid for this object. | |
bool | setParameter (const String &name, const String &value) |
Generic parameter setting method. | |
void | setParameterList (const NameValuePairList ¶mList) |
Generic multiple parameter setting method. | |
Public Member Functions inherited from Ogre::MovableObject | |
MovableObject () | |
Constructor. | |
MovableObject (const String &name) | |
Named constructor. | |
virtual | ~MovableObject () |
Virtual destructor - read Scott Meyers if you don't know why this is needed. | |
MovableObjectFactory * | _getCreator (void) const |
Get the creator of this object, if any (internal use only) | |
LightList * | _getLightList () |
Returns a pointer to the current list of lights for this object. | |
SceneManager * | _getManager (void) const |
Get the manager of this object, if any (internal use only) | |
virtual const Affine3 & | _getParentNodeFullTransform (void) const |
Return the full transformation of the parent sceneNode or the attachingPoint node. | |
virtual void | _notifyCreator (MovableObjectFactory *fact) |
Notify the object of it's creator (internal use only) | |
virtual void | _notifyManager (SceneManager *man) |
Notify the object of it's manager (internal use only) | |
virtual void | _notifyMoved (void) |
Internal method called to notify the object that it has been moved. | |
virtual void | _releaseManualHardwareResources () |
Notifies the movable object that hardware resources were lost. | |
virtual void | _restoreManualHardwareResources () |
Notifies the movable object that hardware resources should be restored. | |
void | addQueryFlags (uint32 flags) |
As setQueryFlags, except the flags passed as parameters are appended to the existing flags on this object. | |
void | addVisibilityFlags (uint32 flags) |
As setVisibilityFlags, except the flags passed as parameters are appended to the existing flags on this object. | |
void | detachFromParent (void) |
Detaches an object from a parent SceneNode or TagPoint, if attached. | |
Real | getBoundingRadiusScaled () const |
as getBoundingRadius, but with scaling applied | |
bool | getCastShadows (void) const override |
Returns whether shadow casting is enabled for this object. | |
uint32 | getLightMask () const |
Get a bitwise mask which will filter the lights affecting this object. | |
Listener * | getListener (void) const |
Gets the current listener for this object. | |
const String & | getName (void) const |
Returns the name of this object. | |
Node * | getParentNode (void) const |
Returns the node to which this object is attached. | |
SceneNode * | getParentSceneNode (void) const |
Returns the scene node to which this object is attached. | |
Real | getPointExtrusionDistance (const Light *l) const override |
Get the distance to extrude for a point/spot light. | |
virtual uint32 | getQueryFlags (void) const |
Returns the query flags relevant for this object. | |
bool | getReceivesShadows () |
Returns whether the Material of any Renderable that this MovableObject will add to the render queue will receive shadows. | |
Real | getRenderingDistance (void) const |
Gets the distance at which batches are no longer rendered. | |
Real | getRenderingMinPixelSize () const |
Returns the minimum pixel size an object needs to be in both screen axes in order to be rendered. | |
uint8 | getRenderQueueGroup (void) const |
Gets the queue group for this entity. | |
const Any & | getUserAny (void) const |
UserObjectBindings & | getUserObjectBindings () |
Class that provides convenient interface to establish a linkage between custom user application objects and Ogre core classes. | |
const UserObjectBindings & | getUserObjectBindings () const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
virtual uint32 | getVisibilityFlags (void) const |
Returns the visibility flags relevant for this object. | |
bool | getVisible (void) const |
Gets this object whether to be visible or not, if it has a renderable component. | |
const AxisAlignedBox & | getWorldBoundingBox (bool derive=false) const override |
Retrieves the axis-aligned bounding box for this object in world coordinates. | |
virtual const Sphere & | getWorldBoundingSphere (bool derive=false) const |
Retrieves the worldspace bounding sphere for this object. | |
bool | isAttached (void) const |
Returns true if this object is attached to a SceneNode or TagPoint. | |
bool | isDebugDisplayEnabled (void) const |
Gets whether debug display of this object is enabled. | |
virtual bool | isInScene (void) const |
Returns true if this object is attached to a SceneNode or TagPoint, and this SceneNode / TagPoint is currently in an active part of the scene graph. | |
bool | isParentTagPoint () const |
Gets whether the parent node is a TagPoint (or a SceneNode) | |
virtual bool | isVisible (void) const |
Returns whether or not this object is supposed to be visible or not. | |
const LightList & | queryLights (void) const |
Gets a list of lights, ordered relative to how close they are to this movable object. | |
void | removeQueryFlags (uint32 flags) |
As setQueryFlags, except the flags passed as parameters are removed from the existing flags on this object. | |
void | removeVisibilityFlags (uint32 flags) |
As setVisibilityFlags, except the flags passed as parameters are removed from the existing flags on this object. | |
void | setCastShadows (bool enabled) |
Sets whether or not this object will cast shadows. | |
void | setDebugDisplayEnabled (bool enabled) |
Sets whether or not the debug display of this object is enabled. | |
void | setLightMask (uint32 lightMask) |
Set a bitwise mask which will filter the lights affecting this object. | |
void | setListener (Listener *listener) |
Sets a listener for this object. | |
void | setQueryFlags (uint32 flags) |
Sets the query flags for this object. | |
void | setRenderingDistance (Real dist) |
Sets the distance at which the object is no longer rendered. | |
void | setRenderingMinPixelSize (Real pixelSize) |
Sets the minimum pixel size an object needs to be in both screen axes in order to be rendered. | |
void | setUserAny (const Any &anything) |
void | setVisibilityFlags (uint32 flags) |
Sets the visibility flags for this object. | |
void | setVisible (bool visible) |
Tells this object whether to be visible or not, if it has a renderable component. | |
Public Member Functions inherited from Ogre::ShadowCaster | |
virtual | ~ShadowCaster () |
const AxisAlignedBox & | getDarkCapBounds (const Light &light, Real dirLightExtrusionDist) const |
Gets the world space bounding box of the dark cap, as extruded using the light provided. | |
virtual EdgeData * | getEdgeList (void) |
Returns details of the edges which might be used to determine a silhouette. | |
const AxisAlignedBox & | getLightCapBounds (void) const |
Gets the world space bounding box of the light cap. | |
virtual const ShadowRenderableList & | getShadowVolumeRenderableList (const Light *light, const HardwareIndexBufferPtr &indexBuffer, size_t &indexBufferUsedSize, float extrusionDistance, int flags=0) |
Gets an list of the renderables required to render the shadow volume. | |
bool | hasEdgeList () |
Returns whether the object has a valid edge list. | |
Public Member Functions inherited from Ogre::AnimableObject | |
AnimableObject () | |
virtual | ~AnimableObject () |
virtual AnimableValuePtr | createAnimableValue (const String &valueName) |
Create a reference-counted AnimableValuePtr for the named value. | |
virtual const StringVector & | getAnimableValueNames (void) const |
Gets a list of animable value names for this object. | |
Static Public Member Functions | |
static Real | getDefaultIterationInterval (void) |
Get the default iteration interval for all ParticleSystem instances. | |
static Real | getDefaultNonVisibleUpdateTimeout (void) |
Get the default nonvisible timeout for all ParticleSystem instances. | |
static void | setDefaultIterationInterval (Real iterationInterval) |
Set the default iteration interval for all ParticleSystem instances. | |
static void | setDefaultNonVisibleUpdateTimeout (Real timeout) |
Set the default nonvisible timeout for all ParticleSystem instances. | |
Static Public Member Functions inherited from Ogre::StringInterface | |
static void | cleanupDictionary () |
Cleans up the static 'msDictionary' required to reset Ogre, otherwise the containers are left with invalid pointers, which will lead to a crash as soon as one of the ResourceManager implementers (e.g. | |
Static Public Member Functions inherited from Ogre::MovableObject | |
static uint32 | getDefaultQueryFlags () |
Get the default query flags for all future MovableObject instances. | |
static uint32 | getDefaultVisibilityFlags () |
Get the default visibility flags for all future MovableObject instances. | |
static void | setDefaultQueryFlags (uint32 flags) |
Set the default query flags for all future MovableObject instances. | |
static void | setDefaultVisibilityFlags (uint32 flags) |
Set the default visibility flags for all future MovableObject instances. | |
Static Public Member Functions inherited from Ogre::ShadowCaster | |
static void | clearShadowRenderableList (ShadowRenderableList &shadowRenderables) |
Common implementation of releasing shadow renderables. | |
static void | extrudeVertices (const HardwareVertexBufferSharedPtr &vertexBuffer, size_t originalVertexCount, const Vector4 &lightPos, Real extrudeDist) |
Utility method for extruding vertices based on a light. | |
Additional Inherited Members | |
Public Types inherited from Ogre::ShadowCaster | |
typedef Ogre::ShadowRenderableList | ShadowRenderableList |
typedef VectorIterator< ShadowRenderableList > | ShadowRenderableListIterator |
Class defining particle system based special effects.
Particle systems are special effects generators which are based on a number of moving points to create the impression of things like like sparkles, smoke, blood spurts, dust etc.
Ogre::ParticleSystem::ParticleSystem | ( | ) |
Default constructor required for STL creation in manager.
Creates a particle system with no emitters or affectors.
You should use the ParticleSystemManager to create particle systems rather than creating them directly.
|
virtual |
Sets the ParticleRenderer to be used to render this particle system.
The main ParticleSystem just manages the creation and movement of particles; they are rendered using functions in ParticleRenderer and the ParticleVisual instances they create.
typeName | String identifying the type of renderer to use; a new instance of this type will be created; a factory must have been registered with ParticleSystemManager. |
ParticleSystemRenderer * Ogre::ParticleSystem::getRenderer | ( | void | ) | const |
Gets the ParticleRenderer to be used to render this particle system.
Gets the name of the ParticleRenderer to be used to render this particle system.
ParticleEmitter * Ogre::ParticleSystem::addEmitter | ( | const String & | emitterType | ) |
Adds an emitter to this particle system.
Particles are created in a particle system by emitters - see the ParticleEmitter class for more details.
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. |
ParticleEmitter * Ogre::ParticleSystem::getEmitter | ( | unsigned short | index | ) | const |
Retrieves an emitter by it's index (zero-based).
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.
index | Zero-based index of the emitter to retrieve. |
Returns the number of emitters for this particle system.
Removes an emitter from the system.
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.
index | Zero-based index of the emitter to retrieve. |
void Ogre::ParticleSystem::removeEmitter | ( | ParticleEmitter * | emitter | ) |
Removes an emitter from the system.
Drops the emitter from this system.
emitter | Pointer to a particle emitter. |
ParticleAffector * Ogre::ParticleSystem::addAffector | ( | const String & | affectorType | ) |
Adds an affector to this particle system.
Particles are modified over time in a particle system by affectors - see the ParticleAffector class for more details.
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. |
ParticleAffector * Ogre::ParticleSystem::getAffector | ( | unsigned short | index | ) | const |
Retrieves an affector by it's index (zero-based).
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.
index | Zero-based index of the affector to retrieve. |
Returns the number of affectors for this particle system.
Removes an affector from the system.
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.
index | Zero-based index of the affector to retrieve. |
void Ogre::ParticleSystem::clear | ( | ) |
Empties this set of all particles.
Gets the number of individual particles in the system right now.
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).
Manually add a particle to the system.
Instead of using an emitter, you can manually add a particle to the system. You must initialise the returned particle instance immediately with the 'emission' state.
Manually add an emitter particle to the system.
The purpose of a particle emitter is to emit particles. Besides visual particles, also other other particle types can be emitted, other emitters for example. The emitted emitters have a double role; they behave as particles and can be influenced by affectors, but they are still emitters and capable to emit other particles (or emitters). It is possible to create a chain of emitters - emitters emitting other emitters, which also emit emitters.
emitterName | The name of a particle emitter that must be emitted. |
Retrieve a particle from the system for manual tweaking.
Normally you use an affector to alter particles in flight, but for small manually controlled particle systems you might want to use this method.
Returns the maximum number of particles this system is allowed to have active at once.
See ParticleSystem::setParticleQuota for more info.
Sets the maximum number of particles this system is allowed to have active at once.
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 original particle system style as possible. The quota can be increased but not decreased after the system has been created.
quota | The maximum number of particles this system is allowed to have. |
Returns the maximum number of emitted emitters this system is allowed to have active at once.
See ParticleSystem::setEmittedEmitterQuota for more info.
Sets the maximum number of emitted emitters this system is allowed to have active at once.
Particle systems can have - besides a particle quota - also an emitted emitter quota.
quota | The maximum number of emitted emitters this system is allowed to have. |
ParticleSystem & Ogre::ParticleSystem::operator= | ( | const ParticleSystem & | rhs | ) |
Assignment operator for copying.
This operator deep copies all particle emitters and effectors, but not particles. The system's name is also not copied.
Updates the particles in the system based on time elapsed.
This is called automatically every frame by OGRE.
timeElapsed | The amount of time, in seconds, since the last frame. |
Returns all active particles in this system.
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.
|
virtual |
Sets the name of the material to be used for this billboard set.
Sets the name of the material to be used for this billboard set.
Internal method to notify the object of the camera to be used for the next rendering operation.
Certain objects may want to do specific processing based on the camera position. This method notifies them in case they wish to do this.
Reimplemented from Ogre::MovableObject.
|
overridevirtual |
Internal method called to notify the object that it has been attached to a node.
Reimplemented from Ogre::MovableObject.
|
inlineoverridevirtual |
Retrieves the local axis-aligned bounding box for this object.
This bounding box is in local coordinates.
Implements Ogre::MovableObject.
Retrieves the radius of the origin-centered bounding sphere for this object.
Implements Ogre::MovableObject.
|
overridevirtual |
Internal method by which the movable object must add Renderable subclass instances to the rendering queue.
The engine will call this method when this object is to be rendered. The object must then create one or more Renderable subclass instances which it places on the passed in Queue for rendering.
Implements Ogre::MovableObject.
|
overridevirtual |
Method to allow a caller to abstractly iterate over the Renderable instances that this MovableObject will add to the render queue when asked, if any.
visitor | Pointer to a class implementing the Renderable::Visitor interface which will be called back for each Renderable which will be queued. Bear in mind that the state of the Renderable instances may not be finalised depending on when you call this. |
debugRenderables | If false, only regular renderables will be visited (those for normal display). If true, debug renderables will be included too. |
Implements Ogre::MovableObject.
Fast-forwards this system by the required number of seconds.
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.
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. |
Sets a 'speed factor' on this particle system, which means it scales the elapsed real time which has passed by this factor before passing it to the emitters, affectors, and the particle life calculation.
An interesting side effect - if you want to create a completely manual particle system where you control the emission and life of particles yourself, you can set the speed factor to 0.0f, thus disabling normal particle emission, alteration, and death.
Gets the 'speed factor' on this particle system.
Sets a 'iteration interval' on this particle system.
The default Particle system update interval, based on elapsed frame time, will cause different behavior between low frame-rate and high frame-rate. By using this option, you can make the particle system update at a fixed interval, keeping the behavior the same no matter what frame-rate is.
iterationInterval | The iteration interval, default to zero. |
Gets a 'iteration interval' on this particle system.
|
inlinestatic |
Set the default iteration interval for all ParticleSystem instances.
Get the default iteration interval for all ParticleSystem instances.
Sets when the particle system should stop updating after it hasn't been visible for a while.
By default, visible particle systems update all the time, even when not in view. This means that they are guaranteed to be consistent when they do enter view. However, this comes at a cost, updating particle systems can be expensive, especially if they are perpetual.
timeout | The time after which the particle system will be disabled if it is no longer visible. 0 to disable the timeout and always update. |
Gets when the particle system should stop updating after it hasn't been visible for a while.
Set the default nonvisible timeout for all ParticleSystem instances.
Get the default nonvisible timeout for all ParticleSystem instances.
Returns the type name of this object.
Implements Ogre::MovableObject.
Sets the default dimensions of the particles in this set.
All particles in a set are created with these default dimensions. The set will render most efficiently if all the particles in the set are the default size. It is possible to alter the size of individual particles at the expense of extra calculation. See the Particle class for more info.
width | The new default width for the particles in this set. Must be non-negative! |
height | The new default height for the particles in this set. Must be non-negative! |
See setDefaultDimensions - this sets 1 component individually.
See setDefaultDimensions - this gets 1 component individually.
Referenced by Ogre::ParticleEmitter::_initParticle().
See setDefaultDimensions - this sets 1 component individually.
See setDefaultDimensions - this gets 1 component individually.
Referenced by Ogre::ParticleEmitter::_initParticle().
Returns whether or not particles in this are tested individually for culling.
Sets whether culling tests particles in this individually as well as in a group.
Particle sets are always culled as a whole group, based on a bounding box which encloses all particles in the set. For fairly localised sets, this is enough. However, you can optionally tell the set to also cull individual particles in the set, i.e. to test each individual particle before rendering. The default is not to do this.
cullIndividual | If true, each particle is tested before being sent to the pipeline as well as the whole set having to pass the coarse group bounding test. |
Return the resource group to be used to load dependent resources.
Get the origin of this particle system, e.g.
a script file name.
This property will only contain something if the creator of this particle system chose to populate it. Script loaders are advised to populate it.
Notify this particle system of it's origin.
Sets the render queue group this entity will be rendered through.
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 the default queue (RenderQueue::getDefaultQueueGroup), 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.
queueID | Enumerated value of the queue group to use. See the enum RenderQueueGroupID for what kind of values can be used here. |
Reimplemented from Ogre::MovableObject.
|
overridevirtual |
Sets the render queue group and group priority this entity will be rendered through.
Render queues are grouped to allow you to more tightly control the ordering of rendered objects. Within a single render group there another type of grouping called priority which allows further control. If you do not call this method, all Entity objects default to the default queue and priority (RenderQueue::getDefaultQueueGroup, RenderQueue::getDefaultRenderablePriority), 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.
queueID | Enumerated value of the queue group to use. See the enum RenderQueueGroupID for what kind of values can be used here. |
priority | The priority within a group to use. |
Reimplemented from Ogre::MovableObject.
Set whether or not particles are sorted according to the camera.
Enabling sorting alters the order particles are sent to the renderer. When enabled, particles are sent to the renderer in order of furthest distance from the camera.
Gets whether particles are sorted relative to the camera.
void Ogre::ParticleSystem::setBounds | ( | const AxisAlignedBox & | aabb | ) |
Set the (initial) bounds of the particle system manually.
If you can, set the bounds of a particle system up-front and call setBoundsAutoUpdated(false); this is the most efficient way to organise it. Otherwise, set an initial bounds and let the bounds increase for a little while (the default is 5 seconds), after which time the AABB is fixed to save time.
aabb | Bounds in local space. |
Sets whether the bounds will be automatically updated for the life of the particle system.
If you have a stationary particle system, it would be a good idea to call this method and set the value to 'false', since the maximum bounds of the particle system will eventually be static. If you do this, you can either set the bounds manually using the setBounds() method, or set the second parameter of this method to a positive number of seconds, so that the bounds are calculated for a few seconds and then frozen.
autoUpdate | If true (the default), the particle system will update it's bounds every frame. If false, the bounds update will cease after the 'stopIn' number of seconds have passed. |
stopIn | Only applicable if the first parameter is true, this is the number of seconds after which the automatic update will cease. |
Sets whether particles (and any affector effects) remain relative to the node the particle system is attached to.
By default particles are in world space once emitted, so they are not affected by movement in the parent node of the particle system. This makes the most sense when dealing with completely independent particles, but if you want to constrain them to follow local motion too, you can set this to true.
Gets whether particles (and any affector effects) remain relative to the node the particle system is attached to.
Internal method for updating the bounds of the particle system.
This is called automatically for a period of time after the system's creation (10 seconds by default, settable by setBoundsAutoUpdated) to increase (and only increase) the bounds of the system according to the emitted and affected particles. After this period, the system is assumed to achieved its maximum size, and the bounds are no longer computed for efficiency. You can tweak the behaviour by either setting the bounds manually (setBounds, preferred), or changing the time over which the bounds are updated (performance cost). You can also call this method manually if you need to update the bounds on an ad-hoc basis.
This is used to turn on or off particle emission for this system.
By default particle system is always emitting particles (if a emitters exists) and this can be used to stop the emission for all emitters. To turn it on again, call it passing true.
Note that this does not detach the particle system from the scene node, it will still use some CPU.
bool Ogre::ParticleSystem::getEmitting | ( | ) | const |
Returns true if the particle system emitting flag is turned on.
This function will not actually return whether the particles are being emitted. It only returns the value of emitting flag.
Override to return specific type flag.
Reimplemented from Ogre::MovableObject.