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[dim], T > | type |
boost fusion that store the point | |
Public Member Functions | |
__device__ __host__ T | center (unsigned int i) |
Get the component i of the center. | |
__device__ __host__ | Sphere (const Sphere< dim, T > &sph) |
Sphere constructor. | |
template<unsigned int k> | |
Sphere (boost::fusion::vector< T[k]> &c, T radius) | |
Sphere constructor. | |
Sphere (Point< dim, double > &c, T radius) | |
Sphere constructor. | |
__device__ __host__ T | radius () const |
Get the radius of the sphere. | |
__device__ __host__ bool | isInside (Point< dim, T > p) const |
Check if a point is inside. | |
template<typename Distance > | |
__device__ __host__ bool | isInside (Point< dim, T > p) const |
Check if a point is inside. | |
template<typename Distance > | |
bool __device__ __host__ | isInside (float *pnt) const |
Is the point inside the sphere. | |
__device__ __host__ T | distance (Point< dim, T > &p) const |
Return the distance from the surface. | |
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 | |
typedef boost::fusion::vector<T[dim],T> Sphere< dim, T >::type |
boost fusion that store the point
Definition at line 28 of file Sphere.hpp.
|
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 |
Sphere constructor.
Sphere constructor
k | dimensionality of the center point (and the sphere) |
c | center point |
radius |
Definition at line 79 of file Sphere.hpp.
|
inline |
Sphere constructor.
Sphere constructor
k | dimensionality of the center point (and the sphere) |
c | center point |
radius |
Definition at line 99 of file Sphere.hpp.
|
inline |
Get the component i of the center.
i | coordinate |
Definition at line 44 of file Sphere.hpp.
|
inline |
Return the distance from the surface.
p | point |
Definition at line 216 of file Sphere.hpp.
|
inline |
Is the point inside the sphere.
pnt | check if the point is inside |
Definition at line 188 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 128 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 157 of file Sphere.hpp.
|
inline |
Get the radius of the sphere.
Definition at line 115 of file Sphere.hpp.
Structure that store the data.
Definition at line 31 of file Sphere.hpp.
|
static |
property id of the radius of the sphere
Definition at line 36 of file Sphere.hpp.
|
static |
property id of the center position of the sphere
Definition at line 34 of file Sphere.hpp.