27 #include <Geometry/SphericalCoordinates.hh>
36 affineReferenceFrame_ = newAffineBase;
42 return affineReferenceFrame_;
49 double& phi,
double& theta)
const
51 HomgPoint3D localPoint = affineReferenceFrame_.GlobalToLocal(point);
55 const double x = localPoint[0];
56 const double y = localPoint[1];
57 const double z = localPoint[2];
59 if((rho<1e-12) || (fabs(x)<1e-12 && fabs(y)<1e-12)) {
69 BIASASSERT(phi>-M_PI);
70 BIASASSERT(phi<=M_PI);
72 BIASASSERT(theta<=M_PI);
81 ray[0] = sin(theta)*cos(phi);
82 ray[1] = sin(theta)*sin(phi);
86 ray = affineReferenceFrame_.LocalToGlobal(ray);
const CoordinateTransform3D & GetAffineBase() const
void GetCartesianRayFromFullPhi(const double &phi, const double &theta, HomgPoint3D &ray) const
Calculates the Euclidean ray belonging to the passed angles in the world coordinate frame...
void SetAffineBase(const CoordinateTransform3D &newAffineBase)
Sets the "local" coordinate frame of the spherical coordinates.
double NormL2() const
Return the L2 norm: sqrt(a^2 + b^2 + c^2 + d^2)
class HomgPoint3D describes a point with 3 degrees of freedom in projective coordinates.
void GetSphericalCoordinatesFullPhi(const HomgPoint3D &point, double &rho, double &phi, double &theta) const
Method calculates spherical coordinates, hereby phi will lie in the range (-M_PI, M_PI] while theta l...