Changeset 51 for trunk/VUT/OcclusionCullingSceneManager/src/OgreOcclusionCullingOctreeSceneManager.cpp
- Timestamp:
- 04/19/05 09:12:55 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/OcclusionCullingSceneManager/src/OgreOcclusionCullingOctreeSceneManager.cpp
r45 r51 16 16 //mDisplayNodes = true; 17 17 //mShowBoundingBoxes = true; 18 //mShowBoxes = true;18 mShowBoxes = true; 19 19 mMaxDepth = 20; 20 20 } … … 57 57 // must be empty because objects are found and rendered in an interleaved fashion 58 58 // in _renderVisibibleObjects 59 //char *msg = "now finding visible objects\n"; OutputDebugString(msg);60 59 } 61 60 //----------------------------------------------------------------------- … … 92 91 return mOcclusionCullingOctreeSceneTraverser->getOptionKeys ( refKeys ) || OctreeSceneManager::getOptionKeys( refKeys ); 93 92 } 94 //-----------------------------------------------------------------------95 void OcclusionCullingOctreeSceneManager::_renderOctant(Camera *cam, Octree *octant)96 {97 //Add stuff to be rendered;98 NodeList::iterator it = octant->mNodes.begin();99 100 while(it != octant->mNodes.end())101 {102 OctreeNode *sn = *it;103 104 mNumObjects++;105 106 // check bounding box visibility of scene nodes107 if (cam->isVisible(sn->_getWorldAABB()))108 {109 sn->_addToRenderQueue(cam, getRenderQueue(), false);110 //node->_findVisibleObjects(cam, getRenderQueue(), false, mDisplayNodes, false);111 mVisible.push_back(sn);112 113 if (mDisplayNodes)114 getRenderQueue()->addRenderable(sn);115 116 // check if the scene manager or this node wants the bounding box shown.117 if (sn->getShowBoundingBox() || mShowBoundingBoxes)118 sn->_addBoundingBoxToQueue(getRenderQueue());119 120 if (mShowBoxes)121 getRenderQueue()->addRenderable(octant->getWireBoundingBox());122 }123 ++it;124 }125 126 SceneManager::_renderVisibleObjects();127 128 // delete all rendered objects from renderqueue129 _deleteRenderedQueueGroups();130 }131 93 }
Note: See TracChangeset
for help on using the changeset viewer.