Represents a group of particles with shared settings, emitters, and a renderer.
More...
|
|
void | clearParticles () |
| | Clears all active particles.
|
|
void | clearImmortalParticles () |
| | Clears only immortal particles.
|
|
void | update () |
| | Main update loop for particle physics and lifecycle.
|
|
void | updateForRenderer () |
| | Updates buffers for rendering.
|
|
void | setGravityRotation (const core::vector3df &euler) |
| | Sets gravity direction using euler rotation.
|
|
void | setParticleRotation (const core::vector3df &euler) |
| | Sets particle orientation using euler rotation.
|
|
void | setParentWorldMatrix (const core::matrix4 &m) |
| | Sets the parent entity's world matrix.
|
|
void | setWorldMatrix (const core::matrix4 &m) |
| | Sets the local-to-world transform of this group.
|
|
const core::matrix4 & | getWorld () |
| | Gets the world matrix of this group.
|
| virtual core::vector3df | getTransformPosition (const core::vector3df &pos) |
| | Transforms a position from local group space to world space.
|
| virtual core::vector3df | getTransformVector (const core::vector3df &vec) |
| | Transforms a vector (rotation only) from local group space to world space.
|
|
const core::aabbox3df & | getBBox () |
| | Gets the bounding box of all active particles.
|
|
u32 | getNumParticles () |
| | Gets current particle count.
|
|
CParticle * | getParticlePointer () |
| | Gets raw pointer to particle array.
|
|
CEmitter * | addEmitter (CEmitter *e) |
| | Adds an emitter to the group.
|
|
std::vector< CEmitter * > & | getEmitters () |
| | Gets all emitters.
|
|
void | removeEmitter (CEmitter *e) |
| | Removes an emitter.
|
|
void | addCallback (IParticleCallback *cb) |
| | Adds a lifecycle callback.
|
|
void | removeCallback (IParticleCallback *cb) |
| | Removes a lifecycle callback.
|
|
std::vector< IParticleCallback * > & | getCallback () |
| | Gets all callbacks.
|
|
void | addSystem (ISystem *s) |
| | Adds a custom system to process particles.
|
|
std::vector< ISystem * > & | getSystems () |
| | Gets all systems.
|
|
void | removeSystem (ISystem *s) |
| | Removes a system.
|
|
int | addParticle (u32 emiterID, const core::vector3df &position, const core::vector3df &subEmitterDirection) |
| | Manually spawns a particle using an emitter index.
|
|
int | addParticleVelocity (u32 emiterID, const core::vector3df &position, const core::vector3df &velocity) |
| | Manually spawns a particle with initial velocity using an emitter index.
|
|
int | addParticleByEmitter (CEmitter *emitter, const core::vector3df &position, const core::vector3df &subEmitterDirection) |
| | Manually spawns a particle using a pointer to an emitter.
|
|
int | addParticleVelocityByEmitter (CEmitter *emitter, const core::vector3df &position, const core::vector3df &velocity) |
| | Manually spawns a particle with initial velocity using a pointer to an emitter.
|
|
IRenderer * | setRenderer (IRenderer *r) |
| | Assigns a renderer to this group.
|
|
IRenderer * | getRenderer () |
| | Gets the current renderer.
|
|
CParticleInstancing * | getIntancing () |
| | Internal: gets instancing buffer.
|
|
CParticleCPUBuffer * | getParticleBuffer () |
| | Internal: gets CPU mesh buffer.
|
|
u32 | getCurrentParticleCount () |
| | Gets current particle count.
|
|
CModel * | createModel (const std::wstring &attributeName) |
| | Creates or retrieves a model for a specific parameter name.
|
|
CModel * | createModel (EParticleParams param) |
| | Creates or retrieves a model for a specific parameter type.
|
|
CModel * | getModel (EParticleParams param) |
| | Finds a model for a parameter type.
|
|
void | deleteModel (EParticleParams param) |
| | Deletes a model.
|
|
std::vector< CModel * > & | getModels () |
| | Gets all models.
|
|
CInterpolator * | createInterpolator () |
| | Creates a new interpolator.
|
|
void | deleteInterpolator (CInterpolator *interpolator) |
| | Deletes an interpolator.
|
|
std::vector< CInterpolator * > & | getInterpolators () |
| | Gets all interpolators.
|
|
core::array< CParticle > & | getParticles () |
| | Gets raw access to particle list.
|
|
int | getFrameUpdate () |
| | Gets last frame index update.
|
|
void | updateFrame (int frame) |
| | Syncs frame count.
|
| virtual CObjectSerializable * | createSerializable () |
| | Creates a serializable object for property editing or saving.
|
| virtual void | loadSerializable (CObjectSerializable *object) |
| | Loads properties from a serializable object.
|
|
|
float | Friction |
| | Global friction for all particles in this group.
|
|
float | LifeMin |
| | Minimum life time for newly born particles.
|
|
float | LifeMax |
| | Maximum life time for newly born particles.
|
|
bool | Immortal |
| | If true, particles do not die from age.
|
|
float | GravityValue |
| | Gravity magnitude.
|
|
core::vector3df | GravityRotation |
| | Gravity rotation (euler angles).
|
|
core::vector3df | ParticleRotation |
| | Global rotation for all particles.
|
|
core::vector3df | Gravity |
| | Calculated gravity vector.
|
|
core::vector3df | OrientationNormal |
| | Custom orientation normal for fixed billboarding.
|
|
core::vector3df | OrientationUp |
| | Custom orientation up vector for fixed billboarding.
|
|
bool | UseOrientationAsBillboard |
| | Whether to use custom orientation instead of camera billboard.
|
|
std::wstring | Name |
| | Friendly name of the group.
|
|
bool | Visible |
| | Visibility flag.
|
|
bool | Optimized |
| | If true, uses optimized particle swap on deletion (may affect sorting).
|
Represents a group of particles with shared settings, emitters, and a renderer.
Groups manage the lifecycle of particles, their properties (life, friction, gravity), and the systems that affect them.
Example
group->
Gravity.set(0.0f, -10.0f, 0.0f);
Represents a group of particles with shared settings, emitters, and a renderer.
Definition CGroup.h:132
float Friction
Global friction for all particles in this group.
Definition CGroup.h:169
float LifeMin
Minimum life time for newly born particles.
Definition CGroup.h:171
core::vector3df Gravity
Calculated gravity vector.
Definition CGroup.h:185
float LifeMax
Maximum life time for newly born particles.
Definition CGroup.h:173
CModel * createModel(const std::wstring &attributeName)
Creates or retrieves a model for a specific parameter name.
CModel * setEnd(float f)
Sets fixed end value.
Definition CModel.h:112
CModel * setStart(float f)
Sets fixed start value.
Definition CModel.h:94