Changeset 1758 for GTP/trunk/Lib/Vis/Preprocessing/src/Pvs.cpp
- Timestamp:
- 11/15/06 16:07:29 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/Pvs.cpp
r1740 r1758 79 79 We eliminate already accounted bvh nodes and objects using mailboxing. 80 80 */ 81 static float EvalBvhNodeContribution(Bvh Intersectable *bvhobj)81 static float EvalBvhNodeContribution(BvhNode *bvhObj) 82 82 { 83 BvhLeaf *leaf = bvhobj->GetItem(); 84 BvhNode *node = leaf->GetActiveNode(); 83 BvhNode *node; 84 85 // hack for choosing which node to account for 86 if (bvhObj->IsLeaf()) 87 node = dynamic_cast<BvhLeaf *>(bvhObj)->GetActiveNode(); 88 else 89 node = bvhObj; 85 90 86 91 // early exit 87 if (node == leaf) 88 { 92 if (node->IsLeaf()) 93 { 94 BvhLeaf *leaf = dynamic_cast<BvhLeaf *>(node); 89 95 // objects already accounted for 90 96 if (leaf->Mailed()) … … 112 118 if (node->IsLeaf()) 113 119 { 114 leaf = dynamic_cast<BvhLeaf *>(node);120 BvhLeaf *leaf = dynamic_cast<BvhLeaf *>(node); 115 121 116 122 // add #objects exclusivly in this node … … 156 162 case Intersectable::BVH_INTERSECTABLE: 157 163 { 158 Bvh Intersectable *bvhObj = dynamic_cast<BvhIntersectable *>(obj);164 BvhNode *bvhObj = dynamic_cast<BvhNode *>(obj); 159 165 pvs += EvalBvhNodeContribution(bvhObj); 160 166 break;
Note: See TracChangeset
for help on using the changeset viewer.