Ignore:
Timestamp:
11/17/06 10:10:41 (18 years ago)
Author:
mattausch
Message:

removed error in sample registration

File:
1 edited

Legend:

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

    r1763 r1764  
    10331033 
    10341034                bool madeContrib = false; 
    1035                 float contribution; 
    1036  
    1037                 Intersectable *obj = ray->mTerminationObject; 
    1038  
    1039                 if (obj)  
     1035                float contribution = 1; 
     1036 
     1037                Intersectable *entry =  
     1038                        mHierarchyManager->GetIntersectable(ray->mTerminationObject, true); 
     1039 
     1040                if (entry)  
    10401041                { 
    10411042                        madeContrib =  
    1042                                 mViewCellsManager->AddSampleToPvs( 
    1043                                         obj,  
    1044                                         ray->mTermination,  
    1045                                         vc,  
    1046                                         ray->mPdf,  
    1047                                         contribution); 
     1043                                vc->GetPvs().AddSample(entry, ray->mPdf); 
    10481044 
    10491045                        sc += contribution; 
    10501046                } 
    10511047#if COUNT_ORIGIN_OBJECTS 
    1052                 obj = ray->mOriginObject; 
    1053  
    1054                 if (obj)  
     1048                entry = mHierarchyManager->GetIntersectable(ray->mOriginObject, true); 
     1049 
     1050                if (entry)  
    10551051                { 
    10561052                        madeContrib =  
    1057                                 mViewCellsManager->AddSampleToPvs( 
    1058                                         obj, 
    1059                                         ray->mOrigin,  
    1060                                         vc,  
    1061                                         ray->mPdf,  
    1062                                         contribution); 
     1053                                vc->GetPvs().AddSample(entry, ray->mPdf); 
    10631054 
    10641055                        sc += contribution; 
Note: See TracChangeset for help on using the changeset viewer.