Changeset 1004 for GTP/trunk/Lib/Vis/Preprocessing/src/VspBspTree.cpp
- Timestamp:
- 06/07/06 18:38:29 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/VspBspTree.cpp
r1002 r1004 55 55 56 56 57 VspBspTree::VspBspTree( Environment *env):57 VspBspTree::VspBspTree(): 58 58 mRoot(NULL), 59 59 mUseAreaForPvs(false), … … 67 67 { 68 68 bool randomize = false; 69 env->GetBoolValue("VspBspTree.Construction.randomize", randomize);69 Environment::GetSingleton()->GetBoolValue("VspBspTree.Construction.randomize", randomize); 70 70 if (randomize) 71 71 Randomize(); // initialise random generator for heuristics 72 72 73 73 //-- termination criteria for autopartition 74 env->GetIntValue("VspBspTree.Termination.maxDepth", mTermMaxDepth);75 env->GetIntValue("VspBspTree.Termination.minPvs", mTermMinPvs);76 env->GetIntValue("VspBspTree.Termination.minRays", mTermMinRays);77 env->GetFloatValue("VspBspTree.Termination.minProbability", mTermMinProbability);78 env->GetFloatValue("VspBspTree.Termination.maxRayContribution", mTermMaxRayContribution);79 env->GetFloatValue("VspBspTree.Termination.minAccRayLenght", mTermMinAccRayLength);80 env->GetFloatValue("VspBspTree.Termination.maxCostRatio", mTermMaxCostRatio);81 env->GetIntValue("VspBspTree.Termination.missTolerance", mTermMissTolerance);82 env->GetIntValue("VspBspTree.Termination.maxViewCells", mMaxViewCells);74 Environment::GetSingleton()->GetIntValue("VspBspTree.Termination.maxDepth", mTermMaxDepth); 75 Environment::GetSingleton()->GetIntValue("VspBspTree.Termination.minPvs", mTermMinPvs); 76 Environment::GetSingleton()->GetIntValue("VspBspTree.Termination.minRays", mTermMinRays); 77 Environment::GetSingleton()->GetFloatValue("VspBspTree.Termination.minProbability", mTermMinProbability); 78 Environment::GetSingleton()->GetFloatValue("VspBspTree.Termination.maxRayContribution", mTermMaxRayContribution); 79 Environment::GetSingleton()->GetFloatValue("VspBspTree.Termination.minAccRayLenght", mTermMinAccRayLength); 80 Environment::GetSingleton()->GetFloatValue("VspBspTree.Termination.maxCostRatio", mTermMaxCostRatio); 81 Environment::GetSingleton()->GetIntValue("VspBspTree.Termination.missTolerance", mTermMissTolerance); 82 Environment::GetSingleton()->GetIntValue("VspBspTree.Termination.maxViewCells", mMaxViewCells); 83 83 84 84 //-- max cost ratio for early tree termination 85 env->GetFloatValue("VspBspTree.Termination.maxCostRatio", mTermMaxCostRatio);86 87 env->GetFloatValue("VspBspTree.Termination.minGlobalCostRatio", mTermMinGlobalCostRatio);88 env->GetIntValue("VspBspTree.Termination.globalCostMissTolerance", mTermGlobalCostMissTolerance);85 Environment::GetSingleton()->GetFloatValue("VspBspTree.Termination.maxCostRatio", mTermMaxCostRatio); 86 87 Environment::GetSingleton()->GetFloatValue("VspBspTree.Termination.minGlobalCostRatio", mTermMinGlobalCostRatio); 88 Environment::GetSingleton()->GetIntValue("VspBspTree.Termination.globalCostMissTolerance", mTermGlobalCostMissTolerance); 89 89 90 90 // HACK//mTermMinPolygons = 25; 91 91 92 92 //-- factors for bsp tree split plane heuristics 93 env->GetFloatValue("VspBspTree.Factor.pvs", mPvsFactor);94 env->GetFloatValue("VspBspTree.Termination.ct_div_ci", mCtDivCi);93 Environment::GetSingleton()->GetFloatValue("VspBspTree.Factor.pvs", mPvsFactor); 94 Environment::GetSingleton()->GetFloatValue("VspBspTree.Termination.ct_div_ci", mCtDivCi); 95 95 96 96 97 97 //-- partition criteria 98 env->GetIntValue("VspBspTree.maxPolyCandidates", mMaxPolyCandidates);99 env->GetIntValue("VspBspTree.maxRayCandidates", mMaxRayCandidates);100 env->GetIntValue("VspBspTree.splitPlaneStrategy", mSplitPlaneStrategy);101 102 env->GetFloatValue("VspBspTree.Construction.epsilon", mEpsilon);103 env->GetIntValue("VspBspTree.maxTests", mMaxTests);98 Environment::GetSingleton()->GetIntValue("VspBspTree.maxPolyCandidates", mMaxPolyCandidates); 99 Environment::GetSingleton()->GetIntValue("VspBspTree.maxRayCandidates", mMaxRayCandidates); 100 Environment::GetSingleton()->GetIntValue("VspBspTree.splitPlaneStrategy", mSplitPlaneStrategy); 101 102 Environment::GetSingleton()->GetFloatValue("VspBspTree.Construction.epsilon", mEpsilon); 103 Environment::GetSingleton()->GetIntValue("VspBspTree.maxTests", mMaxTests); 104 104 105 105 // if only the driving axis is used for axis aligned split 106 env->GetBoolValue("VspBspTree.splitUseOnlyDrivingAxis", mOnlyDrivingAxis);106 Environment::GetSingleton()->GetBoolValue("VspBspTree.splitUseOnlyDrivingAxis", mOnlyDrivingAxis); 107 107 108 108 //-- termination criteria for axis aligned split 109 env->GetFloatValue("VspBspTree.Termination.AxisAligned.maxRayContribution",109 Environment::GetSingleton()->GetFloatValue("VspBspTree.Termination.AxisAligned.maxRayContribution", 110 110 mTermMaxRayContriForAxisAligned); 111 env->GetIntValue("VspBspTree.Termination.AxisAligned.minRays",111 Environment::GetSingleton()->GetIntValue("VspBspTree.Termination.AxisAligned.minRays", 112 112 mTermMinRaysForAxisAligned); 113 113 114 // env->GetFloatValue("VspBspTree.maxTotalMemory", mMaxTotalMemory);115 env->GetFloatValue("VspBspTree.maxStaticMemory", mMaxMemory);116 117 env->GetFloatValue("VspBspTree.Construction.renderCostWeight", mRenderCostWeight);118 env->GetBoolValue("VspBspTree.usePolygonSplitIfAvailable", mUsePolygonSplitIfAvailable);119 120 env->GetBoolValue("VspBspTree.useCostHeuristics", mUseCostHeuristics);121 env->GetBoolValue("VspBspTree.useSplitCostQueue", mUseSplitCostQueue);122 env->GetBoolValue("VspBspTree.simulateOctree", mCirculatingAxis);123 env->GetBoolValue("VspBspTree.useRandomAxis", mUseRandomAxis);124 env->GetIntValue("VspBspTree.nodePriorityQueueType", mNodePriorityQueueType);125 126 env->GetBoolValue("ViewCells.PostProcess.emptyViewCellsMerge", mEmptyViewCellsMergeAllowed);114 //Environment::GetSingleton()->GetFloatValue("VspBspTree.maxTotalMemory", mMaxTotalMemory); 115 Environment::GetSingleton()->GetFloatValue("VspBspTree.maxStaticMemory", mMaxMemory); 116 117 Environment::GetSingleton()->GetFloatValue("VspBspTree.Construction.renderCostWeight", mRenderCostWeight); 118 Environment::GetSingleton()->GetBoolValue("VspBspTree.usePolygonSplitIfAvailable", mUsePolygonSplitIfAvailable); 119 120 Environment::GetSingleton()->GetBoolValue("VspBspTree.useCostHeuristics", mUseCostHeuristics); 121 Environment::GetSingleton()->GetBoolValue("VspBspTree.useSplitCostQueue", mUseSplitCostQueue); 122 Environment::GetSingleton()->GetBoolValue("VspBspTree.simulateOctree", mCirculatingAxis); 123 Environment::GetSingleton()->GetBoolValue("VspBspTree.useRandomAxis", mUseRandomAxis); 124 Environment::GetSingleton()->GetIntValue("VspBspTree.nodePriorityQueueType", mNodePriorityQueueType); 125 126 Environment::GetSingleton()->GetBoolValue("ViewCells.PostProcess.emptyViewCellsMerge", mEmptyViewCellsMergeAllowed); 127 127 128 128 char subdivisionStatsLog[100]; 129 env->GetStringValue("VspBspTree.subdivisionStats", subdivisionStatsLog);129 Environment::GetSingleton()->GetStringValue("VspBspTree.subdivisionStats", subdivisionStatsLog); 130 130 mSubdivisionStats.open(subdivisionStatsLog); 131 131 132 env->GetFloatValue("VspBspTree.Construction.minBand", mMinBand);133 env->GetFloatValue("VspBspTree.Construction.maxBand", mMaxBand);134 env->GetBoolValue("VspBspTree.Construction.useDrivingAxisForMaxCost", mUseDrivingAxisForMaxCost);132 Environment::GetSingleton()->GetFloatValue("VspBspTree.Construction.minBand", mMinBand); 133 Environment::GetSingleton()->GetFloatValue("VspBspTree.Construction.maxBand", mMaxBand); 134 Environment::GetSingleton()->GetBoolValue("VspBspTree.Construction.useDrivingAxisForMaxCost", mUseDrivingAxisForMaxCost); 135 135 136 136 //-- debug output … … 198 198 Debug << endl; 199 199 } 200 200 /* 201 201 VspBspTree::VspBspTree(): 202 202 mRoot(NULL), … … 211 211 mEpsilon(1e-6f) 212 212 { 213 } 213 }*/ 214 214 215 215 BspViewCell *VspBspTree::GetOutOfBoundsCell()
Note: See TracChangeset
for help on using the changeset viewer.