Changeset 1770 for GTP/trunk/Lib/Vis
- Timestamp:
- 11/20/06 13:54:14 (18 years ago)
- Location:
- GTP/trunk/Lib/Vis/Preprocessing/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/BvHierarchy.cpp
r1768 r1770 1344 1344 PrepareLocalSubdivisionCandidates(tData, axis); 1345 1345 1346 VssRayContainer rays;1347 // maximal 2 objects share the same ray1348 rays.reserve(tData.mNumRays * 2);1349 CollectRays(tData.mNode->mObjects, rays);1350 1351 const float prop = (float)mMaxTests / ((float)tData.mNumRays + Limits::Small);1352 1353 VssRay::NewMail();1354 1355 //cout << "here7 " << tData.mNumRays << " " << rays.size() << endl;1356 //cout << "here5 prop: " << prop << " " << mMaxTests << " " << tData.mNumRays << endl;1357 // only use a subset of the rays1358 VssRayContainer::const_iterator rit, rit_end = rays.end();1359 1360 int nRays = 0;1361 1362 for (rit = rays.begin(); rit != rit_end; ++ rit)1363 {1364 if ((mMaxTests >= (int)rays.size()) || (Random(1.0f) < prop))1365 {1366 (*rit)->Mail();1367 ++ nRays;1368 }1369 }1370 1371 //cout << "here99 " << nRays << " obj " << tData.mNode->mObjects.size() << endl;1372 1346 // collect and mark the view cells as belonging to front pvs 1373 1347 ViewCellContainer viewCells; … … 1469 1443 sAxis = box.Size().DrivingAxis(); 1470 1444 } 1471 1445 1446 1447 // only use a subset of the rays for visibility based heuristics 1448 if (mUseCostHeuristics && useVisibilityBasedHeuristics) 1449 { 1450 VssRayContainer rays; 1451 // maximal 2 objects share the same ray 1452 rays.reserve(tData.mNumRays * 2); 1453 CollectRays(tData.mNode->mObjects, rays); 1454 1455 const float prop = (float)mMaxTests / (float)tData.mNumRays; 1456 1457 VssRay::NewMail(); 1458 1459 VssRayContainer::const_iterator rit, rit_end = rays.end(); 1460 1461 int nRays = 0; 1462 1463 for (rit = rays.begin(); rit != rit_end; ++ rit) 1464 { 1465 if ((mMaxTests >= (int)rays.size()) || (Random(1.0f) < prop)) 1466 { 1467 (*rit)->Mail(); 1468 ++ nRays; 1469 } 1470 } 1471 } 1472 1472 1473 //////////////////////////////////// 1473 1474 //-- evaluate split cost for all three axis -
GTP/trunk/Lib/Vis/Preprocessing/src/QtPreprocessorThread.cpp
r1766 r1770 1 #if USE_QT 1 #ifdef GTP_INTERNAL 2 #ifndef NO_QT 2 3 #include <QApplication> 3 4 #include "QtPreprocessorThread.h" … … 31 32 32 33 #endif 34 #endif -
GTP/trunk/Lib/Vis/Preprocessing/src/TestPreprocessor.vcproj
r1766 r1770 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 2.exe"208 OutputFile="../bin/release/Preprocessor.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"
Note: See TracChangeset
for help on using the changeset viewer.