Changeset 1165 for GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src
- Timestamp:
- 07/27/06 17:08:21 (18 years ago)
- Location:
- GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreKdTreeSceneManager.cpp
r1163 r1165 18 18 namespace Ogre 19 19 { 20 KdTreeSceneManager::KdTreeSceneManager(const String& name): 21 SceneManager(name) 22 { 23 int maxdepth = 20; 24 mKdTree = 0; 25 init(maxdepth); 26 } 27 28 KdTreeSceneManager::~KdTreeSceneManager(void) 29 { 30 delete mKdTree; 31 } 32 33 const String& KdTreeSceneManager::getTypeName(void) const 34 { 35 return KdTreeSceneManagerFactory::FACTORY_TYPE_NAME; 36 } 37 38 void KdTreeSceneManager::init(int maxdepth) 20 KdTreeSceneManager::KdTreeSceneManager(const String& name, GtpVisibility::VisibilityManager *vm): 21 SceneManager(name), mKdTree(0), mVisibilityManager(vm) 39 22 { 40 23 // Replace root node with my node … … 44 27 mSceneRoot->_notifyRootNode(); 45 28 46 mMaxDepth = maxdepth;29 mMaxDepth = KDTREE_MAX_DEPTH; 47 30 mShowBoxes = false; 48 31 … … 50 33 OGRE_DELETE(mKdTree); 51 34 52 mBuildMethod = KdTree::KDBM_RECURSIVE;53 //mBuildMethod = KdTree::KDBM_PRIORITYQUEUE;35 //mBuildMethod = KdTree::KDBM_RECURSIVE; 36 mBuildMethod = KdTree::KDBM_PRIORITYQUEUE; 54 37 #ifdef KDTREE_DEBUG 55 38 mHighlighLevel = 0; 56 39 mShowAllBoxes = false; 57 40 #endif 41 42 mHierarchyInterface = new KdTreeHierarchyInterface(this, mDestRenderSystem); 43 } 44 45 KdTreeSceneManager::~KdTreeSceneManager(void) 46 { 47 delete mKdTree; 48 } 49 50 const String& KdTreeSceneManager::getTypeName(void) const 51 { 52 return KdTreeSceneManagerFactory::FACTORY_TYPE_NAME; 58 53 } 59 54 … … 310 305 mMetaData.typeName = FACTORY_TYPE_NAME; 311 306 mMetaData.description = "Scene manager that organises the scene based on a kd-tree"; 312 mMetaData.sceneTypeMask = ST_GENERIC; // support generic scenes (so far)307 mMetaData.sceneTypeMask = 0xFFFF; // support all types of scenes (hopefully) 313 308 mMetaData.worldGeometrySupported = false; 314 309 } … … 317 312 const String& instanceName) 318 313 { 319 return new KdTreeSceneManager(instanceName );314 return new KdTreeSceneManager(instanceName, visManager); 320 315 } 321 316 //----------------------------------------------------------------------- -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreVisibilitySceneManagerDll.cpp
r1163 r1165 54 54 //visibilityTerrainPlugin = new VisibilityTerrainSceneManagerFactory(visManager); 55 55 occlusionCullingPlugin = new OcclusionCullingSceneManagerFactory(visManager); 56 kdTreeFactory = new KdTreeSceneManagerFactory( );56 kdTreeFactory = new KdTreeSceneManagerFactory(visManager); 57 57 // Construct listener manager singleton 58 58 new TerrainPageSourceListenerManager();
Note: See TracChangeset
for help on using the changeset viewer.