|
Box2D
3.0.0
A Real-Time-Oriented 2-D Physics Engine
|
#include <Simplex.hpp>
Classes | |
| class | Cache |
| Simplex cache. More... | |
Public Types | |
| using | Edges = ArrayList< SimplexEdge, MaxEdges, std::remove_const< decltype(MaxEdges)>::type > |
| Simplex edge collection. More... | |
| using | size_type = Edges::size_type |
| Size type. More... | |
| using | Coefficients = ArrayList< RealNum, MaxEdges, std::remove_const< decltype(MaxEdges)>::type > |
| Coefficients. More... | |
| using | IndexPairs = ArrayList< IndexPair, MaxEdges, std::remove_const< decltype(MaxEdges)>::type > |
| Index pairs. More... | |
Public Member Functions | |
| Simplex ()=default | |
| BOX2D_CONSTEXPR Edges | GetEdges () const noexcept |
| const SimplexEdge & | GetSimplexEdge (size_type index) const noexcept |
| BOX2D_CONSTEXPR RealNum | GetCoefficient (size_type index) const noexcept |
| BOX2D_CONSTEXPR size_type | GetSize () const noexcept |
Static Public Member Functions | |
| static Cache | GetCache (const Simplex::Edges &edges) noexcept |
| static IndexPairs | GetIndexPairs (const Edges &collection) noexcept |
| Gets index pairs for the given edges collection. More... | |
| static BOX2D_CONSTEXPR Length2D | CalcSearchDirection (const Edges &simplexEdges) noexcept |
| Calculates the "search direction" for the given simplex edge list. More... | |
| static RealNum | CalcMetric (const Edges &simplexEdges) |
| Gets the given simplex's "metric". More... | |
| static Simplex | Get (const SimplexEdge &s0) noexcept |
| static Simplex | Get (const SimplexEdge &s0, const SimplexEdge &s1) noexcept |
| Gets the simplex for the given 2 edges. More... | |
| static Simplex | Get (const SimplexEdge &s0, const SimplexEdge &s1, const SimplexEdge &s2) noexcept |
| Gets the simplex for the given 3 edges. More... | |
| static Simplex | Get (const Edges &edges) noexcept |
| Gets the simplex for the given collection of vertices. More... | |
Static Public Attributes | |
| static constexpr auto | MaxEdges = std::uint8_t{3} |
| Maximum number of supportable edges in a simplex. More... | |
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 GJK collision detection.
| using box2d::Simplex::Coefficients = ArrayList<RealNum, MaxEdges, std::remove_const<decltype(MaxEdges)>::type> |
Coefficients.
Collection of coefficient values.
| using box2d::Simplex::Edges = ArrayList<SimplexEdge, MaxEdges, std::remove_const<decltype(MaxEdges)>::type> |
Simplex edge collection.
| using box2d::Simplex::IndexPairs = ArrayList<IndexPair, MaxEdges, std::remove_const<decltype(MaxEdges)>::type> |
Index pairs.
| using box2d::Simplex::size_type = Edges::size_type |
Size type.
|
default |
Gets the given simplex's "metric".
|
inlinestaticnoexcept |
Calculates the "search direction" for the given simplex edge list.
| simplexEdges | A one or two edge list. |
|
staticnoexcept |
|
staticnoexcept |
Gets the simplex for the given 2 edges.
|
staticnoexcept |
Gets the simplex for the given 3 edges.
Gets the simplex for the given collection of vertices.
| edges | Collection of zero, one, two, or three simplex edges. |
|
inlinestaticnoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinestaticnoexcept |
Gets index pairs for the given edges collection.
|
inlinenoexcept |
|
inlinenoexcept |
|
static |
Maximum number of supportable edges in a simplex.
1.8.14