Changeset 3069 for GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Bvh.cpp
- Timestamp:
- 10/24/08 17:04:15 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Bvh.cpp
r3068 r3069 1269 1269 void Bvh::UpdateDynamicBranch() 1270 1270 { 1271 // the bvh has two main branches 1272 // a static branch (the old root), and adynamic branch 1273 // we create a 'dynamic' leaf which basically is a container 1274 // for all dynamic objects underneath 1275 1276 // the bounding boxes of the dynamic tree must be updated 1277 // once each frame in order to be able to incorporate 1278 // the movements of the objects within 1279 1271 1280 // delete old branch 1272 if (!mDynamicRoot->IsLeaf()) 1273 { 1274 cout << "deleting old branch" << endl; 1275 1276 DEL_PTR(mDynamicRoot); 1277 1278 mDynamicRoot = new BvhLeaf(mRoot); 1279 mDynamicRoot->mBox = mRoot->mBox; 1280 1281 mDynamicRoot->mFirst = 0; 1282 mDynamicRoot->mLast = 0; 1283 mDynamicRoot->mArea = mDynamicRoot->mBox.SurfaceArea(); 1284 } 1285 1281 cout << "deleting old branch" << endl; 1282 1283 DEL_PTR(mDynamicRoot); 1284 1285 mDynamicRoot = new BvhLeaf(mRoot); 1286 mDynamicRoot->mBox = mRoot->mBox; 1287 1288 mDynamicRoot->mFirst = 0; 1289 mDynamicRoot->mLast = (int)mDynamicEntities.size() - 1; 1290 mDynamicRoot->mArea = mDynamicRoot->mBox.SurfaceArea(); 1291 1286 1292 cout << "updating dynamic branch" << endl; 1287 1293
Note: See TracChangeset
for help on using the changeset viewer.