Ignore:
Timestamp:
07/18/06 19:03:14 (18 years ago)
Author:
mattausch
Message:

added kd pvs support, changed way of counting pvs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/Preprocessing/src/VspOspTree.h

    r1139 r1141  
    3333class KdLeaf; 
    3434class OspTree; 
     35class KdIntersectable; 
     36 
    3537 
    3638 
     
    461463#endif 
    462464 
     465typedef map<KdNode *, KdIntersectable *> KdIntersectableMap; 
     466 
    463467typedef FlexibleHeap<SplitCandidate *> SplitQueue; 
    464468 
     
    980984                 
    981985        */ 
    982         void AddToPvs(VspLeaf *leaf, 
     986        void AddSamplesToPvs(VspLeaf *leaf, 
    983987                                  const RayInfoContainer &rays,  
    984988                                  float &sampleContributions, 
    985989                                  int &contributingSamples); 
     990 
     991        bool AddKdLeafToPvs(KdLeaf *leaf, ViewCell *vc, float &pvs, float &contribution); 
    986992 
    987993        /** Propagates valid flag up the tree. 
     
    10181024protected: 
    10191025 
    1020         bool mUseKdPvs; 
    1021  
    1022         enum {PER_OBJECT, PER_KDLEAF}; 
     1026        bool mUseKdPvsForHeuristics; 
     1027        bool mStoreKdPvs; 
    10231028 
    10241029        ViewCellsManager *mViewCellsManager; 
     
    10361041        /// box around the whole view domain 
    10371042        AxisAlignedBox3 mBoundingBox; 
    1038  
    10391043 
    10401044 
     
    13391343#endif 
    13401344 
     1345        /** Returns or creates a new intersectable for use in a kd based pvs. 
     1346                The OspTree is responsible for destruction of the intersectable. 
     1347        */ 
     1348        KdIntersectable *GetOrCreateKdIntersectable(KdNode *node); 
     1349 
    13411350        /** Collects rays stored in the leaves. 
    13421351        */ 
     
    15491558                float &pFront, 
    15501559                float &pBack); 
    1551         /** Adds ray sample contributions to the PVS. 
    1552                 @param sampleContributions the number contributions of the samples 
    1553                 @param contributingSampels the number of contributing rays 
    1554                  
    1555         */ 
    1556         void AddToPvs(VspLeaf *leaf, 
    1557                                   const RayInfoContainer &rays,  
    1558                                   float &sampleContributions, 
    1559                                   int &contributingSamples); 
    1560  
     1560         
    15611561        /** Propagates valid flag up the tree. 
    15621562        */ 
     
    16671667 
    16681668 
    1669  
    16701669        //-- split heuristics based parameters 
    16711670         
     
    16981697        /// weight between  render cost decrease and node render cost 
    16991698        float mRenderCostDecreaseWeight; 
     1699 
     1700        /// stores the kd node intersectables used for pvs 
     1701        KdIntersectableMap mKdIntersectables; 
    17001702}; 
    17011703 
Note: See TracChangeset for help on using the changeset viewer.