18 #ifndef INCLUDED_PARTICLEEMITTER
19 #define INCLUDED_PARTICLEEMITTER
184 #endif // INCLUDED_PARTICLEEMITTER
void Unattach(const CParticleEmitterPtr &self)
Stop this emitter emitting new particles, and pass responsibility for rendering to the CParticleManag...
virtual void SetTransform(const CMatrix3D &transform)
#define UNUSED(param)
mark a function parameter as unused and avoid the corresponding compiler warning. ...
CParticleEmitterPtr m_Emitter
bool m_Active
Whether this emitter is still emitting new particles.
void UpdateArrayData()
Update particle and vertex array data.
shared_ptr< CParticleEmitterType > CParticleEmitterTypePtr
CModelParticleEmitter(const CParticleEmitterTypePtr &type)
void SetPosition(const CVector3D &pos)
Set the position to be used for emission of new particles.
void AddParticle(const SParticle &particle)
Push a new particle onto the ring buffer.
virtual CModelAbstract * Clone() const
std::vector< SParticle > m_Particles
void RenderArray(const CShaderProgramPtr &shader)
Draw the vertex array.
shared_ptr< CParticleEmitter > CParticleEmitterPtr
A VertexArray that is specialised to handle 16-bit array indices.
float m_EmissionRoundingError
virtual void InvalidatePosition()
Mark this model's position and bone matrices, and all props' positions as invalid.
void Bind(const CShaderProgramPtr &shader)
Bind rendering state (textures and blend modes).
VertexArray m_VertexArray
virtual CModelParticleEmitter * ToCModelParticleEmitter()
Dynamic cast.
VertexArray::Attribute m_AttributeAxis
VertexArray::Attribute m_AttributeUV
VertexArray::Attribute m_AttributeColor
void SetDirty(u32 dirtyflags)
CBoundingBoxAligned GetParticleBounds()
Get the bounding box of the center points of particles at their current positions.
virtual void SetEntityVariable(const std::string &name, float value)
Called when the entity tries to set some variable to affect the display of this model and/or its chil...
VertexIndexArray m_IndexArray
virtual void ValidatePosition()
Ensure that both the transformation and the bone matrices are correct for this model and all its prop...
Abstract base class for graphical objects that are used by units, or as props attached to other CMode...
virtual void SetTerrainDirty(ssize_t i0, ssize_t j0, ssize_t i1, ssize_t j1)
Called when terrain has changed in the given inclusive bounds.
virtual void SetDirtyRec(int dirtyflags)
Calls SetDirty on this model and all child objects.
CBoundingBoxAligned m_ParticleBounds
Bounding box of the current particle center points.
Particle emitter model, for attaching emitters as props on other models.
std::map< std::string, float > m_EntityVariables
virtual void CalcBounds()
(Re)calculates and stores any bounds or bound-dependent data for this object.
CVector3D GetPosition() const
shared_ptr< CShaderProgram > CShaderProgramPtr
VertexArray::Attribute m_AttributePos
Simulation state for a single particle.
CParticleEmitter(const CParticleEmitterTypePtr &type)
CParticleEmitterTypePtr m_Type
CParticleEmitterTypePtr m_Type
void SetEntityVariable(const std::string &name, float value)