Changeset 1703 for GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp
- Timestamp:
- 10/31/06 10:57:14 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp
r1701 r1703 33 33 #define KD_PVS_AREA (5*1e-4f) 34 34 35 36 35 37 namespace GtpVisibilityPreprocessor { 36 38 … … 38 40 // HACK 39 41 const static bool SAMPLE_AFTER_SUBDIVISION = true; 40 const static bool CLAMP_TO_BOX = true; 42 const static bool CLAMP_TO_BOX = false; 43 44 int ViewCellsManager::sRenderCostEvaluationType = 0; 45 41 46 42 47 template <typename T> class myless … … 101 106 Environment::GetSingleton()->GetIntValue("ViewCells.Filter.maxSize", mMaxFilterSize); 102 107 Environment::GetSingleton()->GetFloatValue("ViewCells.Filter.width", mFilterWidth); 103 Environment::GetSingleton()->GetIntValue("ViewCells.renderCostEvaluationType", mRenderCostEvaluationType);108 Environment::GetSingleton()->GetIntValue("ViewCells.renderCostEvaluationType", sRenderCostEvaluationType); 104 109 105 110 Environment::GetSingleton()->GetBoolValue("ViewCells.exportBboxesForPvs", mExportBboxesForPvs); … … 179 184 if (strcmp(buf, "perobject") == 0) 180 185 { 181 mRenderCostEvaluationType = ViewCellsManager::PER_OBJECT;182 } 183 else if (strcmp(buf, " directional") == 0)184 { 185 mRenderCostEvaluationType = ViewCellsManager::PER_TRIANGLE;186 sRenderCostEvaluationType = ViewCellsManager::PER_OBJECT; 187 } 188 else if (strcmp(buf, "pertriangle") == 0) 189 { 190 sRenderCostEvaluationType = ViewCellsManager::PER_TRIANGLE; 186 191 } 187 192 else … … 224 229 Debug << "evaluate view cells: " << mEvaluateViewCells << endl; 225 230 Debug << "sampling type: " << mSamplingType << endl; 226 Debug << "render cost evaluation type: " << mRenderCostEvaluationType << endl;231 Debug << "render cost evaluation type: " << sRenderCostEvaluationType << endl; 227 232 Debug << "evaluation sampling type: " << mEvaluationSamplingType << endl; 228 233 Debug << "show visualization: " << mShowVisualization << endl; … … 1091 1096 1092 1097 1093 float ViewCellsManager::EvalRenderCost(Intersectable *obj) const1094 { 1095 switch ( mRenderCostEvaluationType)1098 float ViewCellsManager::EvalRenderCost(Intersectable *obj) //const 1099 { 1100 switch (sRenderCostEvaluationType) 1096 1101 { 1097 1102 case PER_OBJECT: 1098 //cout << "perobject" << endl;1099 1103 return 1.0f; 1100 1104 1101 1105 case PER_TRIANGLE: 1102 { //cout << "pertriangle" << endl;1106 { 1103 1107 return (float)obj->NumberOfFaces(); 1104 1108 } … … 5187 5191 AxisAlignedBox3 bbox = mViewSpaceBox; 5188 5192 bbox.Scale(Vector3(0.5, 1, 0.5)); 5193 5189 5194 if (CLAMP_TO_BOX) 5190 5195 { … … 5204 5209 } 5205 5210 5206 mHierarchyManager->ExportObjectSpaceHierarchy(exporter, objects, CLAMP_TO_BOX ? &bbox : NULL, false); 5211 mHierarchyManager->ExportObjectSpaceHierarchy(exporter, 5212 objects, CLAMP_TO_BOX ? &bbox : NULL, false); 5207 5213 ExportViewCellsForViz(exporter, CLAMP_TO_BOX ? &bbox : NULL, GetClipPlane()); 5208 5214
Note: See TracChangeset
for help on using the changeset viewer.