28 #ifndef HPL_PORTAL_CONTAINER_H 29 #define HPL_PORTAL_CONTAINER_H 31 #include "common/list.h" 32 #include "hpl1/engine/graphics/Renderable.h" 33 #include "hpl1/engine/math/BoundingVolume.h" 34 #include "hpl1/engine/scene/RenderableContainer.h" 35 #include "common/stablemap.h" 36 #include "hpl1/std/set.h" 41 class cSectorVisibilityContainer;
47 typedef Hpl1::Std::set<iRenderable *>::iterator tRenderableSetIt;
50 typedef Hpl1::Std::set<iEntity3D *>::iterator tEntity3DSetIt;
54 class cPortalContainer;
77 tSectorMap *mpSectorMap;
78 tEntity3DSet *mpEntity3DSet;
80 tEntity3DSetIt mEntityIt;
81 tSectorMapIt mSectorIt;
83 tEntity3DSet mIteratedSet;
96 void OnTransformUpdate(
iEntity3D *apEntity);
108 void OnTransformUpdate(
iEntity3D *apEntity);
132 void SetTargetSector(
tString asSectorId);
137 void AddPortalId(
int alId);
138 void SetNormal(
const cVector3f &avNormal);
140 void SetTransform(
const cMatrixf &a_mtxTrans);
144 bool IsVisible(
cFrustum *apFrustum);
146 tPortalList *GetPortalList();
150 cVector3f GetNormal() {
return mvNormal; }
151 int GetId() {
return mlId; }
152 cPlanef &GetPlane() {
return mPlane; }
154 bool GetActive() {
return mbActive; }
155 void SetActive(
bool abX) { mbActive = abX; }
168 tPortalList mlstPortals;
169 bool mbPortalsNeedUpdate;
189 bool TryToAdd(
iRenderable *apObject,
bool abStatic);
190 bool TryToAddEntity(
iEntity3D *apEntity);
192 void AddPortal(
cPortal *apPortal);
201 void SetAmbientColor(
const cColor &aAmbient) { mAmbient = aAmbient; }
202 const cColor &GetAmbientColor() {
return mAmbient; }
206 tPortalList *GetPortalList() {
return &mlstPortals; }
207 tString &GetId() {
return msId; }
217 tRenderableSet m_setStaticObjects;
218 tRenderableSet m_setDynamicObjects;
220 tEntity3DSet m_setEntities;
222 tPortalList mlstPortals;
241 bool Add(
iRenderable *apRenderable,
bool abStatic);
256 void AddSector(
tString asSectorId);
271 int GetSectorVisitCount()
const {
return mlSectorVisitCount; }
280 tSectorMap *GetSectorMap() {
return &m_mapSectors; }
281 tStringList *GetVisibleSectorsList() {
return &mlstVisibleSectors; }
283 tRenderableSet *GetGlobalDynamicObjectSet() {
return &m_setGlobalDynamicObjects; }
284 tRenderableList *GetGlobalStaticObjectList() {
return &mlstGlobalStaticObjects; }
289 tSectorMap m_mapSectors;
291 int mlSectorVisitCount;
297 tRenderableSet m_setGlobalDynamicObjects;
299 tRenderableList mlstGlobalStaticObjects;
302 tEntity3DSet m_setGlobalEntities;
306 int mlEntityIterateCount;
311 #endif // HPL_PORTAL_CONTAINER_H Definition: PortalContainer.h:181
Definition: PortalContainer.h:64
Definition: Light3D.h:117
typename TreeT::BasicIterator iterator
Definition: stablemap.h:48
Definition: BoundingVolume.h:71
Definition: Renderable.h:70
Definition: PortalContainer.h:125
Definition: Entity3D.h:57
Definition: SectorVisibility.h:136
Definition: RenderList.h:145
Definition: Entity3D.h:81
Definition: list_intern.h:51
Definition: PortalContainer.h:229
Definition: Entity3D.h:44
Definition: PortalContainer.h:92
Definition: RenderableContainer.h:41
Definition: PortalContainer.h:104