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" 48 enum eShadowVolumeType {
49 eShadowVolumeType_None,
50 eShadowVolumeType_ZPass,
51 eShadowVolumeType_ZFail,
52 eShadowVolumeType_LastEnum,
55 class iLowLevelGraphics;
56 class cRenderSettings;
61 class cTextureManager;
65 class cSectorVisibilityContainer;
68 typedef tCasterCacheSet::iterator tCasterCacheSetIt;
72 kSaveData_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;
210 tCasterCacheSet m_setStaticCasters;
211 tCasterCacheSet m_setDynamicCasters;
213 bool mbStaticCasterAdded;
215 bool mbOnlyAffectInInSector;
217 int mlSectorVisibilityCount;
220 unsigned int *mpIndexArray;
228 #endif // HPL_LIGHT3D_H
Definition: Renderer3D.h:77
int GetMatrixUpdateCount()
Definition: Light3D.h:163
Definition: VertexBuffer.h:90
Definition: Light3D.h:117
virtual iSaveData * CreateSaveData()
Definition: BoundingVolume.h:71
virtual void SaveDataSetup(cSaveObjectHandler *apSaveObjectHandler, cGame *apGame)
Definition: Renderable.h:70
Definition: FileSearcher.h:43
Definition: BillBoard.h:78
virtual void SaveToSaveData(iSaveData *apSaveData)
Definition: SaveGame.h:111
Definition: SectorVisibility.h:136
Definition: TextureManager.h:47
Definition: RenderList.h:145
Definition: Resources.h:160
Definition: Entity3D.h:81
Definition: tinyxml.h:864
Definition: list_intern.h:54
Definition: Material.h:203
virtual void LoadFromSaveData(iSaveData *apSaveData)
Definition: SaveGame.h:183
Definition: LowLevelGraphics.h:200
Definition: Camera3D.h:53