Changeset 1296 for GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include
- Timestamp:
- 08/29/06 18:28:00 (18 years ago)
- Location:
- GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreBoundingBoxConverter.h
r933 r1296 12 12 class Entity; 13 13 class OctreeSceneManager; 14 class KdTreeSceneManager; 14 15 15 16 /** Class which converts preprocessor types to OGRE types … … 19 20 public: 20 21 OgreBoundingBoxConverter(OctreeSceneManager *sm); 22 OgreBoundingBoxConverter(KdTreeSceneManager *sm); 21 23 22 24 bool IdentifyObjects(const GtpVisibilityPreprocessor::IndexedBoundingBoxContainer &iboxes, … … 28 30 Entity *FindCorrespondingObject(const AxisAlignedBox &box) const; 29 31 30 OctreeSceneManager *mSceneMgr; 32 OctreeSceneManager *mOctSceneMgr; 33 KdTreeSceneManager *mKdSceneMgr; 31 34 }; 32 35 -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreKdTree.h
r1250 r1296 561 561 //void findVisibleNodes(NodeList& visibleNodes, Camera * cam); 562 562 563 /** Recurses the kdtree, adding any nodes intersecting with the 564 box/sphere/volume/ray into the given list. 565 It ignores the exclude scene node. 566 */ 567 void findNodesIn(const AxisAlignedBox &box, std::list<SceneNode *> &list, SceneNode *exclude = 0); 568 void findNodesIn(const Sphere &sphere, std::list<SceneNode *> &list, SceneNode *exclude = 0); 569 void findNodesIn(const PlaneBoundedVolume &volume, std::list<SceneNode *> &list, SceneNode *exclude = 0); 570 void findNodesIn(const Ray &ray, std::list<SceneNode *> &list, SceneNode *exclude = 0); 571 563 572 // self-explanatory ... 564 573 int getMaxDepth(void) { return mMaxDepth; }; 565 StatsgetStats(void) const { return mStats; };574 const Stats& getStats(void) const { return mStats; }; 566 575 AxisAlignedBox getBox(void) { if (mKdRoot) return mKdRoot->mAABB; else return AxisAlignedBox(); }; 567 576 void setBuildMethod(BuildMethod bm) { mBuildMethod = bm; } … … 598 607 //void recFindVisibleNodes(KdTree::Node * node, NodeList& visibleNodes, Camera * cam); 599 608 609 /** Recurses the kdtree, adding any nodes intersecting with the 610 box/sphere/volume/ray into the given list. 611 It ignores the exclude scene node. 612 */ 613 void recFindNodesIn(const AxisAlignedBox &box, std::list<SceneNode *> &list, SceneNode *exclude, Node * node, bool full = false); 614 void recFindNodesIn(const Sphere &sphere, std::list<SceneNode *> &list, SceneNode *exclude, Node * node, bool full = false); 615 void recFindNodesIn(const PlaneBoundedVolume &volume, std::list<SceneNode *> &list, SceneNode *exclude, Node * node, bool full = false); 616 void recFindNodesIn(const Ray &ray, std::list<SceneNode *> &list, SceneNode *exclude, Node * node, bool full = false); 617 600 618 // the root node of the kdtree 601 619 KdTree::Node * mKdRoot; -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreKdTreeSceneManager.h
r1285 r1296 13 13 #include <OgreSceneManager.h> 14 14 #include <VisibilityManager.h> 15 #include <ViewCellsManager.h> 15 16 16 17 #include "OgreKdTree.h" … … 123 124 virtual bool getShowBoxes(void) const; 124 125 126 /** Recurses the kdtree, adding any nodes intersecting with the 127 box/sphere/volume/ray into the given list. 128 It ignores the exclude scene node. 129 */ 130 void findNodesIn( const AxisAlignedBox &box, std::list < SceneNode * > &list, SceneNode *exclude = 0 ) 131 { 132 if (mKdTree) 133 mKdTree->findNodesIn(box, list, exclude); 134 } 135 void findNodesIn( const Sphere &sphere, std::list < SceneNode * > &list, SceneNode *exclude = 0 ) 136 { 137 if (mKdTree) 138 mKdTree->findNodesIn(sphere, list, exclude); 139 } 140 void findNodesIn( const PlaneBoundedVolume &volume, std::list < SceneNode * > &list, SceneNode *exclude=0 ) 141 { 142 if (mKdTree) 143 mKdTree->findNodesIn(volume, list, exclude); 144 } 145 void findNodesIn( const Ray &ray, std::list < SceneNode * > &list, SceneNode *exclude=0 ) 146 { 147 if (mKdTree) 148 mKdTree->findNodesIn(ray, list, exclude); 149 } 150 151 /************************************************************************/ 152 /* Functions for PVS */ 153 /************************************************************************/ 154 /** Loads view cells for this particular scene. 155 */ 156 bool LoadViewCells(const String &filename); 157 125 158 /************************************************************************/ 126 159 /* Functions for CHC */ … … 168 201 void WriteLog(); 169 202 170 /** Switches between simple & enhanced visibility 171 */ 172 //void setEnhancedVis(bool enhanced); 173 203 /************************************************************************/ 204 /* Functions for PVS */ 205 /************************************************************************/ 206 /** Loads / unloads pvs of the view cell to set the visibility in the scene. 207 */ 208 void applyViewCellPvs(GtpVisibilityPreprocessor::ViewCell *vc, const bool load); 209 210 /** updates pvs in current frame. 211 */ 212 void updatePvs(Camera *cam); 213 214 /** Sets all objects invisible. 215 */ 216 void SetObjectsVisible(const bool visible); 174 217 175 218 /************************************************************************/ … … 225 268 // if we currently render the item buffer 226 269 bool mIsItemBufferPhase; 270 // delete or clear the renderqueue after each rame? 271 bool mDeleteQueueAfterRendering; 272 227 273 228 274 // remember visited scene nodes for viz 229 //KdRenderableList mVisibleNodes;230 275 KdTree::NodeList mVisibleNodes; 231 232 bool mDeleteQueueAfterRendering;233 276 234 277 /************************************************************************/ … … 258 301 // the method of building the tree 259 302 KdTree::BuildMethod mBuildMethod; 303 304 /************************************************************************/ 305 /* PVS specific options and members */ 306 /************************************************************************/ 307 308 // The view cell manager 309 GtpVisibilityPreprocessor::ViewCellsManager *mViewCellsManager; 310 311 /// Used to assign Ogre meshes to view cell entries. 312 GtpVisibilityPreprocessor::ObjectContainer mObjects; 313 314 GtpVisibilityPreprocessor::ViewCell *mElementaryViewCell; 315 GtpVisibilityPreprocessor::ViewCell *mCurrentViewCell; 316 317 /// If view cells are loaded. 318 bool mViewCellsLoaded; 319 320 /// If view cells are used. 321 bool mUseViewCells; 322 323 /// if the view cells are filtered 324 bool mUseVisibilityFilter; 260 325 }; 261 326
Note: See TracChangeset
for help on using the changeset viewer.