31 #if defined(RayIntersectionPredicates_RECURSES)
32 #error Recursive header files inclusion detected in RayIntersectionPredicates.h
33 #else // defined(RayIntersectionPredicates_RECURSES)
35 #define RayIntersectionPredicates_RECURSES
37 #if !defined RayIntersectionPredicates_h
39 #define RayIntersectionPredicates_h
44 #include "DGtal/base/Common.h"
80 template <
typename TPo
int>
110 "Direction must be non-null vector");
127 const Point &v3)
const
130 ASSERT((v1 != v2 ) && (v1 != v3) && (v2 != v3));
141 P =
myDest.crossProduct( e2 );
174 Q = T.crossProduct( e1 );
220 const Point &v4)
const
222 return (this->
operator()(v1,v2,v3) ||
223 this->
operator()(v1,v4,v3) );
239 template <
typename Surfel >
242 auto const & aPreSurfel = aSurfel.
preCell();
249 Point baseQuadCenter = aPreSurfel.coordinates;
257 x1= baseQuadCenter[0]-ONE; y1= baseQuadCenter[1]-ONE; z1= baseQuadCenter[2];
258 x2= baseQuadCenter[0]+ONE; y2= baseQuadCenter[1]-ONE; z2= baseQuadCenter[2];
259 x3= baseQuadCenter[0]+ONE; y3= baseQuadCenter[1]+ONE; z3= baseQuadCenter[2];
260 x4= baseQuadCenter[0]-ONE; y4= baseQuadCenter[1]+ONE; z4= baseQuadCenter[2];
265 x1= baseQuadCenter[0]-ONE; y1= baseQuadCenter[1]; z1= baseQuadCenter[2]-ONE;
266 x2= baseQuadCenter[0]-ONE; y2= baseQuadCenter[1]; z2= baseQuadCenter[2]+ONE;
267 x3= baseQuadCenter[0]+ONE; y3= baseQuadCenter[1]; z3= baseQuadCenter[2]+ONE;
268 x4= baseQuadCenter[0]+ONE; y4= baseQuadCenter[1]; z4= baseQuadCenter[2]-ONE;
273 x1= baseQuadCenter[0]; y1= baseQuadCenter[1]-ONE; z1= baseQuadCenter[2]-ONE;
274 x2= baseQuadCenter[0]; y2= baseQuadCenter[1]+ONE; z2= baseQuadCenter[2]-ONE;
275 x3= baseQuadCenter[0]; y3= baseQuadCenter[1]+ONE; z3= baseQuadCenter[2]+ONE;
276 x4= baseQuadCenter[0]; y4= baseQuadCenter[1]-ONE; z4= baseQuadCenter[2]+ONE;
293 #endif // !defined RayIntersectionPredicates_h
295 #undef RayIntersectionPredicates_RECURSES
296 #endif // else defined(RayIntersectionPredicates_RECURSES)