18#ifndef INCLUDED_MODELABSTRACT
19#define INCLUDED_MODELABSTRACT
87 virtual std::unique_ptr<CModelAbstract>
Clone()
const = 0;
int32_t player_id_t
valid player IDs are non-negative (see ICmpOwnership)
Definition: Player.h:24
static const player_id_t INVALID_PLAYER
Definition: Player.h:26
Definition: BoundingBoxAligned.h:34
static const CBoundingBoxAligned EMPTY
Definition: BoundingBoxAligned.h:36
Definition: BoundingBoxOriented.h:31
Abstract base class for graphical objects that are used by units, or as props attached to other CMode...
Definition: ModelAbstract.h:50
CColor m_ShadingColor
Modulating color.
Definition: ModelAbstract.h:187
virtual const CColor & GetShadingColor() const
Definition: ModelAbstract.h:172
virtual void SetPlayerID(player_id_t id)
Definition: ModelAbstract.h:166
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 void SetShadingColor(const CColor &color)
Definition: ModelAbstract.h:171
CModelAbstract()
Definition: ModelAbstract.h:77
CModelAbstract * m_Parent
If non-null, points to the model that we are attached to.
Definition: ModelAbstract.h:179
virtual void InvalidateBounds()
Marks the bounds as invalid.
Definition: ModelAbstract.h:114
virtual CModelDecal * ToCModelDecal()
Dynamic cast.
Definition: ModelAbstract.h:96
virtual const CBoundingBoxOriented & GetSelectionBox()
Returns the world-space selection box of this model.
Definition: ModelAbstract.cpp:24
CustomSelectionShape * m_CustomSelectionShape
Pointer to a descriptor for a custom-defined selection box shape.
Definition: ModelAbstract.h:201
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:154
virtual player_id_t GetPlayerID() const
Definition: ModelAbstract.h:169
player_id_t m_PlayerID
Definition: ModelAbstract.h:184
NONCOPYABLE(CModelAbstract)
virtual void ValidatePosition()=0
Ensure that both the transformation and the bone matrices are correct for this model and all its prop...
void CalcSelectionBox()
Definition: ModelAbstract.cpp:34
virtual ~CModelAbstract()
Definition: ModelAbstract.h:82
virtual void InvalidatePosition()=0
Mark this model's position and bone matrices, and all props' positions as invalid.
virtual CModelParticleEmitter * ToCModelParticleEmitter()
Dynamic cast.
Definition: ModelAbstract.h:99
bool m_SelectionBoxValid
Is the current selection box valid?
Definition: ModelAbstract.h:195
virtual CModelDummy * ToCModelDummy()
Dynamic cast.
Definition: ModelAbstract.h:90
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:142
virtual std::unique_ptr< CModelAbstract > Clone() const =0
virtual CModel * ToCModel()
Dynamic cast.
Definition: ModelAbstract.h:93
CBoundingBoxOriented m_SelectionBox
Selection box for this model.
Definition: ModelAbstract.h:192
void SetCustomSelectionShape(CustomSelectionShape *descriptor)
Sets a custom selection shape as described by a descriptor.
Definition: ModelAbstract.h:124
virtual const CBoundingBoxAligned GetWorldBoundsRec()
Returns world space bounds of this object and all child objects.
Definition: ModelAbstract.h:106
bool m_PositionValid
True if both transform and and bone matrices are valid.
Definition: ModelAbstract.h:182
Empty placeholder ModelAbstract implementation, to render nothing.
Definition: ModelDummy.h:27
Particle emitter model, for attaching emitters as props on other models.
Definition: ParticleEmitter.h:189
Definition: RenderableObject.h:54
const CBoundingBoxAligned & GetWorldBounds()
Returns the world-space axis-aligned bounds of this object.
Definition: RenderableObject.h:104
bool m_BoundsValid
Remembers whether any bounds need to be recalculated.
Definition: RenderableObject.h:159
#define UNUSED(param)
mark a function parameter as unused and avoid the corresponding compiler warning.
Definition: code_annotation.h:40
Definition: ModelAbstract.h:34
static constexpr uint32_t SILHOUETTE_OCCLUDER
Definition: ModelAbstract.h:38
static constexpr uint32_t FLOAT_ON_WATER
Definition: ModelAbstract.h:40
static constexpr uint32_t NO_LOOP_ANIMATION
Definition: ModelAbstract.h:36
static constexpr uint32_t IGNORE_LOS
Definition: ModelAbstract.h:39
static constexpr uint32_t CAST_SHADOWS
Definition: ModelAbstract.h:35
static constexpr uint32_t SILHOUETTE_DISPLAY
Definition: ModelAbstract.h:37
Describes a custom selection shape to be used for a model's selection box instead of the default recu...
Definition: ModelAbstract.h:60
float m_Height
Box height if BOX, cylinder height if CYLINDER.
Definition: ModelAbstract.h:72
float m_Size0
Box width if BOX, or radius if CYLINDER.
Definition: ModelAbstract.h:70
EType
Definition: ModelAbstract.h:62
@ BOX
The selection shape is determined by an oriented box of custom, user-specified size.
Definition: ModelAbstract.h:64
@ CYLINDER
The selection shape is determined by a cylinder of custom, user-specified size.
Definition: ModelAbstract.h:66
float m_Size1
Box depth if BOX, or radius if CYLINDER.
Definition: ModelAbstract.h:71
EType m_Type
Type of shape.
Definition: ModelAbstract.h:69
unsigned int uint32_t
Definition: wposix_types.h:53
intptr_t ssize_t
Definition: wposix_types.h:82