Changeset 1824 for GTP/trunk/Lib/Vis/Preprocessing/src/VssRay.cpp
- Timestamp:
- 11/28/06 19:46:36 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/VssRay.cpp
r1580 r1824 8 8 VssRay::mailID = 0; 9 9 10 #define OLD_PARAM 0 10 11 11 12 VssRay::VssRay( … … 230 231 VssRay::GetDirParam(const int axis, const Vector3 dir) 231 232 { 233 Vector3 d = Normalize(dir); 234 #if OLD_PARAM 232 235 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 244 Vector3 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 233 254 } 234 255
Note: See TracChangeset
for help on using the changeset viewer.