Pyrogenesis  trunk
Public Member Functions | Private Types | Private Member Functions | Private Attributes | Friends | List of all members
CParticleEmitterType Class Reference

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>

Collaboration diagram for CParticleEmitterType:
Collaboration graph
[legend]

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
}
 
typedef shared_ptr< IParticleVarIParticleVarPtr
 
typedef shared_ptr< IParticleEffectorIParticleEffectorPtr
 

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
 
GLenum m_BlendEquation
 
GLenum m_BlendFuncSrc
 
GLenum m_BlendFuncDst
 
bool m_StartFull
 
bool m_UseRelativeVelocity
 
float m_MaxLifetime
 
size_t m_MaxParticles
 
CBoundingBoxAligned m_MaxBounds
 
std::vector< IParticleVarPtrm_Variables
 
std::vector< IParticleEffectorPtrm_Effectors
 
CParticleManagerm_Manager
 

Friends

class CModelParticleEmitter
 
class CParticleEmitter
 
class CParticleVarConstant
 
class CParticleVarUniform
 
class CParticleVarCopy
 
class ParticleRenderer
 

Detailed Description

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.

Member Typedef Documentation

Member Enumeration Documentation

anonymous enum
private
Enumerator
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 

Constructor & Destructor Documentation

CParticleEmitterType::CParticleEmitterType ( const VfsPath path,
CParticleManager manager 
)

Member Function Documentation

CBoundingBoxAligned CParticleEmitterType::CalculateBounds ( CVector3D  emitterPos,
CBoundingBoxAligned  emittedBounds 
)
private
int CParticleEmitterType::GetVariableID ( const std::string &  name)
private
bool CParticleEmitterType::LoadXML ( const VfsPath path)
private
CParticleEmitterType::NONCOPYABLE ( CParticleEmitterType  )
private
void CParticleEmitterType::UpdateEmitter ( CParticleEmitter emitter,
float  dt 
)
private

Update the state of an emitter's particles, by a potentially long time dt.

void CParticleEmitterType::UpdateEmitterStep ( CParticleEmitter emitter,
float  dt 
)
private

Update the state of an emitter's particles, by a short time dt that can be computed in a single step.

Friends And Related Function Documentation

friend class CModelParticleEmitter
friend
friend class CParticleEmitter
friend
friend class CParticleVarConstant
friend
friend class CParticleVarCopy
friend
friend class CParticleVarUniform
friend
friend class ParticleRenderer
friend

Member Data Documentation

GLenum CParticleEmitterType::m_BlendEquation
private
GLenum CParticleEmitterType::m_BlendFuncDst
private
GLenum CParticleEmitterType::m_BlendFuncSrc
private
std::vector<IParticleEffectorPtr> CParticleEmitterType::m_Effectors
private
CParticleManager& CParticleEmitterType::m_Manager
private
CBoundingBoxAligned CParticleEmitterType::m_MaxBounds
private
float CParticleEmitterType::m_MaxLifetime
private
size_t CParticleEmitterType::m_MaxParticles
private
bool CParticleEmitterType::m_StartFull
private
CTexturePtr CParticleEmitterType::m_Texture
private
bool CParticleEmitterType::m_UseRelativeVelocity
private
std::vector<IParticleVarPtr> CParticleEmitterType::m_Variables
private

The documentation for this class was generated from the following files: