Particle Emitter. More...
#include <deParticleEmitter.h>
Classes | |
| struct | sParticle |
Public Types | |
| enum | eParameters { epTimeToLive, epInterval, epCastAngleX, epCastAngleY, epSize, epRed, epGreen, epBlue, epTransparency, epEmissivity, epMass, epRotation, epLinearVelocity, epAngularVelocity, epBrownMotion, epDamping, epDrag, epGravityX, epGravityY, epGravityZ, epLocalGravity, epElasticity, epRoughness, EP_COUNT } |
Public Member Functions | |
Constructors and Destructors | |
| deParticleEmitter (deParticleEmitterManager *manager) | |
| Creates a new particle emitter. | |
| virtual | ~deParticleEmitter () |
| Cleans up the particle emitter. | |
Management | |
| const decDVector & | GetPosition () const |
| Retrieves the position. | |
| void | SetPosition (const decDVector &position) |
| Sets the position. | |
| const decQuaternion & | GetOrientation () const |
| Retrieves the orientation. | |
| void | SetOrientation (const decQuaternion &orientation) |
| Sets the orientation. | |
| bool | GetEnableCasting () const |
| Determines if casting particles is enabled. | |
| void | SetEnableCasting (bool enable) |
| Sets if casting particles is enabled. | |
| deComponent * | GetComponent () const |
| Retrieves the component used for casting or NULL. | |
| void | SetComponent (deComponent *component) |
| Sets the component used for casting or NULL. | |
| deSkin * | GetSkin () const |
| Retrieves the skin of the particle instances or NULL. | |
| void | SetSkin (deSkin *skin) |
| Sets the mode of the particle instances or NULL. | |
| deDynamicSkin * | GetDynamicSkin () const |
| Retrieves the dynamic skin or null if not used. | |
| void | SetDynamicSkin (deDynamicSkin *dynamicSkin) |
| Sets the dynamic skin or null if not used. | |
| decLayerMask & | GetLayerMask () |
| Retrieves the layer mask. | |
| const decLayerMask & | GetLayerMask () const |
| void | NotifyLayerMaskChanged () |
| Notifies the peers that the layer mask changed. | |
| int | GetGroupNumber () const |
| Retrieves the group number or 0 if not set. | |
| void | SetGroupNumber (int groupNumber) |
| Sets the group number or 0 if not set. | |
| bool | CanHit (const decLayerMask &layerMask, int groupNumber) const |
| Determines if a particle instance can be hit by another object represented by a layer mask and a group number. | |
| float | GetPhysicsSize () const |
| Retrieves the physics size of the particle. | |
| void | SetPhysicsSize (float size) |
| Sets the physics size of the particle. | |
| float | GetMaxLinearVelocity () const |
| Retrieves the maximum linear velocity for mapping as requested by the graphic module. | |
| void | SetMaxLinearVelocity (float maxLinearVelocity) |
| Sets the maximum linear velocity for mapping as requested by the graphic module. | |
| float | GetMaxAngularVelocity () const |
| Retrieves the maximum angular velocity for mapping as requested by the graphic module. | |
| void | SetMaxAngularVelocity (float maxAngularVelocity) |
| Sets the maximum angular velocity for mapping as requested by the graphic module. | |
| bool | GetSquareVelocities () const |
| Determines if velocities have to be squared as requested by the graphic module. | |
| void | SetSquareVelocities (bool squareVelocities) |
| Sets if velocities have to be squared as requested by the graphic module. | |
| bool | GetGraphicModuleSimulates () const |
| Determines if the graphic module takes care of simulation. | |
| void | SetGraphicModuleSimulates (bool graphicModuleSimulates) |
| Sets if the graphic module takes care of simulation. | |
| int | GetControllerCount () const |
| Retrieves the count of controllers. | |
| void | SetControllerCount (int count) |
| Sets the number of controllers. | |
| deParticleEmitterController & | GetControllerAt (int index) |
| Retrieves the controller at the given index. | |
| const deParticleEmitterController & | GetControllerAt (int index) const |
| void | NotifyControllerChangedAt (int controller) |
| Notifies that the controller at the given index changed. | |
| deParticleEmitterParameter & | GetParameter (int parameter) |
| Retrieves a parameter. | |
| const deParticleEmitterParameter & | GetParameter (int parameter) const |
| void | NotifyParameterChanged (int parameter) |
| Notifies all that a parameter changed. | |
| void | CastParticles (int count) |
| Cast particles burst like. | |
| void | KillAllParticles () |
| Kill all particles. | |
| sParticle * | GetParticleArray () const |
| Retrieves the particle array or NULL if not set. | |
| int | GetParticleCount () const |
| Retrieves the number of particles. | |
| void | SetParticleArray (sParticle *particleArray, int count) |
| Sets the particle array and number of particles. | |
| void | NotifyParticlesChanged () |
| Notifies the Graphic Module that the particles array changed. | |
| void | NotifyLastParticleDied () |
| Notifies the Scripting Module that the last particle died. | |
System Peers | |
| deBaseGraphicParticleEmitter * | GetGraphicPeer () const |
| Retrieves the graphic system peer object or NULL if not assigned. | |
| void | SetGraphicPeer (deBaseGraphicParticleEmitter *peer) |
| Sets the graphic system peer object or NULL if not assigned. | |
| deBasePhysicsParticleEmitter * | GetPhysicsPeer () const |
| Retrieves the physics system peer object or NULL if not assigned. | |
| void | SetPhysicsPeer (deBasePhysicsParticleEmitter *peer) |
| Sets the physics system peer object or NULL if not assigned. | |
| deBaseScriptingParticleEmitter * | GetScriptingPeer () const |
| Retrieves the scripting system peer object or NULL if not assigned. | |
| void | SetScriptingPeer (deBaseScriptingParticleEmitter *peer) |
| Sets the scripting system peer object or NULL if not assigned. | |
Linked List | |
| deWorld * | GetParentWorld () const |
| Retrieves the parent world or NULL. | |
| void | SetParentWorld (deWorld *world) |
| Sets the parent world or NULL. | |
| deParticleEmitter * | GetLLWorldPrev () const |
| Retrieves the previous particle emitter in the parent world linked list. | |
| void | SetLLWorldPrev (deParticleEmitter *emitter) |
| Sets the next particle emitter in the parent world linked list. | |
| deParticleEmitter * | GetLLWorldNext () const |
| Retrieves the next particle emitter in the parent world linked list. | |
| void | SetLLWorldNext (deParticleEmitter *emitter) |
| Sets the next particle emitter in the parent world linked list. | |
Particle Emitter.
Emits particles in the form of billboards. The position and orientation of the particle emitter defines where particles are produced and in which direction they are cast. The cast parameters are picked randomly between the minimum and maximum value. The state of particles is stored individually by the physics module. The Physics module has to provide the graphics related particle states for the Graphics module in addition to any internal states required for the simulation. This shared information has to be provided using an array of sParticle elements. The position of the particles are relative to the emitter position. The Scripting Module will be notified by the Physics Module about collisions of particles with world.
| deParticleEmitter::deParticleEmitter | ( | deParticleEmitterManager * | manager ) |
Creates a new particle emitter.
| virtual deParticleEmitter::~deParticleEmitter | ( | ) | [virtual] |
Cleans up the particle emitter.
| bool deParticleEmitter::CanHit | ( | const decLayerMask & | layerMask, |
| int | groupNumber | ||
| ) | const |
Determines if a particle instance can be hit by another object represented by a layer mask and a group number.
The layer mask and the group number of both entities are checked for a match. Group numbers match only if neither of them is 0.
| void deParticleEmitter::CastParticles | ( | int | count ) |
Cast particles burst like.
| deComponent* deParticleEmitter::GetComponent | ( | ) | const [inline] |
Retrieves the component used for casting or NULL.
| const deParticleEmitterController& deParticleEmitter::GetControllerAt | ( | int | index ) | const |
| deParticleEmitterController& deParticleEmitter::GetControllerAt | ( | int | index ) |
Retrieves the controller at the given index.
| int deParticleEmitter::GetControllerCount | ( | ) | const [inline] |
Retrieves the count of controllers.
| deDynamicSkin* deParticleEmitter::GetDynamicSkin | ( | ) | const [inline] |
Retrieves the dynamic skin or null if not used.
| bool deParticleEmitter::GetEnableCasting | ( | ) | const [inline] |
Determines if casting particles is enabled.
| bool deParticleEmitter::GetGraphicModuleSimulates | ( | ) | const [inline] |
Determines if the graphic module takes care of simulation.
| deBaseGraphicParticleEmitter* deParticleEmitter::GetGraphicPeer | ( | ) | const [inline] |
Retrieves the graphic system peer object or NULL if not assigned.
| int deParticleEmitter::GetGroupNumber | ( | ) | const [inline] |
Retrieves the group number or 0 if not set.
| decLayerMask& deParticleEmitter::GetLayerMask | ( | ) | [inline] |
Retrieves the layer mask.
| const decLayerMask& deParticleEmitter::GetLayerMask | ( | ) | const [inline] |
| deParticleEmitter* deParticleEmitter::GetLLWorldNext | ( | ) | const [inline] |
Retrieves the next particle emitter in the parent world linked list.
| deParticleEmitter* deParticleEmitter::GetLLWorldPrev | ( | ) | const [inline] |
Retrieves the previous particle emitter in the parent world linked list.
| float deParticleEmitter::GetMaxAngularVelocity | ( | ) | const [inline] |
Retrieves the maximum angular velocity for mapping as requested by the graphic module.
| float deParticleEmitter::GetMaxLinearVelocity | ( | ) | const [inline] |
Retrieves the maximum linear velocity for mapping as requested by the graphic module.
| const decQuaternion& deParticleEmitter::GetOrientation | ( | ) | const [inline] |
Retrieves the orientation.
| deParticleEmitterParameter& deParticleEmitter::GetParameter | ( | int | parameter ) |
Retrieves a parameter.
| const deParticleEmitterParameter& deParticleEmitter::GetParameter | ( | int | parameter ) | const |
| deWorld* deParticleEmitter::GetParentWorld | ( | ) | const [inline] |
Retrieves the parent world or NULL.
| sParticle* deParticleEmitter::GetParticleArray | ( | ) | const [inline] |
Retrieves the particle array or NULL if not set.
| int deParticleEmitter::GetParticleCount | ( | ) | const [inline] |
Retrieves the number of particles.
| deBasePhysicsParticleEmitter* deParticleEmitter::GetPhysicsPeer | ( | ) | const [inline] |
Retrieves the physics system peer object or NULL if not assigned.
| float deParticleEmitter::GetPhysicsSize | ( | ) | const [inline] |
Retrieves the physics size of the particle.
| const decDVector& deParticleEmitter::GetPosition | ( | ) | const [inline] |
Retrieves the position.
| deBaseScriptingParticleEmitter* deParticleEmitter::GetScriptingPeer | ( | ) | const [inline] |
Retrieves the scripting system peer object or NULL if not assigned.
| deSkin* deParticleEmitter::GetSkin | ( | ) | const [inline] |
Retrieves the skin of the particle instances or NULL.
| bool deParticleEmitter::GetSquareVelocities | ( | ) | const [inline] |
Determines if velocities have to be squared as requested by the graphic module.
| void deParticleEmitter::KillAllParticles | ( | ) |
Kill all particles.
| void deParticleEmitter::NotifyControllerChangedAt | ( | int | controller ) |
Notifies that the controller at the given index changed.
| void deParticleEmitter::NotifyLastParticleDied | ( | ) |
Notifies the Scripting Module that the last particle died.
| void deParticleEmitter::NotifyLayerMaskChanged | ( | ) |
Notifies the peers that the layer mask changed.
| void deParticleEmitter::NotifyParameterChanged | ( | int | parameter ) |
Notifies all that a parameter changed.
| void deParticleEmitter::NotifyParticlesChanged | ( | ) |
Notifies the Graphic Module that the particles array changed.
| void deParticleEmitter::SetComponent | ( | deComponent * | component ) |
Sets the component used for casting or NULL.
| void deParticleEmitter::SetControllerCount | ( | int | count ) |
Sets the number of controllers.
| void deParticleEmitter::SetDynamicSkin | ( | deDynamicSkin * | dynamicSkin ) |
Sets the dynamic skin or null if not used.
| void deParticleEmitter::SetEnableCasting | ( | bool | enable ) |
Sets if casting particles is enabled.
| void deParticleEmitter::SetGraphicModuleSimulates | ( | bool | graphicModuleSimulates ) |
Sets if the graphic module takes care of simulation.
| void deParticleEmitter::SetGraphicPeer | ( | deBaseGraphicParticleEmitter * | peer ) |
Sets the graphic system peer object or NULL if not assigned.
| void deParticleEmitter::SetGroupNumber | ( | int | groupNumber ) |
Sets the group number or 0 if not set.
| void deParticleEmitter::SetLLWorldNext | ( | deParticleEmitter * | emitter ) |
Sets the next particle emitter in the parent world linked list.
| void deParticleEmitter::SetLLWorldPrev | ( | deParticleEmitter * | emitter ) |
Sets the next particle emitter in the parent world linked list.
| void deParticleEmitter::SetMaxAngularVelocity | ( | float | maxAngularVelocity ) |
Sets the maximum angular velocity for mapping as requested by the graphic module.
| void deParticleEmitter::SetMaxLinearVelocity | ( | float | maxLinearVelocity ) |
Sets the maximum linear velocity for mapping as requested by the graphic module.
| void deParticleEmitter::SetOrientation | ( | const decQuaternion & | orientation ) |
Sets the orientation.
| void deParticleEmitter::SetParentWorld | ( | deWorld * | world ) |
Sets the parent world or NULL.
| void deParticleEmitter::SetParticleArray | ( | sParticle * | particleArray, |
| int | count | ||
| ) |
Sets the particle array and number of particles.
Used by the Physics Module to set the particle array for the Graphic Module to render later on.
| void deParticleEmitter::SetPhysicsPeer | ( | deBasePhysicsParticleEmitter * | peer ) |
Sets the physics system peer object or NULL if not assigned.
| void deParticleEmitter::SetPhysicsSize | ( | float | size ) |
Sets the physics size of the particle.
| void deParticleEmitter::SetPosition | ( | const decDVector & | position ) |
Sets the position.
| void deParticleEmitter::SetScriptingPeer | ( | deBaseScriptingParticleEmitter * | peer ) |
Sets the scripting system peer object or NULL if not assigned.
| void deParticleEmitter::SetSkin | ( | deSkin * | skin ) |
Sets the mode of the particle instances or NULL.
| void deParticleEmitter::SetSquareVelocities | ( | bool | squareVelocities ) |
Sets if velocities have to be squared as requested by the graphic module.
1.7.2