Namespaces | |
d2 | |
detail | |
pmr | |
Classes | |
class | ArrayList |
Array list. More... | |
class | BlockAllocator |
struct | BlockDeallocator |
Block deallocator. More... | |
struct | ConstraintSolverConf |
Constraint solver configuration data. More... | |
class | Contact |
A potential contact between the children of two body associated shapes. More... | |
struct | Contactable |
Aggregate data for identifying one side (of two) in a contact. More... | |
struct | ContactFeature |
The contact feature. More... | |
class | ContactKey |
Key value class for contacts. More... | |
struct | DynamicTreeBranchData |
Branch data of a tree node. More... | |
struct | DynamicTreeUnusedData |
Unused data of a tree node. More... | |
union | DynamicTreeVariantData |
Variant data. More... | |
struct | Filter |
A holder for contact filtering data. More... | |
class | FlagGuard |
Flag guard type. More... | |
class | GrowableStack |
class | Interval |
Interval template type. More... | |
class | InvalidArgument |
Invalid argument logic error. More... | |
struct | Island |
Definition of a self-contained constraint "island". More... | |
struct | IslandStats |
Island solver statistics. More... | |
class | LengthError |
Length based logic error. More... | |
struct | LengthIndexPair |
A length associated with two vertex counter indices. More... | |
struct | LexicographicalGreater |
Function object for performing lexicographical greater-than comparisons of containers. More... | |
struct | LexicographicalGreaterEqual |
Function object for performing lexicographical greater-than or equal-to comparisons of containers. More... | |
struct | LexicographicalLess |
Function object for performing lexicographical less-than comparisons of containers. More... | |
struct | LexicographicalLessEqual |
Function object for performing lexicographical less-than or equal-to comparisons of containers. More... | |
struct | MovementConf |
Movement configuration. More... | |
class | ObjectPool |
Object pool with indexable properties. More... | |
class | OutOfRange |
Out-of-range exception with a range type & value. More... | |
struct | PreStepStats |
Pre-phase per-step statistics. More... | |
struct | RegStepStats |
Regular-phase per-step statistics. More... | |
struct | ReversionWrapper |
Wrapper for reversing ranged-for loop ordering. More... | |
class | Span |
An encapsulation of an array and its size. More... | |
class | StackAllocator |
struct | StepConf |
Step configuration. More... | |
struct | StepStats |
Per-step statistics. More... | |
class | ThreadLocalAllocator |
Thread local "stateless" allocator. More... | |
struct | ToiConf |
Time of impact configuration. More... | |
struct | ToiOutput |
Output data for time of impact. More... | |
struct | ToiStepStats |
TOI-phase per-step statistics. More... | |
class | TypeID |
Type identifier. More... | |
struct | Vector |
Vector. More... | |
struct | Version |
Version numbering scheme. More... | |
struct | WasDestroyed |
Was destroyed invalid argument logic error. More... | |
class | WrongState |
Wrong state logic error. More... | |
Typedefs | |
using | Angle = detail::plane_angle |
Angle quantity. More... | |
using | AngularAcceleration = detail::angular_acceleration |
Angular acceleration quantity. More... | |
using | AngularMomentum = detail::angular_momentum |
Angular momentum quantity. More... | |
using | AngularVelocity = detail::angular_velocity |
Angular velocity quantity. More... | |
using | Area = detail::area |
Area quantity. More... | |
using | AreaDensity = detail::surface_density |
Area (surface) density quantity. More... | |
using | BodyCounter = std::remove_const_t< decltype(MaxBodies)> |
Count type for bodies. More... | |
using | BodyID = detail::IndexingNamedType< BodyCounter, struct BodyIdentifier > |
Body identifier. More... | |
using | BodyShapeFunction = std::function< void(std::pair< BodyID, ShapeID >)> |
Body-shapes function. | |
using | ChildCounter = std::remove_const_t< decltype(MaxChildCount)> |
Child counter type. More... | |
using | ContactCounter = WiderType< BodyCounter > |
Count type for contacts. More... | |
using | ContactFunction = std::function< void(ContactID)> |
Contacts function. | |
using | ContactID = detail::IndexingNamedType< ContactCounter, struct ContactIdentifier > |
Contact identifier. More... | |
template<typename Type , typename Check , typename DecayedType = std::decay_t<Type>> | |
using | DecayedTypeIfNotSame = std::enable_if_t<!std::is_same_v< DecayedType, Check >, DecayedType > |
Decayed type if not same as the checked type. More... | |
using | DynamicTreeSize = ContactCounter |
Dynamic tree size type. | |
template<typename T > | |
using | Finite = detail::Checked< T, detail::FiniteChecker< T > > |
Finite constrained value type. | |
template<typename T > | |
using | FiniteFF = detail::Checked< T, detail::FiniteChecker< T >, true > |
Fast failing finite constrained value type. | |
using | Force = detail::force |
Force quantity. More... | |
using | Force2 = Vector2< Force > |
2-element vector of Force quantities. More... | |
using | Frequency = detail::frequency |
Frequency quantity. More... | |
template<typename Type , typename Return > | |
using | HasNullaryFunctor = detail::HasFunctor< Type, Return()> |
Has nullary functor type alias. More... | |
template<typename Type , typename Return , typename Arg > | |
using | HasUnaryFunctor = detail::HasFunctor< Type, Return(Arg)> |
Has unary functor type alias. More... | |
using | IndexPair = std::pair< VertexCounter, VertexCounter > |
Index pair. More... | |
using | IndexPair3 = std::array< IndexPair, MaxSimplexEdges > |
Array of three index-pair elements. More... | |
using | InvMass = detail::inverse_mass |
Inverse mass quantity. More... | |
using | InvMass2 = Vector2< InvMass > |
2-element vector of inverse mass (InvMass ) quantities. | |
using | InvMass22 = Matrix22< InvMass > |
2 by 2 matrix of InvMass elements. | |
using | InvMass3 = Vector3< InvMass > |
3-element vector of inverse mass (InvMass ) quantities. | |
using | InvRotInertia = detail::inverse_moment_of_inertia |
Inverse rotational inertia quantity. More... | |
using | JointCounter = std::remove_const_t< decltype(MaxJoints)> |
Counter type for joints. More... | |
using | JointFunction = std::function< void(JointID)> |
Joints function. | |
using | JointID = detail::IndexingNamedType< JointCounter, struct JointIdentifier > |
Joint identifier. More... | |
using | KeyedContactID = std::pair< ContactKey, ContactID > |
Keyed contact identifier. | |
using | Length = detail::length |
Length quantity. More... | |
using | Length2 = Vector2< Length > |
2-element vector of Length quantities. More... | |
using | LinearAcceleration = detail::acceleration |
Linear acceleration quantity. More... | |
using | LinearAcceleration2 = Vector2< LinearAcceleration > |
2-element vector of linear acceleration (LinearAcceleration ) quantities. More... | |
using | LinearVelocity = detail::velocity |
Linear velocity quantity. More... | |
using | LinearVelocity2 = Vector2< LinearVelocity > |
2-element vector of linear velocity (LinearVelocity ) quantities. More... | |
using | Mass = detail::mass |
Mass quantity. More... | |
using | Mass2 = Vector2< Mass > |
2-element vector of Mass quantities. | |
using | Mass22 = Matrix22< Mass > |
2 by 2 matrix of Mass elements. | |
using | Mass3 = Vector3< Mass > |
3-element vector of Mass quantities. | |
using | Mat22 = Matrix22< Real > |
2 by 2 matrix of Real elements. | |
using | Mat33 = Matrix33< Real > |
3 by 3 matrix of Real elements. | |
template<typename T , std::size_t M, std::size_t N> | |
using | Matrix = Vector< Vector< T, N >, M > |
Generic M by N matrix. More... | |
template<typename T > | |
using | Matrix22 = Matrix< T, 2, 2 > |
2 by 2 matrix. | |
template<typename T > | |
using | Matrix33 = Matrix< T, 3, 3 > |
3 by 3 matrix. | |
using | Momentum = detail::momentum |
Momentum quantity. More... | |
using | Momentum2 = Vector2< Momentum > |
2-element vector of Momentum quantities. More... | |
template<typename T > | |
using | Negative = detail::Checked< T, detail::NegativeChecker< T > > |
Negative constrained value type. | |
template<typename T > | |
using | NegativeFF = detail::Checked< T, detail::NegativeChecker< T >, true > |
Fast failing negative constrained value type. | |
template<typename T > | |
using | NonNegative = detail::Checked< T, detail::NonNegativeChecker< T > > |
Non-negative constrained value type. | |
template<typename T > | |
using | NonNegativeFF = detail::Checked< T, detail::NonNegativeChecker< T >, true > |
Fast failing non-negative constrained value type. | |
template<typename T > | |
using | NonNull = std::enable_if_t< std::is_pointer_v< T >, detail::Checked< T, detail::NonZeroChecker< T > >> |
Non-null constrained value type. | |
template<typename T > | |
using | NonNullFF = std::enable_if_t< std::is_pointer_v< T >, detail::Checked< T, detail::NonZeroChecker< T >, true > > |
Fast failing non-null constrained value type. | |
template<typename T > | |
using | NonPositive = detail::Checked< T, detail::NonPositiveChecker< T > > |
Non-positive constrained value type. | |
template<typename T > | |
using | NonPositiveFF = detail::Checked< T, detail::NonPositiveChecker< T >, true > |
Fast failing non-positive constrained value type. | |
template<typename T > | |
using | NonZero = std::enable_if_t<!std::is_pointer_v< T >, detail::Checked< T, detail::NonZeroChecker< T > >> |
Non-zero constrained value type. | |
template<typename T > | |
using | NonZeroFF = std::enable_if_t<!std::is_pointer_v< T >, detail::Checked< T, detail::NonZeroChecker< T >, true > > |
Fast failing non-zero constrained value type. | |
using | PairLength2 = std::pair< Length2, Length2 > |
Pair of Length2 values. More... | |
template<typename T > | |
using | Positive = detail::Checked< T, detail::PositiveChecker< T > > |
Positive constrained value type. | |
template<typename T > | |
using | PositiveFF = detail::Checked< T, detail::PositiveChecker< T >, true > |
Fast failing positive constrained value type. | |
using | Real = float |
Real-number type. More... | |
using | RotInertia = detail::moment_of_inertia |
Rotational inertia quantity. More... | |
using | SecondMomentOfArea = detail::second_moment_of_area |
Second moment of area quantity. More... | |
using | ShapeCounter = std::remove_const_t< decltype(MaxShapes)> |
Count type for shapes. More... | |
using | ShapeFunction = std::function< void(ShapeID)> |
Shapes function. | |
using | ShapeID = detail::IndexingNamedType< ShapeCounter, struct ShapeIdentifier > |
Shape identifier. More... | |
using | Time = detail::time |
Time quantity. More... | |
using | TimestepIters = std::uint8_t |
Time step iterations type. More... | |
using | Torque = detail::torque |
Torque quantity. More... | |
template<class T > | |
using | underlying_type_t = typename detail::underlying_type< T >::type |
Underlying-type convenience alias. | |
template<typename T > | |
using | UnitInterval = detail::Checked< T, detail::UnitIntervalChecker< T > > |
Unit interval constrained value type. | |
template<typename T > | |
using | UnitIntervalFF = detail::Checked< T, detail::UnitIntervalChecker< T >, true > |
Fast failing unit interval constrained value type. | |
using | Vec2 = Vector2< Real > |
Vector with 2 Real elements. More... | |
using | Vec3 = Vector3< Real > |
A 3-dimensional column vector with 3 elements. | |
template<typename T > | |
using | Vector2 = Vector< T, 2 > |
Vector with 2-elements. More... | |
template<typename T > | |
using | Vector3 = Vector< T, 3 > |
Vector with 3-elements. More... | |
using | VertexCounter = std::remove_const_t< decltype(MaxShapeVertices)> |
Vertex count type. More... | |
using | VertexCounter2 = VertexCounterArray< 2 > |
2-element vertex counter array. | |
template<std::size_t N> | |
using | VertexCounterArray = std::array< VertexCounter, N > |
Vertex counter array template alias. | |
template<typename T > | |
using | WiderType = typename detail::Wider< T >::type |
The wider type helper. | |
template<typename T > | |
using | ZeroToUnderOne = detail::Checked< T, detail::ZeroToUnderOneChecker< T > > |
Unit interval constrained value type. | |
template<typename T > | |
using | ZeroToUnderOneFF = detail::Checked< T, detail::ZeroToUnderOneChecker< T >, true > |
Fast failing unit interval constrained value type. | |
Enumerations | |
enum class | BodyType { Static = 0 , Kinematic , Dynamic } |
Type of body. More... | |
enum class | LimitState { e_inactiveLimit , e_atLowerLimit , e_atUpperLimit , e_equalLimits } |
Limit state. More... | |
enum class | PointState { Null , Add , Persist , Remove } |
Point state enumeration. More... | |
enum class | RayCastOpcode { Terminate , IgnoreFixture , ClipRay , ResetRay } |
Ray cast opcode enumeration. More... | |
Functions | |
d2::UnitVec | abs (const d2::UnitVec &v) noexcept |
Gets the absolute value of the given value. | |
template<typename T , std::size_t N> | |
constexpr auto | abs (const Vector< T, N > &v) noexcept -> decltype(abs(T{}), Vector< T, N >{}) |
Absolute value function for vectors. | |
void * | Alloc (std::size_t size) |
Allocates memory. More... | |
template<typename T > | |
T * | AllocArray (std::size_t size) |
Allocates memory for an array. More... | |
template<typename T > | |
constexpr auto | AlmostEqual (T a, T b, int ulp=4) -> std::enable_if_t< IsArithmeticV< T >, bool > |
Determines whether the given two values are "almost equal". More... | |
template<typename T > | |
constexpr auto | AlmostZero (const T &value) -> decltype(abs(value)< std::numeric_limits< T >::min()) |
Gets whether a given value is almost zero. More... | |
template<typename T > | |
auto | Atan2 (T y, T x) |
Computes the arc-tangent of the given y and x values. More... | |
template<typename T > | |
auto | Average (const T &span) |
Computes the average of the given values. | |
template<typename T > | |
auto | begin (ReversionWrapper< T > w) |
Begin function for getting a reversed order iterator. | |
template<typename T > | |
constexpr auto | Bisect (const T &a1, const T &a2) -> decltype((a1+a2)/2) |
Bisection method. More... | |
template<class T > | |
constexpr auto | cfloor (T v) noexcept |
Constant expression enhanced floor function. More... | |
void | Clear (Island &island) noexcept |
Clears the island containers. | |
constexpr auto | compare (const Version &lhs, const Version &rhs) noexcept |
Comparison function. More... | |
Length2 | ComputeCentroid (const Span< const Length2 > &vertices) |
Computes the centroid of a counter-clockwise array of 3 or more vertices. More... | |
std::size_t | Count (const Island &island, BodyID entry) |
Counts the number of occurrences of the given entry in the given island. | |
std::size_t | Count (const Island &island, ContactID entry) |
Counts the number of occurrences of the given entry in the given island. | |
std::size_t | Count (const Island &island, JointID entry) |
Counts the number of occurrences of the given entry in the given island. | |
template<class T1 , class T2 , std::enable_if_t< std::tuple_size_v< T1 >==2 &&std::tuple_size_v< T2 >==2, int > = 0> | |
constexpr auto | Cross (const T1 &a, const T2 &b) noexcept |
Performs the 2-element analog of the cross product of two vectors. More... | |
template<class T > | |
constexpr auto | ctrunc (T v) noexcept |
Constant expression enhanced truncate function. More... | |
template<typename T1 , typename T2 > | |
constexpr auto | Dot (const T1 &a, const T2 &b) noexcept |
Performs the dot product on two vectors (A and B). More... | |
constexpr bool | empty (IndexPair3 pairs) noexcept |
Checks whether the given collection of index pairs is empty. | |
template<typename T > | |
auto | end (ReversionWrapper< T > w) |
End function for getting a reversed order iterator. | |
template<class InputIt1 , class InputIt2 > | |
constexpr auto | Equal (InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2) -> decltype(first1==last1, first2==last2,++first1,++first2, *first1== *first2) |
A pre-C++20 constant expression implementation of std::equal . More... | |
template<typename T , typename U > | |
auto | EraseAll (T &container, const U &value) -> decltype(distance(container.erase(remove(begin(container), end(container), value), end(container)), end(container))) |
Convenience template function for erasing specified value from container. More... | |
template<typename T , typename U > | |
auto | EraseFirst (T &container, const U &value) -> decltype(container.erase(find(begin(container), end(container), value)) !=end(container)) |
Convenience template function for erasing first found value from container. More... | |
constexpr void | FlagForFiltering (Contact &contact) noexcept |
Flags the contact for filtering. More... | |
constexpr void | FlagForUpdating (Contact &contact) noexcept |
Flags the contact for updating. More... | |
constexpr ContactFeature | Flip (ContactFeature val) noexcept |
Flips contact features information. | |
void | Free (void *mem) |
Frees memory. More... | |
template<std::size_t I, std::size_t N, typename T > | |
constexpr auto | get (const Vector< T, N > &v) noexcept |
Gets the specified element of the given collection. | |
template<std::size_t I, std::size_t N, typename T > | |
constexpr auto & | get (Vector< T, N > &v) noexcept |
Gets the specified element of the given collection. | |
template<class T > | |
Angle | GetAngle (const Vector2< T > &value) |
Gets the angle. More... | |
NonNegativeFF< Area > | GetAreaOfCircle (Length radius) |
Gets the area of a circle. | |
NonNegativeFF< Area > | GetAreaOfPolygon (const Span< const Length2 > &vertices) |
Gets the area of a polygon. More... | |
constexpr BodyID | GetBodyA (const Contact &contact) noexcept |
Gets the body A ID of the given contact. | |
constexpr BodyID | GetBodyB (const Contact &contact) noexcept |
Gets the body B ID of the given contact. | |
std::string | GetBuildDetails () |
Gets the build details of the library. | |
template<typename T , typename U = decltype(Interval<T>{}, ((T{} + T{}) / 2))> | |
constexpr auto | GetCenter (const Interval< T > &v) noexcept(noexcept((v.GetMin()+v.GetMax())/2)) |
Gets the center of the given interval. More... | |
constexpr ChildCounter | GetChildIndexA (const Contact &contact) noexcept |
Gets the child index A of the given contact. | |
constexpr ChildCounter | GetChildIndexB (const Contact &contact) noexcept |
Gets the child index B of the given contact. | |
std::vector< Length2 > | GetCircleVertices (Length radius, std::size_t slices, Angle start=0_deg, Real turns=Real(1)) |
Gets the vertices for a circle described by the given parameters. | |
template<typename T , std::size_t N> | |
constexpr std::enable_if_t<!IsVectorV< T >, Vector< Vector< T, 1 >, N > > | GetColumnMatrix (Vector< T, N > arg) |
Gets the specified column of the given matrix as a column matrix. | |
constexpr ConstraintSolverConf | GetDefaultPositionSolverConf () noexcept |
Gets the default position solver configuration. | |
constexpr auto | GetDefaultToiConf () |
Gets the default time of impact configuration. | |
constexpr ConstraintSolverConf | GetDefaultToiPositionSolverConf () noexcept |
Gets the default TOI position solver configuration. | |
constexpr ContactFeature | GetFaceFaceContactFeature (ContactFeature::Index a, ContactFeature::Index b) noexcept |
Gets the face face contact feature for the given indices. | |
constexpr ContactFeature | GetFaceVertexContactFeature (ContactFeature::Index a, ContactFeature::Index b) noexcept |
Gets the face vertex contact feature for the given indices. | |
template<std::size_t N> | |
VertexCounter | GetFirstShapeVertexIdx (const detail::SeparationInfo< N > &info) noexcept |
Gets first shape vertex index. | |
constexpr auto | GetFriction (const Contact &contact) noexcept |
Gets the coefficient of friction. More... | |
template<class T > | |
constexpr auto | GetFwdPerpendicular (const Vector2< T > &vector) noexcept -> Vector2< T > |
Gets a vector clockwise (forward-clockwise) perpendicular to the given vector. More... | |
constexpr Angle | GetFwdRotationalAngle (const Angle &a1, const Angle &a2) noexcept |
Gets the forward/clockwise rotational angle to go from angle 1 to angle 2. More... | |
template<typename T > | |
constexpr std::enable_if_t< IsSquareMatrixV< T >, T > | GetIdentity () |
Gets the identity matrix of the template type and size as given by the argument. More... | |
template<typename T , std::size_t N> | |
constexpr std::enable_if_t<!IsVectorV< T >, Matrix< T, N, N > > | GetIdentityMatrix () |
Gets the identity matrix of the template type and size. More... | |
template<typename T > | |
constexpr Interval< T > | GetIntersection (Interval< T > a, const Interval< T > &b) noexcept |
Gets the intersecting interval of two given ranges. | |
constexpr auto | GetInverse22 (const Mat33 &value) noexcept -> Mat33 |
Gets the inverse of the given matrix as a 2-by-2. More... | |
template<typename T > | |
auto | GetMagnitude (const T &value) noexcept(noexcept(sqrt(GetMagnitudeSquared(value)))) -> decltype(sqrt(GetMagnitudeSquared(value))) |
Gets the magnitude of the given value. More... | |
template<typename T > | |
constexpr auto | GetMagnitudeSquared (const T &value) noexcept |
Gets the square of the magnitude of the given iterable value. More... | |
Length | GetMaxRegLinearCorrection (const StepConf &conf) noexcept |
Gets the maximum regular linear correction from the given value. | |
template<typename T > | |
constexpr auto | GetModuloNext (T value, const T count) noexcept -> decltype(++value,(value< count)? value:static_cast< T >(0), T()) |
Gets the modulo next value. More... | |
template<typename T > | |
constexpr auto | GetModuloPrev (const T value, const T count) noexcept -> decltype((value ? value :count) - static_cast< T >(1), T()) |
Gets the modulo previous value. More... | |
MovementConf | GetMovementConf (const StepConf &conf) noexcept |
Gets the movement configuration from the given value. More... | |
const char * | GetName (const TypeID &id) noexcept |
Gets the name associated with the given type ID. | |
constexpr const char * | GetName (ContactFeature::Type type) noexcept |
Gets the human readable name for the given contact feature type. | |
const char * | GetName (ToiOutput::State state) noexcept |
Gets a human readable name for the given output state. | |
Angle | GetNormalized (Angle value) noexcept |
Gets the "normalized" value of the given angle. More... | |
constexpr std::size_t | GetNumValidIndices (IndexPair3 pairs) noexcept |
Gets the number of valid indices in the given collection of index pairs. More... | |
constexpr auto | GetOtherBody (const Contact &c, BodyID bodyID) noexcept |
Gets the other body ID for the contact than the one given. | |
SecondMomentOfArea | GetPolarMoment (const Span< const Length2 > &vertices) |
Gets the polar moment of the area enclosed by the given vertices. More... | |
ConstraintSolverConf | GetRegConstraintSolverConf (const StepConf &conf) noexcept |
Gets the regular phase constraint solver configuration for the given step configuration. | |
constexpr auto | GetRestitution (const Contact &contact) noexcept |
Gets the coefficient of restitution. More... | |
template<class T > | |
constexpr auto | GetRevPerpendicular (const Vector2< T > &vector) noexcept -> Vector2< T > |
Gets a vector counter-clockwise (reverse-clockwise) perpendicular to the given vector. More... | |
constexpr Angle | GetRevRotationalAngle (const Angle &a1, const Angle &a2) noexcept |
Gets the reverse (counter) clockwise rotational angle to go from angle 1 to angle 2. More... | |
template<typename T , std::size_t N> | |
constexpr std::enable_if_t<!IsVectorV< T >, Vector< Vector< T, N >, 1 > > | GetRowMatrix (Vector< T, N > arg) |
Gets the specified row of the given matrix as a row matrix. | |
template<VertexCounter M, std::size_t N> | |
VertexCounter | GetSecondShapeVertexIdx (const detail::SeparationInfo< N > &info) noexcept |
Gets second shape vertex indices. | |
constexpr ShapeID | GetShapeA (const Contact &contact) noexcept |
Gets the shape A associated with the given contact. | |
constexpr ShapeID | GetShapeB (const Contact &contact) noexcept |
Gets the shape B associated with the given contact. | |
Angle | GetShortestDelta (Angle a0, Angle a1) noexcept |
Gets the shortest angular distance to go from angle 0 to angle 1. More... | |
template<typename T , typename U = decltype(Interval<T>{}, (T{} - T{}))> | |
constexpr auto | GetSize (const Interval< T > &v) noexcept(noexcept(v.GetMax() - v.GetMin())) |
Gets the size of the given interval. More... | |
constexpr auto | GetSymInverse33 (const Mat33 &value) noexcept -> Mat33 |
Gets the symmetric inverse of this matrix as a 3-by-3. More... | |
constexpr auto | GetTangentSpeed (const Contact &contact) noexcept |
Gets the desired tangent speed. More... | |
constexpr auto | GetToi (const Contact &contact) noexcept |
Gets the time of impact (TOI) as a fraction. More... | |
ToiConf | GetToiConf (const StepConf &conf) noexcept |
Gets the time of impact configuration for the given step configuration. | |
ConstraintSolverConf | GetToiConstraintSolverConf (const StepConf &conf) noexcept |
Gets the TOI phase constraint solver configuration for the given step configuration. | |
constexpr auto | GetToiCount (const Contact &contact) noexcept |
Gets the time of impact count. More... | |
template<typename T > | |
TypeID | GetTypeID () noexcept |
Gets the type ID for the function's template parameter type with its name demangled. | |
template<typename T > | |
TypeID | GetTypeID (const T &) noexcept |
Gets the type ID for the function parameter type with its name demangled. | |
template<typename T > | |
constexpr const char * | GetTypeName () noexcept |
Gets the name associated with the given template parameter type. | |
constexpr auto | GetVec2 (const Vector2< Real > &value) -> Vec2 |
Gets the given value as a 2-element vector of reals (Vec2 ). | |
template<class T > | |
constexpr auto | GetVec2 (const Vector2< T > &value) -> decltype(Vec2{static_cast< Real >(get< 0 >(value).value()), static_cast< Real >(get< 1 >(value).value())}) |
Gets value as 2-element vector of reals for any type having value() member function. | |
Version | GetVersion () noexcept |
Gets the version information of the library. | |
constexpr ContactFeature | GetVertexFaceContactFeature (ContactFeature::Index a, ContactFeature::Index b) noexcept |
Gets the vertex face contact feature for the given indices. | |
constexpr ContactFeature | GetVertexVertexContactFeature (ContactFeature::Index a, ContactFeature::Index b) noexcept |
Gets the vertex vertex contact feature for the given indices. | |
template<typename T , std::size_t N> | |
constexpr auto | GetX (const Vector< T, N > &value) -> decltype(get< 0 >(value)) |
Gets the "X" element of the given value - i.e. the first element. | |
template<typename T , std::size_t N> | |
constexpr auto | GetX (Vector< T, N > &value) -> decltype(get< 0 >(value)) |
Gets the "X" element of the given value - i.e. the first element. | |
template<typename T , std::size_t N> | |
constexpr auto | GetY (const Vector< T, N > &value) -> decltype(get< 1 >(value)) |
Gets the "Y" element of the given value - i.e. the second element. | |
template<typename T , std::size_t N> | |
constexpr auto | GetY (Vector< T, N > &value) -> decltype(get< 1 >(value)) |
Gets the "Y" element of the given value - i.e. the second element. | |
template<typename T , std::size_t N> | |
constexpr auto | GetZ (const Vector< T, N > &value) -> decltype(get< 2 >(value)) |
Gets the "Z" element of the given value - i.e. the third element. | |
template<typename T , std::size_t N> | |
constexpr auto | GetZ (Vector< T, N > &value) -> decltype(get< 2 >(value)) |
Gets the "Z" element of the given value - i.e. the third element. | |
constexpr auto | HasValidToi (const Contact &contact) noexcept |
Gets whether a TOI is set. More... | |
constexpr Vec2 | InverseTransform (const Vec2 &v, const Mat22 &A) noexcept |
template<class IN_TYPE > | |
constexpr auto | Invert (const Matrix22< IN_TYPE > &value) noexcept |
Inverts the given value. | |
bool | IsAccelerable (BodyType type) |
Is "accelerable". More... | |
constexpr auto | IsDestroyed (const Contact &c) noexcept -> bool |
Whether or not the given contact was destroyed. More... | |
constexpr bool | IsEnabled (const Contact &contact) noexcept |
Gets whether the given contact is enabled or not. | |
template<typename T > | |
constexpr bool | IsEntirelyAfter (const Interval< T > &a, const Interval< T > &b) |
Determines whether the first range is entirely after the second range. | |
template<typename T > | |
constexpr bool | IsEntirelyBefore (const Interval< T > &a, const Interval< T > &b) |
Determines whether the first range is entirely before the second range. | |
template<typename T > | |
constexpr bool | IsEntirelyEnclosing (const Interval< T > &a, const Interval< T > &b) |
Determines whether the first range entirely encloses the second. | |
constexpr bool | IsFor (const Contact &c, BodyID bodyID, ShapeID shapeID) noexcept |
Is-for convenience function. More... | |
constexpr bool | IsFor (const Contact &c, ShapeID shapeID) noexcept |
Is-for convenience function. More... | |
constexpr bool | IsFor (const Contactable &c, BodyID bodyID, ShapeID shapeID) noexcept |
Is-for convenience function. More... | |
bool | IsFullOfBodies (const Island &island) |
Determines whether the given island is full of bodies. | |
bool | IsFullOfContacts (const Island &island) |
Determines whether the given island is full of contacts. | |
constexpr bool | IsImpenetrable (const Contact &contact) noexcept |
Whether the given contact is "impenetrable". More... | |
template<typename T , typename U = decltype(Interval<T>{}, T{} < T{}, T{} >= T{})> | |
constexpr bool | IsIntersecting (const Interval< T > &a, const Interval< T > &b) noexcept(noexcept(T{}< T{}) &&noexcept(T{} >=T{})) |
Checks whether two value ranges have any intersection/overlap at all. More... | |
bool | IsMaxTranslationWithinTolerance (const StepConf &conf) noexcept |
Determines whether the maximum translation is within tolerance. | |
template<typename T > | |
constexpr auto | IsOdd (const T &val) -> decltype((val % 2) !=T{}) |
Is-odd. More... | |
template<typename T > | |
constexpr auto | IsPowerOfTwo (const T &n) -> decltype(n &&!(n &(n - 1))) |
Reports whether or not the given value is a power of two. | |
constexpr bool | IsSensor (const Contact &contact) noexcept |
Gets whether the given contact is for sensors or not. | |
bool | IsSpeedable (BodyType type) |
Is "speedable". More... | |
constexpr bool | IsTouching (const Contact &contact) noexcept |
Gets whether the given contact is touching or not. | |
constexpr auto | IsValid (const BodyID &value) noexcept -> bool |
Determines validity of given value by comparing against playrho::InvalidBodyID . More... | |
constexpr auto | IsValid (const ContactID &value) noexcept -> bool |
Determines validity of given value by comparing against playrho::InvalidContactID . More... | |
constexpr auto | IsValid (const d2::Acceleration &value) noexcept -> bool |
Determines if the given value is valid. | |
constexpr auto | IsValid (const d2::Manifold &value) noexcept -> bool |
Gets whether the given manifold is valid. | |
constexpr auto | IsValid (const d2::Position &value) noexcept -> bool |
Determines if the given value is valid. | |
constexpr auto | IsValid (const d2::Sweep &value) noexcept -> bool |
Determines if the given value is valid. | |
constexpr auto | IsValid (const d2::Transformation &value) noexcept -> bool |
Determines if the given value is valid. | |
constexpr auto | IsValid (const d2::UnitVec &value) noexcept -> bool |
Determines if the given value is valid. | |
constexpr auto | IsValid (const d2::Velocity &value) noexcept -> bool |
Determines if the given value is valid. | |
constexpr auto | IsValid (const JointID &value) noexcept -> bool |
Determines validity of given value by comparing against playrho::InvalidJointID . More... | |
constexpr auto | IsValid (const Mat22 &value) noexcept -> bool |
Determines if the given value is valid. More... | |
constexpr auto | IsValid (const ShapeID &value) noexcept -> bool |
Determines validity of given value by comparing against playrho::InvalidShapeID . More... | |
template<typename T > | |
constexpr auto | IsValid (const T &value) noexcept -> bool |
Determines if the given value is valid, using the equality operator. More... | |
template<typename TYPE > | |
constexpr auto | IsValid (const Vector2< TYPE > &value) noexcept -> bool |
Determines whether the given vector contains finite coordinates. | |
constexpr auto | IsValid (std::size_t value) noexcept -> bool |
Determines if the given value is valid. | |
template<typename T > | |
constexpr auto | MakeUnsigned (const T &arg) noexcept -> std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T >> |
Makes the given value into an unsigned value. More... | |
constexpr auto | max_size (IndexPair3 pairs) -> decltype(pairs.max_size()) |
Gets the maximum size of the given container of index pairs. More... | |
auto | MixFriction (NonNegativeFF< Real > friction1, NonNegativeFF< Real > friction2) |
Mixes friction. More... | |
auto | MixRestitution (Real restitution1, Real restitution2) noexcept |
Mixes restitution. More... | |
template<typename T > | |
auto | ModuloViaFmod (T dividend, T divisor) |
Modulo operation using std::fmod . More... | |
template<typename T > | |
auto | ModuloViaTrunc (T dividend, T divisor) noexcept |
Modulo operation using std::trunc . More... | |
constexpr Mat22 | MulT (const Mat22 &A, const Mat22 &B) noexcept |
Computes A^T * B. | |
constexpr auto | NeedsFiltering (const Contact &contact) noexcept |
Whether or not the contact needs filtering. | |
constexpr auto | NeedsUpdating (const Contact &contact) noexcept |
Whether or not the contact needs updating. | |
template<typename T > | |
constexpr auto | NextPowerOfTwo (T x) -> decltype((x|(x >> 1u)), T(++x)) |
Gets the next largest power of 2. More... | |
Real | Normalize (Vec2 &vector) |
Converts the given vector into a unit vector and returns its original length. | |
template<typename T , std::size_t LhsSize, std::size_t RhsSize> | |
constexpr auto | operator!= (const ArrayList< T, LhsSize > &lhs, const ArrayList< T, RhsSize > &rhs) noexcept |
Inequality operator support. | |
bool | operator!= (const BlockAllocator &a, const BlockAllocator &b) |
BlockAllocator inequality operator. | |
constexpr bool | operator!= (const Contact &lhs, const Contact &rhs) noexcept |
Operator not-equals. | |
constexpr bool | operator!= (const Contactable &lhs, const Contactable &rhs) noexcept |
Inequality operator. | |
constexpr bool | operator!= (const ContactKey &lhs, const ContactKey &rhs) noexcept |
Inequality operator. | |
constexpr bool | operator!= (const Filter lhs, const Filter rhs) noexcept |
Inequality operator. | |
template<typename T > | |
constexpr bool | operator!= (const Interval< T > &a, const Interval< T > &b) noexcept |
Inequality operator. More... | |
constexpr auto | operator!= (const PreStepStats &lhs, const PreStepStats &rhs) -> bool |
Operator not-equal support. | |
constexpr auto | operator!= (const RegStepStats &lhs, const RegStepStats &rhs) -> bool |
Operator not-equal support. | |
template<typename T > | |
constexpr auto | operator!= (const Span< T > &lhs, const Span< T > &rhs) noexcept |
Inequality operator support. | |
constexpr auto | operator!= (const ToiStepStats &lhs, const ToiStepStats &rhs) -> bool |
Operator not-equal support. | |
template<typename T , std::size_t N> | |
constexpr bool | operator!= (const Vector< T, N > &lhs, const Vector< T, N > &rhs) noexcept |
Inequality operator. | |
constexpr auto | operator!= (const Version &lhs, const Version &rhs) noexcept |
Inequality operator. | |
constexpr bool | operator!= (ContactFeature lhs, ContactFeature rhs) noexcept |
Determines if the given two contact features are not equal. | |
constexpr Length | operator""_cm (long double v) noexcept |
SI unit symbol for a centimeter of Length. More... | |
constexpr Length | operator""_cm (unsigned long long int v) noexcept |
SI unit symbol for a centimeter of Length. More... | |
constexpr Time | operator""_d (long double v) noexcept |
Symbol for a day unit of Time. More... | |
constexpr Time | operator""_d (unsigned long long int v) noexcept |
Symbol for a day unit of Time. More... | |
constexpr Angle | operator""_deg (long double v) noexcept |
Abbreviation for a degree unit of Angle. More... | |
constexpr Angle | operator""_deg (unsigned long long int v) noexcept |
Abbreviation for a degree unit of Angle. More... | |
constexpr Length | operator""_dm (long double v) noexcept |
SI unit symbol for a decimeter of Length. More... | |
constexpr Length | operator""_dm (unsigned long long int v) noexcept |
SI unit symbol for a decimeter of Length. More... | |
constexpr Mass | operator""_g (long double v) noexcept |
SI unit symbol for a gram unit of Mass. More... | |
constexpr Mass | operator""_g (unsigned long long int v) noexcept |
SI unit symbol for a gram unit of Mass. More... | |
constexpr Length | operator""_Gm (long double v) noexcept |
SI unit symbol for a gigameter unit of Length. More... | |
constexpr Length | operator""_Gm (unsigned long long int v) noexcept |
SI unit symbol for a gigameter unit of Length. More... | |
constexpr Time | operator""_h (long double v) noexcept |
Symbol for an hour unit of Time. More... | |
constexpr Time | operator""_h (unsigned long long int v) noexcept |
Symbol for an hour unit of Time. More... | |
constexpr Frequency | operator""_Hz (long double v) noexcept |
SI symbol for a hertz unit of Frequency. More... | |
constexpr Frequency | operator""_Hz (unsigned long long int v) noexcept |
SI symbol for a hertz unit of Frequency. More... | |
constexpr Mass | operator""_kg (long double v) noexcept |
SI unit symbol for a kilogram unit of Mass. More... | |
constexpr Mass | operator""_kg (unsigned long long int v) noexcept |
SI unit symbol for a kilogram unit of Mass. More... | |
constexpr AreaDensity | operator""_kgpm2 (long double v) noexcept |
Abbreviation for kilogram per square meter. | |
constexpr AreaDensity | operator""_kgpm2 (unsigned long long int v) noexcept |
Abbreviation for kilogram per square meter. | |
constexpr Length | operator""_km (long double v) noexcept |
SI symbol for a kilometer unit of Length. More... | |
constexpr Length | operator""_km (unsigned long long int v) noexcept |
SI symbol for a kilometer unit of Length. More... | |
constexpr LinearVelocity | operator""_kps (long double v) noexcept |
Abbreviation for kilometer per second. More... | |
constexpr LinearVelocity | operator""_kps (unsigned long long int v) noexcept |
Abbreviation for kilometer per second. More... | |
constexpr Length | operator""_m (long double v) noexcept |
SI unit symbol for a meter of Length. More... | |
constexpr Length | operator""_m (unsigned long long int v) noexcept |
SI unit symbol for a meter of Length. More... | |
constexpr Area | operator""_m2 (long double v) noexcept |
Abbreviation for meter squared unit of Area. More... | |
constexpr Area | operator""_m2 (unsigned long long int v) noexcept |
Abbreviation for meter squared unit of Area. More... | |
constexpr Time | operator""_min (long double v) noexcept |
SI symbol for a minute unit of Time. More... | |
constexpr Time | operator""_min (unsigned long long int v) noexcept |
SI symbol for a minute unit of Time. More... | |
constexpr Length | operator""_Mm (long double v) noexcept |
SI unit symbol for a megameter unit of Length. More... | |
constexpr Length | operator""_Mm (unsigned long long int v) noexcept |
SI unit symbol for a megameter unit of Length. More... | |
constexpr LinearVelocity | operator""_mps (long double v) noexcept |
Abbreviation for meter per second. More... | |
constexpr LinearVelocity | operator""_mps (unsigned long long int v) noexcept |
Abbreviation for meter per second. More... | |
constexpr LinearAcceleration | operator""_mps2 (long double v) noexcept |
Abbreviation for meter per second squared. More... | |
constexpr LinearAcceleration | operator""_mps2 (unsigned long long int v) noexcept |
Abbreviation for meter per second squared. More... | |
constexpr Force | operator""_N (long double v) noexcept |
SI symbol for a newton unit of Force. More... | |
constexpr Force | operator""_N (unsigned long long int v) noexcept |
SI symbol for a newton unit of Force. More... | |
constexpr Torque | operator""_Nm (long double v) noexcept |
Abbreviation for newton-meter unit of torque. More... | |
constexpr Torque | operator""_Nm (unsigned long long int v) noexcept |
Abbreviation for newton-meter unit of torque. More... | |
constexpr Momentum | operator""_Ns (long double v) noexcept |
SI symbol for a newton second of impulse. More... | |
constexpr Momentum | operator""_Ns (unsigned long long int v) noexcept |
SI symbol for a newton second of impulse. More... | |
constexpr Mass | operator""_Pg (long double v) noexcept |
SI unit symbol for a petagram unit of Mass. More... | |
constexpr Mass | operator""_Pg (unsigned long long int v) noexcept |
SI unit symbol for a petagram unit of Mass. More... | |
constexpr Angle | operator""_rad (long double v) noexcept |
SI symbol for a radian unit of Angle. More... | |
constexpr Angle | operator""_rad (unsigned long long int v) noexcept |
SI symbol for a radian unit of Angle. More... | |
constexpr AngularVelocity | operator""_rpm (long double v) noexcept |
Abbreviation for revolutions per minute. More... | |
constexpr AngularVelocity | operator""_rpm (unsigned long long int v) noexcept |
Abbreviation for revolutions per minute. More... | |
constexpr Time | operator""_s (long double v) noexcept |
SI symbol for a second unit of Time. More... | |
constexpr Time | operator""_s (unsigned long long int v) noexcept |
SI symbol for a second unit of Time. More... | |
constexpr Mass | operator""_Yg (long double v) noexcept |
SI unit symbol for a yottagram unit of Mass. More... | |
constexpr Mass | operator""_Yg (unsigned long long int v) noexcept |
SI unit symbol for a yottagram unit of Mass. More... | |
template<std::size_t N, typename T1 , typename T2 , typename OT = decltype(T1{} * T2{})> | |
constexpr std::enable_if_t< IsMultipliableV< T1, T2 > &&!IsVectorV< T1 >, Vector< OT, N > > | operator* (const T1 &s, const Vector< T2, N > &a) noexcept |
Multiplication operator for non-vector times vector. More... | |
template<typename T1 , typename T2 , std::size_t A, std::size_t B, typename OT = decltype(T1{} * T2{})> | |
constexpr std::enable_if_t< IsMultipliableV< T1, T2 > &&!IsVectorV< T1 >, Vector< OT, B > > | operator* (const Vector< T1, A > &lhs, const Vector< Vector< T2, B >, A > &rhs) noexcept |
Multiplies an A-element vector by a A-by-B vector of vectors. More... | |
template<std::size_t N, typename T1 , typename T2 , typename OT = decltype(T1{} * T2{})> | |
constexpr std::enable_if_t< IsMultipliableV< T1, T2 > &&!IsVectorV< T2 >, Vector< OT, N > > | operator* (const Vector< T1, N > &a, const T2 &s) noexcept |
Multiplication operator for vector times non-vector. More... | |
template<typename T1 , typename T2 , std::size_t A, std::size_t B, typename OT = decltype(T1{} * T2{})> | |
constexpr std::enable_if_t< IsMultipliableV< T1, T2 > &&!IsVectorV< T2 >, Vector< OT, B > > | operator* (const Vector< Vector< T1, A >, B > &lhs, const Vector< T2, A > &rhs) noexcept |
Multiplies a B-by-A vector of vectors by an A-element vector. More... | |
template<typename T1 , typename T2 , std::size_t A, std::size_t B, std::size_t C, typename OT = decltype(T1{} * T2{})> | |
constexpr std::enable_if_t< IsMultipliableV< T1, T2 >, Vector< Vector< OT, C >, A > > | operator* (const Vector< Vector< T1, B >, A > &lhs, const Vector< Vector< T2, C >, B > &rhs) noexcept |
Calculates the matrix product of the two given vector of vectors (matrices). More... | |
template<typename T1 , typename T2 , std::size_t N> | |
constexpr std::enable_if_t< std::is_same_v< T1, decltype(T1{} *T2{})>, Vector< T1, N > & > | operator*= (Vector< T1, N > &lhs, const T2 rhs) noexcept |
Multiplication assignment operator. | |
template<typename T , std::size_t M, std::size_t N> | |
constexpr auto | operator+ (const Matrix< T, M, N > &lhs, const Matrix< T, M, N > &rhs) noexcept |
Matrix addition operator for two same-type, same-sized matrices. More... | |
template<typename T , std::size_t N> | |
constexpr std::enable_if_t< std::is_same_v< T, decltype(T{}+T{})>, Vector< T, N > > | operator+ (Vector< T, N > lhs, const Vector< T, N > rhs) noexcept |
Adds two vectors component-wise. | |
template<typename T , std::size_t N> | |
constexpr std::enable_if_t< std::is_same_v< T, decltype(+T{})>, Vector< T, N > > | operator+ (Vector< T, N > v) noexcept |
Unary plus operator. | |
template<typename T , std::size_t S> | |
constexpr ArrayList< T, S > & | operator+= (ArrayList< T, S > &lhs, T rhs) |
Appends the given value onto back. More... | |
template<typename T , std::size_t S, class U > | |
constexpr auto | operator+= (ArrayList< T, S > &lhs, U &&rhs) -> decltype(rhs.begin(), rhs.end(), rhs.size(), lhs) |
Appends the given values onto back. More... | |
template<typename T , std::size_t N> | |
constexpr std::enable_if_t< std::is_same_v< T, decltype(T{}+T{})>, Vector< T, N > & > | operator+= (Vector< T, N > &lhs, const Vector< T, N > rhs) noexcept |
Increments the left hand side value by the right hand side value. | |
template<typename T , std::size_t M, std::size_t N> | |
constexpr auto | operator- (const Matrix< T, M, N > &lhs, const Matrix< T, M, N > &rhs) noexcept |
Matrix subtraction operator for two same-type, same-sized matrices. More... | |
template<typename T , std::size_t N> | |
constexpr std::enable_if_t< std::is_same_v< T, decltype(T{} - T{})>, Vector< T, N > > | operator- (Vector< T, N > lhs, const Vector< T, N > rhs) noexcept |
Subtracts two vectors component-wise. | |
template<typename T , std::size_t N> | |
constexpr std::enable_if_t< std::is_same_v< T, decltype(-T{})>, Vector< T, N > > | operator- (Vector< T, N > v) noexcept |
Unary negation operator. | |
template<typename T , std::size_t N> | |
constexpr std::enable_if_t< std::is_same_v< T, decltype(T{} - T{})>, Vector< T, N > & > | operator-= (Vector< T, N > &lhs, const Vector< T, N > rhs) noexcept |
Decrements the left hand side value by the right hand side value. | |
template<std::size_t N, typename T1 , typename T2 , typename OT = decltype(T1{} / T2{})> | |
constexpr std::enable_if_t< IsDivisableV< T1, T2 > &&!IsVectorV< T2 >, Vector< OT, N > > | operator/ (const Vector< T1, N > &a, const T2 &s) noexcept |
Division operator. | |
template<typename T1 , typename T2 , std::size_t N> | |
constexpr std::enable_if_t< std::is_same_v< T1, decltype(T1{}/T2{})>, Vector< T1, N > & > | operator/= (Vector< T1, N > &lhs, const T2 rhs) noexcept |
Division assignment operator. | |
constexpr bool | operator< (const Contactable &lhs, const Contactable &rhs) noexcept |
Less-than operator. | |
constexpr bool | operator< (const ContactKey &lhs, const ContactKey &rhs) noexcept |
Less-than operator. | |
template<typename T > | |
constexpr bool | operator< (const Interval< T > &lhs, const Interval< T > &rhs) noexcept |
Less-than operator. More... | |
template<std::size_t N0, class T0 , std::size_t N1, class T1 > | |
constexpr bool | operator< (const Vector< T0, N0 > &lhs, const Vector< T1, N1 > &rhs) noexcept |
Less than operator. More... | |
constexpr auto | operator< (const Version &lhs, const Version &rhs) noexcept |
Less-than operator. | |
inline ::std::ostream & | operator<< (::std::ostream &os, const ContactFeature &value) |
Stream output operator. | |
template<typename T > | |
::std::ostream & | operator<< (::std::ostream &os, const Interval< T > &value) |
Output stream operator. | |
template<typename T , std::size_t N> | |
::std::ostream & | operator<< (::std::ostream &os, const Vector< T, N > &value) |
Output stream operator. | |
auto | operator<< (std::ostream &os, const Contactable &c) -> std::ostream & |
Output stream operator support. | |
constexpr bool | operator<= (const ContactKey &lhs, const ContactKey &rhs) noexcept |
Less-than or equal-to operator. | |
template<typename T > | |
constexpr bool | operator<= (const Interval< T > &lhs, const Interval< T > &rhs) noexcept |
Less-than or equal-to operator. More... | |
constexpr auto | operator<= (const Version &lhs, const Version &rhs) noexcept |
Less-than or equal-to operator. | |
template<typename T , std::size_t LhsSize, std::size_t RhsSize> | |
constexpr auto | operator== (const ArrayList< T, LhsSize > &lhs, const ArrayList< T, RhsSize > &rhs) noexcept |
Equality operator support. | |
bool | operator== (const BlockAllocator &a, const BlockAllocator &b) |
BlockAllocator equality operator. | |
constexpr bool | operator== (const Contact &lhs, const Contact &rhs) noexcept |
Operator equals. | |
constexpr bool | operator== (const Contactable &lhs, const Contactable &rhs) noexcept |
Equality operator. | |
constexpr bool | operator== (const ContactKey &lhs, const ContactKey &rhs) noexcept |
Equality operator. | |
constexpr bool | operator== (const Filter lhs, const Filter rhs) noexcept |
Equality operator. | |
template<typename T > | |
constexpr bool | operator== (const Interval< T > &a, const Interval< T > &b) noexcept |
Equality operator. More... | |
constexpr auto | operator== (const PreStepStats &lhs, const PreStepStats &rhs) -> bool |
Operator equal support. | |
constexpr auto | operator== (const RegStepStats &lhs, const RegStepStats &rhs) -> bool |
Operator equal support. | |
template<typename T > | |
constexpr auto | operator== (const Span< T > &lhs, const Span< T > &rhs) noexcept |
Equality operator support. | |
constexpr auto | operator== (const ToiStepStats &lhs, const ToiStepStats &rhs) -> bool |
Operator equal support. | |
template<typename T , std::size_t N> | |
constexpr bool | operator== (const Vector< T, N > &lhs, const Vector< T, N > &rhs) noexcept |
Equality operator. | |
constexpr auto | operator== (const Version &lhs, const Version &rhs) noexcept |
Equality operator. | |
constexpr bool | operator== (ContactFeature lhs, ContactFeature rhs) noexcept |
Determines if the given two contact features are equal. | |
constexpr bool | operator> (const ContactKey &lhs, const ContactKey &rhs) noexcept |
Greater-than operator. | |
template<typename T > | |
constexpr bool | operator> (const Interval< T > &lhs, const Interval< T > &rhs) noexcept |
Greater-than operator. More... | |
constexpr auto | operator> (const Version &lhs, const Version &rhs) noexcept |
Greater-than operator. | |
constexpr bool | operator>= (const ContactKey &lhs, const ContactKey &rhs) noexcept |
Greater-than or equal-to operator. | |
template<typename T > | |
constexpr bool | operator>= (const Interval< T > &lhs, const Interval< T > &rhs) noexcept |
Greater-than or equal-to operator. More... | |
constexpr auto | operator>= (const Version &lhs, const Version &rhs) noexcept |
Greater-than or equal-to operator. | |
void * | Realloc (void *ptr, std::size_t size) |
Reallocates memory. More... | |
template<typename T > | |
T * | ReallocArray (T *ptr, std::size_t count) |
Reallocates memory for an array. More... | |
void | Reserve (Island &island, BodyCounter bodies, ContactCounter contacts, JointCounter joints) |
Reserves space ahead of time. | |
template<typename T > | |
std::enable_if_t< IsReverseIterableV< T >, ReversionWrapper< T > > | Reverse (T &&iterable) |
Gets a reversed order iterated wrapper. More... | |
template<typename T > | |
auto | RoundOff (const T &value, unsigned precision=DefaultRoundOffPrecission) -> decltype(round(value *static_cast< T >(precision))/static_cast< T >(precision)) |
Computes the rounded value of the given value. | |
auto | RoundOff (const Vec2 &value, std::uint32_t precision=DefaultRoundOffPrecission) -> Vec2 |
Computes the rounded value of the given value. More... | |
template<typename T , typename U > | |
constexpr auto | Secant (const T &target, const U &a1, const T &s1, const U &a2, const T &s2) -> decltype(a1+(target - s1) *(a2 - a1)/(s2 - s1)) |
Secant method. More... | |
constexpr void | SetDestroyed (Contact &c) noexcept |
Sets the destroyed property of the given contact. More... | |
constexpr void | SetEnabled (Contact &contact) noexcept |
Enables the contact. More... | |
constexpr void | SetFriction (Contact &contact, NonNegative< Real > value) noexcept |
Sets the friction value for the identified contact. More... | |
constexpr void | SetImpenetrable (Contact &contact) noexcept |
Sets the impenetrability of the given contact. More... | |
constexpr void | SetRestitution (Contact &contact, Real value) |
Sets the restitution value for the identified contact. More... | |
constexpr void | SetSensor (Contact &contact) noexcept |
Sets the sensor state of the given contact. More... | |
constexpr void | SetTangentSpeed (Contact &contact, LinearVelocity value) noexcept |
Sets the desired tangent speed for a conveyor belt behavior. More... | |
constexpr void | SetToi (Contact &contact, const std::optional< UnitIntervalFF< Real >> &toi) noexcept |
Sets the time of impact (TOI). More... | |
constexpr void | SetToiCount (Contact &contact, Contact::substep_type value) noexcept |
Sets the TOI count to the given value. More... | |
bool | ShouldCollide (const Filter filterA, const Filter filterB) noexcept |
Determines whether collision processing should be performed. | |
constexpr auto | size (IndexPair3 pairs) -> decltype(GetNumValidIndices(pairs)) |
Gets the dynamic size of the given collection of index pairs. More... | |
template<typename T , typename U > | |
constexpr auto | Solve (const Matrix22< U > &mat, const Vector2< T > &b) noexcept |
Solves A * x = b, where b is a column vector. More... | |
template<typename T > | |
constexpr auto | Solve22 (const Mat33 &mat, const Vector2< T > &b) noexcept -> Vector2< T > |
Solves A * x = b, where b is a column vector. More... | |
template<typename T > | |
constexpr auto | Solve33 (const Mat33 &mat, const Vector3< T > &b) noexcept -> Vector3< T > |
Solves A * x = b, where b is a column vector. More... | |
void | Sort (Island &island) noexcept |
Sorts the island containers. | |
template<class T > | |
constexpr auto | Square (T t) noexcept(noexcept(t *t)) -> decltype(t *t) |
Squares the given value. | |
template<class T > | |
constexpr auto | StripUnit (const T &value) -> std::enable_if_t< IsArithmeticV< T > &&!detail::is_detected_v< detail::get_member_type, T >, T > |
Strips the units off of the given value. More... | |
template<typename T > | |
constexpr auto | to_underlying (T value) noexcept -> underlying_type_t< T > |
template<class T > | |
constexpr auto | ToSigned (const T &value) -> decltype(static_cast< std::make_signed_t< T >>(value)) |
Converts the given value to its closest signed equivalent. | |
const char * | ToString (LimitState val) noexcept |
Provides a human readable C-style string uniquely identifying the given limit state. | |
constexpr Vec2 | Transform (const Vec2 &v, const Mat33 &A) noexcept |
Multiplies a vector by a matrix. | |
template<std::size_t M, typename T1 , std::size_t N, typename T2 > | |
constexpr auto | Transform (const Vector< T1, M > &v, const Matrix< T2, M, N > &m) noexcept |
Multiplies an M-element vector by an M-by-N matrix. More... | |
constexpr void | UnflagForFiltering (Contact &contact) noexcept |
Unflags this contact for filtering. More... | |
constexpr void | UnflagForUpdating (Contact &contact) noexcept |
Unflags this contact for updating. More... | |
constexpr void | UnsetDestroyed (Contact &c) noexcept |
Unsets the destroyed property of the given contact. More... | |
constexpr void | UnsetEnabled (Contact &contact) noexcept |
Disables the identified contact. More... | |
constexpr void | UnsetImpenetrable (Contact &contact) noexcept |
Unsets the impenetrability of the given contact. More... | |
constexpr void | UnsetSensor (Contact &contact) noexcept |
Unsets the sensor state of the given contact. More... | |
RegStepStats & | Update (RegStepStats &lhs, const IslandStats &rhs) noexcept |
Updates regular-phase per-step statistics with island statistics. | |
template<typename T > | |
ObjectPool< T >::size_type | used (const ObjectPool< T > &array) noexcept |
Gets the number of elements that are used in the specified structure. More... | |
Variables | |
constexpr auto | BigG = static_cast<Real>(6.67408e-11f) * CubicMeter / (Kilogram * SquareSecond) |
Big "G". More... | |
constexpr auto | Centi = Real(1e-2) |
Centi- (1 x 10^-2). More... | |
constexpr auto | CubicMeter = Meter * Meter * Meter |
Cubic meter unit of volume. | |
constexpr auto | Deci = Real(1e-1) |
Deci- (1 x 10^-1). More... | |
constexpr auto | DefaultAabbExtension = DefaultLinearSlop * Real(20) |
Default AABB extension amount. | |
constexpr auto | DefaultAngularSleepTolerance = Real((Pi * 2) / 180) * RadianPerSecond |
Default angular sleep tolerance. More... | |
constexpr auto | DefaultAngularSlop = (Pi * 2_rad) / Real(180) |
Default angular slop. More... | |
constexpr auto | DefaultCirclesRatio = Real(10) |
Default circles ratio. More... | |
constexpr auto | DefaultDistanceMultiplier = Real(2) |
Default distance multiplier. | |
constexpr auto | DefaultLinearSleepTolerance = 0.01_mps |
Default linear sleep tolerance. More... | |
constexpr auto | DefaultLinearSlop = 0.005_m |
Default linear slop. More... | |
constexpr auto | DefaultMaxAngularCorrection = Real(8.0f / 180.0f) * Pi * 1_rad |
Default maximum angular correction. More... | |
constexpr auto | DefaultMaxDistanceIters = std::uint8_t{20} |
Default max number of distance iterations. | |
constexpr auto | DefaultMaxLinearCorrection = 0.2_m |
Default maximum linear correction. More... | |
constexpr auto | DefaultMaxRotation = Angle{179_deg} |
Default maximum rotation per world step. More... | |
constexpr auto | DefaultMaxSubSteps = std::uint8_t{8} |
Default maximum number of sub steps. More... | |
constexpr auto | DefaultMaxToiIters = std::uint8_t{20} |
Default maximum time of impact iterations. | |
constexpr auto | DefaultMaxToiRootIters = std::uint8_t{30} |
Default maximum time of impact root iterator count. | |
constexpr auto | DefaultMaxTranslation = 2_m |
Default maximum translation amount. More... | |
constexpr auto | DefaultMaxVertexRadius = 255_m |
Default maximum vertex radius. More... | |
constexpr auto | DefaultMinStillTimeToSleep = Time{1_s / 2} |
Default minimum still time to sleep. More... | |
constexpr auto | DefaultMinVertexRadius = 0.01_m |
Default minimum vertex radius. More... | |
constexpr auto | DefaultRegMinMomentum = Momentum{0_Ns / 100} |
Default regular-phase minimum momentum. More... | |
constexpr auto | DefaultRoundOffPrecission = unsigned{100000} |
Default round-off precision. | |
constexpr auto | DefaultStepFrequency = 60_Hz |
Default step frequency. More... | |
constexpr auto | DefaultStepTime = Time{1_s / 60} |
Default step time. More... | |
constexpr auto | DefaultToiMinMomentum = Momentum{0_Ns / 100} |
Default TOI-phase minimum momentum. More... | |
constexpr auto | DefaultVelocityThreshold = 1_mps |
Default velocity threshold. | |
constexpr auto | Degree = Angle{Radian * Pi / Real{180}} |
Degree unit of angle quantity. More... | |
constexpr auto | DegreePerSecond = AngularVelocity{RadianPerSecond * Degree / Radian} |
Degree per second unit of angular velocity. More... | |
constexpr auto | DegreePerSquareSecond = Degree / (Second * Second) |
Degree per square second unit of angular acceleration. More... | |
constexpr auto | EarthlyLinearAcceleration = static_cast<Real>(-9.8f) * MeterPerSquareSecond |
Earthly gravity. More... | |
constexpr auto | Giga = Real(1e9) |
Giga- (1 x 10^9). More... | |
constexpr auto | Hertz = Frequency(detail::hertz) |
Hertz unit of Frequency. More... | |
template<class T , std::enable_if_t< std::numeric_limits< T >::has_signaling_NaN||std::numeric_limits< T >::has_quiet_NaN, int > = 0> | |
constexpr auto | Invalid |
Invalid value of the template's instantiated numeric type. More... | |
constexpr auto | InvalidBodyID = BodyID{static_cast<BodyID::underlying_type>(-1)} |
Invalid body ID value. More... | |
constexpr auto | InvalidContactID = ContactID{static_cast<ContactID::underlying_type>(-1)} |
Invalid contact ID value. More... | |
constexpr auto | InvalidIndexPair |
Invalid index-pair value. More... | |
constexpr auto | InvalidJointID = JointID{static_cast<JointID::underlying_type>(-1)} |
Invalid joint ID value. More... | |
constexpr auto | InvalidLength2 = Length2{Invalid<Length>, Invalid<Length>} |
Invalid Length2 constant. | |
constexpr auto | InvalidShapeID = ShapeID{static_cast<ShapeID::underlying_type>(-1)} |
Invalid shape ID value. More... | |
constexpr auto | InvalidVertex = static_cast<VertexCounter>(-1) |
Invalid vertex index. More... | |
template<class T1 , class T2 = T1> | |
constexpr bool | IsAddableV = detail::IsAddable<T1, T2>::value |
Determines whether the given type is an addable type. | |
template<class T > | |
constexpr bool | IsArithmeticV = detail::IsArithmetic<T>::value |
Determines whether the given type is an arithmetic type. | |
template<class T1 , class T2 = T1> | |
constexpr bool | IsDivisableV = detail::IsDivisable<T1, T2>::value |
Determines whether the given type is a divisible type. | |
template<class T1 , class T2 = T1> | |
constexpr bool | IsEqualityComparableV = detail::IsEqualityComparable<T1, T2>::value |
Determines whether the given types are equality comparable. | |
template<class T1 , class T2 = T1> | |
constexpr bool | IsInequalityComparableV = detail::IsInequalityComparable<T1, T2>::value |
Determines whether the given types are inequality comparable. | |
template<class T > | |
constexpr bool | IsIterableV = detail::IsIterable<T>::value |
Determines whether the given type is an iterable type. | |
template<class T > | |
constexpr bool | IsMatrixV = detail::IsMatrix<T>::value |
Determines whether the given type is a Matrix type. | |
template<class T1 , class T2 = T1> | |
constexpr bool | IsMultipliableV = detail::IsMultipliable<T1, T2>::value |
Determines whether the given type is a multipliable type. | |
template<class T > | |
constexpr bool | IsReverseIterableV = detail::IsReverseIterable<T>::value |
Determines whether the given type is a reverse iterable type. | |
template<class T > | |
constexpr bool | IsSquareMatrixV = detail::IsSquareMatrix<T>::value |
Determines whether the given type is a square Matrix type. | |
template<class T > | |
constexpr bool | IsVectorV = detail::IsVector<T>::value |
Determines whether the given type is a Vector type. | |
constexpr auto | Kilo = Real(1e3) |
Kilo- (1 x 10^3). More... | |
constexpr auto | Kilogram = Mass(detail::kilogram) |
Kilogram unit of mass. More... | |
constexpr auto | KilogramPerSquareMeter = AreaDensity(detail::kilogram_per_square_meter) |
Kilogram per square meter unit of area density. More... | |
constexpr auto | MaxBodies |
Maximum number of bodies in a world. More... | |
constexpr auto | MaxChildCount = std::numeric_limits<std::uint32_t>::max() >> 6 |
Max child count. | |
constexpr auto | MaxContacts = ContactCounter{MaxBodies} * ContactCounter{MaxBodies - 1} / ContactCounter{2} |
Maximum number of contacts in a world (2147319811). More... | |
constexpr auto | MaxFloat = std::numeric_limits<Real>::max() |
Maximum float value. | |
constexpr auto | MaxJoints |
Maximum number of joints in a world. More... | |
constexpr auto | MaxManifoldPoints = std::uint8_t{2} |
Maximum manifold points. More... | |
constexpr auto | MaxShapes |
Maximum number of shapes in a world. More... | |
constexpr auto | MaxShapeVertices = std::uint8_t{254} |
Maximum number of vertices for any shape type. More... | |
constexpr auto | MaxSimplexEdges = std::uint8_t{3} |
Maximum number of supportable edges in a simplex. | |
constexpr auto | Mega = Real(1e6) |
Mega- (1 x 10^6). More... | |
constexpr auto | Meter = Length(detail::meter) |
Meter unit of Length. More... | |
constexpr auto | MeterPerSecond = LinearVelocity(detail::meter_per_second) |
Meter per second unit of linear velocity. More... | |
constexpr auto | MeterPerSquareSecond = LinearAcceleration(detail::meter_per_second_squared) |
Meter per square second unit of linear acceleration. More... | |
constexpr auto | Newton = Force(detail::newton) |
Newton unit of force. More... | |
constexpr auto | NewtonMeter = Torque(detail::newton_meter) |
Newton meter unit of torque. More... | |
constexpr auto | NewtonMeterSecond = NewtonMeter * Second |
Newton meter second unit of angular momentum. More... | |
constexpr auto | NewtonSecond = Newton * Second |
Newton second unit of momentum. More... | |
constexpr auto | Peta = Real(1e15) |
Peta- (1 x 10^15). More... | |
constexpr auto | Pi = Real(3.14159265358979323846264338327950288L) |
Pi. More... | |
constexpr auto | Radian = Angle(detail::radian) |
Radian unit of angle. More... | |
constexpr auto | RadianPerSecond = AngularVelocity(detail::radian_per_second) |
Radian per second unit of angular velocity. More... | |
constexpr auto | RadianPerSquareSecond = Radian / (Second * Second) |
Radian per square second unit of angular acceleration. More... | |
constexpr auto | RevolutionsPerMinute = 2 * Pi * Radian / (Real{detail::SecondsPerMinute} * Second) |
Revolutions per minute units of angular velocity. More... | |
constexpr auto | Second = Time(detail::second) |
Second unit of time. More... | |
constexpr auto | SquareMeter = Area(detail::square_meter) |
Square meter unit of area. More... | |
constexpr auto | SquareRadian = Radian * Radian |
Square radian unit type. More... | |
constexpr auto | SquareRootTwo |
Square root of two. More... | |
constexpr auto | SquareSecond = Second * Second |
Square second unit. More... | |
constexpr auto | Tera = Real(1e12) |
Tera- (1 x 10^12). More... | |
constexpr auto | Yotta = Real(1e24) |
Yotta- (1 x 10^24). More... | |
Name space for all PlayRho related names.
using playrho::BodyCounter = typedef std::remove_const_t<decltype(MaxBodies)> |
Count type for bodies.
playrho::MaxBodies
value. using playrho::BodyID = typedef detail::IndexingNamedType<BodyCounter, struct BodyIdentifier> |
Body identifier.
A strongly typed identifier for uniquely identifying bodes within playrho::d2::World
instances. This is based on the playrho::BodyCounter
type as its underlying type. These identifiers can be compared with other body identifiers. Two body identifiers from the same world that compare equal for example, identify the same body within that world.
using playrho::ChildCounter = typedef std::remove_const_t<decltype(MaxChildCount)> |
Child counter type.
Relating to "children" of shape where each child is a convex shape possibly comprising a concave shape.
MaxChildCount
value. using playrho::ContactCounter = typedef WiderType<BodyCounter> |
Count type for contacts.
playrho::BodyCounter
without possibility of overflow. using playrho::ContactID = typedef detail::IndexingNamedType<ContactCounter, struct ContactIdentifier> |
Contact identifier.
A strongly typed identifier for uniquely identifying contacts within playrho::d2::World
instances. This is based on the playrho::ContactCounter
type as its underlying type. These identifiers can be compared with other contact identifiers. Two contact identifiers from the same world that compare equal for example, identify the same contact within that world.
using playrho::DecayedTypeIfNotSame = typedef std::enable_if_t<!std::is_same_v<DecayedType, Check>, DecayedType> |
Decayed type if not same as the checked type.
using playrho::Force2 = typedef Vector2<Force> |
2-element vector of Force quantities.
using playrho::HasNullaryFunctor = typedef detail::HasFunctor<Type, Return()> |
Has nullary functor type alias.
using playrho::HasUnaryFunctor = typedef detail::HasFunctor<Type, Return(Arg)> |
Has unary functor type alias.
using playrho::IndexPair = typedef std::pair<VertexCounter, VertexCounter> |
Index pair.
std::array
would make more sense if it weren't for the fact that std::pair
, but not std::array
, has constexpr
equality and inequality operators. using playrho::IndexPair3 = typedef std::array<IndexPair, MaxSimplexEdges> |
Array of three index-pair elements.
InvalidIndexPair
value, denotes an unused or invalid elements. using playrho::JointCounter = typedef std::remove_const_t<decltype(MaxJoints)> |
Counter type for joints.
playrho::MaxJoints
value. using playrho::JointID = typedef detail::IndexingNamedType<JointCounter, struct JointIdentifier> |
Joint identifier.
A strongly typed identifier for uniquely identifying joints within playrho::d2::World
instances. This is based on the playrho::JointCounter
type as its underlying type. These identifiers can be compared with other joint identifiers. Two joint identifiers from the same world that compare equal for example, identify the same joint within that world.
using playrho::Length2 = typedef Vector2<Length> |
2-element vector of Length quantities.
using playrho::LinearAcceleration2 = typedef Vector2<LinearAcceleration> |
2-element vector of linear acceleration (LinearAcceleration
) quantities.
using playrho::LinearVelocity2 = typedef Vector2<LinearVelocity> |
2-element vector of linear velocity (LinearVelocity
) quantities.
using playrho::Matrix = typedef Vector<Vector<T, N>, M> |
Generic M by N matrix.
using playrho::Momentum2 = typedef Vector2<Momentum> |
2-element vector of Momentum quantities.
using playrho::PairLength2 = typedef std::pair<Length2, Length2> |
Pair of Length2
values.
std::pair
because this is a pair and also because std::pair
has more support for constant expressions. using playrho::Real = typedef float |
Real-number type.
This is the number type underlying numerical calculations conceptually involving real-numbers. Ideally the implementation of this type doesn't suffer from things like: catastrophic cancellation, catastrophic division, overflows, nor underflows.
float
, double
, or long double
). LiteralType
that has necessary support: all common mathematical functions, support for infinity and NaN, and a specialization of the std::numeric_limits
class template for it.Real
).using playrho::ShapeCounter = typedef std::remove_const_t<decltype(MaxShapes)> |
Count type for shapes.
playrho::MaxShapes
value. using playrho::ShapeID = typedef detail::IndexingNamedType<ShapeCounter, struct ShapeIdentifier> |
Shape identifier.
A strongly typed identifier for uniquely identifying shapes within playrho::d2::World
instances. This is based on the playrho::ShapeCounter
type as its underlying type. These identifiers can be compared with other shape identifiers. Two shape identifiers from the same world that compare equal for example, identify the same shape within that world.
using playrho::TimestepIters = typedef std::uint8_t |
Time step iterations type.
A type for counting iterations per time-step.
using playrho::Vec2 = typedef Vector2<Real> |
Vector with 2 Real elements.
Real
type (or 8 using Real of float). using playrho::Vector2 = typedef Vector<T, 2> |
using playrho::Vector3 = typedef Vector<T, 3> |
using playrho::VertexCounter = typedef std::remove_const_t<decltype(MaxShapeVertices)> |
Vertex count type.
ContactFeature::Index
type.
|
strong |
Type of body.
|
strong |
Limit state.
|
strong |
|
strong |
Ray cast opcode enumeration.
Instructs some ray casting methods on what to do next.
void * playrho::Alloc | ( | std::size_t | size | ) |
Allocates memory.
std::bad_alloc
exception if unable to allocate non-zero sized memory and return a null pointer if the requested size is zero. This is done to ensure that the behavior is not implementation defined unlike std::malloc
. std::bad_alloc | If unable to allocate non-zero sized memory. |
nullptr
. Pointer must be deallocated with Free(void*)
or one of the Realloc
functions. Referenced by AllocArray(), playrho::BlockAllocator::Allocate(), and playrho::StackAllocator::Allocate().
T* playrho::AllocArray | ( | std::size_t | size | ) |
Allocates memory for an array.
std::bad_alloc | If unable to allocate non-zero sized memory. |
nullptr
. Pointer must be deallocated with Free(void*)
or one of the Realloc
functions. Comparison function.
Referenced by operator!=(), operator<(), operator<=(), operator==(), operator>(), and operator>=().
|
constexpr |
A pre-C++20 constant expression implementation of std::equal
.
Referenced by operator==().
auto playrho::EraseAll | ( | T & | container, |
const U & | value | ||
) | -> decltype(distance(container.erase(remove(begin(container), end(container), value), end(container)), end(container))) |
Convenience template function for erasing specified value from container.
std::erase
function. auto playrho::EraseFirst | ( | T & | container, |
const U & | value | ||
) | -> decltype(container.erase(find(begin(container), end(container), value)) != end(container)) |
Convenience template function for erasing first found value from container.
true
if value was found and erased, false
otherwise.
|
constexprnoexcept |
Flags the contact for filtering.
NeedsFiltering(contact)
returns true.
|
constexprnoexcept |
Flags the contact for updating.
NeedsUpdating(contact)
returns true. void playrho::Free | ( | void * | mem | ) |
Frees memory.
Alloc
, consider also changing this function. Referenced by playrho::d2::DynamicTree::~DynamicTree(), playrho::BlockAllocator::Clear(), playrho::d2::DynamicTree::Clear(), playrho::StackAllocator::Free(), playrho::BlockAllocator::Free(), playrho::GrowableStack< T, N >::push(), Realloc(), and playrho::d2::DynamicTree::RebuildBottomUp().
|
constexprnoexcept |
Gets the center of the given interval.
Interval::value_type
. Referenced by playrho::d2::RayCast().
|
constexprnoexcept |
Gets the coefficient of friction.
|
constexprnoexcept |
Gets a vector clockwise (forward-clockwise) perpendicular to the given vector.
This takes a vector of form (x, y) and returns the vector (y, -x).
vector | Vector to return a clockwise perpendicular equivalent for. |
|
constexpr |
Gets the identity matrix of the template type and size as given by the argument.
|
constexpr |
Gets the identity matrix of the template type and size.
|
noexcept |
Gets the movement configuration from the given value.
maxTranslation
and maxRotation
fields of the given value respectively are returned.
|
constexprnoexcept |
|
constexprnoexcept |
Gets the coefficient of restitution.
|
constexprnoexcept |
Gets a vector counter-clockwise (reverse-clockwise) perpendicular to the given vector.
This takes a vector of form (x, y) and returns the vector (-y, x).
vector | Vector to return a counter-clockwise perpendicular equivalent for. |
|
constexprnoexcept |
Gets the size of the given interval.
Gets the difference between the max and min values.
Interval::value_type
. Referenced by playrho::detail::AABB< N >::GetDimensions(), and playrho::detail::AABB< N >::GetPerimeter().
|
constexprnoexcept |
Gets the desired tangent speed.
|
constexprnoexcept |
Gets the time of impact (TOI) as a fraction.
|
constexprnoexcept |
Gets the time of impact count.
|
constexprnoexcept |
Gets whether a TOI is set.
|
inline |
Is "accelerable".
Whether or not the given type value is for a body which can have a non-zero acceleration associated with it.
true
if the given type value represents an "accelerable" type value, false
otherwise. Referenced by playrho::d2::Body::GetVelocity(), and playrho::d2::Body::operator==().
|
constexprnoexcept |
Whether or not the given contact was destroyed.
Referenced by playrho::d2::Body::operator==().
Is-for convenience function.
Referenced by playrho::Contact::IsFor().
Is-for convenience function.
|
constexprnoexcept |
Is-for convenience function.
|
constexprnoexcept |
Whether the given contact is "impenetrable".
Referenced by playrho::d2::Body::operator==().
|
constexprnoexcept |
Checks whether two value ranges have any intersection/overlap at all.
a
intersects with b
if and only if any value of a
is also a value of b
. Referenced by playrho::detail::AABB< N >::TestOverlap().
|
inline |
Is "speedable".
Whether or not the given type value is for a body which can have a non-zero speed associated with it.
true
if the given type value represents a "speedable" type value, false
otherwise. Referenced by playrho::d2::Body::operator==().
|
constexprnoexcept |
Determines validity of given value by comparing against playrho::InvalidBodyID
.
playrho::InvalidBodyID
, else false. Referenced by playrho::d2::VelocityConstraint::VelocityConstraint(), playrho::d2::DistanceProxy::ComputeAABB(), playrho::d2::DynamicTree::CreateLeaf(), playrho::d2::DistanceProxy::Distance(), playrho::d2::WorldManifold::GetPointCount(), playrho::d2::Position::GetPosition(), playrho::ToiOutput::GetToiViaSat(), playrho::d2::GetTransformation(), playrho::d2::TargetJointConf::InitVelocity(), playrho::d2::Acceleration::IsValid(), playrho::d2::Position::IsValid(), playrho::d2::Sweep::IsValid(), playrho::d2::Transformation::IsValid(), IsValid(), playrho::d2::Velocity::IsValid(), playrho::d2::Body::SetAcceleration(), playrho::d2::BodyConstraint::SetPosition(), playrho::d2::BodyConstraint::SetVelocity(), playrho::GaussSeidel::SolvePositionConstraint(), and playrho::d2::TargetJointConf::SolveVelocity().
|
constexprnoexcept |
Determines validity of given value by comparing against playrho::InvalidContactID
.
playrho::InvalidContactID
, else false.
|
constexprnoexcept |
Determines validity of given value by comparing against playrho::InvalidJointID
.
playrho::InvalidJointID
, else false.
|
constexprnoexcept |
Determines if the given value is valid.
Determines whether the given vector contains finite coordinates.
|
constexprnoexcept |
Determines validity of given value by comparing against playrho::InvalidShapeID
.
playrho::InvalidShapeID
, else false.
|
constexprnoexcept |
Determines if the given value is valid, using the equality operator.
Any value for which the comparison of that value with itself is true
is considered valid by this function, and any value for which this comparison is false
is said to be not valid. If this seems like an odd algorithm, be aware that this is essentially how floating point NaN
(not-a-number) works.
|
constexprnoexcept |
Makes the given value into an unsigned value.
std::make_unsigned
in that this changes the value to the value in the type that's the unsigned type equivalent of the input value. std::make_unsigned
merely provides the unsigned type equivalent. Referenced by playrho::Island::Count().
|
constexpr |
Gets the maximum size of the given container of index pairs.
Referenced by playrho::ArrayList< T, MAXSIZE, SIZE_TYPE >::ArrayList(), and playrho::d2::RayCast().
|
inline |
Mixes friction.
Friction mixing formula. The idea is to allow either value to drive the resulting friction to zero. For example, anything slides on ice.
friction1 | A zero or greater value. |
friction2 | A zero or greater value. |
Referenced by playrho::d2::Shape::GetDefaultFriction().
Mixes restitution.
Restitution mixing law. The idea is allow for anything to bounce off an inelastic surface. For example, a super ball bounces on anything.
Referenced by playrho::d2::Shape::GetDefaultRestitution().
|
constexprnoexcept |
Inequality operator.
EqualityComparable
named requirement for Interval objects.
|
constexprnoexcept |
|
constexprnoexcept |
Multiplies an A-element vector by a A-by-B vector of vectors.
lhs | Left-hand-side vector treated as if it were of type: Vector<Vector<T1, A>, 1> . |
rhs | Right-hand-side vector of vectors. |
|
constexprnoexcept |
|
constexprnoexcept |
Multiplies a B-by-A vector of vectors by an A-element vector.
lhs | Left-hand-side vector of vectors. |
rhs | Right-hand-side vector treated as if it were of type: Vector<Vector<T2, 1>, A> . |
|
constexprnoexcept |
Calculates the matrix product of the two given vector of vectors (matrices).
Multiplies an A-by-B vector of vectors by a B-by-C vector of vectors returning an A-by-C vector of vectors.
Multiplication of two matrices is defined if and only if the number of columns of the left matrix is the same as the number of rows of the right matrix.
lhs | Left-hand-side matrix. |
rhs | Right-hand-side matrix. |
|
constexprnoexcept |
Matrix addition operator for two same-type, same-sized matrices.
|
constexpr |
Appends the given value onto back.
LengthError | if size() is not less than max_size() . |
|
constexpr |
Appends the given values onto back.
LengthError | if operation would exceed max_size() . |
|
constexprnoexcept |
Matrix subtraction operator for two same-type, same-sized matrices.
|
constexprnoexcept |
Less-than operator.
LessThanComparable
named requirement: for all a, !(a < a); if (a < b) then !(b < a); if (a < b) and (b < c) then (a < c); with equiv = !(a < b) && !(b < a), if equiv(a, b) and equiv(b, c), then equiv(a, c).
|
constexprnoexcept |
Less than operator.
std::set
.
|
constexprnoexcept |
Less-than or equal-to operator.
|
constexprnoexcept |
Equality operator.
EqualityComparable
named requirement for Interval objects.
|
constexprnoexcept |
Greater-than operator.
|
constexprnoexcept |
Greater-than or equal-to operator.
void * playrho::Realloc | ( | void * | ptr, |
std::size_t | size | ||
) |
Reallocates memory.
std::bad_alloc
exception if unable to allocate non-zero sized memory, return a null pointer if the requested size is zero, and free old memory if the new size is zero. This is done to ensure that the behavior is not implementation defined unlike std::realloc
. std::bad_alloc | If unable to reallocate non-zero sized memory. Pointer must be deallocated with Free(void*) or one of the Realloc functions. |
nullptr
. Referenced by ReallocArray().
T* playrho::ReallocArray | ( | T * | ptr, |
std::size_t | count | ||
) |
Reallocates memory for an array.
ptr | Pointer to the old memory. |
count | Count of elements to reallocate for. This value must be less than the value of std::numeric_limits<std::size_t>::max() / sizeof(T) or an exception will be thrown. |
std::bad_alloc | If unable to reallocate non-zero sized memory. |
nullptr
. Pointer must be deallocated with Free(void*)
or one of the Realloc
functions. std::enable_if_t<IsReverseIterableV<T>, ReversionWrapper<T> > playrho::Reverse | ( | T && | iterable | ) |
Gets a reversed order iterated wrapper.
|
constexprnoexcept |
Sets the destroyed property of the given contact.
|
constexprnoexcept |
Enables the contact.
IsEnabled(contact)
returns true.
|
constexprnoexcept |
Sets the friction value for the identified contact.
Overrides the default friction mixture.
contact | The contact whose friction should be set. |
value | Co-efficient of friction value of zero or greater. |
friction
must be greater-than or equal-to zero. GetFriction(contact)
returns the value set.
|
constexprnoexcept |
Sets the impenetrability of the given contact.
IsImpenetrable(contact)
returns true. Sets the restitution value for the identified contact.
This override the default restitution mixture.
GetRestitution(contact)
returns the value set.
|
constexprnoexcept |
Sets the sensor state of the given contact.
IsSensor(contact)
returns true.
|
constexprnoexcept |
Sets the desired tangent speed for a conveyor belt behavior.
GetTangentSpeed(contact)
returns the value set.
|
constexprnoexcept |
Sets the time of impact (TOI).
contact | The contact to update. |
toi | Optional time of impact as a fraction between 0 and 1 where 1 indicates no actual impact in the current time slot. |
HasValidToi(contact)
returns toi.has_value()
. GetToi(const Contact&)
returns the value set.
|
constexprnoexcept |
Sets the TOI count to the given value.
GetToiCount(contact)
returns value
.
|
constexpr |
Gets the dynamic size of the given collection of index pairs.
GetNumValidIndices
. Referenced by Alloc(), AllocArray(), playrho::StackAllocator::Allocate(), playrho::StackAllocator::AllocateArray(), Average(), ComputeCentroid(), Dot(), GetAreaOfPolygon(), GetPolarMoment(), playrho::detail::IsFull(), and Realloc().
|
constexpr |
Strips the units off of the given value.
Strips the unit from the given value.
StripUnit
functions have been declared so it can use any of those as needed. Referenced by Atan2(), playrho::d2::Simplex::CalcMetric(), Cross(), playrho::d2::DistanceProxy::Distance(), playrho::d2::UnitVec::Get(), playrho::d2::GetContactRelVelocity(), playrho::d2::ChainShapeConf::GetMassData(), playrho::d2::GetMassData(), playrho::d2::GetUnitVector(), playrho::d2::GearJointConf::InitVelocity(), playrho::d2::PrismaticJointConf::InitVelocity(), playrho::d2::WeldJointConf::InitVelocity(), Invert(), playrho::detail::UnitMagnitudeChecker< T >::operator()(), Solve(), playrho::d2::GearJointConf::SolvePosition(), playrho::d2::PrismaticJointConf::SolvePosition(), playrho::d2::WeldJointConf::SolvePosition(), playrho::GaussSeidel::SolvePositionConstraint(), playrho::d2::PrismaticJointConf::SolveVelocity(), and playrho::d2::WeldJointConf::SolveVelocity().
|
constexprnoexcept |
Converts the given value to the value as the underlying type.
std::to_underlying
slated for C++23. Referenced by playrho::d2::VelocityConstraint::VelocityConstraint(), playrho::d2::At(), playrho::d2::GetSoonestContact(), playrho::d2::World::GetWorldIndex(), playrho::Contactable::operator<<(), and playrho::GaussSeidel::SolvePositionConstraint().
|
constexprnoexcept |
Unflags this contact for filtering.
NeedsFiltering(contact)
returns false.
|
constexprnoexcept |
Unflags this contact for updating.
NeedsUpdating(contact)
returns false.
|
constexprnoexcept |
Unsets the destroyed property of the given contact.
|
constexprnoexcept |
Disables the identified contact.
IsEnabled(contact)
returns false.
|
constexprnoexcept |
Unsets the impenetrability of the given contact.
IsImpenetrable(contact)
returns false.
|
constexprnoexcept |
Unsets the sensor state of the given contact.
IsSensor(contact)
returns false.
|
noexcept |
Gets the number of elements that are used in the specified structure.
|
constexpr |
Default angular sleep tolerance.
A body cannot sleep if its angular velocity is above this amount.
Default angular slop.
A small angle used as a collision and constraint tolerance. Usually it is chosen to be numerically significant, but visually insignificant.
|
constexpr |
Default circles ratio.
Ratio used for switching between rounded-corner collisions and closest-face biased normal collisions.
|
constexpr |
Default linear sleep tolerance.
A body cannot sleep if the magnitude of its linear velocity is above this amount.
|
constexpr |
Default linear slop.
Length used as a collision and constraint tolerance. Usually chosen to be numerically significant, but visually insignificant. Lower or raise to decrease or increase respectively the minimum of space between bodies at rest.
b2_linearSlop
define is 0.005 (meters). Referenced by playrho::d2::PolygonShapeConf::Set().
Default maximum angular correction.
|
constexpr |
Default maximum linear correction.
The maximum linear position correction used when solving constraints. This helps to prevent overshoot.
|
constexpr |
Default maximum rotation per world step.
|
constexpr |
Default maximum number of sub steps.
This is the default maximum number of sub-steps per contact in continuous physics simulation. In other words, this is the default maximum number of times in a world step that a contact will have continuous collision resolution done for it.
|
constexpr |
Default maximum translation amount.
|
constexpr |
Default maximum vertex radius.
255_m
or DefaultLinearSlop * 2 * 25500
.
|
constexpr |
Default minimum still time to sleep.
The default minimum time bodies must be still for bodies to be put to sleep.
|
constexpr |
Default minimum vertex radius.
0.01_m
or DefaultLinearSlop * Real(2)
.
|
constexpr |
Default regular-phase minimum momentum.
|
constexpr |
Default step frequency.
|
constexpr |
Default step time.
|
constexpr |
Default TOI-phase minimum momentum.
|
constexpr |
|
constexpr |
Invalid body ID value.
A special, reserved value of a playrho::BodyID
that represents/identifies an invalid body.
Referenced by playrho::d2::World::FindClosestBody(), playrho::d2::World::GetAnchorA(), playrho::d2::World::GetAnchorB(), playrho::d2::DistanceJointConf::InitVelocity(), playrho::d2::FrictionJointConf::InitVelocity(), playrho::d2::GearJointConf::InitVelocity(), playrho::d2::MotorJointConf::InitVelocity(), playrho::d2::PrismaticJointConf::InitVelocity(), playrho::d2::PulleyJointConf::InitVelocity(), playrho::d2::RevoluteJointConf::InitVelocity(), playrho::d2::RopeJointConf::InitVelocity(), playrho::d2::TargetJointConf::InitVelocity(), playrho::d2::WeldJointConf::InitVelocity(), playrho::d2::WheelJointConf::InitVelocity(), playrho::d2::World::IsEnabled(), IsValid(), playrho::d2::World::SetAwake(), playrho::d2::DistanceJointConf::SolvePosition(), playrho::d2::GearJointConf::SolvePosition(), playrho::d2::PrismaticJointConf::SolvePosition(), playrho::d2::PulleyJointConf::SolvePosition(), playrho::d2::RevoluteJointConf::SolvePosition(), playrho::d2::RopeJointConf::SolvePosition(), playrho::d2::WeldJointConf::SolvePosition(), playrho::d2::WheelJointConf::SolvePosition(), playrho::d2::DistanceJointConf::SolveVelocity(), playrho::d2::FrictionJointConf::SolveVelocity(), playrho::d2::GearJointConf::SolveVelocity(), playrho::d2::MotorJointConf::SolveVelocity(), playrho::d2::PrismaticJointConf::SolveVelocity(), playrho::d2::PulleyJointConf::SolveVelocity(), playrho::d2::RevoluteJointConf::SolveVelocity(), playrho::d2::RopeJointConf::SolveVelocity(), playrho::d2::TargetJointConf::SolveVelocity(), playrho::d2::WeldJointConf::SolveVelocity(), and playrho::d2::WheelJointConf::SolveVelocity().
|
constexpr |
Invalid contact ID value.
A special, reserved value of a playrho::ContactID
that represents/identifies an invalid contact.
Referenced by playrho::d2::GetSoonestContact(), and IsValid().
|
constexpr |
Invalid index-pair value.
Referenced by playrho::d2::DistanceProxy::Distance(), playrho::d2::GetIndexPairs(), and GetNumValidIndices().
|
constexpr |
Invalid joint ID value.
A special, reserved value of a playrho::JointID
that represents/identifies an invalid joint.
Referenced by IsValid().
|
constexpr |
Invalid shape ID value.
A special, reserved value of a playrho::ShapeID
that represents/identifies an invalid shape.
Referenced by playrho::d2::Body::Attach(), and IsValid().
|
constexpr |
Invalid vertex index.
This is a special, reserved value for indicating/identifying an invalid vertex.
Referenced by playrho::d2::Manifold::AddPoint(), playrho::d2::DistanceProxy::GetMaxSeparation(), playrho::d2::DistanceProxy::GetMaxSeparation4x4(), playrho::d2::DistanceProxy::GetNormal(), playrho::d2::DistanceProxy::GetSupportIndex(), and playrho::d2::DistanceProxy::GetVertex().
|
constexpr |
Maximum number of bodies in a world.
std::uint16_t
and eliminating one value for the invalid body identifier (playrho::InvalidBodyID
).
|
constexpr |
Maximum number of contacts in a world (2147319811).
Uses the formula for the maximum number of edges in an unidirectional graph of playrho::MaxBodies
nodes. This occurs when every possible body is connected to every other body.
|
constexpr |
Maximum number of joints in a world.
std::uint16_t
and eliminating one value for the invalid joint identifier (playrho::InvalidJointID
).
|
constexpr |
Maximum manifold points.
This is the maximum number of contact points between two convex shapes. Do not change this value.
Referenced by playrho::d2::ContactImpulsesList::AddEntry(), playrho::d2::Manifold::AddPoint(), playrho::d2::ContactImpulsesList::GetEntryNormal(), playrho::d2::ContactImpulsesList::GetEntryTanget(), playrho::d2::WorldManifold::GetImpulses(), playrho::d2::WorldManifold::GetPoint(), playrho::d2::VelocityConstraint::GetPointAt(), and playrho::d2::WorldManifold::GetSeparation().
|
constexpr |
Maximum number of shapes in a world.
std::uint16_t
and eliminating one value for the invalid shape identifier (playrho::InvalidShapeID
).
|
constexpr |
Maximum number of vertices for any shape type.
Referenced by playrho::ToiOutput::GetToiViaSat().
|
constexpr |
Pi.
An "irrational number" that's defined as the ratio of a circle's circumference to its diameter.
cmath
include without enabling _USE_MATH_DEFINES
. So rather than add yet more C preprocessor macros to all sources that this library may be compiled with, it's simply hard-coded in here instead using a C++ mechanism that also keeps it with the enclosing name space. Referenced by GetAreaOfCircle(), GetCircleVertices(), playrho::d2::ChainShapeConf::GetMassData(), playrho::d2::GetMassData(), GetNormalized(), playrho::d2::Position::GetPosition(), GetShortestDelta(), playrho::d2::DistanceJointConf::InitVelocity(), playrho::d2::TargetJointConf::InitVelocity(), playrho::d2::WeldJointConf::InitVelocity(), and playrho::d2::WheelJointConf::InitVelocity().
|
constexpr |
Square root of two.
Referenced by playrho::d2::UnitVec::GetDownRight(), and playrho::d2::UnitVec::GetUpRight().