Ignore:
Timestamp:
09/20/06 13:37:29 (18 years ago)
Author:
mattausch
Message:

corrected raycasting bug for triangles because of ill defined triangles

File:
1 edited

Legend:

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

    r1419 r1420  
    125125          const Vector3 a = (*ri)->GetOrigin(); 
    126126          const Vector3 b = (*ri)->mTerminationObject ? (*ri)->GetTermination() : a + 1000 * Normalize((*ri)->GetDir()); 
    127            
     127 
     128#if _DEBUG 
    128129          bool isnan = false; 
    129  
    130           if ((a[0] != a[0]) || (a[1] != a[1]) || (a[2] != a[2])) 
     130          if (!a.CheckValidity()) 
    131131          { 
    132132                  cout << "error a"<<endl; 
     
    134134          } 
    135135 
    136           if ((b[0] != b[0]) || (b[1] != b[1]) || (b[2] != b[2])) 
     136           if (!b.CheckValidity()) 
    137137          { 
    138138                  cout << "error b"<<endl; 
    139139                  isnan = true; 
    140140          } 
    141  
    142           if (!isnan) 
    143           { 
    144                 stream << a.x << " " << a.y << " " << a.z << " ,"; 
    145                 stream << b.x << " " << b.y << " " << b.z << " ,\n"; 
    146           } 
     141          if (isnan) 
     142                  continue; 
     143#endif 
     144          stream << a.x << " " << a.y << " " << a.z << " ,"; 
     145          stream << b.x << " " << b.y << " " << b.z << " ,\n"; 
    147146  } 
    148147 
Note: See TracChangeset for help on using the changeset viewer.