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"
52 eRenderableType_Normal,
53 eRenderableType_ParticleSystem,
55 eRenderableType_Light,
56 eRenderableType_Dummy,
57 eRenderableType_LastEnum
62kSaveData_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; }
102 cMatrixf *GetInvModelMatrix();
104 inline void SetPrevMatrix(
const cMatrixf &a_mtxPrev) { m_mtxPrevious = a_mtxPrev; }
105 inline cMatrixf &GetPrevMatrix() {
return m_mtxPrevious; }
107 const cVector3f &GetCalcScale();
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;
Definition: BoundingVolume.h:71
Definition: Camera3D.h:53
Definition: RenderList.h:145
Definition: SaveGame.h:183
Definition: Entity3D.h:81
Definition: Material.h:203
Definition: Renderable.h:70
virtual int GetMatrixUpdateCount()=0
virtual void LoadFromSaveData(iSaveData *apSaveData)
virtual void SaveToSaveData(iSaveData *apSaveData)
virtual void SaveDataSetup(cSaveObjectHandler *apSaveObjectHandler, cGame *apGame)
virtual iSaveData * CreateSaveData()
Definition: SaveGame.h:111
Definition: VertexBuffer.h:90