Changeset 2744 for GTP/trunk


Ignore:
Timestamp:
06/09/08 10:41:23 (16 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

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

    r2743 r2744  
    815815        direction = UniformRandomVector(r[0], r[1]); 
    816816         
    817 #if 0 
    818         const float c = Magnitude(direction); 
    819  
    820         if (!((c < 1.00001f) && (c > 0.999999f))) 
    821                 cerr << "len wrong" << endl; 
    822     if (c <= Limits::Small)  
    823                 return false; 
    824  
    825         direction *= 1.0f / c; 
     817##if 0 
     818        origin = mViewCell->GetBox().GetRandomPoint(); 
     819#else 
     820        origin = mViewCell->GetBox().GetUniformRandomSurfacePoint(); 
     821 
     822        //origin = mViewCell->GetBox().GetRandomSurfacePoint(); 
     823        //mViewCell->GetRandomEdgePoint(origin, normal); 
     824        //origin = Vector3(680.682, 189.552, -278.177); 
     825 
     826        // move a little bit back to avoid piercing through walls 
     827        // that bound the view cell 
     828        origin -= 0.01f * normal; 
    826829#endif 
    827  
    828         // get point on view cell surface 
    829         if (1) 
    830         { 
    831                 //mViewCell->GetRandomEdgePoint(origin, normal); 
    832                 origin = mViewCell->GetBox().GetRandomSurfacePoint(); 
    833                 //origin = mViewCell->GetBox().GetRandomPoint(); 
    834                 //origin = Vector3(680.682, 189.552, -278.177); 
    835                 // move a little bit back to avoid piercing through walls 
    836                 // that bound the view cell 
    837                 //origin -= 0.01f * normal; 
    838         } 
    839         else 
    840                 origin = mViewCell->GetBox().GetUniformRandomSurfacePoint(); 
     830                 
    841831 
    842832        static const float pdf = 1.0f; 
Note: See TracChangeset for help on using the changeset viewer.