Changeset View
Changeset View
Standalone View
Standalone View
source/graphics/Model.h
Show All 26 Lines | |||||
#include "graphics/ModelAbstract.h" | #include "graphics/ModelAbstract.h" | ||||
#include <vector> | #include <vector> | ||||
struct SPropPoint; | struct SPropPoint; | ||||
class CObjectEntry; | class CObjectEntry; | ||||
class CSkeletonAnim; | class CSkeletonAnim; | ||||
class CSkeletonAnimDef; | class CSkeletonAnimDef; | ||||
class CSimulation2; | class CTerrain; | ||||
class CWater; | |||||
#define MODELFLAG_CASTSHADOWS (1<<0) | #define MODELFLAG_CASTSHADOWS (1<<0) | ||||
#define MODELFLAG_NOLOOPANIMATION (1<<1) | #define MODELFLAG_NOLOOPANIMATION (1<<1) | ||||
#define MODELFLAG_SILHOUETTE_DISPLAY (1<<2) | #define MODELFLAG_SILHOUETTE_DISPLAY (1<<2) | ||||
#define MODELFLAG_SILHOUETTE_OCCLUDER (1<<3) | #define MODELFLAG_SILHOUETTE_OCCLUDER (1<<3) | ||||
#define MODELFLAG_IGNORE_LOS (1<<4) | #define MODELFLAG_IGNORE_LOS (1<<4) | ||||
#define MODELFLAG_FLOATONWATER (1<<5) | #define MODELFLAG_FLOATONWATER (1<<5) | ||||
/////////////////////////////////////////////////////////////////////////////// | /////////////////////////////////////////////////////////////////////////////// | ||||
Show All 27 Lines | struct Prop | ||||
CObjectEntry* m_ObjectEntry; | CObjectEntry* m_ObjectEntry; | ||||
bool m_Hidden; ///< Should this prop be temporarily removed from rendering? | bool m_Hidden; ///< Should this prop be temporarily removed from rendering? | ||||
bool m_Selectable; /// < should this prop count in the selection size? | bool m_Selectable; /// < should this prop count in the selection size? | ||||
}; | }; | ||||
public: | public: | ||||
// constructor | // constructor | ||||
CModel(CSimulation2& simulation); | CModel(CTerrain& terrain, CWater& water); | ||||
// destructor | // destructor | ||||
~CModel(); | ~CModel(); | ||||
/// Dynamic cast | /// Dynamic cast | ||||
virtual CModel* ToCModel() | virtual CModel* ToCModel() | ||||
{ | { | ||||
return this; | return this; | ||||
▲ Show 20 Lines • Show All 143 Lines • ▼ Show 20 Lines | public: | ||||
*/ | */ | ||||
virtual void InvalidatePosition(); | virtual void InvalidatePosition(); | ||||
private: | private: | ||||
// delete anything allocated by the model | // delete anything allocated by the model | ||||
void ReleaseData(); | void ReleaseData(); | ||||
// Needed for terrain aligned props | // Needed for terrain aligned props | ||||
CSimulation2& m_Simulation; | CTerrain& m_Terrain; | ||||
CWater& m_Water; | |||||
// object flags | // object flags | ||||
int m_Flags; | int m_Flags; | ||||
// model's material | // model's material | ||||
CMaterial m_Material; | CMaterial m_Material; | ||||
// pointer to the model's raw 3d data | // pointer to the model's raw 3d data | ||||
CModelDefPtr m_pModelDef; | CModelDefPtr m_pModelDef; | ||||
// object space bounds of model - accounts for bounds of all possible animations | // object space bounds of model - accounts for bounds of all possible animations | ||||
Show All 32 Lines |
Wildfire Games · Phabricator