Changeset 498


Ignore:
Timestamp:
01/04/06 19:34:11 (18 years ago)
Author:
mattausch
Message:
 
Location:
trunk/VUT
Files:
7 added
1 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/VUT/GtpVisibilityPreprocessor/scripts/Preprocessor.vcproj

    r497 r498  
    6262                        <Tool 
    6363                                Name="VCCLCompilerTool" 
    64                                 AdditionalIncludeDirectories="..\support;..\support\devil\include;..\support\zlib\include;..\include;&quot;$(QTDIR)\include\QtCore&quot;;&quot;$(QTDIR)\include\QtGui&quot;;&quot;$(QTDIR)\include&quot;;&quot;$(QTDIR)\include\QtOpenGl&quot;;include" 
     64                                AdditionalIncludeDirectories="..\support;..\support\devil\include;..\support\zlib\include;..\include;&quot;$(QTDIR)\include\QtCore&quot;;&quot;$(QTDIR)\include\QtGui&quot;;&quot;$(QTDIR)\include&quot;;&quot;$(QTDIR)\include\QtOpenGl&quot;;..\src" 
    6565                                PreprocessorDefinitions="WIN32;NDEBUG;_LIB;" 
    6666                                RuntimeLibrary="2" 
     
    7777                                Name="VCLinkerTool" 
    7878                                AdditionalDependencies="xerces-c_2.lib zdll.lib zziplib.lib devil.lib qtmain.lib QtOpenGL4.lib QtUiTools.lib QtCore4.lib QtDesigner4.lib QtGui4.lib QtAssistantClient.lib QtTest4.lib Qt3Supportd4.lib QAxContainer.lib QAxServerd.lib QtXml4.lib glut32.lib OpenGL32.Lib glu32.lib QAxServer.lib QtDesignerComponents4.lib" 
    79                                 AdditionalLibraryDirectories="..\support\xercesc\lib\;..\support\zlib\lib\;..\support\devil\lib;&quot;$(QTDIR)\lib&quot;;..\include\GL"/> 
     79                                AdditionalLibraryDirectories="..\support\xercesc\lib\;..\support\zlib\lib\;..\support\devil\lib;&quot;$(QTDIR)\lib&quot;;..\include;..\src\GL"/> 
    8080                        <Tool 
    8181                                Name="VCMIDLTool"/> 
  • trunk/VUT/GtpVisibilityPreprocessor/scripts/default.env

    r497 r498  
    2121        # stored sample rays 
    2222        samplesFilename rays.out 
    23         useGlRenderer false 
     23        useGlRenderer true 
    2424#       type sampling 
    2525        type vss 
  • trunk/VUT/GtpVisibilityPreprocessor/src/GlRenderer.h

    r497 r498  
    2626  PvsRenderStatistics() { Reset(); } 
    2727   
    28   Reset() { 
     28  void Reset() { 
    2929        maxError = 0.0f; 
    3030        sumError = 0.0f; 
     
    4949 
    5050public: 
    51   SceneGraph *mSceneGraph; 
    5251  ObjectContainer mObjects; 
    53   ViewCellsManager *mViewCellsManager; 
    54    
     52    
    5553  Vector3 mViewPoint; 
    5654  Vector3 mViewDirection; 
  • trunk/VUT/GtpVisibilityPreprocessor/src/ViewCellsManager.cpp

    r495 r498  
    320320{ 
    321321        mViewCells.clear(); 
     322         
    322323        CollectViewCells(); 
    323324        mViewCellsStats.Reset(); 
  • trunk/VUT/GtpVisibilityPreprocessor/src/VspBspTree.cpp

    r497 r498  
    15081508void VspBspTree::CollectViewCells(ViewCellContainer &viewCells) const 
    15091509{ 
    1510   stack<BspNode *> nodeStack; 
    1511  
    1512   if (!mRoot) 
     1510        stack<BspNode *> nodeStack; 
     1511 
     1512        if (!mRoot) 
    15131513        return; 
    15141514 
    1515   nodeStack.push(mRoot); 
    1516    
    1517   ViewCell::NewMail(); 
    1518  
    1519   while (!nodeStack.empty())  
    1520   { 
    1521           BspNode *node = nodeStack.top(); 
    1522           nodeStack.pop(); 
    1523            
    1524           if (node->IsLeaf() && !mShowInvalidSpace && node->TreeValid()) 
    1525           { 
    1526                   ViewCell *viewCell = dynamic_cast<BspLeaf *>(node)->GetViewCell(); 
    1527                    
    1528                   if (!viewCell->Mailed())  
    1529                   { 
    1530                           viewCell->Mail(); 
    1531                           viewCells.push_back(viewCell); 
    1532                   } 
    1533           } 
    1534           else 
    1535           { 
    1536                   BspInterior *interior = dynamic_cast<BspInterior *>(node); 
    1537                    
    1538                   nodeStack.push(interior->GetFront()); 
    1539                   nodeStack.push(interior->GetBack()); 
    1540           } 
    1541   } 
     1515        nodeStack.push(mRoot); 
     1516 
     1517        ViewCell::NewMail(); 
     1518         
     1519        while (!nodeStack.empty())  
     1520        { 
     1521                BspNode *node = nodeStack.top(); 
     1522                nodeStack.pop(); 
     1523                 
     1524                if (node->IsLeaf()) 
     1525                { 
     1526                        if (!mShowInvalidSpace && node->TreeValid()) 
     1527                        { 
     1528                                ViewCell *viewCell = dynamic_cast<BspLeaf *>(node)->GetViewCell(); 
     1529                         
     1530                                if (!viewCell->Mailed())  
     1531                                { 
     1532                                        viewCell->Mail(); 
     1533                                        viewCells.push_back(viewCell); 
     1534                                } 
     1535                        } 
     1536                } 
     1537                else 
     1538                { 
     1539                        BspInterior *interior = dynamic_cast<BspInterior *>(node); 
     1540                         
     1541                        nodeStack.push(interior->GetFront()); 
     1542                        nodeStack.push(interior->GetBack()); 
     1543                } 
     1544        } 
    15421545} 
    15431546 
     
    17421745                                                   const bool onlyUnmailed) const 
    17431746{ 
    1744         PolygonContainer cell; 
    1745         ConstructGeometry(n, cell); 
     1747        PolygonContainer geom; 
     1748        ConstructGeometry(n, geom); 
    17461749 
    17471750        stack<BspNode *> nodeStack; 
     
    17581761 
    17591762                if (node->IsLeaf()) 
     1763 
    17601764                {       // test if this leaf is in valid view space 
    17611765            if (node->TreeValid() && 
     
    17901794                        BspInterior *interior = dynamic_cast<BspInterior *>(node); 
    17911795 
    1792                         const int cf = Polygon3::ClassifyPlane(cell, 
     1796                        const int cf = Polygon3::ClassifyPlane(geom, 
    17931797                                                                                                   interior->GetPlane(), 
    17941798                                                                                                   mEpsilon); 
     
    18081812        } 
    18091813 
    1810         CLEAR_CONTAINER(cell); 
     1814        CLEAR_CONTAINER(geom); 
    18111815        return (int)neighbors.size(); 
    18121816} 
     
    18351839                        BspNode *next; 
    18361840 
    1837                         PolygonContainer cell; 
     1841                        PolygonContainer geom; 
    18381842 
    18391843                        // todo: not very efficient: constructs full cell everytime 
    1840                         ConstructGeometry(interior, cell); 
    1841  
    1842                         const int cf = Polygon3::ClassifyPlane(cell, halfspace, mEpsilon); 
     1844                        ConstructGeometry(interior, geom); 
     1845 
     1846                        const int cf = Polygon3::ClassifyPlane(geom, halfspace, mEpsilon); 
    18431847 
    18441848                        if (cf == Polygon3::BACK_SIDE) 
     
    23232327            leaf = (*iit).mLeaf; 
    23242328 
    2325                         // view space does not correspond to valid space 
     2329                        // view space not valid 
    23262330                        if (!leaf->TreeValid() || !prevLeaf->TreeValid()) 
    23272331                                continue; 
Note: See TracChangeset for help on using the changeset viewer.