Box2D  3.0.0
A Real-Time-Oriented 2-D Physics Engine
Public Types | Public Member Functions | List of all members
box2d::SimplexEdge Class Reference

Simplex edge. More...

#include <SimplexEdge.hpp>

Public Types

using index_type = IndexPair::size_type
 

Public Member Functions

 SimplexEdge ()=default
 Default constructor. More...
 
constexpr SimplexEdge (const SimplexEdge &copy)=default
 
constexpr SimplexEdge (Length2D pA, index_type iA, Length2D pB, index_type iB) noexcept
 Initializing constructor. More...
 
constexpr auto GetPointA () const noexcept
 Gets point A (in world coordinates). More...
 
constexpr auto GetPointB () const noexcept
 Gets point B (in world coordinates). More...
 
constexpr Length2D GetPointDelta () const noexcept
 Gets the point delta. More...
 
constexpr auto GetIndexA () const noexcept
 
constexpr auto GetIndexB () const noexcept
 
constexpr auto GetIndexPair () const noexcept
 

Detailed Description

Simplex edge.

This is the locations (in world coordinates) and indices of a pair of vertices from two shapes (shape A and shape B).

Note
This data structure is 28-bytes large (on at least one 64-bit platform).

Member Typedef Documentation

◆ index_type

Constructor & Destructor Documentation

◆ SimplexEdge() [1/3]

box2d::SimplexEdge::SimplexEdge ( )
default

Default constructor.

◆ SimplexEdge() [2/3]

constexpr box2d::SimplexEdge::SimplexEdge ( const SimplexEdge copy)
default

◆ SimplexEdge() [3/3]

constexpr box2d::SimplexEdge::SimplexEdge ( Length2D  pA,
index_type  iA,
Length2D  pB,
index_type  iB 
)
inlinenoexcept

Initializing constructor.

Parameters
pAPoint A in world coordinates.
iAIndex of point A within the shape that it comes from.
pBPoint B in world coordinates.
iBIndex of point B within the shape that it comes from.

Member Function Documentation

◆ GetIndexA()

constexpr auto box2d::SimplexEdge::GetIndexA ( ) const
inlinenoexcept

◆ GetIndexB()

constexpr auto box2d::SimplexEdge::GetIndexB ( ) const
inlinenoexcept

◆ GetIndexPair()

constexpr auto box2d::SimplexEdge::GetIndexPair ( ) const
inlinenoexcept

◆ GetPointA()

constexpr auto box2d::SimplexEdge::GetPointA ( ) const
inlinenoexcept

Gets point A (in world coordinates).

◆ GetPointB()

constexpr auto box2d::SimplexEdge::GetPointB ( ) const
inlinenoexcept

Gets point B (in world coordinates).

◆ GetPointDelta()

constexpr Length2D box2d::SimplexEdge::GetPointDelta ( ) const
inlinenoexcept

Gets the point delta.

This is the difference between points A and B.

Returns
Point B minus point A.

The documentation for this class was generated from the following file: