Changeset 139 for trunk/VUT/work/ogre_changes/Plugins
- Timestamp:
- 06/20/05 08:13:57 (20 years ago)
- Location:
- trunk/VUT/work/ogre_changes/Plugins/OctreeSceneManager
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/work/ogre_changes/Plugins/OctreeSceneManager/include/OgreOctreeSceneManager.h
r115 r139 112 112 @param octree the octant to be rendered (without children) 113 113 @param onlyShadowCasters if only shadow casters are rendered 114 @param leaveTransparentsInQueue if transparemtshould be left in queue for later processing114 @param passes if passes should be left in queue for later processing 115 115 */ 116 void _renderOctant(Camera* cam, Octree *octree, bool onlyShadowCasters, bool leaveTransparentsInQueue = false); 116 void _renderOctant(Camera* cam, Octree *octree, bool onlyShadowCasters, 117 const int leavePassesInQueue = 0); 117 118 118 119 /** Returns stored list of boxes */ -
trunk/VUT/work/ogre_changes/Plugins/OctreeSceneManager/src/OgreOctree.cpp
r135 r139 36 36 #include <OgreOctree.h> 37 37 #include <OgreOctreeNode.h> 38 #include <OgreLogManager.h> 38 39 39 40 namespace Ogre … … 109 110 mDepth = 0; 110 111 112 _updateBounds(); 111 113 #endif //GTP_VISIBILITY_MODIFIED_OGRE 112 114 mNumNodes = 0; … … 175 177 //mWireBoundingBox->setupBoundingBox(mBox); 176 178 mWireBoundingBox->setupBoundingBox(mWorldAABB); 179 177 180 return mWireBoundingBox; 178 181 } … … 229 232 // Reset bounds first 230 233 mWorldAABB.setNull(); 231 234 232 235 // Update bounds from own attached objects 233 236 NodeList::iterator it, it_end; … … 247 250 for (int k = 0; k < 2; ++k) 248 251 { 249 if (mChildren[i][j][k] != 0)252 if (mChildren[i][j][k]) 250 253 { 251 254 mWorldAABB.merge(mChildren[i][j][k]->_getWorldAABB()); … … 254 257 } 255 258 } 259 // HACK: clamp to bounds 260 AxisAlignedBox box; 261 _getCullBounds(&box); 262 mWorldAABB = mWorldAABB.intersection(box); 263 264 //std::stringstream d; d << "updating box: " << mWorldAABB << ", depth: " << mDepth << "null: " << mBox.isNull(); 265 //LogManager::getSingleton().logMessage(d.str()); 266 256 267 // recursively update parent bounds 257 268 if (mParent) -
trunk/VUT/work/ogre_changes/Plugins/OctreeSceneManager/src/OgreOctreeSceneManager.cpp
r135 r139 1176 1176 //----------------------------------------------------------------------- 1177 1177 void OctreeSceneManager::_renderOctant(Camera *cam, Octree *octant, bool onlyShadowCasters, 1178 bool leaveTransparentsInQueue)//, bool useZPassQueue)1178 const int leavePassesInQueue) 1179 1179 { 1180 1180 // delete previously rendered objects from the render queue 1181 _deleteRenderedQueueGroups(leave TransparentsInQueue);1181 _deleteRenderedQueueGroups(leavePassesInQueue); 1182 1182 1183 1183 //Add stuff to be rendered; -
trunk/VUT/work/ogre_changes/Plugins/OctreeSceneManager/src/OgreTerrainRenderable.cpp
r132 r139 388 388 if (mLastNextLevel != nextLevel) 389 389 { 390 //LogManager::getSingleton().logMessage("vbuffer binding"); 391 if (nextLevel > 0) 392 { 393 //LogManager::getSingleton().logMessage("level > 0"); 394 mTerrain->vertexBufferBinding->setBinding(DELTA_BINDING, 390 if (nextLevel > 0) 391 { 392 mTerrain->vertexBufferBinding->setBinding(DELTA_BINDING, 395 393 mDeltaBuffers[nextLevel - 1]); 396 394 } 397 395 else 398 { 399 //LogManager::getSingleton().logMessage("level <= 0 (dummy b)"); 396 { 400 397 // bind dummy (incase bindings checked) 401 398 mTerrain->vertexBufferBinding->setBinding(DELTA_BINDING, … … 406 403 407 404 } 408 //else LogManager::getSingleton().logMessage("no lod morph");409 /*std::stringstream d;410 d << "terrain: " << this->getName() << ", notify camera: " << cam->getName() << ", pos: " << StringConverter::toString(cam->getDerivedPosition()) <<411 ", distance: " << StringConverter::toString(L) << ", lod level: " << mLastNextLevel412 << ", render level: " << getRenderLevel() << ", morph factor: " << mLODMorphFactor;413 LogManager::getSingleton().logMessage(d.str());*/414 415 405 } 416 406 //-----------------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.