31#include "common/list.h"
32#include "hpl1/engine/graphics/GraphicsTypes.h"
33#include "hpl1/engine/graphics/Renderable.h"
34#include "hpl1/engine/scene/Entity3D.h"
35#include "hpl1/engine/scene/Light.h"
36#include "hpl1/std/set.h"
48enum eShadowVolumeType {
49 eShadowVolumeType_None,
50 eShadowVolumeType_ZPass,
51 eShadowVolumeType_ZFail,
52 eShadowVolumeType_LastEnum,
55class iLowLevelGraphics;
65class cSectorVisibilityContainer;
68typedef tCasterCacheSet::iterator tCasterCacheSetIt;
72kSaveData_ChildClass(iRenderable, iLight3D) {
73 kSaveData_ClassInit(iLight3D) public : tString msFalloffMap;
74 cContainerList<int> mlstBillboardIds;
77 cColor mSpecularColor;
79 float mfFarAttenuation;
80 float mfNearAttenuation;
84 bool mbAffectMaterial;
93 tString msFlickerOffSound;
94 tString msFlickerOnSound;
95 tString msFlickerOffPS;
96 tString msFlickerOnPS;
97 float mfFlickerOnMinLength;
98 float mfFlickerOffMinLength;
99 float mfFlickerOnMaxLength;
100 float mfFlickerOffMaxLength;
101 cColor mFlickerOffColor;
102 float mfFlickerOffRadius;
104 float mfFlickerOnFadeLength;
105 float mfFlickerOffFadeLength;
107 cColor mFlickerOnColor;
108 float mfFlickerOnRadius;
112 float mfFlickerStateLength;
124 void UpdateLogic(
float afTimeStep);
126 virtual void SetFarAttenuation(
float afX);
127 virtual void SetNearAttenuation(
float afX);
134 bool CheckObjectIntersection(
iRenderable *apObject);
137 bool HasStaticCasters();
138 void ClearCasters(
bool abClearStatic);
140 void SetAllStaticCastersAdded(
bool abX) { mbStaticCasterAdded = abX; }
141 bool AllStaticCastersAdded() {
return mbStaticCasterAdded; }
143 eLight3DType GetLightType() {
return mLightType; }
146 tString GetEntityType() {
return "iLight3D"; }
149 void SetVisible(
bool abVisible);
152 void SetFalloffMap(
iTexture *apTexture);
155 iMaterial *GetMaterial() {
return NULL; }
158 bool IsShadowCaster() {
return false; }
159 eRenderableType GetRenderType() {
return eRenderableType_Light; }
169 void LoadXMLProperties(
const tString asFile);
171 void AttachBillboard(
cBillboard *apBillboard);
172 void RemoveBillboard(
cBillboard *apBillboard);
175 inline iTexture *GetTempTexture(
size_t alIdx) {
return mvTempTextures[alIdx]; }
176 inline void SetTempTexture(
size_t alIdx, iTexture *apTex) { mvTempTextures[alIdx] = apTex; }
178 void SetOnlyAffectInSector(
bool abX) { mbOnlyAffectInInSector = abX; }
179 bool GetOnlyAffectInSector() {
return mbOnlyAffectInInSector; }
193 virtual void ExtraXMLProperties(
TiXmlElement *apMainElem) {}
194 virtual void UpdateBoundingVolume() = 0;
197 eLight3DType mLightType;
213 bool mbStaticCasterAdded;
215 bool mbOnlyAffectInInSector;
217 int mlSectorVisibilityCount;
220 unsigned int *mpIndexArray;
ListInternal::Iterator< iLight3D * > iterator
Definition: list.h:52
Definition: tinyxml.h:864
Definition: BillBoard.h:78
Definition: BoundingVolume.h:71
Definition: Camera3D.h:53
Definition: FileSearcher.h:43
Definition: RenderList.h:145
Definition: Renderer3D.h:77
Definition: Resources.h:160
Definition: SaveGame.h:183
Definition: SectorVisibility.h:136
Definition: TextureManager.h:47
Definition: Entity3D.h:81
Definition: Light3D.h:117
virtual void SaveToSaveData(iSaveData *apSaveData)
virtual void SaveDataSetup(cSaveObjectHandler *apSaveObjectHandler, cGame *apGame)
int GetMatrixUpdateCount()
Definition: Light3D.h:163
virtual void LoadFromSaveData(iSaveData *apSaveData)
virtual iSaveData * CreateSaveData()
Definition: LowLevelGraphics.h:200
Definition: Material.h:203
Definition: Renderable.h:70
Definition: SaveGame.h:111
Definition: VertexBuffer.h:90