Ignore:
Timestamp:
11/28/06 19:46:36 (18 years ago)
Author:
bittner
Message:

global lines support

File:
1 edited

Legend:

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

    r1580 r1824  
    88VssRay::mailID = 0; 
    99 
     10#define OLD_PARAM 0 
    1011 
    1112VssRay::VssRay( 
     
    230231VssRay::GetDirParam(const int axis, const Vector3 dir) 
    231232{ 
     233  Vector3 d = Normalize(dir); 
     234#if OLD_PARAM 
    232235  return (axis == 0) ? atan2(dir.x, dir.z) : asin(dir.y); 
     236#else 
     237  //  x = cos(p0)sin(p1) 
     238  //  y = cos(p1) 
     239  //  z = sin(p0)sin(p1) 
     240  return (axis == 0) ? atan2(dir.z, dir.x) : acos(dir.y); 
     241#endif 
     242} 
     243 
     244Vector3 VssRay::GetInvDirParam(const float alpha, const float beta) 
     245{ 
     246#if OLD_PARAM 
     247  return Normalize(Vector3(sin(alpha), sin(beta), cos(alpha))); 
     248 
     249#else 
     250  return Normalize(Vector3(cos(alpha)*sin(beta), 
     251                                                   cos(beta), 
     252                                                   sin(alpha)*sin(beta))); 
     253#endif 
    233254} 
    234255 
Note: See TracChangeset for help on using the changeset viewer.