![]() |
Skylicht Engine
|
Base class for particle emitters. More...
#include <ParticleSystem/Particles/Emitters/CEmitter.h>
Public Member Functions | |
| CEmitter (EEmitter type) | |
| virtual CObjectSerializable * | createSerializable () |
| Creates a serializable object for property editing or saving. | |
| virtual void | loadSerializable (CObjectSerializable *object) |
| Loads properties from a serializable object. | |
| virtual bool | haveDirection () |
| Returns true if this emitter has a primary direction. | |
| CZone * | setZone (CZone *z) |
| Sets the spawn zone. | |
| CZone * | getZone () |
| Gets the current spawn zone. | |
| void | stop () |
| Stops the emitter immediately. | |
| void | setTank (int tank) |
| Sets the tank capacity and current value. | |
| void | resetTank () |
| Resets the tank and flow logic. | |
| int | getTank () |
| Gets current tank value. | |
| int | getLastTank () |
| Gets last set tank value. | |
| void | setTankValue (int tank) |
| Updates the persistent tank value without immediate reset. | |
| int | getDefaultTank () |
| Gets default tank from serializable data. | |
| float | getDefaultFlow () |
| Gets default flow from serializable data. | |
| void | setFlow (float flow) |
| Sets continuous birth rate (particles per second). | |
| float | getFlow () |
| Gets current flow rate. | |
| void | setActive (bool b) |
| Enables or disables the emitter. | |
| bool | isActive () |
| Checks if emitter is active. | |
| void | setDelay (float timeSecond) |
| Sets start delay in seconds. | |
| void | setForce (float min, float max) |
| Sets initial velocity force range. | |
| float | getForceMin () |
| Gets min force. | |
| float | getForceMax () |
| Gets max force. | |
| void | setResetTankInterval (float min, float max) |
| Sets interval for automatic tank resets. | |
| void | setEmitFullZone (bool b) |
| Sets volume spawn mode. | |
| bool | isEmitFullZone () |
| Checks volume spawn mode. | |
| EEmitter | getType () |
| Gets emitter type. | |
| const wchar_t * | getName () |
| Gets display name. | |
| virtual u32 | updateNumber (float deltaTime) |
| Calculates how many particles should be born this frame. | |
| virtual void | setBornData (SBornData &data) |
| Initializes birth data for sub-emitters. | |
| u32 | updateBornData (u32 index, float deltaTime) |
| Internal: updates birth calculation for a specific sub-group particle index. | |
| virtual u32 | updateBornData (SBornData &data, float deltaTime) |
| Internal: core logic for sub-emitter birth calculation. | |
| void | clearBornData () |
| Clears sub-emitter birth records. | |
| void | generateVelocity (CParticle &particle, CZone *zone, CGroup *group) |
| Generates initial velocity for a particle. | |
| void | emitParticle (CParticle &particle, CZone *zone, CGroup *group) |
| Full emission logic: generates position and velocity. | |
| virtual void | generateVelocity (CParticle &particle, float speed, CZone *zone, CGroup *group)=0 |
| Implementation-specific velocity generation. | |
| u32 | addBornData () |
| Adds a new sub-emitter record. | |
| void | swapBornData (int index1, int index2) |
| Swaps sub-emitter records (for array reordering). | |
| void | deleteBornData () |
| Removes a sub-emitter record. | |
Protected Attributes | |
| int | m_lastTank |
| int | m_defaultTank |
| int | m_tank |
| Current particles remaining in the tank. | |
| float | m_flow |
| Current birth rate (particles per second). | |
| float | m_lastFlow |
| float | m_defaultFlow |
| float | m_flowLifeTime |
| Duration of the flow logic before it stops. | |
| float | m_forceMin |
| Minimum magnitude of initial velocity. | |
| float | m_forceMax |
| Maximum magnitude of initial velocity. | |
| float | m_fraction |
| bool | m_active |
| Active status. | |
| bool | m_emitFullZone |
| Whether to spawn particles randomly within the zone volume. | |
| float | m_delay |
| Configured delay. | |
| float | m_waitDelay |
| Current waiting time for delay. | |
| float | m_lifeTime |
| Total time elapsed since start. | |
| float | m_reset |
| Current reset timer. | |
| float | m_resetIntervalMin |
| Min interval for auto-resetting the tank. | |
| float | m_resetIntervalMax |
| Max interval for auto-resetting the tank. | |
| CZone * | m_zone |
| The spawn zone assigned to this emitter. | |
| EEmitter | m_type |
| Type of the emitter. | |
| core::array< SBornData > | m_bornData |
| Internal: birth data for sub-emitters. | |
Base class for particle emitters.
Emitters control how many particles are born per second (Flow) and their initial velocity. They can operate in "Flow" mode (continuous) or "Tank" mode (limited count).
|
virtual |
Creates a serializable object for property editing or saving.
Reimplemented from Skylicht::Particle::CParticleSerializable.
Reimplemented in Skylicht::Particle::CNormalEmitter, Skylicht::Particle::CSphericEmitter, and Skylicht::Particle::CStraightEmitter.
|
pure virtual |
Implementation-specific velocity generation.
Implemented in Skylicht::Particle::CNormalEmitter, Skylicht::Particle::CRandomEmitter, Skylicht::Particle::CSphericEmitter, and Skylicht::Particle::CStraightEmitter.
|
inlinevirtual |
Returns true if this emitter has a primary direction.
Reimplemented in Skylicht::Particle::CDirectionEmitter.
|
virtual |
Loads properties from a serializable object.
| object | The serializable data to load. |
Reimplemented from Skylicht::Particle::CParticleSerializable.
Reimplemented in Skylicht::Particle::CNormalEmitter, Skylicht::Particle::CSphericEmitter, and Skylicht::Particle::CStraightEmitter.