Changeset 727


Ignore:
Timestamp:
04/05/06 00:57:25 (18 years ago)
Author:
mattausch
Message:

added view cell description bsp tree

Location:
GTP/trunk/Lib/Vis
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/scripts/Plugin_VisibilitySceneManager.vcproj

    r726 r727  
    228228                                </File> 
    229229                                <File 
    230                                         RelativePath="..\include\VspBspTree.h"> 
     230                                        RelativePath="..\include\ViewCellBspTree.h"> 
    231231                                </File> 
    232232                        </Filter> 
     
    266266                                <File 
    267267                                        RelativePath="..\src\OgreVisibilitySceneManagerDll.cpp"> 
     268                                </File> 
     269                                <File 
     270                                        RelativePath="..\src\ViewCellBspTree.cpp"> 
    268271                                </File> 
    269272                        </Filter> 
  • GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellBsp.h

    r710 r727  
    914914                                  int &contributingSamples); 
    915915 
    916         /** Preprocesses polygons and throws out all polygons which are coincident to 
    917                 the view space box faces (they can be problematic). 
     916        /** Preprocesses polygons and throws out all polygons which  
     917                are coincident to the view space box faces: 
     918                These polygons can can be problematic for bsp because they create 
     919                bad view cells. 
    918920        */ 
    919921        void PreprocessPolygons(PolygonContainer &polys); 
    920922 
    921         /** Returns view cell corresponding to  
    922                 the invalid view space. If it does not exist, it is created. 
     923        /** Returns view cell corresponding to the invalid view space.  
     924                If it does not exist, it is created. 
    923925        */ 
    924926        BspViewCell *GetOrCreateOutOfBoundsCell(); 
  • GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp

    r726 r727  
    324324                ConstructSubdivision(preprocessor->mObjects, initialSamples); 
    325325 
     326        // initial samples count for overall samples ... 
    326327        numSamples += numInitialSamples; 
    327328 
     
    369370        { 
    370371                cout << "casting " << mSamplesPerPass << " samples of " << n << " ... "; 
     372                Debug << "casting " << mSamplesPerPass << " samples of " << n << " ... "; 
     373 
    371374                VssRayContainer constructionSamples; 
    372375 
     
    378381                if (0) dirSamples = !dirSamples; // toggle sampling method 
    379382 
     383                // cast new samples 
    380384                numSamples += CastPassSamples(mSamplesPerPass,  
    381385                                                                          samplingType, 
     
    386390                cout << "computing sample contribution for " << (int)constructionSamples.size() << " samples ... "; 
    387391 
    388                 // TODO: leak? 
    389                 if (1 || SAMPLE_AFTER_SUBDIVISION) 
     392                // computes sample contribution of cast rays TODO: leak? 
     393                if (SAMPLE_AFTER_SUBDIVISION) 
    390394                        ComputeSampleContributions(constructionSamples, true, false); 
    391395 
  • GTP/trunk/Lib/Vis/Preprocessing/src/VspBspTree.cpp

    r726 r727  
    24632463                        if (!onlyValid || node->TreeValid()) 
    24642464                        { 
    2465                                 ViewCell *viewCell =  
    2466                                         mViewCellsTree->GetActiveViewCell(dynamic_cast<BspLeaf *>(node)->GetViewCell()); 
     2465                                ViewCell *leafVc = dynamic_cast<BspLeaf *>(node)->GetViewCell(); 
     2466 
     2467                                ViewCell *viewCell = mViewCellsTree->GetActiveViewCell(leafVc); 
    24672468                                                 
    24682469                                if (!onlyUnmailed || !viewCell->Mailed())  
  • GTP/trunk/Lib/Vis/Preprocessing/src/VspBspTree.h

    r720 r727  
    5757                /// the probability that this node contains view point 
    5858                float mProbability; 
    59                 /// geometry of node induced by half planes 
     59                /// geometry of node as induced by planes 
    6060                BspNodeGeometry *mGeometry; 
    6161                /// pvs size 
     
    6363                /// how often this branch has missed the max-cost ratio 
    6464                int mMaxCostMisses; 
    65                 /// if this node is a kd-node (i.e., boundaries are axis aligned) 
     65                /// if this node is a kd-node (i.e., boundaries are axis aligned 
    6666                bool mIsKdNode; 
    67                 /// current split axis: used for octree 
     67                // current axis 
    6868                int mAxis; 
    69                 /// for priority traversal: priority of this traversal data 
     69                // current priority 
    7070                float mPriority; 
    7171 
     
    8989                mMaxCostMisses(0),  
    9090                mIsKdNode(false), 
    91                 mPriority(0) 
     91                mPriority(0), 
     92                mAxis(0) 
    9293                {} 
    9394                 
     
    108109                mMaxCostMisses(0), 
    109110                mIsKdNode(false), 
    110                 mPriority(0) 
     111                mPriority(0), 
     112                mAxis(0) 
    111113                {} 
    112114 
     
    123125                mGeometry(geom), 
    124126                mMaxCostMisses(0), 
    125                 mIsKdNode(false) 
     127                mIsKdNode(false), 
     128                mAxis(0) 
    126129                {} 
    127130 
Note: See TracChangeset for help on using the changeset viewer.