Ignore:
Timestamp:
12/02/05 19:46:07 (19 years ago)
Author:
mattausch
Message:

fixed error in ray to vssray conversion

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/VUT/GtpVisibilityPreprocessor/src/SamplingPreprocessor.cpp

    r441 r444  
    3232                                                           const Ray::Intersection &origin) 
    3333{ 
    34   ray.intersections.clear(); 
    35   ray.kdLeaves.clear(); 
    36   ray.testedObjects.clear(); 
    37   ray.bspIntersections.clear(); 
     34        ray.intersections.clear(); 
     35        ray.kdLeaves.clear(); 
     36        ray.testedObjects.clear(); 
     37        ray.bspIntersections.clear(); 
    3838   
    3939        ray.mFlags |= Ray::STORE_KDLEAVES | Ray::STORE_BSP_INTERSECTIONS; 
    40   //  cout<<point<<" "<<direction<<endl; 
    41   ray.Init(point, direction, type); 
     40        //  cout<<point<<" "<<direction<<endl; 
     41 
     42        ray.Init(point, direction, type); 
    4243        ray.sourceObject = origin; 
    4344} 
     
    319320                                        Ray *ray = new Ray(); 
    320321 
    321                                         // the source object 
    322                                         Ray::Intersection source =  
    323                                                 Ray::Intersection(0, reverseSample ? NULL : object, faceIndex); 
    324                          
    325322                                        // construct a ray 
    326                                         SetupRay(*ray, point, direction, Ray::LOCAL_RAY, source); 
     323                                        SetupRay(*ray, point, direction, Ray::LOCAL_RAY,  
     324                                                         Ray::Intersection(0, reverseSample ? NULL : object, faceIndex)); 
     325 
    327326                                        passRays.push_back(ray); 
    328327                                         
     
    428427                { 
    429428                        for (it = newRays.begin(); it != it_end; ++ it) 
     429                        { 
    430430                                mVssSampleRays.push_back(new VssRay(*(*it))); 
     431                        } 
    431432                } 
    432433                else 
    433434                { 
     435                        // construct view cells using the collected samples 
     436                        cout << "building view cells from " << (int)mVssSampleRays.size() << " samples " << endl; 
     437 
    434438                        mViewCellsManager->Construct(objects, mVssSampleRays); 
    435          
    436                         // construct view cells using the collected samples 
    437                         cout << "building view cells from " << (int)mSampleRays.size() << " samples " << endl; 
    438                  
    439                         // add contributions of saved samples to PVS 
    440                         //contributingSamples += mBspTree->GetStat().contributingSamples; 
    441                         //sampleContributions += mBspTree->GetStat().sampleContributions; 
    442  
     439                         
    443440                        // throw away samples  
    444441                        CLEAR_CONTAINER(mVssSampleRays); 
Note: See TracChangeset for help on using the changeset viewer.