28 #ifndef HPL_RENDERABLE_H 29 #define HPL_RENDERABLE_H 31 #include "hpl1/engine/graphics/GraphicsTypes.h" 32 #include "hpl1/engine/math/MathTypes.h" 33 #include "hpl1/engine/scene/Entity3D.h" 34 #include "hpl1/engine/system/SystemTypes.h" 41 class cBoundingVolume;
51 enum eRenderableType {
52 eRenderableType_Normal,
53 eRenderableType_ParticleSystem,
55 eRenderableType_Light,
56 eRenderableType_Dummy,
57 eRenderableType_LastEnum
62 kSaveData_ChildClass(iEntity3D, iRenderable) {
63 kSerializableClassInit(cSaveData_iRenderable) public :
bool mbStatic;
76 bool IsRendered() {
return mbRendered; }
77 virtual void SetRendered(
bool abX) { mbRendered = abX; }
82 virtual bool IsShadowCaster() = 0;
85 virtual bool CollidesWithFrustum(
cFrustum *apFrustum);
89 virtual eRenderableType GetRenderType() = 0;
91 virtual void UpdateGraphics(
cCamera3D *apCamera,
float afFrameTime,
cRenderList *apRenderList) {}
99 float GetZ() {
return mfZ; }
100 void SetZ(
float afZ) { mfZ = afZ; }
104 inline void SetPrevMatrix(
const cMatrixf &a_mtxPrev) { m_mtxPrevious = a_mtxPrev; }
105 inline cMatrixf &GetPrevMatrix() {
return m_mtxPrevious; }
109 void SetStatic(
bool abX) { mbStatic = abX; }
110 bool IsStatic()
const {
return mbStatic; }
112 inline int GetRenderCount()
const {
return mlRenderCount; }
113 inline void SetRenderCount(
const int alCount) { mlRenderCount = alCount; }
114 inline int GetPrevRenderCount()
const {
return mlPrevRenderCount; }
115 inline void SetPrevRenderCount(
const int alCount) { mlPrevRenderCount = alCount; }
117 void SetForceShadow(
bool abX) { mbForceShadow = abX; }
118 bool GetForceShadow() {
return mbForceShadow; }
120 bool GetIsOneSided() {
return mbIsOneSided; }
121 const cVector3f &GetOneSidedNormal() {
return mvOneSidedNormal; }
136 int mlLastMatrixCount;
143 int mlPrevRenderCount;
145 int mlCalcScaleMatrixCount;
154 #endif // HPL_RENDERABLE_H
Definition: VertexBuffer.h:90
virtual void SaveToSaveData(iSaveData *apSaveData)
Definition: BoundingVolume.h:71
Definition: Renderable.h:70
virtual void SaveDataSetup(cSaveObjectHandler *apSaveObjectHandler, cGame *apGame)
virtual void LoadFromSaveData(iSaveData *apSaveData)
Definition: SaveGame.h:111
Definition: RenderList.h:145
Definition: Entity3D.h:81
virtual iSaveData * CreateSaveData()
Definition: Material.h:203
Definition: SaveGame.h:183
Definition: Camera3D.h:53
virtual int GetMatrixUpdateCount()=0