18 #ifndef INCLUDED_MODELABSTRACT 19 #define INCLUDED_MODELABSTRACT 191 #endif // INCLUDED_MODELABSTRACT player_id_t m_PlayerID
Definition: ModelAbstract.h:170
void CalcSelectionBox()
Definition: ModelAbstract.cpp:34
The selection shape is determined by a cylinder of custom, user-specified size.
Definition: ModelAbstract.h:52
#define UNUSED(param)
mark a function parameter as unused and avoid the corresponding compiler warning. ...
Definition: code_annotation.h:38
float m_Size0
Box width if BOX, or radius if CYLINDER.
Definition: ModelAbstract.h:56
virtual void SetPlayerID(player_id_t id)
Definition: ModelAbstract.h:152
virtual CModelParticleEmitter * ToCModelParticleEmitter()
Dynamic cast.
Definition: ModelAbstract.h:82
float m_Height
Box height if BOX, cylinder height if CYLINDER.
Definition: ModelAbstract.h:58
static const CBoundingBoxAligned EMPTY
Definition: BoundingBoxAligned.h:165
float m_Size1
Box depth if BOX, or radius if CYLINDER.
Definition: ModelAbstract.h:57
virtual void InvalidatePosition()=0
Mark this model's position and bone matrices, and all props' positions as invalid.
CColor m_ShadingColor
Modulating color.
Definition: ModelAbstract.h:173
virtual void SetShadingColor(const CColor &color)
Definition: ModelAbstract.h:157
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.
Definition: ModelAbstract.cpp:24
void SetCustomSelectionShape(CustomSelectionShape *descriptor)
Sets a custom selection shape as described by a descriptor.
Definition: ModelAbstract.h:110
virtual CModelAbstract * Clone() const =0
bool m_PositionValid
True if both transform and and bone matrices are valid.
Definition: ModelAbstract.h:168
int32_t player_id_t
valid player IDs are non-negative (see ICmpOwnership)
Definition: Player.h:24
Describes a custom selection shape to be used for a model's selection box instead of the default recu...
Definition: ModelAbstract.h:46
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.
Definition: RenderableObject.h:160
CustomSelectionShape * m_CustomSelectionShape
Pointer to a descriptor for a custom-defined selection box shape.
Definition: ModelAbstract.h:187
~CModelAbstract()
Definition: ModelAbstract.h:68
EType
Definition: ModelAbstract.h:48
CModelAbstract()
Definition: ModelAbstract.h:63
intptr_t ssize_t
Definition: wposix_types.h:82
virtual player_id_t GetPlayerID() const
Definition: ModelAbstract.h:155
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...
Definition: ModelAbstract.h:140
virtual const CBoundingBoxAligned GetObjectSelectionBoundsRec()
Returns the (object-space) bounds that should be used to construct a selection box for this model and...
Definition: ModelAbstract.h:128
Abstract base class for graphical objects that are used by units, or as props attached to other CMode...
Definition: ModelAbstract.h:36
Definition: BoundingBoxAligned.h:35
CBoundingBoxOriented m_SelectionBox
Selection box for this model.
Definition: ModelAbstract.h:178
Definition: RenderableObject.h:54
virtual void InvalidateBounds()
Marks the bounds as invalid.
Definition: ModelAbstract.h:100
virtual CModel * ToCModel()
Dynamic cast.
Definition: ModelAbstract.h:76
Definition: BoundingBoxOriented.h:30
Particle emitter model, for attaching emitters as props on other models.
Definition: ParticleEmitter.h:176
virtual CColor GetShadingColor() const
Definition: ModelAbstract.h:158
virtual const CBoundingBoxAligned GetWorldBoundsRec()
Returns world space bounds of this object and all child objects.
Definition: ModelAbstract.h:92
bool m_SelectionBoxValid
Is the current selection box valid?
Definition: ModelAbstract.h:181
const CBoundingBoxAligned & GetWorldBounds()
Returns the world-space axis-aligned bounds of this object.
Definition: RenderableObject.h:105
EType m_Type
Type of shape.
Definition: ModelAbstract.h:55
static const player_id_t INVALID_PLAYER
Definition: Player.h:26
The selection shape is determined by an oriented box of custom, user-specified size.
Definition: ModelAbstract.h:50
virtual CModelDecal * ToCModelDecal()
Dynamic cast.
Definition: ModelAbstract.h:79
CModelAbstract * m_Parent
If non-null, points to the model that we are attached to.
Definition: ModelAbstract.h:165
virtual void ValidatePosition()=0
Ensure that both the transformation and the bone matrices are correct for this model and all its prop...
NONCOPYABLE(CModelAbstract)