18 #ifndef INCLUDED_MODELABSTRACT
19 #define INCLUDED_MODELABSTRACT
191 #endif // INCLUDED_MODELABSTRACT
The selection shape is determined by a cylinder of custom, user-specified size.
#define UNUSED(param)
mark a function parameter as unused and avoid the corresponding compiler warning. ...
float m_Size0
Box width if BOX, or radius if CYLINDER.
virtual void SetPlayerID(player_id_t id)
virtual CModelParticleEmitter * ToCModelParticleEmitter()
Dynamic cast.
float m_Height
Box height if BOX, cylinder height if CYLINDER.
static const CBoundingBoxAligned EMPTY
float m_Size1
Box depth if BOX, or radius if CYLINDER.
virtual void InvalidatePosition()=0
Mark this model's position and bone matrices, and all props' positions as invalid.
CColor m_ShadingColor
Modulating color.
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.
virtual const CBoundingBoxOriented & GetSelectionBox()
Returns the world-space selection box of this model.
void SetCustomSelectionShape(CustomSelectionShape *descriptor)
Sets a custom selection shape as described by a descriptor.
virtual CModelAbstract * Clone() const =0
bool m_PositionValid
True if both transform and and bone matrices are valid.
int32_t player_id_t
valid player IDs are non-negative (see ICmpOwnership)
Describes a custom selection shape to be used for a model's selection box instead of the default recu...
virtual void SetDirtyRec(int dirtyflags)=0
Calls SetDirty on this model and all child objects.
bool m_BoundsValid
Remembers whether any bounds need to be recalculated.
CustomSelectionShape * m_CustomSelectionShape
Pointer to a descriptor for a custom-defined selection box shape.
virtual player_id_t GetPlayerID() const
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...
virtual const CBoundingBoxAligned GetObjectSelectionBoundsRec()
Returns the (object-space) bounds that should be used to construct a selection box for this model and...
Abstract base class for graphical objects that are used by units, or as props attached to other CMode...
CBoundingBoxOriented m_SelectionBox
Selection box for this model.
virtual void InvalidateBounds()
Marks the bounds as invalid.
virtual CModel * ToCModel()
Dynamic cast.
Particle emitter model, for attaching emitters as props on other models.
virtual void SetShadingColor(const CColor &colour)
virtual CColor GetShadingColor() const
virtual const CBoundingBoxAligned GetWorldBoundsRec()
Returns world space bounds of this object and all child objects.
bool m_SelectionBoxValid
Is the current selection box valid?
const CBoundingBoxAligned & GetWorldBounds()
Returns the world-space axis-aligned bounds of this object.
EType m_Type
Type of shape.
static const player_id_t INVALID_PLAYER
The selection shape is determined by an oriented box of custom, user-specified size.
virtual CModelDecal * ToCModelDecal()
Dynamic cast.
CModelAbstract * m_Parent
If non-null, points to the model that we are attached to.
virtual void ValidatePosition()=0
Ensure that both the transformation and the bone matrices are correct for this model and all its prop...
NONCOPYABLE(CModelAbstract)