Ignore:
Timestamp:
01/03/08 15:53:44 (17 years ago)
Author:
bittner
Message:

big merge: preparation for havran ray caster, check if everything works

File:
1 edited

Legend:

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

    r2539 r2575  
    270270int 
    271271RayCaster::ProcessRay(const SimpleRay &simpleRay, 
    272                                           Intersection &hitA, 
    273                                           Intersection &hitB, 
    274                                           VssRayContainer &vssRays, 
    275                                           const AxisAlignedBox3 &box, 
    276                                           const bool castDoubleRay, 
    277                                           const bool pruneInvalidRays) 
     272                      Intersection &hitA, 
     273                      Intersection &hitB, 
     274                      VssRayContainer &vssRays, 
     275                      const AxisAlignedBox3 &box, 
     276                      const bool castDoubleRay, 
     277                      const bool pruneInvalidRays) 
    278278{ 
    279279  int hits = 0; 
     
    325325        Debug<<"PR2"<<flush; 
    326326#endif 
     327 
     328        // VH - I do not know what this is for, commented out temporarily 
     329        // !!!!!!!!!!!!!! !!!!!!!!!!!! !!!!!!!!!! 
     330#if 1 
    327331        const bool validSample = true; 
    328332        if (validSample) { 
     
    363367        { 
    364368                VssRay *vssRay = RequestRay( 
    365                                                                         clipA, 
    366                                                                         hitB.mPoint, 
    367                                                                         hitA.mObject, 
    368                                                                         hitB.mObject, 
    369                                                                         mPreprocessor.mPass, 
    370                                                                         1.0f //simpleRay.mPdf 
    371                                                                         ); 
     369                                            clipA, 
     370                                            hitB.mPoint, 
     371                                            hitA.mObject, 
     372                                            hitB.mObject, 
     373                                            mPreprocessor.mPass, 
     374                                            1.0f //simpleRay.mPdf 
     375                                            ); 
    372376 
    373377                if (validB) 
     
    383387          Debug<<"PR4"<<flush; 
    384388#endif 
    385         } 
     389        } // validSample 
     390#else 
     391        // Just pass if intersected or not 
     392        hits = (hitA.mObject != 0) ? 1 : 0; 
     393        intersect = hitA; 
     394#endif   
    386395         
    387396        return hits; 
     
    391400void 
    392401RayCaster::CastRays( 
    393                                         SimpleRayContainer &rays, 
    394                                         VssRayContainer &vssRays, 
    395                                         const AxisAlignedBox3 &sbox, 
    396                                         const bool castDoubleRay, 
    397                                         const bool pruneInvalidRays ) 
    398 { 
    399         SimpleRayContainer::const_iterator rit, rit_end = rays.end(); 
    400  
    401         for (rit = rays.begin(); rit != rit_end; ++ rit) { 
    402                  
    403                 CastRay( 
    404                         *rit,                            
    405                         vssRays, 
    406                         sbox, 
    407                         castDoubleRay, 
    408                         pruneInvalidRays); 
    409         } 
    410 } 
    411  
    412  
    413 } 
     402                    SimpleRayContainer &rays, 
     403                    VssRayContainer &vssRays, 
     404                    const AxisAlignedBox3 &sbox, 
     405                    const bool castDoubleRay, 
     406                    const bool pruneInvalidRays ) 
     407{ 
     408  SimpleRayContainer::const_iterator rit, rit_end = rays.end(); 
     409   
     410  for (rit = rays.begin(); rit != rit_end; ++ rit) { 
     411     
     412    CastRay( 
     413            *rit,                                
     414            vssRays, 
     415            sbox, 
     416            castDoubleRay, 
     417            pruneInvalidRays); 
     418        } 
     419} 
     420   
     421 
     422} 
Note: See TracChangeset for help on using the changeset viewer.