Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
|
Particle emitter type - stores the common state data for all emitters of that type, and uses that data to update the emitter states. More...
#include <ParticleEmitterType.h>
Public Member Functions | |
CParticleEmitterType (const VfsPath &path, CParticleManager &manager) | |
Private Types | |
enum | { VAR_EMISSIONRATE , VAR_LIFETIME , VAR_POSITION_X , VAR_POSITION_Y , VAR_POSITION_Z , VAR_ANGLE , VAR_VELOCITY_X , VAR_VELOCITY_Y , VAR_VELOCITY_Z , VAR_VELOCITY_ANGLE , VAR_SIZE , VAR_SIZE_GROWTHRATE , VAR_COLOR_R , VAR_COLOR_G , VAR_COLOR_B , VAR__MAX } |
enum class | BlendMode { ADD , SUBTRACT , OVERLAY , MULTIPLY } |
typedef std::shared_ptr< IParticleVar > | IParticleVarPtr |
typedef std::shared_ptr< IParticleEffector > | IParticleEffectorPtr |
Private Member Functions | |
NONCOPYABLE (CParticleEmitterType) | |
int | GetVariableID (const std::string &name) |
bool | LoadXML (const VfsPath &path) |
void | UpdateEmitter (CParticleEmitter &emitter, float dt) |
Update the state of an emitter's particles, by a potentially long time dt . More... | |
void | UpdateEmitterStep (CParticleEmitter &emitter, float dt) |
Update the state of an emitter's particles, by a short time dt that can be computed in a single step. More... | |
CBoundingBoxAligned | CalculateBounds (CVector3D emitterPos, CBoundingBoxAligned emittedBounds) |
Private Attributes | |
CTexturePtr | m_Texture |
BlendMode | m_BlendMode = BlendMode::ADD |
bool | m_StartFull |
bool | m_UseRelativeVelocity |
float | m_MaxLifetime |
u16 | m_MaxParticles |
CBoundingBoxAligned | m_MaxBounds |
std::vector< IParticleVarPtr > | m_Variables |
std::vector< IParticleEffectorPtr > | m_Effectors |
CParticleManager & | m_Manager |
Friends | |
class | CModelParticleEmitter |
class | CParticleEmitter |
class | CParticleVarConstant |
class | CParticleVarUniform |
class | CParticleVarCopy |
class | ParticleRenderer |
Particle emitter type - stores the common state data for all emitters of that type, and uses that data to update the emitter states.
The data is initialised from XML files.
Most of the emitter type data is represented as subclasses of IParticleVar, which will typically return a constant value or a random value each time it's evaluated. New subclasses can be added to support different random distributions, etc.
|
private |
|
private |
|
private |
|
strongprivate |
CParticleEmitterType::CParticleEmitterType | ( | const VfsPath & | path, |
CParticleManager & | manager | ||
) |
|
private |
|
private |
|
private |
|
private |
|
private |
Update the state of an emitter's particles, by a potentially long time dt
.
|
private |
Update the state of an emitter's particles, by a short time dt
that can be computed in a single step.
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |