Box2D
3.0.0
A Real-Time-Oriented 2-D Physics Engine
|
#include <Math.hpp>
Public Member Functions | |
Sweep ()=default | |
Default constructor. More... | |
constexpr | Sweep (const Sweep ©)=default |
Copy constructor. More... | |
constexpr | Sweep (const Position p0, const Position p1, const Length2D lc=Vec2_zero *Meter, RealNum a0=0) noexcept |
Initializing constructor. More... | |
constexpr | Sweep (const Position p, const Length2D lc=Vec2_zero *Meter) |
Initializing constructor. More... | |
Length2D | GetLocalCenter () const noexcept |
Gets the local center of mass position. More... | |
RealNum | GetAlpha0 () const noexcept |
Gets the alpha0 for this sweep. More... | |
void | Advance0 (RealNum alpha) noexcept |
Advances the sweep by a factor of the difference between the given time alpha and the sweep's alpha0. More... | |
void | ResetAlpha0 () noexcept |
Public Attributes | |
Position | pos0 |
Center world position and world angle at time "0". 12-bytes. More... | |
Position | pos1 |
Center world position and world angle at time "1". 12-bytes. More... | |
This describes the motion of a body/shape for TOI computation. Shapes are defined with respect to the body origin, which may not coincide with the center of mass. However, to support dynamics we must interpolate the center of mass position.
|
default |
Default constructor.
|
default |
Copy constructor.
|
inlinenoexcept |
Initializing constructor.
|
inlineexplicit |
Initializing constructor.
|
inlinenoexcept |
Advances the sweep by a factor of the difference between the given time alpha and the sweep's alpha0.
This advances position 0 (pos0
) of the sweep towards position 1 (pos1
) by a factor of the difference between the given alpha and the alpha0.
alpha | Valid new time factor in [0,1) to update the sweep to. Behavior is undefined if value is invalid. |
|
inlinenoexcept |
Gets the alpha0 for this sweep.
|
inlinenoexcept |
Gets the local center of mass position.
|
inlinenoexcept |
Position box2d::Sweep::pos0 |
Center world position and world angle at time "0". 12-bytes.
Position box2d::Sweep::pos1 |
Center world position and world angle at time "1". 12-bytes.