Pyrogenesis trunk
Public Member Functions | Public Attributes | List of all members
CModelParticleEmitter Class Reference

Particle emitter model, for attaching emitters as props on other models. More...

#include <ParticleEmitter.h>

Inheritance diagram for CModelParticleEmitter:
Inheritance graph
[legend]
Collaboration diagram for CModelParticleEmitter:
Collaboration graph
[legend]

Public Member Functions

 CModelParticleEmitter (const CParticleEmitterTypePtr &type)
 
 ~CModelParticleEmitter () override
 
CModelParticleEmitterToCModelParticleEmitter () override
 Dynamic cast. More...
 
std::unique_ptr< CModelAbstractClone () const override
 
void SetTerrainDirty (ssize_t i0, ssize_t j0, ssize_t i1, ssize_t j1) override
 Called when terrain has changed in the given inclusive bounds. More...
 
void SetEntityVariable (const std::string &name, float value) override
 Called when the entity tries to set some variable to affect the display of this model and/or its child objects. More...
 
void CalcBounds () override
 (Re)calculates and stores any bounds or bound-dependent data for this object. More...
 
void ValidatePosition () override
 Ensure that both the transformation and the bone matrices are correct for this model and all its props. More...
 
void InvalidatePosition () override
 Mark this model's position and bone matrices, and all props' positions as invalid. More...
 
void SetTransform (const CMatrix3D &transform) override
 
- Public Member Functions inherited from CModelAbstract
 CModelAbstract ()
 
virtual ~CModelAbstract ()
 
virtual std::unique_ptr< CModelAbstractClone () const =0
 
virtual CModelDummyToCModelDummy ()
 Dynamic cast. More...
 
virtual CModelToCModel ()
 Dynamic cast. More...
 
virtual CModelDecalToCModelDecal ()
 Dynamic cast. More...
 
virtual CModelParticleEmitterToCModelParticleEmitter ()
 Dynamic cast. More...
 
virtual const CBoundingBoxAligned GetWorldBoundsRec ()
 Returns world space bounds of this object and all child objects. More...
 
virtual const CBoundingBoxOrientedGetSelectionBox ()
 Returns the world-space selection box of this model. More...
 
virtual void InvalidateBounds ()
 Marks the bounds as invalid. More...
 
void SetCustomSelectionShape (CustomSelectionShape *descriptor)
 Sets a custom selection shape as described by a descriptor. More...
 
virtual const CBoundingBoxAligned GetObjectSelectionBoundsRec ()
 Returns the (object-space) bounds that should be used to construct a selection box for this model and its children. More...
 
virtual void SetTerrainDirty (ssize_t i0, ssize_t j0, ssize_t i1, ssize_t j1)=0
 Called when terrain has changed in the given inclusive bounds. More...
 
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 child objects. More...
 
virtual void ValidatePosition ()=0
 Ensure that both the transformation and the bone matrices are correct for this model and all its props. More...
 
virtual void InvalidatePosition ()=0
 Mark this model's position and bone matrices, and all props' positions as invalid. More...
 
virtual void SetPlayerID (player_id_t id)
 
virtual player_id_t GetPlayerID () const
 
virtual void SetShadingColor (const CColor &color)
 
virtual const CColorGetShadingColor () const
 
- Public Member Functions inherited from CRenderableObject
 CRenderableObject ()
 
virtual ~CRenderableObject ()
 
virtual void SetTransform (const CMatrix3D &transform)
 
const CMatrix3DGetTransform () const
 
const CMatrix3DGetInvTransform () const
 
void SetDirty (u32 dirtyflags)
 
virtual void CalcBounds ()=0
 (Re)calculates and stores any bounds or bound-dependent data for this object. More...
 
const CBoundingBoxAlignedGetWorldBounds ()
 Returns the world-space axis-aligned bounds of this object. More...
 
virtual void InvalidateBounds ()
 Marks the bounds as invalid. More...
 
void SetRenderData (CRenderData *renderdata)
 
CRenderDataGetRenderData ()
 Return object renderdata - can be null if renderer hasn't yet created the renderdata. More...
 

Public Attributes

CParticleEmitterTypePtr m_Type
 
CParticleEmitterPtr m_Emitter
 
- Public Attributes inherited from CModelAbstract
CModelAbstractm_Parent
 If non-null, points to the model that we are attached to. More...
 
bool m_PositionValid
 True if both transform and and bone matrices are valid. More...
 
player_id_t m_PlayerID
 
CColor m_ShadingColor
 Modulating color. More...
 

Additional Inherited Members

- Protected Member Functions inherited from CModelAbstract
void CalcSelectionBox ()
 
- Protected Member Functions inherited from CRenderableObject
void RecalculateBoundsIfNecessary ()
 Factored out so subclasses don't need to repeat this if they want to add additional getters for bounds-related methods (since they'll have to make sure to recalc the bounds if necessary before they return it). More...
 
- Protected Attributes inherited from CModelAbstract
CBoundingBoxOriented m_SelectionBox
 Selection box for this model. More...
 
bool m_SelectionBoxValid
 Is the current selection box valid? More...
 
CustomSelectionShapem_CustomSelectionShape
 Pointer to a descriptor for a custom-defined selection box shape. More...
 
- Protected Attributes inherited from CRenderableObject
CBoundingBoxAligned m_WorldBounds
 World-space bounds of this object. More...
 
CMatrix3D m_Transform
 
CMatrix3D m_InvTransform
 
CRenderDatam_RenderData
 
bool m_BoundsValid
 Remembers whether any bounds need to be recalculated. More...
 

Detailed Description

Particle emitter model, for attaching emitters as props on other models.

Constructor & Destructor Documentation

◆ CModelParticleEmitter()

CModelParticleEmitter::CModelParticleEmitter ( const CParticleEmitterTypePtr type)

◆ ~CModelParticleEmitter()

CModelParticleEmitter::~CModelParticleEmitter ( )
override

Member Function Documentation

◆ CalcBounds()

void CModelParticleEmitter::CalcBounds ( )
overridevirtual

(Re)calculates and stores any bounds or bound-dependent data for this object.

At this abstraction level, this is only the world-space bounds stored in m_WorldBounds; subclasses may use this method to (re)compute additional bounds if necessary, or any data that depends on the bounds. Whenever bound-dependent data is requested through a public interface, RecalculateBoundsIfNecessary should be called first to ensure bound correctness, which will in turn call this method if it turns out that they're outdated.

See also
m_BoundsValid
RecalculateBoundsIfNecessary

Implements CRenderableObject.

◆ Clone()

std::unique_ptr< CModelAbstract > CModelParticleEmitter::Clone ( ) const
overridevirtual

Implements CModelAbstract.

◆ InvalidatePosition()

void CModelParticleEmitter::InvalidatePosition ( )
overridevirtual

Mark this model's position and bone matrices, and all props' positions as invalid.

Implements CModelAbstract.

◆ SetEntityVariable()

void CModelParticleEmitter::SetEntityVariable ( const std::string &  name,
float  value 
)
overridevirtual

Called when the entity tries to set some variable to affect the display of this model and/or its child objects.

Reimplemented from CModelAbstract.

◆ SetTerrainDirty()

void CModelParticleEmitter::SetTerrainDirty ( ssize_t  i0,
ssize_t  j0,
ssize_t  i1,
ssize_t  j1 
)
inlineoverridevirtual

Called when terrain has changed in the given inclusive bounds.

Might call SetDirty if the change affects this model.

Implements CModelAbstract.

◆ SetTransform()

void CModelParticleEmitter::SetTransform ( const CMatrix3D transform)
overridevirtual

Reimplemented from CRenderableObject.

◆ ToCModelParticleEmitter()

CModelParticleEmitter * CModelParticleEmitter::ToCModelParticleEmitter ( )
inlineoverridevirtual

Dynamic cast.

Reimplemented from CModelAbstract.

◆ ValidatePosition()

void CModelParticleEmitter::ValidatePosition ( )
overridevirtual

Ensure that both the transformation and the bone matrices are correct for this model and all its props.

Implements CModelAbstract.

Member Data Documentation

◆ m_Emitter

CParticleEmitterPtr CModelParticleEmitter::m_Emitter

◆ m_Type

CParticleEmitterTypePtr CModelParticleEmitter::m_Type

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