Struct EPA
Defined in File gjk.h
Nested Relationships
Nested Types
Struct Documentation
-
struct EPA
class for EPA algorithm
Public Types
Public Functions
-
inline EPA(size_t max_iterations_, CoalScalar tolerance_)
-
inline EPA(const EPA &other)
Copy constructor of EPA. Mostly needed for the copy constructor of
GJKSolver
.
-
inline CoalScalar getTolerance() const
Get the tolerance of EPA.
-
inline size_t getNumVertices() const
Get the number of vertices in the polytope of the last run of EPA.
-
void reset(size_t max_iterations, CoalScalar tolerance)
resets the EPA algorithm, preparing it for a new run. It potentially reallocates memory for the vertices and faces if the passed parameters are bigger than the previous ones. This function does not modify the parameters of the EPA algorithm, i.e. the maximum number of iterations and the tolerance.
-
Status evaluate(GJK &gjk, const Vec3s &guess)
- Returns:
a Status which can be demangled using (status & Valid) or (status & Failed). The other values provide a more detailled status
-
void getWitnessPointsAndNormal(const MinkowskiDiff &shape, Vec3s &w0, Vec3s &w1, Vec3s &normal) const
Get the witness points on each object, and the corresponding normal.
- Parameters:
shape – [in] is the Minkowski difference of the two shapes.
w0 – [out] is the witness point on shape0.
w1 – [out] is the witness point on shape1.
normal – [in] is the normal found by EPA. It points from shape0 to shape1. The normal is used to correct the witness points on the shapes if the shapes have a non-zero swept-sphere radius.
Public Static Functions
-
static inline void bind(SimplexFace *fa, size_t ea, SimplexFace *fb, size_t eb)
We bind the face
fa
along its edgeea
to the facefb
along its edgefb
.
-
struct SimplexFace
Public Functions
-
inline SimplexFace()
Public Members
-
bool ignore
-
size_t vertex_id[3]
-
SimplexFace *adjacent_faces[3]
-
SimplexFace *prev_face
-
SimplexFace *next_face
-
size_t adjacent_edge[3]
-
size_t pass
-
inline SimplexFace()
-
struct SimplexFaceList
The simplex list of EPA is a linked list of faces. Note: EPA’s linked list does not own any memory. The memory it refers to is contiguous and owned by a std::vector.
Public Functions
-
inline SimplexFaceList()
-
inline void reset()
-
inline void append(SimplexFace *face)
-
inline void remove(SimplexFace *face)
-
inline SimplexFaceList()
-
inline EPA(size_t max_iterations_, CoalScalar tolerance_)