Essentially a Manifold expressed in world coordinate terms. More...
#include <WorldManifold.hpp>
Classes | |
struct | PointData |
Point data for world manifold. More... | |
Public Types | |
using | size_type = std::remove_const< decltype(MaxManifoldPoints)>::type |
Size type. | |
Public Member Functions | |
WorldManifold ()=default | |
Default constructor. More... | |
constexpr | WorldManifold (UnitVec normal) noexcept |
Initializing constructor. | |
constexpr | WorldManifold (UnitVec normal, PointData ps0) noexcept |
Initializing constructor. | |
constexpr | WorldManifold (UnitVec normal, PointData ps0, PointData ps1) noexcept |
Initializing constructor. | |
size_type | GetPointCount () const noexcept |
Gets the point count. More... | |
UnitVec | GetNormal () const noexcept |
Gets the normal of the contact. More... | |
Length2 | GetPoint (size_type index) const noexcept |
Gets the indexed point's location in world coordinates. More... | |
Length | GetSeparation (size_type index) const noexcept |
Gets the amount of separation at the given indexed point. More... | |
Momentum2 | GetImpulses (size_type index) const noexcept |
Gets the given index contact impulses. More... | |
Private Attributes | |
UnitVec | m_normal = GetInvalid<UnitVec>() |
world vector pointing from A to B | |
Length2 | m_points [MaxManifoldPoints] = {GetInvalid<Length2>(), GetInvalid<Length2>()} |
Points. More... | |
Momentum2 | m_impulses [MaxManifoldPoints] = {Momentum2{}, Momentum2{}} |
Impulses. More... | |
Length | m_separations [MaxManifoldPoints] = {GetInvalid<Length>(), GetInvalid<Length>()} |
Separations. More... | |
Essentially a Manifold expressed in world coordinate terms.
Used to recognize the current state of a contact manifold in world coordinates.
|
default |
Default constructor.
A default constructed world manifold will gave a point count of zero, an invalid normal, invalid points, and invalid separations.
Gets the given index contact impulses.
|
inlinenoexcept |
Gets the normal of the contact.
This is a directional unit-vector.
Gets the indexed point's location in world coordinates.
MaxManifoldPoints
index | Index to return point for. This must be between 0 and GetPointCount() to get a valid point from this method. |
|
inlinenoexcept |
Gets the point count.
This is the maximum index value that can be used to access valid point or separation information.
Gets the amount of separation at the given indexed point.
MaxManifoldPoints
index | Index to return separation for. This must be between 0 and GetPointCount() . |
|
private |
|
private |
Points.
Manifold's contact points in world coordinates (mid-point of intersection)
Referenced by GetPoint().
|
private |
Separations.
A negative value indicates overlap.
Referenced by GetPointCount(), and GetSeparation().