- Timestamp:
- 11/08/05 08:28:45 (19 years ago)
- Location:
- trunk/VUT/GtpVisibilityPreprocessor
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibilityPreprocessor/scripts/default.env
r385 r389 129 129 130 130 maxPolyCandidates 50 131 maxRayCandidates 50131 maxRayCandidates 0 132 132 133 133 Termination { … … 135 135 maxRays 300 136 136 maxPolygons 0 137 maxDepth 80137 maxDepth 50 138 138 139 139 # axis aligned splits … … 151 151 } 152 152 153 154 # if split polys are stored for visualization 155 storeSplitPolys false 156 # x3d visualization of the split planes 157 exportSplits true 153 154 Visualization 155 { 156 # if split polys are stored for visualization 157 storeSplitPolys false 158 # x3d visualization of the split planes 159 exportSplits true 160 # how much samples should be used in visualization 161 162 samples 2000 163 } 158 164 } -
trunk/VUT/GtpVisibilityPreprocessor/src/Environment.cpp
r382 r389 1203 1203 optInt, 1204 1204 "-bsp_postprocessing_samples=", 1205 "20 6000");1205 "200000"); 1206 1206 1207 1207 RegisterOption("BspTree.Construction.sideTolerance", … … 1255 1255 "100"); 1256 1256 1257 RegisterOption("BspTree.storeSplitPolys",1258 optBool,1259 "-bsp_store_split_polys=",1260 "false");1261 1262 1257 RegisterOption("BspTree.splitPlaneStrategy", 1263 1258 optString, … … 1279 1274 "-view_cells_max_viewcells=", 1280 1275 "0"); 1281 1282 RegisterOption("BspTree.exportSplits", 1276 1277 1278 RegisterOption("Bsptree.Visualization.samples", 1279 optInt, 1280 "-bsp_visualization_samples=", 1281 "20000"); 1282 1283 RegisterOption("BspTree.Visualization.exportSplits", 1283 1284 optBool, 1284 "-bsp_ exportSplits",1285 "-bsp_visualization.exportSplits", 1285 1286 "false"); 1287 1288 RegisterOption("BspTree.Visualization.storePolys", 1289 optBool, 1290 "-bsp_visualization_store_polys=", 1291 "false"); 1286 1292 1287 1293 RegisterOption("Preprocessor.type", -
trunk/VUT/GtpVisibilityPreprocessor/src/SamplingPreprocessor.cpp
r388 r389 15 15 environment->GetIntValue("BspTree.Construction.samples", mBspConstructionSamples); 16 16 environment->GetIntValue("ViewCells.PostProcessing.samples", mPostProcessSamples); 17 environment->GetIntValue("BspTree.visualizationSamples", mVisualizationSamples); 18 17 19 mKdPvsDepth = 100; 18 20 mStats.open("stats.log"); … … 605 607 //-- visualization of the BSP splits 606 608 bool exportSplits = false; 607 environment->GetBoolValue("BspTree. exportSplits", exportSplits);609 environment->GetBoolValue("BspTree.Visualization.exportSplits", exportSplits); 608 610 609 611 cout << "exporting splits ... "; … … 726 728 } 727 729 // save rays for post processing 728 else if ((int)mSampleRays.size() < mPostProcessSamples) 730 else if ((int)mSampleRays.size() < mPostProcessSamples) || 731 (((int)mSampleRays.size() < mVisualizationSamples)) 729 732 { 730 733 mSampleRays.push_back(new Ray(ray)); … … 740 743 vector<Ray::BspIntersection>::const_iterator iit; 741 744 742 for (rit = rays.begin(); rit != rays.end(); ++ rit) 745 int limit = min((int)mSampleRays.size(), mPostProcessSamples); 746 747 for (int i = 0; i < limit; ++i) 743 748 { 749 Ray *ray = mSamplesRays[i]; 750 744 751 // traverse leaves stored in the rays and compare and merge consecutive 745 752 // leaves (i.e., the neighbors in the tree) 746 if ( (*rit)->bspIntersections.empty())753 if (ray->bspIntersections.empty()) 747 754 continue; 748 755 749 iit = (*rit)->bspIntersections.begin();756 iit = ray->bspIntersections.begin(); 750 757 751 758 BspLeaf *previousLeaf = (*iit).mLeaf; … … 834 841 835 842 //-- some rays for output 836 const int raysOut = min((int)mSampleRays.size(), 20000);843 const int raysOut = min((int)mSampleRays.size(), mVisualizationSamples); 837 844 vector<Ray *> vcRays[leafOut]; 838 845 … … 991 998 Debug << i << ": pvs size=" << (int)vc->GetPvs().GetSize() << endl; 992 999 1000 1001 // export rays piercing this view cell 1002 exporter->ExportRays(vcRays[i], 10000, RgbColor(0, 1, 0)); 1003 993 1004 m.mDiffuseColor = RgbColor(1, 0, 0); 994 1005 exporter->SetForcedMaterial(m); -
trunk/VUT/GtpVisibilityPreprocessor/src/ViewCellBsp.cpp
r385 r389 1580 1580 environment->GetFloatValue("BspTree.AxisAligned.splitBorder", sSplitBorder); 1581 1581 1582 environment->GetBoolValue("BspTree. storeSplitPolys", sStoreSplitPolys);1582 environment->GetBoolValue("BspTree.Visualization.storePolys", sStoreSplitPolys); 1583 1583 1584 1584 environment->GetFloatValue("BspTree.Construction.sideTolerance", Vector3::sDistTolerance); … … 1735 1735 farChild = in->GetBack(); // plane splits ray 1736 1736 } 1737 else // ray and plane are coincident // WHAT TO DO IN THIS CASE ? 1737 else // ray and plane are coincident 1738 // WHAT TO DO IN THIS CASE ? 1738 1739 { 1739 node = in->GetFront(); 1740 continue; 1740 break; 1741 //node = in->GetFront(); 1742 //continue; 1741 1743 } 1742 1744
Note: See TracChangeset
for help on using the changeset viewer.