An encapsulation of a point, line segment, or triangle.
More...
#include <playrho/d2/Simplex.hpp>
An encapsulation of a point, line segment, or triangle.
An encapsulation of a point, line segment, or triangle. These are defined respectively as: a 0-simplex, a 1-simplex, and a 2-simplex. Used in doing G.J.K. (GJK) collision detection.
- Invariant
- Vertex's for the same index must have the same point locations.
-
There may not be more than one entry for the same index pair.
- See also
- https://en.wikipedia.org/wiki/Simplex
-
https://en.wikipedia.org/wiki/Gilbert%2DJohnson%2DKeerthi_distance_algorithm
◆ Coefficients
Coefficients.
Collection of coefficient values.
◆ Get() [1/3]
Gets the simplex for the given 2 edges.
- Note
- The given simplex vertices must have different index pairs or be of the same values.
- Warning
- Behavior is not specified if the given simplex edges index pairs are the same and the whole edges values are not also the same.
- Parameters
-
- Returns
- One or two edge simplex.
◆ Get() [2/3]
Gets the simplex for the given 3 edges.
- Returns
- One, two, or three edge simplex.
◆ Get() [3/3]
Gets the simplex for the given collection of vertices.
- Parameters
-
edges | Collection of zero, one, two, or three simplex edges. |
- Returns
- Zero, one, two, or three edge simplex.
◆ size()
Gets the size in number of simplex edges that this instance is made up of.
Gets the size in number of valid edges of this Simplex.
- Returns
- Value between 0 and
MaxEdges
(inclusive).
Referenced by Get(), and playrho::d2::GetClosestPoint().
The documentation for this class was generated from the following files:
- Library/include/playrho/d2/Simplex.hpp
- Library/source/playrho/d2/Simplex.cpp