27 #ifndef MPBLOCKS_CLARKSON93_DYNAMIC_SIMPLEX_HPP_
28 #define MPBLOCKS_CLARKSON93_DYNAMIC_SIMPLEX_HPP_
33 namespace clarkson93 {
37 template <
class Traits>
40 typedef Eigen::Matrix<Scalar,Eigen::Dynamic,Eigen::Dynamic>
Matrix;
41 typedef Eigen::Matrix<Scalar,Eigen::Dynamic,1> Vector;
46 for(
int i=1; i < ndim+1; i++)
47 A.row(i-1) = deref(vertices[i]);
51 n = A.partialPivLu().solve(b);
55 c = deref(vertices[1]).dot(n);
58 template <
class Traits>
94 template <
class Traits>
101 template <
class Traits>
104 return vertices[0] == antiOrigin;
107 template <
class Traits>
110 return ( n.dot(x) < c );
121 #endif // SIMPLEX_HPP_
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
void calculateConstraint(uint ndim, PointDeref &deref)
calculate the normal and offset of the constraint given the d vertices on it's base facet (does not c...
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...
void orientConstraint(const Point &x, Orientation orient=INSIDE)
orient the constraint by ensuring that the point x satisfies it (i.e. )
Traits::PointDeref PointDeref