Changeset 1760 for GTP/trunk/Lib/Vis
- Timestamp:
- 11/15/06 20:34:23 (18 years ago)
- Location:
- GTP/trunk/Lib/Vis/Preprocessing/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/BvHierarchy.cpp
r1758 r1760 274 274 //mMemoryConst = (float)(sizeof(VspLeaf) + sizeof(VspViewCell)); 275 275 //mMemoryConst = (float)sizeof(BvhLeaf); 276 mMemoryConst = (float)sizeof(ObjectContainer);276 mMemoryConst = 16;//(float)sizeof(ObjectContainer); 277 277 278 278 mUseBboxAreaForSah = true; -
GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.cpp
r1758 r1760 2170 2170 2171 2171 const float objectSpaceHierarchyMem = float( 2172 subStats.mObjectSpaceSplits * sizeof(ObjectContainer)2172 subStats.mObjectSpaceSplits * mBvHierarchy->mMemoryConst//sizeof(ObjectContainer) 2173 2173 //+ (subStats.mObjectSpaceSplits - 1) * sizeof(BvhInterior) 2174 2174 //+sizeof(BvHierarchy) … … 2177 2177 2178 2178 const float viewSpaceHierarchyMem = float( 2179 subStats.mViewSpaceSplits * sizeof(ObjectPvs)2179 subStats.mViewSpaceSplits * mVspTree->mMemoryConst//sizeof(ObjectPvs) 2180 2180 //+ (subStats.mViewSpaceSplits - 1) * sizeof(VspInterior) 2181 2181 + sizeof(ObjectPvs) -
GTP/trunk/Lib/Vis/Preprocessing/src/TestPreprocessor.vcproj
r1751 r1760 206 206 Name="VCLinkerTool" 207 207 AdditionalDependencies="xerces-c_2.lib glew32.lib zdll.lib zziplib.lib devil.lib glut32.lib OpenGL32.Lib glu32.lib Preprocessor.lib RTScene.lib RTWorld.lib QtCore4.lib qtmain.lib QtOpenGL4.lib Qt3Support4.lib QtTest4.lib QtGui4.lib QtGlRenderer.lib" 208 OutputFile="../bin/release/Preprocessor .exe"208 OutputFile="../bin/release/Preprocessor2.exe" 209 209 LinkIncremental="1" 210 210 AdditionalLibraryDirectories="..\src\GL;..\lib\release;..\..\Preprocessing\lib\release;..\..\..\..\..\..\NonGTP\Boost\lib;..\..\..\..\..\..\NonGTP\Xerces\xercesc\lib;..\..\..\..\..\..\NonGTP\Zlib\lib;..\..\..\..\..\..\NonGTP\Devil\lib;..\MultiLevelRayTracing\RTScene\Release;..\MultiLevelRayTracing\RTWorld\Release;"$(QTDIR)\lib";.\QtGlRenderer\Release" -
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp
r1758 r1760 42 42 // HACK 43 43 const static bool SAMPLE_AFTER_SUBDIVISION = true; 44 //const static bool CLAMP_TO_BOX = false;45 const static bool CLAMP_TO_BOX = true;44 const static bool CLAMP_TO_BOX = false; 45 //const static bool CLAMP_TO_BOX = true; 46 46 47 47 … … 484 484 485 485 exporter->SetWireframe(); 486 ExportViewCellsForViz(exporter, NULL, GetClipPlane());486 ExportViewCellsForViz(exporter, NULL, mColorCode, GetClipPlane()); 487 487 488 488 delete exporter; … … 534 534 } 535 535 536 537 536 if (0) 538 537 { … … 1562 1561 mViewCellsTree->UpdateViewCellsStats(*it, mCurrentViewCellsStats); 1563 1562 } 1563 cout << "here44 " << mCurrentViewCellsStats.maxPvs << endl; 1564 1564 } 1565 1565 … … 2194 2194 void ViewCellsManager::ExportViewCellsForViz(Exporter *exporter, 2195 2195 const AxisAlignedBox3 *sceneBox, 2196 const AxisAlignedPlane *clipPlane,2197 const bool colorCode2196 const bool colorCode, 2197 const AxisAlignedPlane *clipPlane 2198 2198 ) const 2199 2199 { 2200 2200 ViewCellContainer::const_iterator it, it_end = mViewCells.end(); 2201 2201 cout << "here2" << endl; 2202 2202 for (it = mViewCells.begin(); it != it_end; ++ it) 2203 { 2203 {cout << "here4 " << mOnlyValidViewCells << " " << (*it)->GetValid() << endl; 2204 2204 if (!mOnlyValidViewCells || (*it)->GetValid()) 2205 { 2205 {cout << "here5 " << mColorCode << endl; 2206 2206 ExportColor(exporter, *it, colorCode); 2207 2207 ExportViewCellGeometry(exporter, *it, sceneBox, clipPlane); … … 2732 2732 float importance = 0; 2733 2733 static Material m; 2734 2734 //cout << "color code: " << colorCode << endl; 2735 2735 switch (mColorCode) 2736 2736 { … … 2755 2755 2756 2756 case 1: // pvs 2757 { 2757 { //cout << "here22 " << mCurrentViewCellsStats.maxPvs << endl; 2758 2758 if (mCurrentViewCellsStats.maxPvs) 2759 2759 { 2760 //cout << "pvscost : " << (float)mViewCellsTree->GetPvsCost(vc) << endl; 2761 //cout << "maxPvs : " << (float)mCurrentViewCellsStats.maxPvs << endl; 2762 2760 2763 importance = 2761 2764 (float)mViewCellsTree->GetPvsCost(vc) / … … 2780 2783 #endif 2781 2784 default: 2785 cout << "here10" << endl; 2782 2786 break; 2783 2787 } … … 3034 3038 3035 3039 exporter->SetFilled(); 3036 ExportViewCellsForViz(exporter, NULL, GetClipPlane());3040 ExportViewCellsForViz(exporter, NULL, mColorCode, GetClipPlane()); 3037 3041 3038 3042 delete exporter; … … 3041 3045 3042 3046 // export merged view cells using pvs color coding 3043 mColorCode = 1; 3044 3047 3045 3048 exporter = Exporter::GetExporter("merged_view_cells_pvs.wrl"); 3046 3049 cout << "exporting view cells after merge (pvs size) ... "; … … 3054 3057 3055 3058 exporter->SetFilled(); 3056 ExportViewCellsForViz(exporter, NULL, GetClipPlane()); 3059 mColorCode = 1; 3060 cout << "here49 " << mColorCode << endl; 3061 ExportViewCellsForViz(exporter, NULL, mColorCode, GetClipPlane()); 3057 3062 3058 3063 delete exporter; … … 3144 3149 3145 3150 // visualization of the view cells 3146 if ( 1) ExportMergedViewCells(objects);3151 if (0) ExportMergedViewCells(objects); 3147 3152 3148 3153 // compute final meshes and volume / area … … 3186 3191 } 3187 3192 3188 ExportViewCellsForViz(exporter, NULL, GetClipPlane());3193 ExportViewCellsForViz(exporter, NULL, mColorCode, GetClipPlane()); 3189 3194 delete exporter; 3190 3195 } … … 4237 4242 exporter->SetFilled(); 4238 4243 4239 ExportViewCellsForViz(exporter, NULL, GetClipPlane());4244 ExportViewCellsForViz(exporter, NULL, mColorCode, GetClipPlane()); 4240 4245 4241 4246 if (mExportGeometry) … … 4266 4271 exporter->SetFilled(); 4267 4272 4268 ExportViewCellsForViz(exporter, NULL, GetClipPlane());4273 ExportViewCellsForViz(exporter, NULL, mColorCode, GetClipPlane()); 4269 4274 4270 4275 if (mExportGeometry) … … 4535 4540 exporter->ExportRays(visRays, RgbColor(1, 0, 0)); 4536 4541 } 4537 ExportViewCellsForViz(exporter, NULL, GetClipPlane());4542 ExportViewCellsForViz(exporter, NULL, mColorCode, GetClipPlane()); 4538 4543 4539 4544 delete exporter; … … 5491 5496 } 5492 5497 5493 mHierarchyManager->ExportObjectSpaceHierarchy(exporter, 5494 objects,CLAMP_TO_BOX ? &bbox : NULL, false);5495 ExportViewCellsForViz(exporter, CLAMP_TO_BOX ? &bbox : NULL, GetClipPlane());5498 mHierarchyManager->ExportObjectSpaceHierarchy(exporter, objects, 5499 CLAMP_TO_BOX ? &bbox : NULL, false); 5500 ExportViewCellsForViz(exporter, CLAMP_TO_BOX ? &bbox : NULL, mColorCode, GetClipPlane()); 5496 5501 5497 5502 delete exporter; 5503 5498 5504 cout << "finished in " << TimeDiff(starttime, GetTime()) * 1e-3f << " secs" << endl; 5499 5505 mColorCode = savedColorCode; … … 5517 5523 cout << "finished in " << TimeDiff(starttime, GetTime()) * 1e-3f << " secs" << endl; 5518 5524 } 5519 5520 5521 // visualization of the view cells 5522 if (0) ExportMergedViewCells(objects); 5525 5526 cout << "here92 " << mHierarchyManager->GetVspTree()->GetStatistics().maxPvs << endl; 5527 5528 // visualization of the view cells 5529 if (1) 5530 { 5531 EvaluateViewCellsStats(); 5532 ExportMergedViewCells(objects); 5533 } 5523 5534 5524 5535 // export some view cell -
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.h
r1743 r1760 611 611 void ExportViewCellsForViz(Exporter *exporter, 612 612 const AxisAlignedBox3 *box, 613 const AxisAlignedPlane *clipPlane = NULL, 614 const bool colorCode = 0) const; 613 const bool colorCode, 614 const AxisAlignedPlane *clipPlane 615 ) const; 615 616 616 617 /** Sets exporter color. -
GTP/trunk/Lib/Vis/Preprocessing/src/VspTree.cpp
r1749 r1760 473 473 474 474 //mMemoryConst = (float)(sizeof(VspLeaf) + sizeof(ObjectPvs)); 475 mMemoryConst = (float)sizeof(ObjectPvs);475 mMemoryConst = 16;//(float)sizeof(ObjectPvs); 476 476 cout << "vsp memcost: " << mMemoryConst << endl; 477 477 -
GTP/trunk/Lib/Vis/Preprocessing/src/main.cpp
r1723 r1760 251 251 Cleanup(); 252 252 exit(1); 253 }254 255 if (0){256 Exporter *exporter= Exporter::GetExporter("test1.wrl");257 AxisAlignedBox3 bbox = preprocessor->mViewCellsManager->GetViewSpaceBox();258 exporter->SetWireframe();259 exporter->ExportBox(bbox);260 exporter->SetFilled();261 exporter->ExportGeometry(preprocessor->mObjects, true);262 delete exporter;263 253 } 264 254
Note: See TracChangeset
for help on using the changeset viewer.