Om
1.0.0
A universal framework for multimedia simulation
|
A class that iteratively refines a GJK simplex to approximate the shape surface at the collision point. More...
#include <omPhysicsCollisionEPASolver.h>
Classes | |
class | EPAEdge |
class | EPATriangle |
class | EPATriangleSort |
Public Member Functions | |
EPASolver () | |
Create a default EPASolver object. More... | |
template<typename UserDataType1 , typename UserDataType2 , MinkowskiVertex(*)(const UserDataType1 *, const UserDataType2 *, const SIMDFloat4 &) getSupportPoint> | |
EPAResult | solve (const UserDataType1 *userData1, const UserDataType2 *userData2, const MinkowskiVertex *simplex, Float terminationThreshold, Size maxIterations) |
Iteratively refine the specified GJK simplex. More... | |
A class that iteratively refines a GJK simplex to approximate the shape surface at the collision point.
Since the output of the GJKSolver is just a simplex containing the origin, without any contact information, the EPASolver class refines that simplex so that one face of it lies near the surface of the convex shapes that are intersecting. This class can be used to generate better contact information than would be possible with just GJK.
om::physics::collision::EPASolver::EPASolver | ( | ) |
Create a default EPASolver object.
EPAResult om::physics::collision::EPASolver::solve | ( | const UserDataType1 * | userData1, |
const UserDataType2 * | userData2, | ||
const MinkowskiVertex * | simplex, | ||
Float | terminationThreshold, | ||
Size | maxIterations | ||
) |
Iteratively refine the specified GJK simplex.
This method iteratively adds triangles to the given simplex that better approximate the minkowski difference between two convex shapes. The method returns the triangle that is closest to the surface of the shapes' minkowski difference. This triangle can then be used to generate a point of contact on each shape.