WFMath  1.0.2
Public Member Functions | List of all members
WFMath::Ball< dim > Class Template Reference

A dim dimensional ball. More...

#include <ball.h>

Public Member Functions

 Ball ()
 construct an uninitialized ball
 
 Ball (const Point< dim > &center, CoordType radius)
 construct a ball with the given center and radius
 
 Ball (const Ball &b)
 construct a copy of a ball
 
 Ball (const AtlasInType &a)
 Construct a ball from an object passed by Atlas.
 
AtlasOutType toAtlas () const
 Create an Atlas object from the box.
 
void fromAtlas (const AtlasInType &a)
 Set the box's value to that given by an Atlas object.
 
const Point< dim > & center () const
 get the center of the ball
 
Point< dim > & center ()
 get the center of the ball
 
CoordType radius () const
 get the radius of the ball
 
CoordTyperadius ()
 get the radius of the ball
 

Detailed Description

template<int dim = 3>
class WFMath::Ball< dim >

A dim dimensional ball.

This class implements the full shape interface, as described in the fake class Shape.

This class is called Ball<> instead of Sphere to be more in tune with the usual mathematical naming conventions, where a ball is a filled object, while a sphere is just the outer shell. It also helps that a Ball<n> corresponds to an n-ball, while a Sphere<n> would correspond to an (n-1)-sphere.


The documentation for this class was generated from the following files: