- Timestamp:
- 07/12/06 08:23:09 (18 years ago)
- Location:
- GTP/trunk/Lib/Vis/Preprocessing/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/VspOspTree.cpp
r1122 r1123 22 22 23 23 #define USE_FIXEDPOINT_T 0 24 #define COUNT_OBJECTS 0 24 25 25 26 26 //-- static members … … 2649 2649 mTimeStamp(1) 2650 2650 { 2651 2652 2651 bool randomize = false; 2653 2652 Environment::GetSingleton()->GetBoolValue("VspTree.Construction.randomize", randomize); … … 2666 2665 Environment::GetSingleton()->GetFloatValue("OspTree.Termination.maxCostRatio", mTermMaxCostRatio); 2667 2666 2668 Environment::GetSingleton()->GetFloatValue("OspTree.Termination.minGlobalCostRatio", mTermMinGlobalCostRatio); 2669 Environment::GetSingleton()->GetIntValue("OspTree.Termination.globalCostMissTolerance", mTermGlobalCostMissTolerance); 2667 Environment::GetSingleton()->GetFloatValue("OspTree.Termination.minGlobalCostRatio", 2668 mTermMinGlobalCostRatio); 2669 Environment::GetSingleton()->GetIntValue("OspTree.Termination.mTermGlobalCostMissTolerance); 2670 2670 2671 2671 … … 2678 2678 // if only the driving axis is used for axis aligned split 2679 2679 Environment::GetSingleton()->GetBoolValue("OspTree.splitUseOnlyDrivingAxis", mOnlyDrivingAxis); 2680 2681 2680 Environment::GetSingleton()->GetFloatValue("OspTree.maxStaticMemory", mMaxMemory); 2682 2683 2681 Environment::GetSingleton()->GetBoolValue("OspTree.useCostHeuristics", mUseCostHeuristics); 2684 2682 … … 3117 3115 int OspTree::PrepareHeuristics(Intersectable *object) 3118 3116 { 3119 #if COUNT_OBJECTS 3120 return 1; 3121 #else 3122 // the priotity of the object is the number of view cell pvs entries of the object 3123 return object->mViewCellPvs.GetSize(); 3124 #endif 3117 if (mUseSah) 3118 return 1; 3119 else 3120 // the priotity of the object is the number of view cell pvs entries of the object 3121 return object->mViewCellPvs.GetSize(); 3125 3122 } 3126 3123 … … 3187 3184 void OspTree::RemoveContriFromPvs(Intersectable *object, int &pvs) const 3188 3185 { 3189 #if COUNT_OBJECTS 3190 -- pvs; 3191 #else 3192 // the cost of an object is the number of view cells it is part of 3193 pvs -= object->mViewCellPvs.GetSize(); 3194 #endif 3186 if (mUseSah) 3187 -- pvs; 3188 else 3189 // the cost of an object is the number of view cells it is part of 3190 pvs -= object->mViewCellPvs.GetSize(); 3195 3191 } 3196 3192 … … 3198 3194 void OspTree::AddContriToPvs(Intersectable *object, int &pvs) const 3199 3195 { 3200 #if COUNT_OBJECTS 3201 ++ pvs; 3202 #else 3203 // the cost of an object is the number of view cells it is part of 3204 pvs += object->mViewCellPvs.GetSize(); 3205 #endif 3196 if (mUseSah) 3197 ++ pvs; 3198 else 3199 // the cost of an object is the number of view cells it is part of 3200 pvs += object->mViewCellPvs.GetSize(); 3206 3201 } 3207 3202 … … 3287 3282 float OspTree::EvalViewCellPvsIncr(Intersectable *object) const 3288 3283 { 3289 #if COUNT_OBJECTS 3290 return 1; 3291 #else 3292 return (float)object->mViewCellPvs.GetSize(); 3293 #endif 3284 if (mUseSah) 3285 return 1; 3286 else 3287 return (float)object->mViewCellPvs.GetSize(); 3294 3288 } 3295 3289 … … 3787 3781 { 3788 3782 RayInfoContainer *rays = new RayInfoContainer(); 3783 3784 // makes no sense otherwise because only one kd cell available 3785 // during view space partition 3786 mVspTree.mPvsCountMethod = VspTree::PER_OBJECT; 3787 3789 3788 PrepareVsp(sampleRays, forcedViewSpace, *rays); 3790 3789 -
GTP/trunk/Lib/Vis/Preprocessing/src/VspOspTree.h
r1122 r1123 1023 1023 1024 1024 1025 1026 1025 //-- local termination 1027 1026 … … 1596 1595 1597 1596 1598 1599 1597 //-- global criteria 1600 1598 … … 1628 1626 float mEpsilon; 1629 1627 1628 1629 bool mUseSah; 1630 1630 1631 1631 /// subdivision stats output file
Note: See TracChangeset
for help on using the changeset viewer.