- Timestamp:
- 03/10/06 08:23:09 (19 years ago)
- Location:
- GTP/trunk/Lib/Vis
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/scripts/Preprocessor.vcproj
r660 r685 65 65 <Tool 66 66 Name="VCCLCompilerTool" 67 AdditionalIncludeDirectories="..\support;..\support\devil\include;..\support\zlib\include;..\include;"$(QTDIR)\include\QtCore";"$(QTDIR)\include\QtGui";"$(QTDIR)\include";"$(QTDIR)\include\QtOpenGl";..\src;"$(CG_INC_PATH)"; "$(GTPDIR)\NonGTP\Xerces";"$(GTPDIR)\NonGTP\Devil\include";"$(GTPDIR)\NonGTP\Zlib\include""67 AdditionalIncludeDirectories="..\support;..\support\devil\include;..\support\zlib\include;..\include;"$(QTDIR)\include\QtCore";"$(QTDIR)\include\QtGui";"$(QTDIR)\include";"$(QTDIR)\include\QtOpenGl";..\src;"$(CG_INC_PATH)";..\..\..\..\..\..\NonGTP\Devil\include;..\..\..\..\..\..\NonGTP\Zlib\include;..\..\..\..\..\..\NonGTP\Xerces" 68 68 PreprocessorDefinitions="WIN32;NDEBUG;_LIB;" 69 69 RuntimeLibrary="2" -
GTP/trunk/Lib/Vis/Preprocessing/scripts/default.env
r666 r685 177 177 # samples used for view cell construction 178 178 Construction { 179 samples 100000 0179 samples 100000 180 180 samplesPerPass 200000 181 181 } … … 219 219 refine false 220 220 compress false 221 merge false221 merge true 222 222 } 223 223 … … 230 230 colorCode Random 231 231 exportRays false 232 exportGeometry false232 exportGeometry true 233 233 exportMergedViewCells false 234 234 useClipPlane true 235 235 clipPlaneAxis 1 236 } 237 238 showVisualization false 236 clipPlanePos 0.35 237 } 238 239 showVisualization true 239 240 evaluateViewCells false 240 241 … … 302 303 VspBspTree { 303 304 Construction { 304 samples 800000305 epsilon 0.000 5305 samples 200000 306 epsilon 0.00005 306 307 randomize false 307 308 renderCostWeight 1.0 … … 350 351 minGlobalCostRatio 0.0000001 351 352 # minGlobalCostRatio 0.0001 352 maxViewCells 20000353 maxViewCells 10000 353 354 354 355 -
GTP/trunk/Lib/Vis/Preprocessing/src/Environment.cpp
r682 r685 1282 1282 optBool, 1283 1283 "view_cells_merge_empty=", 1284 " false");1284 "true"); 1285 1285 1286 1286 RegisterOption("ViewCells.evaluateViewCells", … … 1604 1604 "true"); 1605 1605 1606 RegisterOption("Preprocessor.computeVisibility", 1607 optBool, 1608 "preprocessor_compute_visibility=", 1609 "true"); 1606 1610 1607 1611 -
GTP/trunk/Lib/Vis/Preprocessing/src/GlRenderer.cpp
r608 r685 123 123 RenderViewCell(*it); 124 124 } 125 } else { 126 // cerr<<"Empty viewcell mesh\n"; 125 127 } 126 128 } … … 732 734 733 735 734 RenderErrors();735 RenderInfo();736 737 if (mRenderViewCells)736 if (!mRenderViewCells) { 737 RenderErrors(); 738 RenderInfo(); 739 } else { 738 740 RenderViewCells(); 741 742 mWireFrame = true; 743 RenderScene(); 744 mWireFrame = false; 745 RenderInfo(); 746 } 739 747 740 748 mFrame++; … … 816 824 vl->addWidget(slider); 817 825 slider->show(); 818 slider->setRange(1, 10000);826 slider->setRange(1, 5000); 819 827 slider->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); 820 828 slider->setValue(500); … … 946 954 SetupCamera(); 947 955 glEnable(GL_CULL_FACE); 956 //glDisable(GL_CULL_FACE); 948 957 glCullFace(GL_FRONT); 949 958 double eq[4]; -
GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp
r675 r685 30 30 environment->GetBoolValue("Preprocessor.loadPolygonsAsMeshes", mLoadPolygonsAsMeshes); 31 31 environment->GetBoolValue("Preprocessor.quitOnFinish", mQuitOnFinish); 32 environment->GetBoolValue("Preprocessor.computeVisibility", mComputeVisibility); 32 33 Debug << "load polygons as meshes: " << mLoadPolygonsAsMeshes << endl; 33 34 -
GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.h
r658 r685 159 159 bool mQuitOnFinish; 160 160 bool mLoadPolygonsAsMeshes; 161 bool mComputeVisibility; 161 162 162 163 protected: -
GTP/trunk/Lib/Vis/Preprocessing/src/PreprocessorThread.cpp
r599 r685 20 20 PreprocessorThread::Main() 21 21 { 22 23 if ( 1) {22 23 if (mPreprocessor->mComputeVisibility) { 24 24 mPreprocessor->ComputeVisibility(); 25 25 // mPreprocessor->ExportPreprocessedData("scene.vis"); -
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp
r684 r685 1754 1754 const bool createMesh) 1755 1755 { 1756 CreateMesh(viewCell);1757 1758 1756 float area = 0; 1759 1757 float volume = 0; … … 1772 1770 area += geom.GetArea(); 1773 1771 volume += geom.GetVolume(); 1772 CreateMesh(*it); 1774 1773 } 1775 1774 … … 3592 3591 vm->FinalizeViewCells(true); 3593 3592 3593 vm->mViewCellsTree->AssignRandomColors(); 3594 3594 Debug << (int)vm->mViewCells.size() << " view cells loaded" << endl; 3595 3595 } … … 3670 3670 const bool createMesh) 3671 3671 { 3672 CreateMesh(viewCell);3673 3674 3672 float area = 0; 3675 3673 float volume = 0; … … 3688 3686 area += geom.GetArea(); 3689 3687 volume += geom.GetVolume(); 3688 CreateMesh(*it); 3690 3689 } 3691 3690 -
GTP/trunk/Lib/Vis/Preprocessing/src/VspBspTree.cpp
r683 r685 1826 1826 1827 1827 // clamp because of possible precision issues 1828 if ( 0&&1828 if (1 && 1829 1829 (!splitSuccessFull || (pFront <= 0) || (pBack <= 0) || 1830 1830 !geomFront.Valid() || !geomBack.Valid())) -
GTP/trunk/Lib/Vis/Preprocessing/src/VssPreprocessor.cpp
r677 r685 13 13 #include "Beam.h" 14 14 #include "GlRenderer.h" 15 #include "ViewCellBsp.h" 15 16 16 17 bool use2dSampling = false; … … 47 48 } 48 49 50 49 51 VssPreprocessor::~VssPreprocessor() 50 52 { … … 52 54 DEL_PTR(mViewSpaceBox); 53 55 } 56 54 57 55 58 void … … 155 158 // cast again to ensure that there is no objectA 156 159 SetupRay(ray, pointB, direction); 157 ray.mFlags |= Ray::CULL_BACKFACES ;160 ray.mFlags |= Ray::CULL_BACKFACESw; 158 161 159 162 if (mKdTree->CastRay(ray)) … … 317 320 vssRays.SelectRays(number, rays); 318 321 319 exporter->ExportRays(rays, RgbColor(1, 0, 0));322 //exporter->ExportRays(rays, RgbColor(1, 0, 0)); 320 323 321 324 delete exporter; … … 401 404 } 402 405 } 403 #include "ViewCellBsp.h" 406 404 407 405 408 void VssPreprocessor::TestBeamCasting(VssTree *tree, -
GTP/trunk/Lib/Vis/Preprocessing/src/X3dExporter.cpp
r678 r685 1135 1135 void X3dExporter::ExportGeometry(const ObjectContainer &objects) 1136 1136 { 1137 #if 0 1137 1138 for (int j = 0; j < objects.size(); ++ j) 1138 1139 ExportIntersectable(objects[j]); 1140 #else 1141 // hack 1142 PolygonContainer polys; 1143 for (int j = 0; j < objects.size(); ++ j){ 1144 polys.push_back(new Polygon3(dynamic_cast<MeshInstance *>(objects[j])->GetMesh()->mVertices)); 1145 } 1146 1147 Mesh dummyMesh; 1148 PolygonContainer::const_iterator it, it_end = polys.end(); 1149 1150 for (it = polys.begin(); it != it_end; ++ it) 1151 { 1152 (*it)->AddToMesh(dummyMesh); 1153 } 1154 ExportMesh(&dummyMesh); 1155 CLEAR_CONTAINER(polys); 1156 #endif 1139 1157 } 1140 1158 -
GTP/trunk/Lib/Vis/Preprocessing/src/default.env
r677 r685 23 23 useGlRenderer true 24 24 # type sampling 25 type vss26 #type rss25 # type vss 26 type rss 27 27 detectEmptyViewSpace true 28 28 pvsRenderErrorSamples 10000 29 29 quitOnFinish false 30 computeVisibility false 30 31 } 31 32 … … 39 40 loadInitialSamples false 40 41 storeInitialSamples false 41 useViewSpaceBox true42 useViewSpaceBox false 42 43 enlargeViewSpace true 43 44 } … … 75 76 RssPreprocessor { 76 77 samplesPerPass 100000 77 initialSamples 10000078 vssSamples 10079 vssSamplesPerPass 10078 initialSamples 500000 79 vssSamples 5000000 80 vssSamplesPerPass 500000 80 81 useImportanceSampling true 81 82 … … 179 180 maxStaticMemory 40 180 181 181 exportToFile true182 loadFromFile false182 exportToFile false 183 loadFromFile true 183 184 184 185 #type kdTree … … 213 214 refine false 214 215 compress false 215 merge false216 merge true 216 217 } 217 218 … … 245 246 # filename ../scripts/viewcells_vienna.xml 246 247 # filename ../scripts/viewcells_atlanta.xml 247 filename ../scripts/viewcells_soda5.xml 248 # filename ../scripts/viewcells_soda5-2.xml 249 # filename ../data/soda/soda5-viewcells.xml 250 filename ../scripts/viewcells_atlanta.xml 248 251 } 249 252
Note: See TracChangeset
for help on using the changeset viewer.