1#ifndef ADAPTIVE_CONE_HPP_
2#define ADAPTIVE_CONE_HPP_
4#include <boost/fusion/include/mpl.hpp>
5#include "Space/Shape/Box.hpp"
6#include "Space/Shape/Point.hpp"
7#include <boost/mpl/range_c.hpp>
8#include <boost/mpl/for_each.hpp>
70template<
unsigned int dim ,
typename T>
79 typedef boost::fusion::vector<T[dim]>
type;
86 static const unsigned int p1 = 0;
105 Box<dim-1,T> upBase = b.getSubBox();
108 T up = b.template getBase<Base::UP>(dim-1);
118 if (b.template getBase<Base::UP>(dim-1) < boost::fusion::at_c<PointA::x>(
data)[dim-1] )
120 r_p = boost::fusion::at_c<PointA::x>(
data)[dim-1];
126 r_p = b.template getBase<Base::UP>(dim-1);
132 return upBase.Intersect<distance>(acon);
155 return Intersect<distance>(b);
169 for (
int i = 0 ; i < dim ; i++)
171 boost::fusion::at_c<0>(
data)[i] = pt[i];
189 T r = pnt.
get(dim-1);
195 sphere.isInside<Distance>(pnt.getSubPoint(dim-1));
205 template<
typename Distance>
bool isInside(
float * pnt)
217 sphere.isInside<Distance>(pnt);
This class represent an Adaptive cylinder cone.
bool Intersect(Box< dim, T > b)
This function check if a box intersect this shape.
bool isInside(float *pnt)
Is a point inside the adaptive cone.
bool isInside(Point< dim, T > pnt)
Is a point inside the adaptive cone.
static const unsigned int p1
Point where cone and cylinder base match.
bool Intersect(Box< dim, T > b, int div, T *dists, T &minsqdistance)
This function check if a box intersect this shape.
Point< dim, T > PointA
Base structure that define a Point.
boost::fusion::vector< T[dim]> type
boost fusion that store the point
AdaptiveCylinderCone(const T *pt)
Create an adaptive cylinder Cone for the point pt.
This class represent an N-dimensional box.
This class implement the point shape in an N-dimensional space.
__device__ __host__ const T & get(unsigned int i) const
Get coordinate.
This class implement the Sphere concept in an N-dimensional space.
this class is a functor for "for_each" algorithm
copy_acc(const S *ptr)
constructor it fix the size
void operator()(T &t) const
It call the copy function for each member.
const S * ptr
Pointer storing the data point.