
 BallN () 
 Default constructor. More...


 BallN (VectorT const ¢er_, T const &radius_) 
 Initialize with a center and a radius. More...


 BallN (BallN const &src) 
 Copy constructor. More...


template<typename U > 
BallN< N, U >  cast () const 
 Cast the ball to a different scalar type. More...


bool  contains (VectorT const &p) const 
 Check if the ball contains a point. More...


bool  contains (BallN const &other) const 
 Check if the ball contains another ball. More...


bool  contains (AxisAlignedBoxN< N, T > const &aab) const 
 Check if the ball contains an axisaligned box. More...


T  distance (VectorT const &p) const 
 Get the distance of the ball from a point. More...


T  distance (BallN const &other) const 
 Get the distance of the ball from another ball. More...


T  distance (AxisAlignedBoxN< N, T > const &aab) const 
 Get the distance of the ball from an axisaligned box. More...


AxisAlignedBoxN< N, T >  getBounds () const 
 Get a bounding box for the ball. More...


VectorT const &  getCenter () const 
 Get the center of the ball. More...


T  getDiameter () const 
 Get the diameter of the ball. More...


T  getRadius () const 
 Get the radius of the ball. More...


bool  intersects (VectorT const &p) const 
 Test if this ball intersects (contains) a point. More...


bool  intersects (BallN const &other) const 
 Check if the ball intersects another ball. More...


bool  intersects (AxisAlignedBoxN< N, T > const &aab) const 
 Check if the ball intersects an axisaligned box. More...


RayIntersectionN< N, T >  rayIntersection (RayN< N, T > const &ray, T max_time=1) const 
 Get the intersection of a ray with the object, including the hit time and the normal at the intersection point. More...


T  rayIntersectionTime (RayN< N, T > const &ray, T max_time=1) const 
 Get the time taken for a ray to intersect the object, or a negative value if there was no intersection in the forward direction. More...


bool  rayIntersects (RayN< N, T > const &ray, T max_time=1) const 
 Check if a ray intersects the object in the forward direction. More...


void  setCenter (VectorT const ¢er_) 
 Set the center of the ball. More...


void  setRadius (T radius_) 
 Set the radius of the ball. More...


template<typename OtherType > 
T  squaredDistance (OtherType const &other) const 
 Get the squared distance of the ball from a point, ball or axisaligned box. More...


T  squaredDistance (AxisAlignedBoxN< N, T > const &aab, VectorT *this_pt=nullptr, VectorT *other_pt=nullptr) const 
 Get the squared distance of the ball from an axisaligned box and optionally return the closest pair of points. More...


std::string  toString () const 
 Get a textual representation of the ball. More...

