|
| virtual void | initComponent () |
| | Initializes component data and required ECS systems.
|
| virtual void | startComponent () |
| | Starts the component, loading the particle source if set.
|
| virtual void | updateComponent () |
| | Updates the internal frame counter.
|
| virtual CObjectSerializable * | createSerializable () |
| | Creates a serializable object for property editing.
|
| virtual void | loadSerializable (CObjectSerializable *object) |
| | Loads properties from a serializable object.
|
| CFactory * | getParticleFactory () |
| | Gets the internal particle factory.
|
| CParticleBufferData * | getData () |
| | Gets the ECS entity data holding particle groups.
|
| void | setGroupTransform (const core::matrix4 &world) |
| | Updates the transform of all particle groups.
|
| CGroup * | createParticleGroup () |
| | Creates a new top-level particle group managed by this component.
|
| CSubGroup * | createParticleSubGroup (CGroup *group) |
| | Creates a sub-group attached to a parent group.
|
|
u32 | getNumOfGroup () |
| | Gets the number of top-level groups.
|
|
CGroup * | getGroup (int i) |
| | Retrieves a specific group by index.
|
|
void | removeParticleGroup (CGroup *group) |
| | Removes a specific group from the component.
|
| void | updateParticleCountByPercentage (float f, bool includeSubGroup=false) |
| | Dynamically adjusts the emission rate of all emitters.
|
|
void | Play () |
| | Resets all emitters and starts playback.
|
|
void | Stop () |
| | Stops all emitters and clears immortal particles.
|
|
bool | IsPlaying () |
| | Checks if any particle is currently alive.
|
|
void | clearParticles () |
| | Immediately removes all active particles across all groups.
|
|
u32 | getTotalParticle () |
| | Gets the total count of active particles in all groups.
|
|
const char * | getSourcePath () |
| | Gets the current .particle file path.
|
|
void | setSourcePath (const char *path) |
| | Sets the .particle file path.
|
| bool | load () |
| | Loads the particle system configuration from m_sourcePath.
|
| bool | save () |
| | Saves the current particle system configuration to m_sourcePath.
|
|
int | getFrameUpdated () |
| | Gets the current frame update count.
|
|
CGroup * | duplicateGroup (CGroup *group) |
| | Clones a particle group.
|
|
CEmitter * | duplicateEmitter (CGroup *group, CEmitter *emitter) |
| | Clones an emitter within a group.
|
|
const char * | getName () |
| virtual void | reset () |
| virtual void | endUpdate () |
|
virtual void | onEnable (bool b) |
|
virtual void | onUpdateCullingLayer (u32 mask) |
|
void | setEnable (bool b) |
|
bool | isEnable () |
|
CGameObject * | getGameObject () |
|
void | setEnableSerializable (bool b) |
|
bool | isSerializable () |
|
void | addLinkComponent (CComponentSystem *comp) |
|
void | removeAllLink () |
|
virtual | ~IActivatorObject () |
| | Virtual destructor for polymorphic activator objects.
|
Main component for creating and managing a particle system in Skylicht.
This component integrates the particle engine with the ECS architecture. It manages particle groups, emitters, and zones, and handles serialization to .particle files.
Example
CGameObject *psObj = zone->createEmptyObject();
group->LifeMax = 2.0f;
group->setRenderer(renderer);
Base class for particle emitters.
Definition CEmitter.h:88
void setFlow(float flow)
Sets continuous birth rate (particles per second).
Definition CEmitter.h:213
void setForce(float min, float max)
Sets initial velocity force range.
Definition CEmitter.h:247
CZone * setZone(CZone *z)
Sets the spawn zone.
Definition CEmitter.h:151
Factory class for creating emitters, zones, and renderers.
Definition CFactory.h:61
CRandomEmitter * createRandomEmitter()
Creates a new Random emitter.
CSphere * createSphereZone(const core::vector3df &pos, float radius)
Creates a Sphere zone.
CQuadRenderer * createQuadRenderer()
Creates a GPU instanced quad renderer.
Represents a group of particles with shared settings, emitters, and a renderer.
Definition CGroup.h:132
float LifeMin
Minimum life time for newly born particles.
Definition CGroup.h:171
Main component for creating and managing a particle system in Skylicht.
Definition CParticleComponent.h:66
CFactory * getParticleFactory()
Gets the internal particle factory.
Definition CParticleComponent.h:124
CGroup * createParticleGroup()
Creates a new top-level particle group managed by this component.
Optimized GPU instancing renderer for billboard particles.
Definition CQuadRenderer.h:72
void setTexturePath(const char *path)
Loads and sets the main texture.
vector3d< f32 > vector3df
Typedef for a f32 3d vector.
Definition vector3d.h:445