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

    r440 r444  
    8080bool 
    8181X3dExporter::ExportRays(const RayContainer &rays, 
    82                                                                                                 const float length, 
    83                                                                                                 const RgbColor &color) 
     82                                                const float length, 
     83                                                const RgbColor &color) 
    8484{ 
    8585  RayContainer::const_iterator ri = rays.begin(); 
     
    130130bool 
    131131X3dExporter::ExportRays(const VssRayContainer &rays, 
    132                                                                                                 const RgbColor &color) 
     132                                                const RgbColor &color) 
    133133{ 
    134134  VssRayContainer::const_iterator ri = rays.begin(); 
     
    154154  ri = rays.begin(); 
    155155  for (; ri != rays.end(); ri++) { 
    156     Vector3 a = (*ri)->GetOrigin(); 
    157                 Vector3 b = (*ri)->mTerminationObject ? (*ri)->GetTermination() : a + 1000 * Normalize(b - a); 
     156    const Vector3 a = (*ri)->GetOrigin(); 
     157        const Vector3 b = (*ri)->mTerminationObject ? (*ri)->GetTermination() : a + 1000 * Normalize((*ri)->GetDir()); 
    158158         
    159159    stream<<a.x<<" "<<a.y<<" "<<a.z<<" ,"; 
    160                 stream<<b.x<<" "<<b.y<<" "<<b.z<<" ,\n"; 
     160        stream<<b.x<<" "<<b.y<<" "<<b.z<<" ,\n"; 
    161161  } 
    162162   
Note: See TracChangeset for help on using the changeset viewer.