Changeset 2233 for GTP/trunk/Lib/Vis/Preprocessing/src/BvHierarchy.h
- Timestamp:
- 03/12/07 13:17:08 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/BvHierarchy.h
r2227 r2233 644 644 { 645 645 // hack: we use the simpler but faster version 646 if (!object) 647 return NULL; 646 //if (!object) return NULL; 648 647 649 648 return object->mBvhLeaf; … … 676 675 ///////////////////////////////// 677 676 678 static float EvalAbsCost(const ObjectContainer &objects);677 static inline float EvalAbsCost(const ObjectContainer &objects); 679 678 680 679 void CollectObjects(const AxisAlignedBox3 &box, ObjectContainer &objects); … … 1101 1100 }; 1102 1101 1102 1103 float BvHierarchy::EvalAbsCost(const ObjectContainer &objects) 1104 { 1105 float result; 1106 1107 #if USE_BETTER_RENDERCOST_EST 1108 1109 ObjectContainer::const_iterator oit, oit_end = objects.end(); 1110 1111 for (oit = objects.begin(); oit != oit_end; ++ oit) 1112 { 1113 result += ViewCellsManager::GetRendercost(*oit); 1114 } 1115 1116 #else 1117 1118 result = (float)objects.size(); 1119 1120 #endif 1121 1122 #if BOUND_RENDERCOST 1123 result = max(result, MIN_RENDERCOST); 1124 #endif 1125 1126 return result; 1103 1127 } 1104 1128 1129 } 1130 1105 1131 #endif
Note: See TracChangeset
for help on using the changeset viewer.