Ignore:
Timestamp:
02/20/07 13:05:26 (17 years ago)
Author:
mattausch
Message:

runs also under debug mode now

Location:
GTP/trunk/Lib/Vis/Preprocessing/src
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/Preprocessing/src/Environment.cpp

    r2124 r2130  
    27852785                                        "99990.0"); 
    27862786         
     2787        RegisterOption("Hierarchy.useTraversalTree", 
     2788                                        optBool, 
     2789                                        "hierarchy_use_traversal_tree=", 
     2790                                        "false"); 
    27872791 
    27882792        /////////////////////////////////////////////////////// 
  • GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.cpp

    r2124 r2130  
    160160                "Hierarchy.Construction.minAvgRayContri", mMinAvgRayContri); 
    161161 
     162        Environment::GetSingleton()->GetBoolValue( 
     163                "Hierarchy.useTraversalTree", mUseTraversalTree); 
     164 
    162165        // for comparing it with byte - value 
    163166        mTermMaxMemory *= (1024.0f * 1024.0f); 
     
    399402 
    400403        // create a traversal tree which is optimized for view cell casting  
    401         if (1)  
     404        if (mUseTraversalTree)  
    402405        { 
    403406                CreateTraversalTree(); 
  • GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.h

    r2124 r2130  
    612612        BvHierarchy *mBvHierarchy; 
    613613         
     614        bool mUseTraversalTree; 
     615 
    614616protected: 
    615617 
     
    682684 
    683685        ViewCellContainer mOldViewCells; 
    684  
    685         //ObjectPvs mOldPvs; 
    686686}; 
    687687 
  • GTP/trunk/Lib/Vis/Preprocessing/src/ObjectsParser.cpp

    r2123 r2130  
    364364 
    365365                        GzFileInputSource isource(myFilePath); 
    366                         Debug<<"here93" << endl; 
    367366                        parser->parse(isource); 
    368367#else 
     
    370369 
    371370#endif 
    372 Debug<<"here932" << endl; 
     371 
    373372                        const unsigned long endMillis = XMLPlatformUtils::getCurrentMillis(); 
    374373                        duration = endMillis - startMillis; 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.vcproj

    r2123 r2130  
    222222                                OptimizeForWindowsApplication="TRUE" 
    223223                                AdditionalIncludeDirectories="..\src;..\..\..\..\..\..\NonGTP\Devil\include;..\..\..\..\..\..\NonGTP\Zlib\include;..\..\..\..\..\..\NonGTP\Xerces;..\..\..\..\..\..\NonGTP\Boost;..\MultiLevelRayTracing;&quot;$(QTDIR)\include\QtCore&quot;;&quot;$(QTDIR)\include\QtGui&quot;;&quot;$(QTDIR)\include&quot;;&quot;$(QTDIR)\include\QtOpenGl&quot;;&quot;$(CG_INC_PATH)&quot;;Timer" 
    224                                 PreprocessorDefinitions="WIN32;NDEBUG;_LIB;GTP_INTERNAL;USE_QT" 
     224                                PreprocessorDefinitions="WIN32;NDEBUG;_LIB;GTP_INTERNAL;USE_QT;USE_BIT_PVS" 
    225225                                ExceptionHandling="TRUE" 
    226226                                RuntimeLibrary="2" 
     
    383383                        </File> 
    384384                        <File 
    385                                 RelativePath=".\BitVectorPvs.cpp"> 
    386                         </File> 
    387                         <File 
    388385                                RelativePath=".\BitVectorPvs.h"> 
    389386                        </File> 
  • GTP/trunk/Lib/Vis/Preprocessing/src/RssTree.cpp

    r2119 r2130  
    403403  cout<<"Dirr Bbox = "<<dirBBox<<endl; 
    404404   
    405   stat.rays = rays.size(); 
     405  stat.rays = (int)rays.size(); 
    406406  stat.initialPvsSize = 0; 
    407407  for (int i=0; i < mRoots.size(); i++) { 
     
    862862        info.axis = axis; 
    863863        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; 
    865865        return; 
    866866  } 
     
    953953 
    954954  currInfo.raysBack = 0; 
    955   currInfo.raysFront = leaf->rays.size(); 
     955  currInfo.raysFront = (int)leaf->rays.size(); 
    956956   
    957957  currInfo.pvsBack = 0; 
     
    11351135  splitCandidates->clear(); 
    11361136   
    1137   int requestedSize = 2*(node->rays.size()); 
     1137  int requestedSize = 2*((int)node->rays.size()); 
    11381138  // creates a sorted split candidates array 
    11391139  if (splitCandidates->capacity() > 500000 && 
     
    11951195  } 
    11961196 
    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(); 
    11991199 
    12001200} 
     
    13211321  // update stats 
    13221322  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()); 
    13241324 
    13251325   
     
    14611461  Debug<<"done."<<endl<<flush; 
    14621462 
    1463   stat.rayRefs += add.size() - remove.size(); 
     1463  stat.rayRefs += (int)add.size() - (int)remove.size(); 
    14641464 
    14651465  Debug<<"Updating statistics..."<<endl<<flush; 
     
    18171817        } 
    18181818  } 
    1819   return pvs.size(); 
     1819  return (int)pvs.size(); 
    18201820} 
    18211821 
     
    20212021                                          ) 
    20222022{ 
    2023   int nrays = leaf->rays.size(); 
     2023  int nrays = (int)leaf->rays.size(); 
    20242024 
    20252025  if (nrays == 2) { 
     
    20402040 
    20412041  if (r1 == r2) 
    2042         r2 = (r1+1)%leaf->rays.size(); 
     2042        r2 = (r1+1)%(int)leaf->rays.size(); 
    20432043 
    20442044#else 
     
    21582158  int indices[3]; 
    21592159 
    2160   int size = rays.size(); 
     2160  int size = (int)rays.size(); 
    21612161  // use russian roulete selection for the tripple 
    21622162  // number of free positions for the bullet 
     
    22302230        for (; ri != rays.end(); ++ri, ++rayIndex) { 
    22312231          RssTreeNode::RayInfo *ray = *ri; 
    2232           int tries = rays.size(); 
     2232          int tries = (int)rays.size(); 
    22332233          for (int i = 0; i < tries; i++) { 
    22342234                int r1, r2, r3; 
     
    26482648  } 
    26492649   
    2650   return rays.size(); 
     2650  return (int)rays.size(); 
    26512651   
    26522652} 
  • GTP/trunk/Lib/Vis/Preprocessing/src/SamplingPreprocessor.cpp

    r2066 r2130  
    137137           
    138138 
    139           rssSamples += vssRays.size(); 
     139          rssSamples += (int)vssRays.size(); 
    140140          for (int j=0; j < vssRays.size(); j++) 
    141141                if (vssRays[j]->mFlags & VssRay::Valid) { 
  • GTP/trunk/Lib/Vis/Preprocessing/src/TestPreprocessor.vcproj

    r2120 r2130  
    8181                                OptimizeForWindowsApplication="TRUE" 
    8282                                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" 
    8484                                RuntimeLibrary="2" 
    8585                                EnableEnhancedInstructionSet="2" 
     
    199199                                OptimizeForWindowsApplication="TRUE" 
    200200                                AdditionalIncludeDirectories="..\include;..\..\..\..\..\..\NonGTP\Boost;..\src;..\..\..\..\..\..\NonGTP\Devil\include;..\..\..\..\..\..\NonGTP\Zlib\include;..\..\..\..\..\..\NonGTP\Xerces;&quot;$(QTDIR)\include\QtOpenGl&quot;;&quot;$(QTDIR)\include\Qt&quot;;&quot;$(QTDIR)\include\QtCore&quot;;&quot;$(QTDIR)\include&quot;;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" 
    202202                                ExceptionHandling="TRUE" 
    203203                                RuntimeLibrary="2" 
  • GTP/trunk/Lib/Vis/Preprocessing/src/TraversalTree.cpp

    r2124 r2130  
    640640                        // hack: assume that we use vsp tree,  
    641641                        //P so we can just test intersection with bounding boxes 
    642                         if (viewCell->GetBox().Intersects(lStart, lEnd)); 
     642                        if (viewCell->GetBox().Intersects(lStart, lEnd)) 
    643643                        { 
    644644                                hitViewCells.push_back(viewCell); 
  • GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp

    r2124 r2130  
    389389                        if (IsValidViewSpace(viewCell) &&  
    390390                                GenerateViewPoints(viewCell, nViewPoints, viewPoints)) 
    391                         {cout << "here99" << endl; 
     391                        { 
    392392                                Debug << "vc: " << viewCell->GetId() << endl; 
    393393 
     
    12891289        ViewCellContainer viewCells; 
    12901290#ifdef USE_BIT_PVS 
    1291         cout << "objects size: " << ObjectPvsIterator::sObjects.size() << endl; 
     1291        cout << "objects size: " << (int)ObjectPvsIterator::sObjects.size() << endl; 
    12921292        cout << "pvs size: " <<  ObjectPvs::sPvsSize << endl; 
    12931293#endif 
     
    70227022 
    70237023        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.