cheshirekow  v0.1.0
gjk88.h File Reference
#include <vector>
#include <set>
#include <cassert>

Go to the source code of this file.

Classes

struct  mpblocks::gjk88::MinkowskiPair< Point >
 

Namespaces

 mpblocks
 
 mpblocks::gjk88
 

Typedefs

template<class Point >
using mpblocks::gjk88::PairVec = std::vector< MinkowskiPair< Point > >
 

Enumerations

enum  mpblocks::gjk88::Result { mpblocks::gjk88::COLLISION, mpblocks::gjk88::COLLISION_FREE, mpblocks::gjk88::INDETERMINANT }
 

Functions

template<class Ops , class Point >
bool mpblocks::gjk88::advanceSimplex (Ops &ops, std::vector< MinkowskiPair< Point > > &simplex, Point &dir)
 returns true if the origin is contained in the simplex, and if it is not, returns false and generates a new search direction More...
 
template<class Ops , class Point >
bool mpblocks::gjk88::advanceSimplex2 (Ops &ops, PairVec< Point > &simplex, Point &dir)
 returns true if the origin is contained in the segment More...
 
template<class Ops , class Point >
bool mpblocks::gjk88::advanceSimplex3 (Ops &ops, PairVec< Point > &simplex, Point &dir)
 returns true if the origin is contained in the triangle More...
 
template<class Ops , class Point >
bool mpblocks::gjk88::advanceSimplex4 (Ops &ops, PairVec< Point > &simplex, Point &dir)
 returns true if the origin is contained in the tetrahedron More...
 
template<class Ops , class SupportFn , class Point , class SimplexHistory , class PointHistory >
Result mpblocks::gjk88::collisionDistance_2d_debug (Ops ops, SupportFn supportFn, Point &a, Point &b, Point &v, SimplexHistory sHist, PointHistory vHist, int maxIter=100)
 
template<class Ops , class SupportFn , class Point >
Result mpblocks::gjk88::collisionDistance_3d (Ops ops, SupportFn supportFn, Point &a, Point &b, Point &v, int maxIter=100)
 
template<class Ops , class SupportFn , class Point , class SimplexHistory , class PointHistory , class ErrorHistory >
Result mpblocks::gjk88::collisionDistance_3d_debug (Ops ops, SupportFn supportFn, Point &a, Point &b, Point &v, SimplexHistory sHist, PointHistory vHist, ErrorHistory eHist, int maxIter=100)
 
template<class Ops , class Point >
bool mpblocks::gjk88::growSimplex2 (Ops &ops, PairVec< Point > &simplex, Point &v)
 returns true if the origin is contained in the segment More...
 
template<class Ops , class Point >
bool mpblocks::gjk88::growSimplex3_2d (Ops &ops, PairVec< Point > &simplex, Point &v)
 returns true if the origin is contained in the triangle More...
 
template<class Ops , class Point >
bool mpblocks::gjk88::growSimplex3_3d (Ops &ops, PairVec< Point > &simplex, Point &v)
 returns true if the origin is contained in the triangle More...
 
template<class Ops , class Point >
bool mpblocks::gjk88::growSimplex4_3d (Ops &ops, PairVec< Point > &simplex, Point &v, int depth=0)
 returns true if the origin is contained in the tetrahedron More...
 
template<class Ops , class Point >
bool mpblocks::gjk88::growSimplex_2d (Ops &ops, std::vector< MinkowskiPair< Point > > &simplex, Point &v)
 returns true if the origin is contained in the simplex, and if it is not, returns false and generates a new search direction More...
 
template<class Ops , class Point >
bool mpblocks::gjk88::growSimplex_3d (Ops &ops, std::vector< MinkowskiPair< Point > > &simplex, Point &v)
 returns true if the origin is contained in the simplex, and if it is not, returns false and generates a new search direction More...
 
template<class Ops , class SupportFn , class Point >
Result mpblocks::gjk88::isCollision (Ops ops, SupportFn supportFn, Point &a, Point &b, Point &d, int maxIter=100)
 GJK algorithm, determines if two convex objects are in collision. More...
 
template<int NDim, class Point >
bool mpblocks::gjk88::isEqual (const Point &a, const Point &b)
 
template<typename T >
int mpblocks::gjk88::sgn (T val)