Ignore:
Timestamp:
03/12/07 13:17:08 (17 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/Preprocessing/src/BvHierarchy.h

    r2227 r2233  
    644644        { 
    645645                // hack: we use the simpler but faster version 
    646                 if (!object)  
    647                         return NULL; 
     646                //if (!object) return NULL; 
    648647 
    649648                return object->mBvhLeaf; 
     
    676675        ///////////////////////////////// 
    677676 
    678         static float EvalAbsCost(const ObjectContainer &objects); 
     677        static inline float EvalAbsCost(const ObjectContainer &objects); 
    679678 
    680679        void CollectObjects(const AxisAlignedBox3 &box, ObjectContainer &objects); 
     
    11011100}; 
    11021101 
     1102 
     1103float 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; 
    11031127} 
    11041128 
     1129} 
     1130 
    11051131#endif 
Note: See TracChangeset for help on using the changeset viewer.