Changeset 2756 for GTP/trunk/App/Demos/Vis/CHC_revisited/Bvh.cpp
- Timestamp:
- 06/13/08 18:06:32 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/CHC_revisited/Bvh.cpp
r2755 r2756 10 10 #include "glInterface.h" 11 11 #include "Triangle3.h" 12 12 #include "SceneEntity.h" 13 #include "Geometry.h" 13 14 14 15 namespace CHCDemo … … 557 558 558 559 559 /*560 560 void Bvh::ComputeIds() 561 561 { 562 // collect all nodes, also the nodes from local bvh 563 // warning: root nodes local bvh are not in there, as they 564 // are equivalent geometry bvh leaves 562 // collect all nodes 565 563 BvhNodeContainer nodes; 566 Collect AllNodes(mRoot, nodes);564 CollectNodes(mRoot, nodes); 567 565 568 566 // assign ids to all nodes of the "regular" hierarchy 569 567 int i = 0; 570 HierarchyNodeContainer::const_iterator lit, lit_end = nodes.end();568 BvhNodeContainer::const_iterator lit, lit_end = nodes.end(); 571 569 572 570 for (lit = nodes.begin(); lit != lit_end; ++ lit, ++ i) … … 575 573 } 576 574 } 577 */ 575 578 576 579 577 void Bvh::PrepareVertices() … … 819 817 820 818 for (int i = node->mFirst; i <= node->mLast; ++ i) 821 {822 819 numTriangles += mGeometry[i]->GetGeometry()->CountTriangles(); 823 } 824 820 825 821 return numTriangles; 826 822 } 827 823 828 824 829 float Bvh::Get GeometryArea(BvhNode *node) const825 float Bvh::GetArea(BvhNode *node) const 830 826 { 831 827 return node->mArea;
Note: See TracChangeset
for help on using the changeset viewer.