// Variations of Sphere3D
template <class scalarT> class Sphere3D;
typedef Sphere3D<int> iSphere3D;
typedef Sphere3D<float> fSphere3D;
typedef Sphere3D<double> dSphere3D;
typedef Sphere3D<unsigned char> bSphere3D;
///////////////////////////////////////////////////////////////////////////////
// Sphere3D
// - Spherical coordinate in 3D space
///////////////////////////////////////////////////////////////////////////////
template <class scalarT>
class Sphere3D
{
private:
typedef Sphere3D<scalarT> self; // Shortcut type to simplify declarations
public:
scalarT r,theta,phi; // Radius, Rotation angles in radians
// Constructors
inline Sphere3D() ; // Notice there is no "default" value of zero
inline Sphere3D(scalarT _r, scalarT _t, scalarT _p)
inline Sphere3D(const self &v)
// This is a shortcut for assignment that "looks" like a constructor
inline void operator ()(scalarT _r, scalarT _t, scalarT _p)
// Set the values in degrees
inline void setDegrees(scalarT _r, scalarT _t, scalarT _p)
// Function to return Vector3D
inline Vector3d<scalarT> getVector3D() const
// Extractor to return Vector3D
inline operator Vector3D<scalarT> () const
};