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/ViewCellBsp.cpp

    r442 r444  
    226226void BspLeaf::AddToPvs(const BoundedRayContainer &rays,  
    227227                                           int &sampleContributions, 
    228                                            int &contributingSamples, 
    229                                            bool storeLeavesWithRays) 
     228                                           int &contributingSamples) 
    230229{ 
    231230        sampleContributions = 0; 
     
    246245                        contribution += mViewCell->GetPvs().AddSample(ray->sourceObject.mObject); 
    247246 
    248                 if (contribution > 0) 
     247                if (contribution) 
    249248                { 
    250249                        sampleContributions += contribution; 
    251250                        ++ contributingSamples; 
    252251                } 
    253                  
    254                 if (storeLeavesWithRays) 
    255                         // warning: intersections not ordered 
     252 
     253                //if (ray->mFlags & Ray::STORE_BSP_INTERSECTIONS) 
    256254                        ray->bspIntersections.push_back(Ray::BspIntersection((*it)->mMinT, this)); 
    257255        } 
     
    632630 
    633631        // generate view cells 
    634         mGenerateViewCells = false; 
     632        mGenerateViewCells = true; 
    635633 
    636634        long startTime = GetTime(); 
     
    14521450 
    14531451        // bound ray or line segment 
    1454         if ((ray.GetType() == Ray::LOCAL_RAY) &&  
     1452        if (//(ray.GetType() == Ray::LOCAL_RAY) &&  
    14551453            !ray.intersections.empty() &&  
    14561454                (ray.intersections[0].mT <= maxT)) 
     
    20722070                                const float newT = t * bRay->mMaxT; 
    20732071 
    2074                                 backRays.push_back(new BoundedRay(ray, bRay->mMinT, newT)); 
    2075                                 frontRays.push_back(new BoundedRay(ray, newT, bRay->mMaxT)); 
     2072                                backRays.push_back(new BoundedRay(ray, minT, newT)); 
     2073                                frontRays.push_back(new BoundedRay(ray, newT, maxT)); 
     2074 
    20762075                                DEL_PTR(bRay); 
    20772076 
Note: See TracChangeset for help on using the changeset viewer.