Changeset 2130 for GTP/trunk/Lib/Vis/Preprocessing/src
- Timestamp:
- 02/20/07 13:05:26 (18 years ago)
- Location:
- GTP/trunk/Lib/Vis/Preprocessing/src
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/Environment.cpp
r2124 r2130 2785 2785 "99990.0"); 2786 2786 2787 RegisterOption("Hierarchy.useTraversalTree", 2788 optBool, 2789 "hierarchy_use_traversal_tree=", 2790 "false"); 2787 2791 2788 2792 /////////////////////////////////////////////////////// -
GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.cpp
r2124 r2130 160 160 "Hierarchy.Construction.minAvgRayContri", mMinAvgRayContri); 161 161 162 Environment::GetSingleton()->GetBoolValue( 163 "Hierarchy.useTraversalTree", mUseTraversalTree); 164 162 165 // for comparing it with byte - value 163 166 mTermMaxMemory *= (1024.0f * 1024.0f); … … 399 402 400 403 // create a traversal tree which is optimized for view cell casting 401 if ( 1)404 if (mUseTraversalTree) 402 405 { 403 406 CreateTraversalTree(); -
GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.h
r2124 r2130 612 612 BvHierarchy *mBvHierarchy; 613 613 614 bool mUseTraversalTree; 615 614 616 protected: 615 617 … … 682 684 683 685 ViewCellContainer mOldViewCells; 684 685 //ObjectPvs mOldPvs;686 686 }; 687 687 -
GTP/trunk/Lib/Vis/Preprocessing/src/ObjectsParser.cpp
r2123 r2130 364 364 365 365 GzFileInputSource isource(myFilePath); 366 Debug<<"here93" << endl;367 366 parser->parse(isource); 368 367 #else … … 370 369 371 370 #endif 372 Debug<<"here932" << endl; 371 373 372 const unsigned long endMillis = XMLPlatformUtils::getCurrentMillis(); 374 373 duration = endMillis - startMillis; -
GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.vcproj
r2123 r2130 222 222 OptimizeForWindowsApplication="TRUE" 223 223 AdditionalIncludeDirectories="..\src;..\..\..\..\..\..\NonGTP\Devil\include;..\..\..\..\..\..\NonGTP\Zlib\include;..\..\..\..\..\..\NonGTP\Xerces;..\..\..\..\..\..\NonGTP\Boost;..\MultiLevelRayTracing;"$(QTDIR)\include\QtCore";"$(QTDIR)\include\QtGui";"$(QTDIR)\include";"$(QTDIR)\include\QtOpenGl";"$(CG_INC_PATH)";Timer" 224 PreprocessorDefinitions="WIN32;NDEBUG;_LIB;GTP_INTERNAL;USE_QT "224 PreprocessorDefinitions="WIN32;NDEBUG;_LIB;GTP_INTERNAL;USE_QT;USE_BIT_PVS" 225 225 ExceptionHandling="TRUE" 226 226 RuntimeLibrary="2" … … 383 383 </File> 384 384 <File 385 RelativePath=".\BitVectorPvs.cpp">386 </File>387 <File388 385 RelativePath=".\BitVectorPvs.h"> 389 386 </File> -
GTP/trunk/Lib/Vis/Preprocessing/src/RssTree.cpp
r2119 r2130 403 403 cout<<"Dirr Bbox = "<<dirBBox<<endl; 404 404 405 stat.rays = rays.size();405 stat.rays = (int)rays.size(); 406 406 stat.initialPvsSize = 0; 407 407 for (int i=0; i < mRoots.size(); i++) { … … 862 862 info.axis = axis; 863 863 info.costRatio = 0.5f; // not true but good for speeding up the subdivision at the top levels! 864 info.raysBack = info.raysFront = leaf->rays.size()/2;864 info.raysBack = info.raysFront = (int)leaf->rays.size()/2; 865 865 return; 866 866 } … … 953 953 954 954 currInfo.raysBack = 0; 955 currInfo.raysFront = leaf->rays.size();955 currInfo.raysFront = (int)leaf->rays.size(); 956 956 957 957 currInfo.pvsBack = 0; … … 1135 1135 splitCandidates->clear(); 1136 1136 1137 int requestedSize = 2*( node->rays.size());1137 int requestedSize = 2*((int)node->rays.size()); 1138 1138 // creates a sorted split candidates array 1139 1139 if (splitCandidates->capacity() > 500000 && … … 1195 1195 } 1196 1196 1197 if ( (int)(leaf->rays.size()) > stat.maxRayRefs)1198 stat.maxRayRefs = leaf->rays.size();1197 if ((int)leaf->rays.size() > stat.maxRayRefs) 1198 stat.maxRayRefs = (int)leaf->rays.size(); 1199 1199 1200 1200 } … … 1321 1321 // update stats 1322 1322 stat.rayRefs -= (int)leaf->rays.size(); 1323 stat.rayRefs += back->rays.size() + front->rays.size();1323 stat.rayRefs += (int)(back->rays.size() + front->rays.size()); 1324 1324 1325 1325 … … 1461 1461 Debug<<"done."<<endl<<flush; 1462 1462 1463 stat.rayRefs += add.size() -remove.size();1463 stat.rayRefs += (int)add.size() - (int)remove.size(); 1464 1464 1465 1465 Debug<<"Updating statistics..."<<endl<<flush; … … 1817 1817 } 1818 1818 } 1819 return pvs.size();1819 return (int)pvs.size(); 1820 1820 } 1821 1821 … … 2021 2021 ) 2022 2022 { 2023 int nrays = leaf->rays.size();2023 int nrays = (int)leaf->rays.size(); 2024 2024 2025 2025 if (nrays == 2) { … … 2040 2040 2041 2041 if (r1 == r2) 2042 r2 = (r1+1)% leaf->rays.size();2042 r2 = (r1+1)%(int)leaf->rays.size(); 2043 2043 2044 2044 #else … … 2158 2158 int indices[3]; 2159 2159 2160 int size = rays.size();2160 int size = (int)rays.size(); 2161 2161 // use russian roulete selection for the tripple 2162 2162 // number of free positions for the bullet … … 2230 2230 for (; ri != rays.end(); ++ri, ++rayIndex) { 2231 2231 RssTreeNode::RayInfo *ray = *ri; 2232 int tries = rays.size();2232 int tries = (int)rays.size(); 2233 2233 for (int i = 0; i < tries; i++) { 2234 2234 int r1, r2, r3; … … 2648 2648 } 2649 2649 2650 return rays.size();2650 return (int)rays.size(); 2651 2651 2652 2652 } -
GTP/trunk/Lib/Vis/Preprocessing/src/SamplingPreprocessor.cpp
r2066 r2130 137 137 138 138 139 rssSamples += vssRays.size();139 rssSamples += (int)vssRays.size(); 140 140 for (int j=0; j < vssRays.size(); j++) 141 141 if (vssRays[j]->mFlags & VssRay::Valid) { -
GTP/trunk/Lib/Vis/Preprocessing/src/TestPreprocessor.vcproj
r2120 r2130 81 81 OptimizeForWindowsApplication="TRUE" 82 82 AdditionalIncludeDirectories="..\include;..\..\..\..\..\..\NonGTP\Boost;..\..\..\..\..\..\NonGTP\Devil\include;..\..\..\..\..\..\NonGTP\Zlib\include;..\..\..\..\..\..\NonGTP\Xerces;..\..\MultiLevelRayTracing;Timer" 83 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;NO_QT ;USE_VERBOSE_PVS"83 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;NO_QT" 84 84 RuntimeLibrary="2" 85 85 EnableEnhancedInstructionSet="2" … … 199 199 OptimizeForWindowsApplication="TRUE" 200 200 AdditionalIncludeDirectories="..\include;..\..\..\..\..\..\NonGTP\Boost;..\src;..\..\..\..\..\..\NonGTP\Devil\include;..\..\..\..\..\..\NonGTP\Zlib\include;..\..\..\..\..\..\NonGTP\Xerces;"$(QTDIR)\include\QtOpenGl";"$(QTDIR)\include\Qt";"$(QTDIR)\include\QtCore";"$(QTDIR)\include";QtInterface" 201 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;GTP_INTERNAL;USE_QT;USE_CG "201 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;GTP_INTERNAL;USE_QT;USE_CG;USE_BIT_PVS" 202 202 ExceptionHandling="TRUE" 203 203 RuntimeLibrary="2" -
GTP/trunk/Lib/Vis/Preprocessing/src/TraversalTree.cpp
r2124 r2130 640 640 // hack: assume that we use vsp tree, 641 641 //P so we can just test intersection with bounding boxes 642 if (viewCell->GetBox().Intersects(lStart, lEnd)) ;642 if (viewCell->GetBox().Intersects(lStart, lEnd)) 643 643 { 644 644 hitViewCells.push_back(viewCell); -
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp
r2124 r2130 389 389 if (IsValidViewSpace(viewCell) && 390 390 GenerateViewPoints(viewCell, nViewPoints, viewPoints)) 391 { cout << "here99" << endl;391 { 392 392 Debug << "vc: " << viewCell->GetId() << endl; 393 393 … … 1289 1289 ViewCellContainer viewCells; 1290 1290 #ifdef USE_BIT_PVS 1291 cout << "objects size: " << ObjectPvsIterator::sObjects.size() << endl;1291 cout << "objects size: " << (int)ObjectPvsIterator::sObjects.size() << endl; 1292 1292 cout << "pvs size: " << ObjectPvs::sPvsSize << endl; 1293 1293 #endif … … 7022 7022 7023 7023 if (1) 7024 { // create a traversal tree for optimal view cell casting 7025 mHierarchyManager->CreateTraversalTree(); 7026 } 7027 } 7028 7029 7030 } 7024 { 7025 if (mHierarchyManager->mUseTraversalTree) 7026 { 7027 // create a traversal tree for optimal view cell casting 7028 mHierarchyManager->CreateTraversalTree(); 7029 } 7030 } 7031 } 7032 7033 7034 }
Note: See TracChangeset
for help on using the changeset viewer.