Ignore:
Timestamp:
11/25/05 07:59:50 (19 years ago)
Author:
mattausch
Message:

started fixing ray bug

Location:
trunk/VUT/GtpVisibilityPreprocessor/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/VUT/GtpVisibilityPreprocessor/src/VssRay.h

    r430 r431  
    5656                mTerminationObject(terminationObject), 
    5757                mRefCount(0), 
    58     mFlags(0) 
     58    mFlags(0), 
     59        mT(1.0f) 
    5960        { 
    6061    Precompute(); 
     
    6566                mFlags(0), 
    6667                mMailbox(-1), 
    67                 mOriginObject(ray.sourceObject.mObject) 
     68                mOriginObject(ray.sourceObject.mObject), 
     69                mT(1.0f) 
    6870        { 
    6971                if (ray.sourceObject.mObject) 
     
    7678                if (!ray.intersections.empty()) 
    7779                { 
    78                         mT = ray.intersections[0].mT; 
    79                         mTermination = ray.Extrap(mT); 
     80                        mTermination = ray.Extrap(ray.intersections[0].mT); 
    8081                        mTerminationObject = ray.intersections[0].mObject; 
    8182                } 
    8283                else 
    8384                { 
    84                         mT = 1e6;//Limits::Infinity; 
    85                         mTermination = mOrigin + ray.GetDir() * mT; 
     85                        mTermination = ray.Extrap(1e6);//TODO: should be Limits::Infinity 
    8686                        mTerminationObject = NULL; 
    8787                } 
  • trunk/VUT/GtpVisibilityPreprocessor/src/VssTree.cpp

    r430 r431  
    538538        Intersectable::NewMail(3); 
    539539 
     540        Debug << "evaluating cost ratio: " << leaf->rays.size() << endl; 
    540541        if (axis <= VssTreeNode::SPLIT_Z) { 
    541542    // this is the main ray classification loop! 
     
    544545                                ri++) 
    545546      if ((*ri).mRay->IsActive()) { 
    546                                  
     547                                //Debug << "new t: " <<   (*ri).mRay->mT << endl; 
    547548                                // determine the side of this ray with respect to the plane 
    548549                                int side = (*ri).ComputeRayIntersection(axis, position, (*ri).mRay->mT); 
Note: See TracChangeset for help on using the changeset viewer.