30 #include <boost/math/constants/constants.hpp>
34 #include "linearAlgebra/WPosition.h"
45 const float piFloat = boost::math::constants::pi<float>();
50 const double piDouble = boost::math::constants::pi<double>();
79 bool intersectPlaneSegment(
const WPlane& p,
82 boost::shared_ptr< WPosition > pointOfIntersection );
95 bool intersectPlaneLineNearCP(
const WPlane& p,
const WLine& l, boost::shared_ptr< WPosition > cutPoint );
105 template<
typename T >
int signum(
const T& value );
111 inline unsigned int oddFactorial(
unsigned int border )
113 unsigned int result = 1;
114 for(
unsigned int i = 3; i <= border; i+=2 )
125 inline unsigned int evenFactorial(
unsigned int border )
127 unsigned int result = 1;
128 for(
unsigned int i = 2; i <= border; i+=2 )
144 template<
typename T >
147 T res =
static_cast< T
>( 1 );
152 for( T k = res; k <= i; ++k )
168 template<
typename T >
169 T areEqual( T a, T b, T delta = T( 0 ) )
171 return ( std::fabs( a - b ) <= delta );
174 template<
typename T >
inline int signum(
const T& value )
A line is an ordered sequence of WPositions.
This only is a 3d double vector.