27 #ifndef MPBLOCKS_CLARKSON93_SIMPLEX_HPP_
28 #define MPBLOCKS_CLARKSON93_SIMPLEX_HPP_
33 namespace clarkson93 {
36 template <
class Traits>
39 typedef Eigen::Matrix<Scalar,NDim,NDim>
Matrix;
40 typedef Eigen::Matrix<Scalar,NDim,1> Vector;
45 for(
unsigned int i=1; i < NDim+1; i++)
46 A.row(i-1) = deref(V[i]);
50 n = A.fullPivLu().solve(b);
54 o = deref(V[1]).dot(n);
57 template <
class Traits>
93 template <
class Traits>
100 template <
class Traits>
103 return V[0] == antiOrigin;
106 template <
class Traits>
109 return ( n.dot(x) < o );
120 #endif // SIMPLEX_HPP_
void calculateConstraint(PointDeref &deref)
calculate the normal and offset of the constraint given the d vertices on it's base facet (does not c...
Traits::PointRef PointRef
Scalar normalProjection(const Point &x)
returns the distance of x to the base facet, used in walking the triangulation to x ...
bool isInfinite(PointRef antiOrigin)
returns true if vertex[0] is the anti origin
Traits::PointDeref PointDeref
void orientConstraint(const Point &x, Orientation orient=INSIDE)
orient the constraint by ensuring that the point x satisfies it (i.e. )
bool isVisible(const Point &x)
returns true if x is on the inside of the base facet (i.e. x is in the same half space as the simplex...