An encapsulation of a point, line segment, or triangle.
More...
#include <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. collision detection.
- Note
- This data structure is 104-bytes large.
- 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.
- Note
- This data structure is 4 * 3 + 4 = 16-bytes large.
◆ size_type
Size type.
- Note
- This data type is explicitly set to 1-byte large.
◆ 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 undefined 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. |
- Warning
- Behavior is undefined if the given collection has more than 3 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().
◆ m_normalizedWeights
Normalized weights.
Collection of coefficients (ranging from greater than 0 to less than 1). A.k.a.: barycentric coordinates.
- Note
- This member variable is 16-bytes.
Referenced by GetCoefficient().
◆ m_simplexEdges
The documentation for this class was generated from the following files: