Ignore:
Timestamp:
12/11/06 08:31:01 (18 years ago)
Author:
bittner
Message:

sampling updates

File:
1 edited

Legend:

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

    r1876 r1877  
    433433  RayInfoContainer rays; 
    434434  int mTotalRays; 
    435          
     435  float mTotalContribution; 
     436   
    436437  bool mValidPvs; 
    437438   
     
    440441  RssTreeLeaf(RssTreeInterior *p, 
    441442                          const int nRays 
    442                           ):RssTreeNode(p), rays(), mPvsSize(0), mTotalRays(0), mValidPvs(false) { 
     443                          ):RssTreeNode(p), rays(), mPvsSize(0), mTotalRays(0), 
     444                                mTotalContribution(0.0f), mValidPvs(false) { 
    443445    rays.reserve(nRays); 
    444446  } 
     
    455457   
    456458  void AddRay(const RayInfo &data) { 
    457                 mValidPvs = false; 
    458     rays.push_back(data); 
    459                 mTotalRays++; 
    460                 data.mRay->Ref(); 
     459        mValidPvs = false; 
     460        rays.push_back(data); 
     461        mTotalRays++; 
     462        mTotalContribution += 
     463          ABS_CONTRIBUTION_WEIGHT*data.mRay->mPvsContribution + 
     464          (1.0f - ABS_CONTRIBUTION_WEIGHT)*data.mRay->mRelativePvsContribution; 
     465        data.mRay->Ref(); 
    461466  } 
    462467         
     
    10661071 
    10671072  int 
    1068   PruneRays(RssTreeLeaf *leaf, 
    1069                         const float contributionThreshold); 
    1070   int 
    10711073  PruneRaysRandom(RssTreeLeaf *leaf, 
    10721074                                  const float ratio); 
Note: See TracChangeset for help on using the changeset viewer.