Changeset 3268 for GTP/trunk/App/Demos/Vis/FriendlyCulling/src
- Timestamp:
- 01/11/09 22:54:05 (15 years ago)
- Location:
- GTP/trunk/App/Demos/Vis/FriendlyCulling/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/BvhConstructor.cpp
r3267 r3268 130 130 // no split could be achieved => just halve number of objects 131 131 split = (leaf->mLast + leaf->mFirst) / 2; 132 cerr << "no reduction " << leaf->CountPrimitives() << " " << leaf->mFirst << " " << leaf->mLast << endl;132 //cerr << "no reduction " << leaf->CountPrimitives() << " " << leaf->mFirst << " " << leaf->mLast << endl; 133 133 } 134 134 … … 185 185 BvhLeaf *l = new BvhLeaf(NULL); 186 186 187 l->mBox = SceneEntity::ComputeBoundingBox(mEntities + mFirst, mFirst - mLast + 1);188 189 187 l->mFirst = mFirst; 190 188 l->mLast = mLast; 189 190 cout << "constructing bvh from " << l->mFirst << " to " << l->mLast << endl; 191 192 l->mBox = SceneEntity::ComputeBoundingBox(mEntities + mFirst, mLast - mFirst + 1); 191 193 l->mArea = l->mBox.SurfaceArea(); 192 194 193 cout << "constructing bvh from " << l->mFirst << " to " << l->mLast << endl;194 195 195 root = SubdivideLeaf(l, 0); 196 196 -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/SceneEntity.cpp
r3262 r3268 187 187 AxisAlignedBox3 box; 188 188 189 if ( !numEntities)189 if (numEntities <= 0) 190 190 { // no box => just initialize 191 191 box.Initialize(); … … 209 209 AxisAlignedBox3 box; 210 210 211 if ( !entities.empty())211 if (entities.empty()) 212 212 { // no box => just initialize 213 213 box.Initialize(); -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/SkyPreetham.cpp
r3250 r3268 109 109 110 110 // scale the sky dome so no intersection with the scene is visible 111 //const float scaleFactor = 80.0f;112 const float scaleFactor = 500.0f;111 const float scaleFactor = 80.0f; 112 //const float scaleFactor = 500.0f; 113 113 114 114 position.z -= 3.0f * scaleFactor; -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp
r3267 r3268 587 587 //LoadModel("sibenik.dem", dynamicObjects); 588 588 589 LoadModel("procedural_pompeii_area6_hires/pompeii.dem", dynamicObjects);590 589 //LoadModel("procedural_pompeii_area6_hires/pompeii.dem", dynamicObjects); 590 /* 591 591 AxisAlignedBox3 box; 592 592 box.Initialize(); … … 603 603 604 604 cout << "pompeii bb:\n" << box << endl; 605 605 */ 606 606 #if 0 607 607 const Vector3 sceneCenter(470.398f, 240.364f, 181.7f); … … 645 645 646 646 BvhFactory bvhFactory; 647 //bvh = bvhFactory.Create(bvh_filename, staticObjects, dynamicObjects, maxDepthForTestingChildren); 647 #if 1 648 648 bvh = bvhFactory.Create(staticObjects, dynamicObjects, maxDepthForTestingChildren); 649 #else 650 bvh = bvhFactory.Create(bvh_filename, staticObjects, dynamicObjects, maxDepthForTestingChildren); 651 #endif 649 652 650 653 if (!bvh)
Note: See TracChangeset
for help on using the changeset viewer.