Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008 #ifndef __SP_SCENEGRAPH_PORTAL_BASED_H__
00009 #define __SP_SCENEGRAPH_PORTAL_BASED_H__
00010
00011
00012 #include "Base/spStandard.hpp"
00013
00014 #ifdef SP_COMPILE_WITH_SCENEGRAPH_PORTAL_BASED
00015
00016
00017 #include "SceneGraph/spSceneGraph.hpp"
00018
00019
00020 namespace sp
00021 {
00022 namespace scene
00023 {
00024
00025
00026 class Sector;
00027 class Portal;
00028
00034 class SP_EXPORT SceneGraphPortalBased : public SceneGraph
00035 {
00036
00037 public:
00038
00039 SceneGraphPortalBased();
00040 ~SceneGraphPortalBased();
00041
00042
00043
00044 Sector* createSector(const scene::Transformation &Transform);
00045 void deleteSector(Sector* SectorObj);
00046 void clearSectors();
00047
00048 Portal* createPortal(const scene::Transformation &Transform);
00049 Portal* createPortal(const scene::Transformation &Transform, Sector* FrontSector, Sector* BackSector);
00050 void deletePortal(Portal* PortalObj);
00051 void clearPortals();
00052
00053 void render();
00054
00056 Sector* findSector(const dim::vector3df &Point) const;
00057
00064 void connectSectors(f32 DistanceTolerance = 0.1f);
00065
00071 void insertRenderNodes();
00077 void releaseRenderNodes();
00078
00079
00080
00081 inline const std::list<Sector*>& getSectorList() const
00082 {
00083 return Sectors_;
00084 }
00085 inline const std::list<Portal*>& getPortalList() const
00086 {
00087 return Portals_;
00088 }
00089
00090 private:
00091
00092
00093
00094 std::list<Sector*> Sectors_;
00095 std::list<Portal*> Portals_;
00096
00097 std::vector<RenderNode*> GlobalRenderNodes_;
00098
00099 };
00100
00101
00102 }
00103
00104 }
00105
00106
00107 #endif
00108
00109 #endif
00110
00111
00112
00113