31 #include <boost/math/constants/constants.hpp>
36 #include "linearAlgebra/WPosition.h"
47 const float piFloat = boost::math::constants::pi<float>();
52 const double piDouble = boost::math::constants::pi<double>();
81 bool intersectPlaneSegment(
const WPlane& p,
84 boost::shared_ptr< WPosition > pointOfIntersection );
97 bool intersectPlaneLineNearCP(
const WPlane& p,
const WLine& l, boost::shared_ptr< WPosition > cutPoint );
107 template<
typename T >
int signum(
const T& value );
113 inline unsigned int oddFactorial(
unsigned int border )
115 unsigned int result = 1;
116 for(
unsigned int i = 3; i <= border; i+=2 )
127 inline unsigned int evenFactorial(
unsigned int border )
129 unsigned int result = 1;
130 for(
unsigned int i = 2; i <= border; i+=2 )
146 template<
typename T >
149 T res =
static_cast< T
>( 1 );
154 for( T k = res; k <= i; ++k )
170 template<
typename T >
171 T areEqual( T a, T b, T delta = T( 0 ) )
173 return ( std::fabs( a - b ) <= delta );
176 template<
typename T >
inline int signum(
const T& value )
A line is an ordered sequence of WPositions.
This only is a 3d double vector.
Represents a plane with a normal vector and a position in space.