This class implement the Sphere concept in an N-dimensional space. More...
This class implement the Sphere concept in an N-dimensional space.
This class implement the sphere shape in an N-dimensional space
T | type of the space |
dim | dimensionality |
Definition at line 23 of file Sphere.hpp.
#include <Sphere.hpp>
Public Types | |
typedef boost::fusion::vector < T[3], T > | type |
boost fusion that store the point | |
Public Member Functions | |
T | center (unsigned int i) |
Get the component i of the center. More... | |
template<unsigned int k> | |
Sphere (boost::fusion::vector< T[k]> &c, T radius) | |
Sphere constructor. More... | |
T | radius () |
Get the radius of the sphere. More... | |
template<typename Distance > | |
T | isInside (Point< dim, T > p) |
Check if a point is inside. More... | |
template<typename Distance > | |
bool | isInside (float *pnt) |
Is the point inside the sphere. More... | |
Data Fields | |
type | data |
Structure that store the data. | |
Static Public Attributes | |
static const unsigned int | x = 0 |
property id of the center position of the sphere | |
static const unsigned int | r = 1 |
property id of the radius of the sphere | |
|
inline |
Sphere constructor.
Sphere constructor
k | dimensionality of the center point (and the sphere) |
c | center point |
radius |
Definition at line 58 of file Sphere.hpp.
|
inline |
Get the component i of the center.
i | coordinate |
Definition at line 44 of file Sphere.hpp.
|
inline |
Check if a point is inside.
distance | distance functor used to calculate the distance two points |
p | Point to check if it is inside |
Definition at line 87 of file Sphere.hpp.
|
inline |
Is the point inside the sphere.
pnt | check if the point is inside |
Definition at line 118 of file Sphere.hpp.
|
inline |
Get the radius of the sphere.
Definition at line 74 of file Sphere.hpp.