This class represent an Adaptive cylinder cone. More...
This class represent an Adaptive cylinder cone.
This class represent an N-dimensional adaptive cylinder cone
T | type of space ... Real Complex Integer |
N | dimensionality of the adaptive cylinder cone |
This shape is useful for adaptive particle search, in order to explain how is defined we take a 1D space where particles can interact each other with different radius
Given one particle we want to know all the neighborhood particles, all the neighborhood particles are given by all the particles included in the radius of interaction of the particle, plus all the other particles with radius big enough to interact with this particle or in other word all the particles that has this particle as neighborhood
If we see the problem to find the neighborhood of the 1D particles in a 2D space (x,r) with x=position and r=interaction radius of the particles.
all the particles neighborhood of one particle (x_p,r_p) are all the particles in the rectangle (x-r_p,0) and (x+r_p,r_p)
in the area r < r_p
and the cone defined by the two bases
(x-r_p,r_p) - (x+r_p,r_p) and (x-r_max,r_max) - (x+r_max,r_max)
This mean that one point (x_p,r_p) and r_max define the shape
Definition at line 71 of file AdaptiveCylinderCone.hpp.
#include <AdaptiveCylinderCone.hpp>
Public Types | |
typedef boost::fusion::vector< T[dim]> | type |
boost fusion that store the point | |
Public Member Functions | |
template<typename distance > | |
bool | Intersect (Box< dim, T > b) |
This function check if a box intersect this shape. | |
template<typename distance > | |
bool | Intersect (Box< dim, T > b, int div, T *dists, T &minsqdistance) |
This function check if a box intersect this shape. | |
AdaptiveCylinderCone (const T *pt) | |
Create an adaptive cylinder Cone for the point pt. | |
template<typename Distance > | |
bool | isInside (Point< dim, T > pnt) |
Is a point inside the adaptive cone. | |
template<typename Distance > | |
bool | isInside (float *pnt) |
Is a point inside the adaptive cone. | |
Data Fields | |
type | data |
Static Public Attributes | |
static const unsigned int | p1 = 0 |
Point where cone and cylinder base match. | |
Private Types | |
typedef Point< dim, T > | PointA |
Base structure that define a Point. | |
|
private |
Base structure that define a Point.
Definition at line 74 of file AdaptiveCylinderCone.hpp.
typedef boost::fusion::vector<T[dim]> AdaptiveCylinderCone< dim, T >::type |
boost fusion that store the point
Definition at line 79 of file AdaptiveCylinderCone.hpp.
|
inline |
Create an adaptive cylinder Cone for the point pt.
pt | array storing the multidimensional point |
Definition at line 164 of file AdaptiveCylinderCone.hpp.
|
inline |
This function check if a box intersect this shape.
b | is the box to check |
Definition at line 94 of file AdaptiveCylinderCone.hpp.
|
inline |
This function check if a box intersect this shape.
It differer from the previous one because it try to optimize the intersection calculation from the previous box intersection, usefull in KDTree, where the child are divisions of the root
distance | functor to calculate the distance between two points |
b | the bounding Box | |
[in] | div | where we are cutting from the previous box |
[in] | dists | array of the previous distances calculated on each dimension |
[in] | minsqdistance | minimum square distance |
Definition at line 150 of file AdaptiveCylinderCone.hpp.
|
inline |
Is a point inside the adaptive cone.
pnt | Point to check |
Definition at line 205 of file AdaptiveCylinderCone.hpp.
|
inline |
Is a point inside the adaptive cone.
pnt | Point to check |
Definition at line 183 of file AdaptiveCylinderCone.hpp.
type AdaptiveCylinderCone< dim, T >::data |
Center point of the cylynder cone (Where the cylinder finish), where the cone start
Definition at line 83 of file AdaptiveCylinderCone.hpp.
|
static |
Point where cone and cylinder base match.
Definition at line 86 of file AdaptiveCylinderCone.hpp.