Changeset 2231 for GTP/trunk/Lib/Vis/Preprocessing
- Timestamp:
- 03/12/07 00:11:00 (18 years ago)
- Location:
- GTP/trunk/Lib/Vis/Preprocessing/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/Exporter.cpp
r2206 r2231 153 153 SetFilled(); 154 154 155 if ( 0)155 if (1) 156 156 ExportGeometry(leaf->mObjects, true, box); 157 157 else -
GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.cpp
r2228 r2231 844 844 845 845 // assume pvs sampled sufficiently => take child pvs 846 if (avgRaysPerObjects > mMaxAvgRaysPerObject)846 if (avgRaysPerObjects >= mMaxAvgRaysPerObject) 847 847 { 848 848 return childPvs; … … 872 872 const float newPvs = alpha * childPvs + (1.0f - alpha) * totalPvs; 873 873 #endif 874 cout << "b ";// << avgRaysPerObjects << " ";874 cout << "b ";// << avgRaysPerObjects << " "; 875 875 //cout << "alpha " << alpha << " beta: " << beta << " child: " << childPvs << " parent: " << totalPvs << endl; 876 876 877 877 if ((newPvs < childPvs - Limits::Small) || (newPvs > totalPvs + Limits::Small)) 878 cout << "Error! " << newPvs << " smaller than child pvs or larger than parent pvs" << endl; 878 cout << "w: " << newPvs << " < child (" 879 << childPvs << ") or > parent (" << totalPvs << ")" << endl; 879 880 880 881 return newPvs; -
GTP/trunk/Lib/Vis/Preprocessing/src/Intersectable.cpp
r2206 r2231 104 104 Vector3 &normal) 105 105 { 106 cerr << "GetRandomSurfacePoint(u,v...) not yet implemented "<< endl;106 cerr << "GetRandomSurfacePoint(u,v...) not yet implemented for type " << Type() << endl; 107 107 return 1; 108 108 } -
GTP/trunk/Lib/Vis/Preprocessing/src/TestPreprocessor.vcproj
r2228 r2231 186 186 IntermediateDirectory="bin\Release" 187 187 ConfigurationType="1" 188 CharacterSet="2"> 188 CharacterSet="2" 189 WholeProgramOptimization="TRUE"> 189 190 <Tool 190 191 Name="VCCLCompilerTool" … … 214 215 Name="VCLinkerTool" 215 216 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 cg.lib cgGL.lib QtOpenGL4.lib Qt3Support4.lib QtTest4.lib QtGui4.lib QtInterface.lib" 216 OutputFile="../bin/release/Preprocessor .exe"217 OutputFile="../bin/release/Preprocessor2.exe" 217 218 LinkIncremental="1" 218 219 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";.\QtInterface\Release;"$(CG_LIB_PATH)"" -
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp
r2228 r2231 6332 6332 Exporter *exporter = Exporter::GetExporter("final_view_cells.wrl"); 6333 6333 6334 //Vector3 scale(0.9f, 0.9f, 0.9f);6335 Vector3 scale(1.0f, 1.0f, 1.0f);6334 Vector3 scale(0.9f, 0.9f, 0.9f); 6335 //Vector3 scale(1.0f, 1.0f, 1.0f); 6336 6336 6337 6337 if (exporter) -
GTP/trunk/Lib/Vis/Preprocessing/src/VspTree.cpp
r2228 r2231 30 30 31 31 32 #define VISUALIZE_SPLIT 0 32 33 #define USE_FIXEDPOINT_T 0 33 34 … … 1343 1344 1344 1345 #endif 1345 #if VISUALIZE_SPLIT 1346 Exporter *exporter = Exporter::GetExporter("split.wrl"); 1347 exporter->ExportBox(box); 1348 1349 RayInfoContainer::const_iterator rit, rit_end = tData.mRays->end(); 1350 1351 for (rit = tData.mRays->begin(); rit != rit_end; ++ rit) 1352 { 1353 RayInfo rayInf = *rit; 1354 1355 VssRay *ray = rayInf.mRay; 1356 1357 exporter->ExportIntersectable(GetParentObject(ray->mTerminationObject)); 1358 1359 AxisAlignedBox3 candidatePlane; 1360 exporter->ExportBox(candidatePlane); 1361 } 1362 delete exporter; 1363 #endif 1346 1347 1364 1348 for (ci = mLocalSubdivisionCandidates->begin(); ci != ci_end; ++ ci) 1365 1349 { … … 1425 1409 const float newRenderCost = penaltyFront * pFront + penaltyBack * pBack; 1426 1410 1411 #if VISUALIZE_SPLIT 1412 1413 const int leaves = mVspStats.Leaves(); 1414 const bool showViz = ((axis == 0) && (leaves == 500)); 1415 1416 if (showViz) 1417 { 1418 Exporter *exporter; 1419 1420 exporter = Exporter::GetExporter("split.wrl"); 1421 exporter->SetWireframe(); 1422 1423 exporter->ExportBox(tData.mBoundingBox); 1424 1425 RayInfoContainer::const_iterator rit, rit_end = tData.mRays->end(); 1426 1427 exporter->SetFilled(); 1428 1429 for (rit = tData.mRays->begin(); rit != rit_end; ++ rit) 1430 { 1431 RayInfo rayInf = *rit; 1432 1433 // export objects 1434 VssRay *ray = rayInf.mRay; 1435 BvhLeaf *leaf = mBvHierarchy->GetLeaf(ray->mTerminationObject); 1436 exporter->ExportIntersectable(leaf); 1437 1438 } 1439 1440 AxisAlignedBox3 vizPlaneBox; 1441 vizPlaneBox = tData.mBoundingBox; 1442 1443 Vector3 scale(1, 1, 1); scale[axis] = 0.05f; 1444 vizPlaneBox.Scale(scale); 1445 exporter->ExportBox(vizPlaneBox); 1446 1447 delete exporter; 1448 } 1449 1450 #endif 1451 1427 1452 if (splitPlaneFound) 1428 1453 { … … 1430 1455 } 1431 1456 1457 1432 1458 #ifdef GTP_DEBUG 1433 1459 cout << "\n((((( eval local cost )))))" << endl … … 1437 1463 << "render cost decrease: " << oldRenderCost * volRatio - newRenderCost * volRatio << endl; 1438 1464 #endif 1465 1439 1466 return ratio; 1440 1467 }
Note: See TracChangeset
for help on using the changeset viewer.