From c41e4d2e04c5c3ad9dc4a6ed7ac7d6da0b6d561d Mon Sep 17 00:00:00 2001 From: cignoni Date: Tue, 4 May 2010 08:07:18 +0000 Subject: [PATCH] IMPORTANT CHANGE; the rarely used frompolar and topolar returns angles in RADIANTS changed the function names to clarify, avoid stupid bugs, and to adequate to the standard --- vcg/space/deprecated_point3.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/vcg/space/deprecated_point3.h b/vcg/space/deprecated_point3.h index 08b71bff..c312b8fb 100644 --- a/vcg/space/deprecated_point3.h +++ b/vcg/space/deprecated_point3.h @@ -337,14 +337,14 @@ public: /** * Convert to polar coordinates from cartesian coordinates. * - * Theta is the azimuth angle and ranges between [0, 360) degrees. - * Phi is the elevation angle (not the polar angle) and ranges between [-90, 90] degrees. + * Theta is the azimuth angle and ranges between [0, 2PI) degrees. + * Phi is the elevation angle (not the polar angle) and ranges between [-PI/2, PI/2] degrees. * * /note Note that instead of the classical polar angle, which ranges between - * 0 and 180 degrees we opt for the elevation angle to obtain a more + * 0 and PI degrees we opt for the elevation angle to obtain a more * intuitive spherical coordinate system. */ - void ToPolar(P3ScalarType &ro, P3ScalarType &theta, P3ScalarType &phi) const + void ToPolarRad(P3ScalarType &ro, P3ScalarType &theta, P3ScalarType &phi) const { ro = Norm(); theta = (P3ScalarType)atan2(_v[2], _v[0]); @@ -354,14 +354,14 @@ public: /** * Convert from polar coordinates to cartesian coordinates. * - * Theta is the azimuth angle and ranges between [0, 360) degrees. + * Theta is the azimuth angle and ranges between [0, 2PI) degrees. * Phi is the elevation angle (not the polar angle) and ranges between [-90, 90] degrees. * * \note Note that instead of the classical polar angle, which ranges between - * 0 and 180 degrees, we opt for the elevation angle to obtain a more + * 0 and PI degrees, we opt for the elevation angle to obtain a more * intuitive spherical coordinate system. */ - void FromPolar(const P3ScalarType &ro, const P3ScalarType &theta, const P3ScalarType &phi) + void FromPolarRad(const P3ScalarType &ro, const P3ScalarType &theta, const P3ScalarType &phi) { _v[0]= ro*cos(theta)*cos(phi); _v[1]= ro*sin(phi);