Name space for all PlayRho related names. More...
Namespaces | |
d2 | |
Name space for 2-dimensionally related PlayRho names. | |
detail | |
Name space for internal/detail related PlayRho names. | |
Classes | |
class | AllocatedArray |
Allocated Array. More... | |
class | ArrayAllocator |
Array allocator. More... | |
class | ArrayList |
Array list. More... | |
class | BlockAllocator |
Block allocator. More... | |
struct | BlockDeallocator |
Block deallocator. More... | |
class | CheckedValue |
Checked value. More... | |
struct | ConstraintSolverConf |
Constraint solver configuration data. More... | |
struct | ContactFeature |
Contact Feature. More... | |
class | ContactKey |
Key value class for contacts. More... | |
struct | Filter |
A holder for contact filtering data. More... | |
struct | FiniteChecker |
Finite constrained value checker. More... | |
class | Fixed |
Template class for fixed-point numbers. More... | |
class | FlagGuard |
Flag guard type. More... | |
class | GrowableStack |
This is a growable LIFO stack with an initial capacity of N. If the stack size exceeds the initial capacity, the heap is used to increase the size of the stack. More... | |
struct | HasFunctor |
Has-functor trait template fallback class. More... | |
struct | HasFunctor< Type, Return(Args...)> |
Has-functor trait template class. More... | |
struct | HasType |
Has-type trait template class. More... | |
struct | HasType< T, std::tuple< T, Ts... > > |
Has-type trait true class. More... | |
struct | HasType< T, std::tuple< U, Ts... > > |
Has-type trait template super class. More... | |
struct | HasType< T, std::tuple<> > |
Has-type trait template class specialized for std::tuple classes. More... | |
class | Interval |
Interval template type. More... | |
class | InvalidArgument |
Invalid argument logic error. More... | |
struct | IsAddable |
Template for determining if the given types are addable. More... | |
struct | IsAddable< T1, T2, std::void_t< decltype(T1{}+T2{})> > |
Template specializing for addable types. More... | |
struct | IsArithmetic |
Template for determining if the given type is an "arithmetic" type. More... | |
struct | IsArithmetic< T, std::void_t< decltype(T{}+T{}), decltype(T{} - T{}), decltype(T{} *T{}), decltype(T{}/T{})> > |
Template specialization for valid/acceptable "arithmetic" types. More... | |
struct | IsDivisable |
Template for determining if the given types are divisable. More... | |
struct | IsDivisable< T1, T2, std::void_t< decltype(T1{}/T2{})> > |
Template specializing for divisable types. More... | |
struct | IsEqualityComparable |
Template for determining if the given type is an equality comparable type. More... | |
struct | IsEqualityComparable< T1, T2, std::void_t< decltype(T1{}==T2{})> > |
Template specialization for equality comparable types. More... | |
struct | IsInequalityComparable |
Template for determining if the given type is an inequality comparable type. More... | |
struct | IsInequalityComparable< T1, T2, std::void_t< decltype(T1{} !=T2{})> > |
Template specialization for inequality comparable types. More... | |
struct | IslandStats |
Island solver statistics. More... | |
struct | IsMatrix |
Trait class for checking if type is a matrix type. More... | |
struct | IsMatrix< Vector< Vector< T, N >, M > > |
Trait class specialization for checking if type is a matrix type. More... | |
struct | IsMultipliable |
Template for determining if the given types are multipliable. More... | |
struct | IsMultipliable< T1, T2, std::void_t< decltype(T1{} *T2{})> > |
Template specializing for multipliable types. More... | |
struct | IsSquareMatrix |
Trait class for checking if type is a square matrix type. More... | |
struct | IsSquareMatrix< Vector< Vector< T, M >, M > > |
Trait class specialization for checking if type is a square matrix type. More... | |
struct | IsVector |
Trait class for checking if type is a Vector type. More... | |
struct | IsVector< Vector< T, N > > |
Trait class specialization for checking if type is a Vector type.. 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... | |
struct | NegativeChecker |
Negative constrained value checker. More... | |
struct | NonNegativeChecker |
Non-negative constrained value checker. More... | |
struct | NonPositiveChecker |
Non-positive constrained value checker. More... | |
struct | NonZeroChecker |
Non-zero constrained value checker. More... | |
struct | NoOpChecker |
No-op value checker. More... | |
struct | PointStates |
Point states. More... | |
struct | PositiveChecker |
Positive constrained value checker. More... | |
struct | PreStepStats |
Pre-phase per-step statistics. More... | |
class | propagate_const |
Constant propagating template wrapper type. More... | |
class | Range |
Template range value class. More... | |
struct | RegStepStats |
Regular-phase per-step statistics. More... | |
class | SizedRange |
Template sized range value class. More... | |
class | Span |
A C++ encapsulation of an array and its size. More... | |
class | StackAllocator |
Stack allocator. More... | |
struct | StepConf |
Step configuration. More... | |
struct | StepStats |
Per-step statistics. 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... | |
struct | TypeInfo |
Type information. More... | |
struct | TypeInfo< d2::DistanceJointConf > |
Type info specialization for d2::DistanceJointConf . More... | |
struct | TypeInfo< d2::FrictionJointConf > |
Type info specialization for d2::FrictionJointConf . More... | |
struct | TypeInfo< d2::GearJointConf > |
Type info specialization for d2::GearJointConf . More... | |
struct | TypeInfo< d2::MotorJointConf > |
Type info specialization for d2::MotorJointConf . More... | |
struct | TypeInfo< d2::PrismaticJointConf > |
Type info specialization for d2::PrismaticJointConf . More... | |
struct | TypeInfo< d2::PulleyJointConf > |
Type info specialization for d2::PulleyJointConf . More... | |
struct | TypeInfo< d2::RevoluteJointConf > |
Type info specialization for d2::RevoluteJointConf . More... | |
struct | TypeInfo< d2::RopeJointConf > |
Type info specialization for d2::RopeJointConf . More... | |
struct | TypeInfo< d2::TargetJointConf > |
Type info specialization for d2::TargetJointConf . More... | |
struct | TypeInfo< d2::WeldJointConf > |
Type info specialization for d2::WeldJointConf . More... | |
struct | TypeInfo< d2::WheelJointConf > |
Type info specialization for d2::WheelJointConf . More... | |
struct | TypeInfo< double > |
Type info specialization for double . More... | |
struct | TypeInfo< Fixed32 > |
Type info specialization for Fixed32 . More... | |
struct | TypeInfo< float > |
Type info specialization for float . More... | |
struct | TypeInfo< long double > |
Type info specialization for long double . More... | |
struct | underlying_type |
Underlying-type template class. More... | |
struct | underlying_type< detail::IndexingNamedType< T, Tag > > |
Underlying-type template class for detail::IndexingNamedType types. More... | |
struct | underlying_type< T, std::enable_if_t< std::is_enum_v< T > > > |
Underlying-type class specialization for enum types. More... | |
struct | UnitIntervalChecker |
Unit-interval constrained value checker. More... | |
struct | Vector |
Vector. More... | |
struct | Version |
Version numbering scheme. More... | |
struct | Wider |
Wider data type obtainer. More... | |
struct | Wider< double > |
Specialization of the Wider trait for double. More... | |
struct | Wider< float > |
Specialization of the Wider trait for float. More... | |
struct | Wider< std::int16_t > |
Specialization of the Wider trait for signed 16-bit integers. More... | |
struct | Wider< std::int32_t > |
Specialization of the Wider trait for signed 32-bit integers. More... | |
struct | Wider< std::int8_t > |
Specialization of the Wider trait for signed 8-bit integers. More... | |
struct | Wider< std::uint16_t > |
Specialization of the Wider trait for unsigned 16-bit integers. More... | |
struct | Wider< std::uint32_t > |
Specialization of the Wider trait for unsigned 32-bit integers. More... | |
struct | Wider< std::uint8_t > |
Specialization of the Wider trait for unsigned 8-bit integers. More... | |
class | WrongState |
Wrong state logic error. More... | |
Typedefs | |
using | PairLength2 = std::pair< Length2, Length2 > |
Pair of Length2 values. More... | |
using | IndexPair = std::pair< VertexCounter, VertexCounter > |
Index pair. More... | |
using | IndexPair3 = std::array< IndexPair, MaxSimplexEdges > |
Array of three index-pair elements. More... | |
template<std::size_t N> | |
using | VertexCounterArray = std::array< VertexCounter, N > |
Vertex counter array template alias. | |
using | VertexCounter2 = VertexCounterArray< 2 > |
2-element vertex counter array. | |
template<typename T > | |
using | DefaultCheckedValue = CheckedValue< T > |
Default checked value type. More... | |
template<typename T > | |
using | Finite = CheckedValue< T, FiniteChecker< T > > |
Finite constrained value type. | |
using | Fixed32 = Fixed< std::int32_t, 9 > |
32-bit fixed precision type. More... | |
template<class T > | |
using | underlying_type_t = typename underlying_type< T >::type |
Underlying-type convenience alias. | |
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 | Mat22 = Matrix22< Real > |
2 by 2 matrix of Real elements. | |
using | Mass22 = Matrix22< Mass > |
2 by 2 matrix of Mass elements. | |
using | InvMass22 = Matrix22< InvMass > |
2 by 2 matrix of InvMass elements. | |
using | Mat33 = Matrix33< Real > |
3 by 3 matrix of Real elements. | |
template<typename T > | |
using | Negative = CheckedValue< T, NegativeChecker< T > > |
Negative constrained value type. | |
template<typename T > | |
using | NonNegative = CheckedValue< T, NonNegativeChecker< T > > |
Non-negative constrained value type. | |
template<typename T > | |
using | NonPositive = CheckedValue< T, NonPositiveChecker< T > > |
Non-positive constrained value type. | |
template<typename T > | |
using | NonZero = std::enable_if_t<!std::is_pointer< T >::value, CheckedValue< T, NonZeroChecker< T > >> |
Non-zero constrained value type. | |
template<typename T > | |
using | NonNull = std::enable_if_t< std::is_pointer< T >::value, CheckedValue< T, NonZeroChecker< T > >> |
Non-null constrained value type. | |
template<typename T > | |
using | Positive = CheckedValue< T, PositiveChecker< T > > |
Positive constrained value type. | |
using | Real = float |
Real-number type. More... | |
using | ChildCounter = std::remove_const< decltype(MaxChildCount)>::type |
Child counter type. More... | |
using | TimestepIters = std::uint8_t |
Time step iterations type. More... | |
using | VertexCounter = std::remove_const< decltype(MaxShapeVertices)>::type |
Vertex count type. More... | |
using | FixtureCounter = std::remove_const< decltype(MaxFixtures)>::type |
Counter type for fixtures. More... | |
using | BodyCounter = std::remove_const< decltype(MaxBodies)>::type |
Count type for bodies. More... | |
using | ContactCounter = Wider< BodyCounter >::type |
Count type for contacts. More... | |
using | JointCounter = std::remove_const< decltype(MaxJoints)>::type |
Counter type for joints. More... | |
template<class T > | |
using | IsIterable = typename detail::IsIterableImpl< T > |
Determines whether the given type is an iterable type. | |
template<typename T , typename Tuple > | |
using | TupleContainsType = typename HasType< T, Tuple >::type |
Tuple contains type alias. More... | |
template<typename Type , typename Return > | |
using | HasNullaryFunctor = HasFunctor< Type, Return()> |
Has nullary functor type alias. More... | |
template<typename Type , typename Return , typename Arg > | |
using | HasUnaryFunctor = HasFunctor< Type, Return(Arg)> |
Has unary functor type alias. More... | |
using | TypeID = detail::IndexingNamedType< const char *const *, struct TypeIdentifier > |
Type identifier. | |
template<typename T > | |
using | UnitInterval = CheckedValue< T, UnitIntervalChecker< T > > |
Unit interval constrained value type. | |
using | Time = PLAYRHO_QUANTITY(boost::units::si::time) |
Time quantity. More... | |
using | Frequency = PLAYRHO_QUANTITY(boost::units::si::frequency) |
Frequency quantity. More... | |
using | Length = PLAYRHO_QUANTITY(boost::units::si::length) |
Length quantity. More... | |
using | LinearVelocity = PLAYRHO_QUANTITY(boost::units::si::velocity) |
Linear velocity quantity. More... | |
using | LinearAcceleration = PLAYRHO_QUANTITY(boost::units::si::acceleration) |
Linear acceleration quantity. More... | |
using | Mass = PLAYRHO_QUANTITY(boost::units::si::mass) |
Mass quantity. More... | |
using | InvMass = PLAYRHO_QUANTITY(playrho::units::si::inverse_mass) |
Inverse mass quantity. More... | |
using | Area = PLAYRHO_QUANTITY(boost::units::si::area) |
Area quantity. More... | |
using | AreaDensity = PLAYRHO_QUANTITY(boost::units::si::surface_density) |
Area (surface) density quantity. More... | |
using | Angle = PLAYRHO_QUANTITY(boost::units::si::plane_angle) |
Angle quantity. More... | |
using | AngularVelocity = PLAYRHO_QUANTITY(boost::units::si::angular_velocity) |
Angular velocity quantity. More... | |
using | AngularAcceleration = PLAYRHO_QUANTITY(boost::units::si::angular_acceleration) |
Angular acceleration quantity. More... | |
using | Force = PLAYRHO_QUANTITY(boost::units::si::force) |
Force quantity. More... | |
using | Torque = PLAYRHO_QUANTITY(boost::units::si::torque) |
Torque quantity. More... | |
using | SecondMomentOfArea = PLAYRHO_QUANTITY(playrho::units::si::second_moment_of_area) |
Second moment of area quantity. More... | |
using | RotInertia = PLAYRHO_QUANTITY(boost::units::si::moment_of_inertia) |
Rotational inertia quantity. More... | |
using | InvRotInertia = PLAYRHO_QUANTITY(playrho::units::si::inverse_moment_of_inertia) |
Inverse rotational inertia quantity. More... | |
using | Momentum = PLAYRHO_QUANTITY(boost::units::si::momentum) |
Momentum quantity. More... | |
using | AngularMomentum = PLAYRHO_QUANTITY(boost::units::si::angular_momentum) |
Angular momentum quantity. More... | |
template<typename T > | |
using | Vector2 = Vector< T, 2 > |
Vector with 2-elements. More... | |
using | Vec2 = Vector2< Real > |
Vector with 2 Real elements. More... | |
using | Length2 = Vector2< Length > |
2-element vector of Length quantities. More... | |
using | LinearVelocity2 = Vector2< LinearVelocity > |
2-element vector of linear velocity (LinearVelocity ) quantities. More... | |
using | LinearAcceleration2 = Vector2< LinearAcceleration > |
2-element vector of linear acceleration (LinearAcceleration ) quantities. More... | |
using | Force2 = Vector2< Force > |
2-element vector of Force quantities. More... | |
using | Mass2 = Vector2< Mass > |
2-element vector of Mass quantities. | |
using | InvMass2 = Vector2< InvMass > |
2-element vector of inverse mass (InvMass ) quantities. | |
using | Momentum2 = Vector2< Momentum > |
2-element vector of Momentum quantities. More... | |
template<typename T > | |
using | Vector3 = Vector< T, 3 > |
Vector with 3-elements. More... | |
using | Vec3 = Vector3< Real > |
A 3-dimensional column vector with 3 elements. More... | |
using | Mass3 = Vector3< Mass > |
3-element vector of Mass quantities. | |
using | InvMass3 = Vector3< InvMass > |
3-element vector of inverse mass (InvMass ) quantities. | |
using | BodyID = detail::IndexingNamedType< BodyCounter, struct BodyIdentifier > |
Identifier for bodies. | |
using | ContactID = detail::IndexingNamedType< ContactCounter, struct ContactIdentifier > |
Contact identifier. | |
using | FixtureID = detail::IndexingNamedType< FixtureCounter, struct FixtureIdentifier > |
Fixture identifier. | |
using | JointID = detail::IndexingNamedType< JointCounter, struct JointIdentifier > |
Joint identifier. | |
Enumerations | |
enum | PointState { PointState::NullState, PointState::AddState, PointState::PersistState, PointState::RemoveState } |
Point state enumeration. More... | |
enum | RayCastOpcode { RayCastOpcode::Terminate, RayCastOpcode::IgnoreFixture, RayCastOpcode::ClipRay, RayCastOpcode::ResetRay } |
Ray cast opcode enumeration. More... | |
enum | BodyType { BodyType::Static = 0, BodyType::Kinematic, BodyType::Dynamic } |
Type of body. More... | |
Functions | |
template<> | |
constexpr d2::AABB | GetInvalid () noexcept |
Gets an invalid AABB value. More... | |
constexpr ContactFeature | GetVertexVertexContactFeature (ContactFeature::Index a, ContactFeature::Index b) noexcept |
Gets the vertex vertex contact feature for the given indices. | |
constexpr ContactFeature | GetVertexFaceContactFeature (ContactFeature::Index a, ContactFeature::Index b) noexcept |
Gets the vertex 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. | |
constexpr ContactFeature | GetFaceFaceContactFeature (ContactFeature::Index a, ContactFeature::Index b) noexcept |
Gets the face face contact feature for the given indices. | |
constexpr ContactFeature | Flip (ContactFeature val) noexcept |
Flips contact features information. | |
constexpr bool | operator== (ContactFeature lhs, ContactFeature rhs) noexcept |
Determines if the given two contact features are equal. | |
constexpr bool | operator!= (ContactFeature lhs, ContactFeature rhs) noexcept |
Determines if the given two contact features are not equal. | |
const char * | GetName (ContactFeature::Type type) noexcept |
Gets the human readable name for the given contact feature type. | |
inline ::std::ostream & | operator<< (::std::ostream &os, const ContactFeature &value) |
Stream output operator. | |
constexpr std::size_t | GetNumValidIndices (IndexPair3 pairs) noexcept |
Gets the number of valid indices in the given collection of index pairs. More... | |
constexpr bool | empty (IndexPair3 pairs) noexcept |
Checks whether the given collection of index pairs is empty. | |
constexpr auto | size (IndexPair3 pairs) -> decltype(GetNumValidIndices(pairs)) |
Gets the dynamic size of the given collection of index pairs. More... | |
constexpr auto | max_size (IndexPair3 pairs) -> decltype(pairs.max_size()) |
Gets the maximum size of the given container of index pairs. More... | |
template<std::size_t N> | |
VertexCounter | GetFirstShapeVertexIdx (const detail::SeparationInfo< N > &info) noexcept |
Gets first shape vertex index. | |
template<VertexCounter M, std::size_t N> | |
VertexCounter | GetSecondShapeVertexIdx (const detail::SeparationInfo< N > &info) noexcept |
Gets second shape vertex indices. | |
template<> | |
constexpr bool | IsValid (const d2::Manifold &value) noexcept |
Gets whether the given manifold is valid. | |
const char * | GetName (TOIOutput::State state) noexcept |
Gets a human readable name for the given output state. | |
ToiConf | GetToiConf (const StepConf &conf) noexcept |
Gets the time of impact configuration for the given step configuration. | |
constexpr auto | GetDefaultToiConf () |
Gets the default time of impact configuration. | |
template<> | |
constexpr bool | IsValid (const d2::Acceleration &value) noexcept |
Determines if the given value is valid. | |
template<typename T > | |
ArrayAllocator< T >::size_type | used (const ArrayAllocator< T > &array) noexcept |
Gets the number of elements that are used in the specified structure. More... | |
template<typename T , std::size_t S> | |
ArrayList< T, S > & | operator+= (ArrayList< T, S > &lhs, const typename ArrayList< T, S >::data_type &rhs) |
ArrayList append operator. | |
template<typename T , std::size_t S> | |
ArrayList< T, S > | operator+ (ArrayList< T, S > lhs, const typename ArrayList< T, S >::data_type &rhs) |
ArrayList add operator. | |
template<typename T > | |
void | Delete (const T *p, BlockAllocator &allocator) |
Deletes the given pointer by calling the pointed-to object's destructor and returning it to the given allocator. | |
bool | operator== (const BlockAllocator &a, const BlockAllocator &b) |
BlockAllocator equality operator. | |
bool | operator!= (const BlockAllocator &a, const BlockAllocator &b) |
BlockAllocator inequality operator. | |
template<typename ValueType , typename CheckerType > | |
auto | operator<< (::std::ostream &os, const CheckedValue< ValueType, CheckerType > &value) -> decltype(os<< ValueType(value)) |
Constrained value stream output operator for value types which support it. More... | |
template<typename LhsValueType , typename LhsCheckerType , typename RhsValueType , typename RhsCheckerType > | |
constexpr auto | operator== (const CheckedValue< LhsValueType, LhsCheckerType > &lhs, const CheckedValue< RhsValueType, RhsCheckerType > &rhs) noexcept(noexcept(std::declval< LhsValueType >()==std::declval< RhsValueType >())) -> decltype(LhsValueType(lhs)==RhsValueType(rhs)) |
Constrained value equality operator for value types which support it. More... | |
template<typename LhsValueType , typename LhsCheckerType , typename RhsValueType , typename RhsCheckerType > | |
constexpr auto | operator!= (const CheckedValue< LhsValueType, LhsCheckerType > &lhs, const CheckedValue< RhsValueType, RhsCheckerType > &rhs) noexcept(noexcept(std::declval< LhsValueType >() !=std::declval< RhsValueType >())) -> decltype(LhsValueType(lhs) !=RhsValueType(rhs)) |
Constrained value inequality operator for value types which support it. More... | |
template<typename LhsValueType , typename LhsCheckerType , typename RhsValueType , typename RhsCheckerType > | |
constexpr auto | operator<= (const CheckedValue< LhsValueType, LhsCheckerType > &lhs, const CheckedValue< RhsValueType, RhsCheckerType > &rhs) -> decltype(LhsValueType(lhs)<=RhsValueType(rhs)) |
Constrained value less-than or equal-to operator. More... | |
template<typename LhsValueType , typename LhsCheckerType , typename RhsValueType , typename RhsCheckerType > | |
constexpr auto | operator>= (const CheckedValue< LhsValueType, LhsCheckerType > &lhs, const CheckedValue< RhsValueType, RhsCheckerType > &rhs) -> decltype(LhsValueType(lhs) >=RhsValueType(rhs)) |
Constrained value greater-than or equal-to operator. More... | |
template<typename LhsValueType , typename LhsCheckerType , typename RhsValueType , typename RhsCheckerType > | |
constexpr auto | operator< (const CheckedValue< LhsValueType, LhsCheckerType > &lhs, const CheckedValue< RhsValueType, RhsCheckerType > &rhs) -> decltype(LhsValueType(lhs)< RhsValueType(rhs)) |
Constrained value less-than operator. More... | |
template<typename LhsValueType , typename LhsCheckerType , typename RhsValueType , typename RhsCheckerType > | |
constexpr auto | operator> (const CheckedValue< LhsValueType, LhsCheckerType > &lhs, const CheckedValue< RhsValueType, RhsCheckerType > &rhs) -> decltype(LhsValueType(lhs) > RhsValueType(rhs)) |
Constrained value greater-than operator. More... | |
template<typename LhsValueType , typename LhsCheckerType , typename RhsValueType , typename RhsCheckerType > | |
constexpr auto | operator* (const CheckedValue< LhsValueType, LhsCheckerType > &lhs, const CheckedValue< RhsValueType, RhsCheckerType > &rhs) -> decltype(LhsValueType(lhs) *RhsValueType(rhs)) |
Constrained value multiplication operator. More... | |
template<typename LhsValueType , typename LhsCheckerType , typename RhsValueType , typename RhsCheckerType > | |
constexpr auto | operator/ (const CheckedValue< LhsValueType, LhsCheckerType > &lhs, const CheckedValue< RhsValueType, RhsCheckerType > &rhs) -> decltype(LhsValueType(lhs)/RhsValueType(rhs)) |
Constrained value division operator. More... | |
template<typename LhsValueType , typename LhsCheckerType , typename RhsValueType , typename RhsCheckerType > | |
constexpr auto | operator+ (const CheckedValue< LhsValueType, LhsCheckerType > &lhs, const CheckedValue< RhsValueType, RhsCheckerType > &rhs) -> decltype(LhsValueType(lhs)+RhsValueType(rhs)) |
Constrained value addition operator. More... | |
template<typename LhsValueType , typename LhsCheckerType , typename RhsValueType , typename RhsCheckerType > | |
constexpr auto | operator- (const CheckedValue< LhsValueType, LhsCheckerType > &lhs, const CheckedValue< RhsValueType, RhsCheckerType > &rhs) -> decltype(LhsValueType(lhs) - RhsValueType(rhs)) |
Constrained value subtraction operator. More... | |
template<typename ValueType , typename CheckerType , typename Other > | |
constexpr auto | operator== (const CheckedValue< ValueType, CheckerType > &lhs, const Other &rhs) -> decltype(ValueType(lhs)==rhs) |
Constrained value equality operator. More... | |
template<typename ValueType , typename CheckerType , typename Other > | |
constexpr auto | operator== (const Other &lhs, const CheckedValue< ValueType, CheckerType > &rhs) -> decltype(lhs==ValueType(rhs)) |
Constrained value equality operator. More... | |
template<typename ValueType , typename CheckerType , typename Other > | |
constexpr auto | operator!= (const CheckedValue< ValueType, CheckerType > &lhs, const Other &rhs) -> decltype(ValueType(lhs) !=rhs) |
Constrained value inequality operator. More... | |
template<typename ValueType , typename CheckerType , typename Other > | |
constexpr auto | operator!= (const Other &lhs, const CheckedValue< ValueType, CheckerType > &rhs) -> decltype(lhs !=ValueType(rhs)) |
Constrained value inequality operator. More... | |
template<typename ValueType , typename CheckerType , typename Other > | |
constexpr auto | operator<= (const CheckedValue< ValueType, CheckerType > &lhs, const Other &rhs) -> decltype(ValueType(lhs)<=rhs) |
Constrained value less-than or equal-to operator. More... | |
template<typename ValueType , typename CheckerType , typename Other > | |
constexpr auto | operator<= (const Other &lhs, const CheckedValue< ValueType, CheckerType > &rhs) -> decltype(lhs<=ValueType(rhs)) |
Constrained value less-than or equal-to operator. More... | |
template<typename ValueType , typename CheckerType , typename Other > | |
constexpr auto | operator>= (const CheckedValue< ValueType, CheckerType > &lhs, const Other &rhs) -> decltype(ValueType(lhs) >=rhs) |
Constrained value greater-than or equal-to operator. More... | |
template<typename ValueType , typename CheckerType , typename Other > | |
constexpr auto | operator>= (const Other &lhs, const CheckedValue< ValueType, CheckerType > &rhs) -> decltype(lhs >=ValueType(rhs)) |
Constrained value greater-than or equal-to operator. More... | |
template<typename ValueType , typename CheckerType , typename Other > | |
constexpr auto | operator< (const CheckedValue< ValueType, CheckerType > &lhs, const Other &rhs) -> decltype(ValueType(lhs)< rhs) |
Constrained value less-than operator. More... | |
template<typename ValueType , typename CheckerType , typename Other > | |
constexpr auto | operator< (const Other &lhs, const CheckedValue< ValueType, CheckerType > &rhs) -> decltype(lhs< ValueType(rhs)) |
Constrained value less-than operator. More... | |
template<typename ValueType , typename CheckerType , typename Other > | |
constexpr auto | operator> (const CheckedValue< ValueType, CheckerType > &lhs, const Other &rhs) -> decltype(ValueType(lhs) > rhs) |
Constrained value greater-than operator. More... | |
template<typename ValueType , typename CheckerType , typename Other > | |
constexpr auto | operator> (const Other &lhs, const CheckedValue< ValueType, CheckerType > &rhs) -> decltype(lhs > ValueType(rhs)) |
Constrained value greater-than ooperator. More... | |
template<typename ValueType , typename CheckerType , typename Other > | |
constexpr auto | operator* (const CheckedValue< ValueType, CheckerType > &lhs, const Other &rhs) -> std::enable_if_t<!IsMultipliable< CheckedValue< ValueType, CheckerType >, Other >::value, decltype(ValueType() *Other())> |
Constrained value multiplication operator. More... | |
template<typename ValueType , typename CheckerType , typename Other > | |
constexpr auto | operator* (const Other &lhs, const CheckedValue< ValueType, CheckerType > &rhs) -> std::enable_if_t<!IsMultipliable< Other, CheckedValue< ValueType, CheckerType >>::value, decltype(Other() *ValueType())> |
Constrained value multiplication operator. More... | |
template<typename ValueType , typename CheckerType , typename Other > | |
constexpr auto | operator/ (const CheckedValue< ValueType, CheckerType > &lhs, const Other &rhs) -> decltype(ValueType(lhs)/rhs) |
Constrained value division operator. More... | |
template<typename ValueType , typename CheckerType , typename Other > | |
constexpr auto | operator/ (const Other &lhs, const CheckedValue< ValueType, CheckerType > &rhs) -> decltype(lhs/ValueType(rhs)) |
Constrained value division operator. More... | |
template<typename ValueType , typename CheckerType , typename Other > | |
constexpr auto | operator+ (const CheckedValue< ValueType, CheckerType > &lhs, const Other &rhs) -> decltype(ValueType(lhs)+rhs) |
Constrained value addition operator. More... | |
template<typename ValueType , typename CheckerType , typename Other > | |
constexpr auto | operator+ (const Other &lhs, const CheckedValue< ValueType, CheckerType > &rhs) -> decltype(lhs+ValueType(rhs)) |
Constrained value addition operator. More... | |
template<typename ValueType , typename CheckerType , typename Other > | |
constexpr auto | operator- (const CheckedValue< ValueType, CheckerType > &lhs, const Other &rhs) -> decltype(ValueType(lhs) - rhs) |
Constrained value subtraction operator. More... | |
template<typename ValueType , typename CheckerType , typename Other > | |
constexpr auto | operator- (const Other &lhs, const CheckedValue< ValueType, CheckerType > &rhs) -> decltype(lhs - ValueType(rhs)) |
Constrained value subtraction operator. More... | |
void * | Alloc (std::size_t size) |
Allocates memory. More... | |
void * | Realloc (void *ptr, std::size_t size) |
Reallocates memory. More... | |
void | Free (void *mem) |
Frees memory. More... | |
template<typename T > | |
T * | AllocArray (std::size_t size) |
Allocates memory for an array. More... | |
template<typename T > | |
T * | ReallocArray (T *ptr, std::size_t count) |
Reallocates memory for an array. More... | |
template<typename BT , unsigned int FB> | |
constexpr bool | operator== (Fixed< BT, FB > lhs, Fixed< BT, FB > rhs) noexcept |
Equality operator. | |
template<typename BT , unsigned int FB> | |
constexpr bool | operator!= (Fixed< BT, FB > lhs, Fixed< BT, FB > rhs) noexcept |
Inequality operator. | |
template<typename BT , unsigned int FB> | |
constexpr bool | operator< (Fixed< BT, FB > lhs, Fixed< BT, FB > rhs) noexcept |
Less-than operator. | |
template<typename BT , unsigned int FB> | |
constexpr bool | operator> (Fixed< BT, FB > lhs, Fixed< BT, FB > rhs) noexcept |
Greater-than operator. | |
template<typename BT , unsigned int FB> | |
constexpr bool | operator<= (Fixed< BT, FB > lhs, Fixed< BT, FB > rhs) noexcept |
Less-than or equal-to operator. | |
template<typename BT , unsigned int FB> | |
constexpr bool | operator>= (Fixed< BT, FB > lhs, Fixed< BT, FB > rhs) noexcept |
Greater-than or equal-to operator. | |
template<typename BT , unsigned int FB> | |
constexpr Fixed< BT, FB > | operator+ (Fixed< BT, FB > lhs, Fixed< BT, FB > rhs) noexcept |
Addition operator. | |
template<typename BT , unsigned int FB> | |
constexpr Fixed< BT, FB > | operator- (Fixed< BT, FB > lhs, Fixed< BT, FB > rhs) noexcept |
Subtraction operator. | |
template<typename BT , unsigned int FB> | |
constexpr Fixed< BT, FB > | operator* (Fixed< BT, FB > lhs, Fixed< BT, FB > rhs) noexcept |
Multiplication operator. | |
template<typename BT , unsigned int FB> | |
constexpr Fixed< BT, FB > | operator/ (Fixed< BT, FB > lhs, Fixed< BT, FB > rhs) noexcept |
Division operator. | |
template<typename BT , unsigned int FB> | |
constexpr Fixed< BT, FB > | operator% (Fixed< BT, FB > lhs, Fixed< BT, FB > rhs) noexcept |
Modulo operator. | |
template<typename BT , unsigned int FB> | |
constexpr bool | AlmostZero (Fixed< BT, FB > value) |
Gets whether a given value is almost zero. More... | |
template<typename BT , unsigned int FB> | |
constexpr bool | AlmostEqual (Fixed< BT, FB > x, Fixed< BT, FB > y, int ulp=2) |
Determines whether the given two values are "almost equal". | |
template<typename BT , unsigned int FB> | |
inline ::std::ostream & | operator<< (::std::ostream &os, const Fixed< BT, FB > &value) |
Output stream operator. | |
constexpr Fixed32 | operator+ (Fixed32 lhs, Fixed32 rhs) noexcept |
Addition operator. | |
constexpr Fixed32 | operator- (Fixed32 lhs, Fixed32 rhs) noexcept |
Subtraction operator. | |
constexpr Fixed32 | operator* (Fixed32 lhs, Fixed32 rhs) noexcept |
Multiplication operator. | |
constexpr Fixed32 | operator/ (Fixed32 lhs, Fixed32 rhs) noexcept |
Division operator. | |
constexpr Fixed32 | operator% (Fixed32 lhs, Fixed32 rhs) noexcept |
Modulo operator. | |
constexpr bool | operator== (Fixed32 lhs, Fixed32 rhs) noexcept |
Equality operator. | |
constexpr bool | operator!= (Fixed32 lhs, Fixed32 rhs) noexcept |
Inequality operator. | |
constexpr bool | operator<= (Fixed32 lhs, Fixed32 rhs) noexcept |
Less-than or equal-to operator. | |
constexpr bool | operator>= (Fixed32 lhs, Fixed32 rhs) noexcept |
Greater-than or equal-to operator. | |
constexpr bool | operator< (Fixed32 lhs, Fixed32 rhs) noexcept |
Less-than operator. | |
constexpr bool | operator> (Fixed32 lhs, Fixed32 rhs) noexcept |
Greater-than operator. | |
template<typename BT , unsigned int FB, int N = 5> | |
constexpr Fixed< BT, FB > | abs (Fixed< BT, FB > arg) |
Computes the absolute value. More... | |
template<typename BT , unsigned int FB> | |
constexpr Fixed< BT, FB > | pow (Fixed< BT, FB > value, int n) |
Computes the value of the given number raised to the given power. More... | |
template<typename BT , unsigned int FB> | |
constexpr Fixed< BT, FB > | trunc (Fixed< BT, FB > arg) |
Truncates the given value. More... | |
template<typename BT , unsigned int FB> | |
Fixed< BT, FB > | nextafter (Fixed< BT, FB > from, Fixed< BT, FB > to) noexcept |
Next after function for Fixed types. More... | |
template<typename BT , unsigned int FB> | |
Fixed< BT, FB > | fmod (Fixed< BT, FB > dividend, Fixed< BT, FB > divisor) noexcept |
Computes the remainder of the division of the given dividend by the given divisor. More... | |
template<typename BT , unsigned int FB> | |
auto | sqrt (Fixed< BT, FB > arg) |
Square root's the given value. More... | |
template<typename BT , unsigned int FB> | |
bool | isnormal (Fixed< BT, FB > arg) |
Gets whether the given value is normal - i.e. not 0 nor infinite. More... | |
template<typename BT , unsigned int FB> | |
Fixed< BT, FB > | sin (Fixed< BT, FB > arg) |
Computes the sine of the argument for Fixed types. More... | |
template<typename BT , unsigned int FB> | |
Fixed< BT, FB > | cos (Fixed< BT, FB > arg) |
Computes the cosine of the argument for Fixed types. More... | |
template<typename BT , unsigned int FB> | |
Fixed< BT, FB > | atan (Fixed< BT, FB > arg) |
Computes the arc tangent. More... | |
template<typename BT , unsigned int FB> | |
Fixed< BT, FB > | atan2 (Fixed< BT, FB > y, Fixed< BT, FB > x) |
Computes the multi-valued inverse tangent. More... | |
template<typename BT , unsigned int FB> | |
Fixed< BT, FB > | log (Fixed< BT, FB > arg) |
Computes the natural logarithm of the given argument. More... | |
template<typename BT , unsigned int FB> | |
Fixed< BT, FB > | exp (Fixed< BT, FB > arg) |
Computes the Euler number raised to the power of the given argument. More... | |
template<typename BT , unsigned int FB> | |
Fixed< BT, FB > | pow (Fixed< BT, FB > base, Fixed< BT, FB > exponent) |
Computes the value of the base number raised to the power of the exponent. More... | |
template<typename BT , unsigned int FB> | |
Fixed< BT, FB > | hypot (Fixed< BT, FB > x, Fixed< BT, FB > y) |
Computes the square root of the sum of the squares. More... | |
template<typename BT , unsigned int FB> | |
Fixed< BT, FB > | round (Fixed< BT, FB > value) noexcept |
Rounds the given value. More... | |
template<typename BT , unsigned int FB> | |
bool | signbit (Fixed< BT, FB > value) noexcept |
Determines whether the given value is negative. More... | |
template<typename BT , unsigned int FB> | |
constexpr bool | isnan (Fixed< BT, FB > value) noexcept |
Gets whether the given value is not-a-number. More... | |
template<typename BT , unsigned int FB> | |
bool | isfinite (Fixed< BT, FB > value) noexcept |
Gets whether the given value is finite. More... | |
template<typename T > | |
constexpr auto | to_underlying (T value) noexcept -> underlying_type_t< T > |
Converts the given value to the value as the underlying type. More... | |
template<typename T > | |
constexpr T | GetSize (const Interval< T > &v) noexcept |
Gets the size of the given interval. More... | |
template<typename T > | |
constexpr T | GetCenter (const Interval< T > &v) noexcept |
Gets the center of the given interval. More... | |
template<typename T > | |
constexpr bool | IsIntersecting (const Interval< T > &a, const Interval< T > &b) noexcept |
Checks whether two value ranges have any intersection/overlap at all. | |
template<typename T > | |
constexpr Interval< T > | GetIntersection (Interval< T > a, const Interval< T > &b) noexcept |
Gets the intersecting interval of two given ranges. | |
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 | 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 | IsEntirelyEnclosing (const Interval< T > &a, const Interval< T > &b) |
Determines whether the first range entirely encloses the second. | |
template<typename T > | |
constexpr bool | operator== (const Interval< T > &a, const Interval< T > &b) noexcept |
Equality operator. More... | |
template<typename T > | |
constexpr bool | operator!= (const Interval< T > &a, const Interval< T > &b) noexcept |
Inequality operator. More... | |
template<typename T > | |
constexpr bool | operator< (const Interval< T > &lhs, const Interval< T > &rhs) noexcept |
Less-than operator. More... | |
template<typename T > | |
constexpr bool | operator<= (const Interval< T > &lhs, const Interval< T > &rhs) noexcept |
Less-than or equal-to operator. More... | |
template<typename T > | |
constexpr bool | operator> (const Interval< T > &lhs, const Interval< T > &rhs) noexcept |
Greater-than operator. More... | |
template<typename T > | |
constexpr bool | operator>= (const Interval< T > &lhs, const Interval< T > &rhs) noexcept |
Greater-than or equal-to operator. More... | |
template<typename T > | |
::std::ostream & | operator<< (::std::ostream &os, const Interval< T > &value) |
Output stream operator. | |
Angle | GetDelta (Angle a1, Angle a2) noexcept |
Gets the shortest angular distance to go from angle 1 to angle 2. More... | |
Length2 | ComputeCentroid (const Span< const Length2 > &vertices) |
Computes the centroid of a counter-clockwise array of 3 or more vertices. More... | |
std::vector< Length2 > | GetCircleVertices (Length radius, unsigned slices, Angle start=0_deg, Real turns=Real{1}) |
Gets the vertices for a circle described by the given parameters. | |
NonNegative< Area > | GetAreaOfCircle (Length radius) |
Gets the area of a circle. | |
NonNegative< Area > | GetAreaOfPolygon (Span< const Length2 > vertices) |
Gets the area of a polygon. More... | |
SecondMomentOfArea | GetPolarMoment (Span< const Length2 > vertices) |
Gets the polar moment of the area enclosed by the given vertices. More... | |
template<typename T > | |
constexpr auto & | GetX (T &value) |
Gets the "X" element of the given value - i.e. the first element. | |
template<typename T > | |
constexpr auto & | GetY (T &value) |
Gets the "Y" element of the given value - i.e. the second element. | |
template<typename T > | |
constexpr auto & | GetZ (T &value) |
Gets the "Z" element of the given value - i.e. the third element. | |
template<typename T > | |
constexpr auto | GetX (const T &value) |
Gets the "X" element of the given value - i.e. the first element. | |
template<typename T > | |
constexpr auto | GetY (const T &value) |
Gets the "Y" element of the given value - i.e. the second element. | |
template<typename T > | |
constexpr auto | GetZ (const T &value) |
Gets the "Z" element of the given value - i.e. the third element. | |
template<typename T > | |
constexpr std::enable_if_t< std::is_signed< T >::value, std::make_unsigned_t< T > > | MakeUnsigned (const T &arg) noexcept |
Makes the given value into an unsigned value. More... | |
template<typename T > | |
constexpr auto | StripUnit (const T &v) -> decltype(StripUnit(v.get())) |
Strips the unit from the given value. | |
template<typename T , typename U > | |
constexpr U | Secant (T target, U a1, T s1, U a2, T s2) noexcept |
Secant method. More... | |
template<typename T > | |
constexpr T | Bisect (T a1, T a2) noexcept |
Bisection method. More... | |
template<typename T > | |
constexpr bool | IsOdd (T val) noexcept |
Is-odd. More... | |
template<class TYPE > | |
constexpr auto | Square (TYPE t) noexcept |
Squares the given value. | |
template<typename T > | |
auto | Atan2 (T y, T x) |
Computes the arc-tangent of the given y and x values. More... | |
template<typename T , typename = std::enable_if_t< IsIterable<T>::value && IsAddable<decltype(*begin(std::declval<T>()))>::value> | |
auto | Average (const T &span) |
Computes the average of the given values. | |
template<typename T > | |
std::enable_if_t< IsArithmetic< T >::value, T > | RoundOff (T value, unsigned precision=100000) |
Computes the rounded value of the given value. | |
Vec2 | RoundOff (Vec2 value, std::uint32_t precision=100000) |
Computes the rounded value of the given value. | |
template<typename T , std::size_t N> | |
constexpr Vector< T, N > | abs (const Vector< T, N > &v) noexcept |
Absolute value function for vectors. | |
d2::UnitVec | abs (const d2::UnitVec &v) noexcept |
Gets the absolute value of the given value. | |
template<typename T > | |
constexpr std::enable_if_t< std::is_arithmetic< T >::value, bool > | AlmostZero (T value) |
Gets whether a given value is almost zero. More... | |
template<typename T > | |
constexpr std::enable_if_t< std::is_floating_point< T >::value, bool > | AlmostEqual (T x, T y, int ulp=2) |
Determines whether the given two values are "almost equal". | |
template<typename T > | |
auto | ModuloViaFmod (T dividend, T divisor) noexcept |
Modulo operation using std::fmod . More... | |
template<typename T > | |
auto | ModuloViaTrunc (T dividend, T divisor) noexcept |
Modulo operation using std::trunc . More... | |
Angle | GetNormalized (Angle value) noexcept |
Gets the "normalized" value of the given angle. More... | |
template<class T > | |
Angle | GetAngle (const Vector2< T > value) |
Gets the angle. More... | |
template<typename T > | |
constexpr auto | GetMagnitudeSquared (T value) noexcept |
Gets the square of the magnitude of the given iterable value. More... | |
template<typename T > | |
auto | GetMagnitude (T value) |
Gets the magnitude of the given value. 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... | |
template<class T1 , class T2 , std::enable_if_t< std::tuple_size< T1 >::value==2 &&std::tuple_size< T2 >::value==2, int > = 0> | |
constexpr auto | Cross (T1 a, T2 b) noexcept |
Performs the 2-element analog of the cross product of two vectors. 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<class IN_TYPE > | |
constexpr auto | Invert (const Matrix22< IN_TYPE > value) noexcept |
Inverts the given value. | |
constexpr Vec3 | Solve33 (const Mat33 &mat, const Vec3 b) noexcept |
Solves A * x = b, where b is a column vector. More... | |
template<typename T > | |
constexpr T | Solve22 (const Mat33 &mat, const T b) noexcept |
Solves A * x = b, where b is a column vector. More... | |
constexpr Mat33 | GetInverse22 (const Mat33 &value) noexcept |
Gets the inverse of the given matrix as a 2-by-2. More... | |
constexpr Mat33 | GetSymInverse33 (const Mat33 &value) noexcept |
Gets the symmetric inverse of this matrix as a 3-by-3. More... | |
template<class T > | |
constexpr auto | GetRevPerpendicular (const T vector) noexcept |
Gets a vector counter-clockwise (reverse-clockwise) perpendicular to the given vector. More... | |
template<class T > | |
constexpr auto | GetFwdPerpendicular (const T vector) noexcept |
Gets a vector clockwise (forward-clockwise) perpendicular to the given vector. More... | |
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 Vec2 | Transform (const Vec2 v, const Mat33 &A) noexcept |
Multiplies a vector by a matrix. | |
constexpr Vec2 | InverseTransform (const Vec2 v, const Mat22 &A) noexcept |
Multiply a matrix transpose times a vector. If a rotation matrix is provided, then this transforms the vector from one frame to another (inverse transform). | |
constexpr Mat22 | MulT (const Mat22 &A, const Mat22 &B) noexcept |
Computes A^T * B. | |
Mat22 | abs (const Mat22 &A) |
Gets the absolute value of the given value. | |
template<typename T > | |
constexpr T | NextPowerOfTwo (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 > | |
constexpr T | GetModuloNext (T value, T count) noexcept |
Gets the modulo next value. | |
template<typename T > | |
constexpr T | GetModuloPrev (T value, T count) noexcept |
Gets the modulo previous value. | |
constexpr Angle | GetRevRotationalAngle (Angle a1, 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<!IsVector< T >::value, Matrix< T, N, N > > | GetIdentityMatrix () |
Gets the identity matrix of the template type and size. More... | |
template<typename T > | |
constexpr std::enable_if_t< IsSquareMatrix< T >::value, 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<!IsVector< T >::value, Vector< Vector< T, N >, 1 > > | GetRowMatrix (Vector< T, N > arg) |
Gets the specified row of the given matrix as a row matrix. | |
template<typename T , std::size_t N> | |
constexpr std::enable_if_t<!IsVector< T >::value, Vector< Vector< T, 1 >, N > > | GetColumnMatrix (Vector< T, N > arg) |
Gets the specified column of the given matrix as a column matrix. | |
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 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<> | |
constexpr bool | IsValid (const Mat22 &value) noexcept |
Determines if the given value is valid. More... | |
template<> | |
constexpr bool | IsValid (const d2::Position &value) noexcept |
Determines if the given value is valid. | |
template<class T > | |
PROPAGATE_CONST_CONSTEXPR void | swap (propagate_const< T > &pt, propagate_const< T > &pu) noexcept(noexcept(swap(std::declval< T & >(), std::declval< T & >()))) |
Support for swap operation. | |
template<> | |
constexpr bool | IsValid (const d2::Sweep &value) noexcept |
Determines if the given value is valid. | |
template<class... T> | |
void | NOT_USED (T &&...) |
"Not used" annotator. | |
template<typename T > | |
constexpr bool | IsValid (const T &value) noexcept |
Determines if the given value is valid. More... | |
template<> | |
constexpr bool | IsValid (const std::size_t &value) noexcept |
Determines if the given value is valid. | |
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... | |
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<> | |
constexpr bool | IsValid (const d2::Transformation &value) noexcept |
Determines if the given value is valid. | |
template<> | |
constexpr bool | IsValid (const TypeID &value) noexcept |
Determines if the given value is valid. | |
template<typename T > | |
constexpr TypeID | GetTypeID () |
Gets the type ID for the template parameter type. | |
template<typename T > | |
constexpr TypeID | GetTypeID (T) |
Gets the type ID for the function parameter type. | |
constexpr const char * | GetName (TypeID id) noexcept |
Gets the name associated with the given type ID. | |
template<typename T > | |
constexpr const char * | GetTypeName () noexcept |
Gets the name associated with the given template parameter type. | |
constexpr Mass | operator""_g (unsigned long long int v) noexcept |
SI unit symbol for a gram unit of Mass. More... | |
constexpr Mass | operator""_g (long double v) noexcept |
SI unit symbol for a gram 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 Mass | operator""_kg (long double v) noexcept |
SI unit symbol for a kilogram 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 Mass | operator""_Pg (long double v) noexcept |
SI unit symbol for a petagram unit of Mass. More... | |
constexpr Mass | operator""_Yg (unsigned long long int v) noexcept |
SI unit symbol for a yottagram unit of Mass. More... | |
constexpr Mass | operator""_Yg (long double v) noexcept |
SI unit symbol for a yottagram unit of Mass. More... | |
constexpr Length | operator""_m (unsigned long long int v) noexcept |
SI unit symbol for a meter of Length. More... | |
constexpr Length | operator""_m (long double v) noexcept |
SI unit symbol for a meter of Length. More... | |
constexpr Length | operator""_dm (unsigned long long int v) noexcept |
SI unit symbol for a decimeter of Length. More... | |
constexpr Length | operator""_dm (long double v) noexcept |
SI unit symbol for a decimeter of Length. More... | |
constexpr Length | operator""_cm (unsigned long long int v) noexcept |
SI unit symbol for a centimeter of Length. More... | |
constexpr Length | operator""_cm (long double v) noexcept |
SI unit symbol for a centimeter of Length. More... | |
constexpr Length | operator""_Gm (unsigned long long int v) noexcept |
SI unit symbol for a gigameter unit of Length. More... | |
constexpr Length | operator""_Gm (long double v) noexcept |
SI unit symbol for a gigameter 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 Length | operator""_Mm (long double v) noexcept |
SI unit symbol for a megameter unit of Length. More... | |
constexpr Length | operator""_km (unsigned long long int v) noexcept |
SI symbol for a kilometer unit of Length. More... | |
constexpr Length | operator""_km (long double v) noexcept |
SI symbol for a kilometer unit of Length. More... | |
constexpr Time | operator""_s (unsigned long long int v) noexcept |
SI symbol for a second unit of Time. More... | |
constexpr Time | operator""_s (long double v) noexcept |
SI symbol for a second unit of Time. More... | |
constexpr Time | operator""_min (unsigned long long int v) noexcept |
SI symbol for a minute unit of Time. More... | |
constexpr Time | operator""_min (long double v) noexcept |
SI symbol for a minute unit of Time. More... | |
constexpr Time | operator""_h (unsigned long long int v) noexcept |
Symbol for an hour unit of Time. More... | |
constexpr Time | operator""_h (long double v) noexcept |
Symbol for an hour unit of Time. More... | |
constexpr Time | operator""_d (unsigned long long int v) noexcept |
Symbol for a day unit of Time. More... | |
constexpr Time | operator""_d (long double v) noexcept |
Symbol for a day unit of Time. More... | |
constexpr Angle | operator""_rad (unsigned long long int v) noexcept |
SI symbol for a radian unit of Angle. More... | |
constexpr Angle | operator""_rad (long double v) noexcept |
SI symbol for a radian unit of Angle. More... | |
constexpr Angle | operator""_deg (unsigned long long int v) noexcept |
Abbreviation for a degree unit of Angle. More... | |
constexpr Angle | operator""_deg (long double v) noexcept |
Abbreviation for a degree unit of Angle. More... | |
constexpr Force | operator""_N (unsigned long long int v) noexcept |
SI symbol for a newton unit of Force. More... | |
constexpr Force | operator""_N (long double v) noexcept |
SI symbol for a newton unit of Force. More... | |
constexpr Area | operator""_m2 (unsigned long long int v) noexcept |
Abbreviation for meter squared unit of Area. More... | |
constexpr Area | operator""_m2 (long double v) noexcept |
Abbreviation for meter squared unit of Area. More... | |
constexpr LinearVelocity | operator""_mps (unsigned long long int v) noexcept |
Abbreviation for meter per second. More... | |
constexpr LinearVelocity | operator""_mps (long double v) noexcept |
Abbreviation for meter per second. More... | |
constexpr LinearVelocity | operator""_kps (unsigned long long int v) noexcept |
Abbreviation for kilometer per second. More... | |
constexpr LinearVelocity | operator""_kps (long double v) noexcept |
Abbreviation for kilometer per second. More... | |
constexpr LinearAcceleration | operator""_mps2 (unsigned long long int v) noexcept |
Abbreviation for meter per second squared. More... | |
constexpr LinearAcceleration | operator""_mps2 (long double v) noexcept |
Abbreviation for meter per second squared. More... | |
constexpr Frequency | operator""_Hz (unsigned long long int v) noexcept |
SI symbol for a hertz unit of Frequency. More... | |
constexpr Frequency | operator""_Hz (long double v) noexcept |
SI symbol for a hertz unit of Frequency. More... | |
constexpr Torque | operator""_Nm (unsigned long long int v) noexcept |
Abbreviation for newton-meter unit of torque. More... | |
constexpr Torque | operator""_Nm (long double v) noexcept |
Abbreviation for newton-meter unit of torque. More... | |
constexpr Momentum | operator""_Ns (unsigned long long int v) noexcept |
SI symbol for a newton second of impulse. More... | |
constexpr Momentum | operator""_Ns (long double v) noexcept |
SI symbol for a newton second of impulse. More... | |
constexpr AreaDensity | operator""_kgpm2 (unsigned long long int v) noexcept |
Abbreviation for kilogram per square meter. | |
constexpr AreaDensity | operator""_kgpm2 (long double v) noexcept |
Abbreviation for kilogram per square meter. | |
constexpr AngularVelocity | operator""_rpm (unsigned long long int v) noexcept |
Abbreviation for revolutions per minute. More... | |
constexpr AngularVelocity | operator""_rpm (long double v) noexcept |
Abbreviation for revolutions per minute. More... | |
constexpr Real | StripUnit (const Real value) |
Strips the units off of the given value. | |
template<> | |
constexpr bool | IsValid (const d2::UnitVec &value) noexcept |
Determines if the given value is valid. | |
template<typename T , std::size_t N> | |
constexpr bool | operator== (const Vector< T, N > &lhs, const Vector< T, N > &rhs) noexcept |
Equality operator. | |
template<typename T , std::size_t N> | |
constexpr bool | operator!= (const Vector< T, N > &lhs, const Vector< T, N > &rhs) noexcept |
Inequality operator. | |
template<typename T , std::size_t N> | |
constexpr std::enable_if_t< std::is_same< T, decltype(+T{})>::value, Vector< T, N > > | operator+ (Vector< T, N > v) noexcept |
Unary plus operator. | |
template<typename T , std::size_t N> | |
constexpr std::enable_if_t< std::is_same< T, decltype(-T{})>::value, 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< T, decltype(T{}+T{})>::value, 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 N> | |
constexpr std::enable_if_t< std::is_same< T, decltype(T{} - T{})>::value, 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<typename T , std::size_t N> | |
constexpr std::enable_if_t< std::is_same< T, decltype(T{}+T{})>::value, 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< T, decltype(T{} - T{})>::value, Vector< T, N > > | operator- (Vector< T, N > lhs, const Vector< T, N > rhs) noexcept |
Subtracts two vectors component-wise. | |
template<typename T1 , typename T2 , std::size_t N> | |
constexpr std::enable_if_t< std::is_same< T1, decltype(T1{} *T2{})>::value, Vector< T1, N > & > | operator*= (Vector< T1, N > &lhs, const T2 rhs) noexcept |
Multiplication assignment operator. | |
template<typename T1 , typename T2 , std::size_t N> | |
constexpr std::enable_if_t< std::is_same< T1, decltype(T1{}/T2{})>::value, Vector< T1, N > & > | operator/= (Vector< T1, N > &lhs, const T2 rhs) noexcept |
Division assignment operator. | |
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< IsMultipliable< T1, T2 >::value, 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 A, std::size_t B, typename OT = decltype(T1{} * T2{})> | |
constexpr std::enable_if_t< IsMultipliable< T1, T2 >::value &&!IsVector< T1 >::value, 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<typename T1 , typename T2 , std::size_t A, std::size_t B, typename OT = decltype(T1{} * T2{})> | |
constexpr std::enable_if_t< IsMultipliable< T1, T2 >::value &&!IsVector< T2 >::value, 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<std::size_t N, typename T1 , typename T2 , typename OT = decltype(T1{} * T2{})> | |
constexpr std::enable_if_t< IsMultipliable< T1, T2 >::value &&!IsVector< T1 >::value, Vector< OT, N > > | operator* (const T1 s, Vector< T2, N > a) noexcept |
Multiplication operator for non-vector times vector. More... | |
template<std::size_t N, typename T1 , typename T2 , typename OT = decltype(T1{} * T2{})> | |
constexpr std::enable_if_t< IsMultipliable< T1, T2 >::value &&!IsVector< T2 >::value, Vector< OT, N > > | operator* (Vector< T1, N > a, const T2 s) noexcept |
Multiplication operator for vector times non-vector. More... | |
template<std::size_t N, typename T1 , typename T2 , typename OT = decltype(T1{} / T2{})> | |
constexpr std::enable_if_t< IsDivisable< T1, T2 >::value &&!IsVector< T2 >::value, Vector< OT, N > > | operator/ (Vector< T1, N > a, const T2 s) noexcept |
Division operator. | |
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<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<typename T , std::size_t N> | |
::std::ostream & | operator<< (::std::ostream &os, const Vector< T, N > &value) |
Output stream operator. | |
constexpr Vec2 | GetVec2 (const Vector2< Real > value) |
Gets the given value as a 2-element vector of reals (Vec2 ). | |
template<typename TYPE > | |
constexpr bool | IsValid (const Vector2< TYPE > &value) noexcept |
Determines whether the given vector contains finite coordinates. | |
template<> | |
constexpr bool | IsValid (const d2::Velocity &value) noexcept |
Determines if the given value is valid. | |
Version | GetVersion () noexcept |
Gets the version information of the library. | |
std::string | GetBuildDetails () noexcept |
Gets the build details of the library. | |
constexpr bool | operator== (Version lhs, Version rhs) |
Equality operator. | |
constexpr bool | operator!= (Version lhs, Version rhs) |
Inequality operator. | |
template<> | |
constexpr bool | IsValid (const BodyID &value) noexcept |
Determines if the given value is valid. | |
bool | IsSpeedable (BodyType type) |
Is "speedable". More... | |
bool | IsAccelerable (BodyType type) |
Is "accelerable". More... | |
ConstraintSolverConf | GetRegConstraintSolverConf (const StepConf &conf) noexcept |
Gets the regular phase constraint solver 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 ConstraintSolverConf | GetDefaultPositionSolverConf () noexcept |
Gets the default position solver configuration. | |
constexpr ConstraintSolverConf | GetDefaultToiPositionSolverConf () noexcept |
Gets the default TOI position solver configuration. | |
Real | MixFriction (Real friction1, Real friction2) |
Mixes friction. More... | |
Real | MixRestitution (Real restitution1, Real restitution2) noexcept |
Mixes restitution. More... | |
template<> | |
constexpr bool | IsValid (const ContactID &value) noexcept |
Determines if the given value is valid. | |
constexpr bool | operator== (const ContactKey lhs, const ContactKey rhs) noexcept |
Equality operator. | |
constexpr bool | operator!= (const ContactKey lhs, const ContactKey rhs) noexcept |
Inequality operator. | |
constexpr bool | operator< (const ContactKey lhs, const ContactKey rhs) noexcept |
Less-than operator. | |
constexpr bool | operator<= (const ContactKey lhs, const ContactKey rhs) noexcept |
Less-than or equal-to operator. | |
constexpr bool | operator> (const ContactKey lhs, const ContactKey rhs) noexcept |
Greater-than operator. | |
constexpr bool | operator>= (const ContactKey lhs, const ContactKey rhs) noexcept |
Greater-than or equal-to operator. | |
constexpr bool | operator== (const Filter lhs, const Filter rhs) noexcept |
Equality operator. | |
constexpr bool | operator!= (const Filter lhs, const Filter rhs) noexcept |
Inequality operator. | |
bool | ShouldCollide (const Filter filterA, const Filter filterB) noexcept |
Determines whether collision processing should be performed. | |
template<> | |
constexpr bool | IsValid (const FixtureID &value) noexcept |
Determines if the given value is valid. | |
template<> | |
constexpr bool | IsValid (const JointID &value) noexcept |
Determines if the given value is valid. | |
MovementConf | GetMovementConf (const StepConf &conf) noexcept |
Gets the movement configuration from the given value. More... | |
bool | IsMaxTranslationWithinTolerance (const StepConf &conf) noexcept |
Determines whether the maximum translation is within tolerance. | |
Length | GetMaxRegLinearCorrection (const StepConf &conf) noexcept |
Gets the maximum regular linear correction from the given value. | |
RegStepStats & | Update (RegStepStats &lhs, const IslandStats &rhs) noexcept |
Updates regular-phase per-step statistics with island statistics. | |
Variables | |
constexpr auto | InvalidIndexPair |
Invalid index-pair value. More... | |
constexpr auto | InvalidIndexPair3 |
Invalid array of three index-pair elements. More... | |
constexpr auto | Pi = Real(3.14159265358979323846264338327950288) |
Pi. More... | |
constexpr auto | SquareRootTwo |
Square root of two. More... | |
constexpr auto | Centi = Real(1e-2) |
Centi- (1 x 10^-2). More... | |
constexpr auto | Deci = Real(1e-1) |
Deci- (1 x 10^-1). More... | |
constexpr auto | Kilo = Real(1e3) |
Kilo- (1 x 10^3). More... | |
constexpr auto | Mega = Real(1e6) |
Mega- (1 x 10^6). More... | |
constexpr auto | Giga = Real(1e9) |
Giga- (1 x 10^9). More... | |
constexpr auto | Tera = Real(1e12) |
Tera- (1 x 10^12). More... | |
constexpr auto | Peta = Real(1e15) |
Peta- (1 x 10^15). More... | |
constexpr auto | Yotta = Real(1e24) |
Yotta- (1 x 10^24). More... | |
constexpr auto | MaxSimplexEdges = std::uint8_t{3} |
Maximum number of supportable edges in a simplex. | |
constexpr auto | MaxChildCount = std::numeric_limits<std::uint32_t>::max() >> 6 |
Max child count. | |
constexpr auto | MaxFloat = std::numeric_limits<Real>::max() |
Maximum float value. | |
constexpr auto | MaxManifoldPoints = std::uint8_t{2} |
Maximum manifold points. This is the maximum number of contact points between two convex shapes. Do not change this value. More... | |
constexpr auto | MaxShapeVertices = std::uint8_t{254} |
Maximum number of vertices for any shape type. More... | |
constexpr auto | InvalidVertex = static_cast<VertexCounter>(-1) |
Invalid vertex index. | |
constexpr auto | DefaultLinearSlop = detail::Defaults<Real>::GetLinearSlop() |
Default linear slop. More... | |
constexpr auto | DefaultMinVertexRadius = DefaultLinearSlop * Real{2} |
Default minimum vertex radius. | |
constexpr auto | DefaultMaxVertexRadius = detail::Defaults<Real>::GetMaxVertexRadius() |
Default maximum vertex radius. | |
constexpr auto | DefaultAabbExtension = DefaultLinearSlop * Real{20} |
Default AABB extension amount. | |
constexpr auto | DefaultDistanceMultiplier = Real{2} |
Default distance multiplier. | |
constexpr auto | DefaultAngularSlop = (Pi * 2_rad) / Real{180} |
Default angular slop. More... | |
constexpr auto | DefaultMaxLinearCorrection = 0.2_m |
Default maximum linear correction. More... | |
constexpr auto | DefaultMaxAngularCorrection = Real(8.0f / 180.0f) * Pi * 1_rad |
Default maximum angular correction. More... | |
constexpr auto | DefaultMaxTranslation = 2_m |
Default maximum translation amount. | |
constexpr auto | DefaultMaxRotation = Angle{Pi * 1_rad / Real(2)} |
Default maximum rotation per world step. 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 | DefaultMaxDistanceIters = std::uint8_t{20} |
Default max number of distance iterations. | |
constexpr auto | DefaultMaxSubSteps = std::uint8_t{8} |
Default maximum number of sub steps. More... | |
constexpr auto | DefaultVelocityThreshold = 1_mps |
Default velocity threshold. | |
constexpr auto | DefaultRegMinMomentum = Momentum{0_Ns / 100} |
Default regular-phase minimum momentum. | |
constexpr auto | DefaultToiMinMomentum = Momentum{0_Ns / 100} |
Default TOI-phase minimum momentum. | |
constexpr auto | MaxFixtures |
Maximum number of fixtures in a world. More... | |
constexpr auto | MaxBodies |
Maximum number of bodies in a world. More... | |
constexpr auto | InvalidContactIndex = static_cast<ContactCounter>(-1) |
Invalid contact index. | |
constexpr auto | MaxContacts = ContactCounter{MaxBodies} * ContactCounter{MaxBodies - 1} / ContactCounter{2} |
Maximum number of contacts in a world (2147319811). More... | |
constexpr auto | MaxJoints |
Maximum number of joints in a world. More... | |
constexpr auto | DefaultStepTime = Time{1_s / 60} |
Default step time. | |
constexpr auto | DefaultStepFrequency = 60_Hz |
Default step frequency. | |
constexpr auto | DefaultMinStillTimeToSleep = Time{1_s / 2} |
Default minimum still time to sleep. More... | |
constexpr auto | DefaultLinearSleepTolerance = 0.01_mps |
Default linear sleep tolerance. More... | |
constexpr auto | DefaultAngularSleepTolerance = Real{(Pi * 2) / 180} * RadianPerSecond |
Default angular sleep tolerance. More... | |
constexpr auto | DefaultCirclesRatio = Real{10} |
Default circles ratio. More... | |
constexpr auto | InvalidTypeID |
Invalid type ID value. More... | |
constexpr auto | Second = PLAYRHO_UNIT(Time, boost::units::si::second) |
Second unit of time. More... | |
constexpr auto | SquareSecond = Second * Second |
Square second unit. More... | |
constexpr auto | Hertz = PLAYRHO_UNIT(Frequency, boost::units::si::hertz) |
Hertz unit of Frequency. More... | |
constexpr auto | Meter = PLAYRHO_UNIT(Length, boost::units::si::meter) |
Meter unit of Length. More... | |
constexpr auto | MeterPerSecond = PLAYRHO_UNIT(LinearVelocity, boost::units::si::meter_per_second) |
Meter per second unit of linear velocity. More... | |
constexpr auto | MeterPerSquareSecond |
Meter per square second unit of linear acceleration. More... | |
constexpr auto | Kilogram = PLAYRHO_UNIT(Mass, boost::units::si::kilogram) |
Kilogram unit of mass. More... | |
constexpr auto | SquareMeter = PLAYRHO_UNIT(Area, boost::units::si::square_meter) |
Square meter unit of area. More... | |
constexpr auto | CubicMeter = Meter * Meter * Meter |
Cubic meter unit of volume. | |
constexpr auto | KilogramPerSquareMeter |
Kilogram per square meter unit of area density. More... | |
constexpr auto | Radian = PLAYRHO_UNIT(Angle, boost::units::si::radian) |
Radian unit of angle. More... | |
constexpr auto | Degree = Angle{Radian * Pi / Real{180}} |
Degree unit of angle quantity. More... | |
constexpr auto | SquareRadian = Radian * Radian |
Square radian unit type. More... | |
constexpr auto | RadianPerSecond = PLAYRHO_UNIT(AngularVelocity, boost::units::si::radian_per_second) |
Radian per second unit of angular velocity. More... | |
constexpr auto | DegreePerSecond = AngularVelocity{RadianPerSecond * Degree / Radian} |
Degree per second unit of angular velocity. More... | |
constexpr auto | RadianPerSquareSecond = Radian / (Second * Second) |
Radian per square second unit of angular acceleration. More... | |
constexpr auto | DegreePerSquareSecond = Degree / (Second * Second) |
Degree per square second unit of angular acceleration. More... | |
constexpr auto | Newton = PLAYRHO_UNIT(Force, boost::units::si::newton) |
Newton unit of force. More... | |
constexpr auto | NewtonMeter = PLAYRHO_UNIT(Torque, boost::units::si::newton_meter) |
Newton meter unit of torque. More... | |
constexpr auto | NewtonSecond = Newton * Second |
Newton second unit of momentum. More... | |
constexpr auto | NewtonMeterSecond = NewtonMeter * Second |
Newton meter second unit of angular momentum. More... | |
constexpr auto | RevolutionsPerMinute = 2 * Pi * Radian / (Real{60} * Second) |
Revolutions per minute units of angular velocity. More... | |
constexpr auto | EarthlyLinearAcceleration = Real{-9.8f} * MeterPerSquareSecond |
Earthly gravity. More... | |
constexpr auto | BigG = Real{6.67408e-11f} * CubicMeter / (Kilogram * SquareSecond) |
Big "G". More... | |
constexpr auto | InvalidBodyID = static_cast<BodyID>(static_cast<BodyID::underlying_type>(-1)) |
Invalid body ID value. | |
constexpr auto | InvalidContactID |
Invalid contact ID value. More... | |
constexpr auto | InvalidFixtureID |
Invalid fixture ID value. More... | |
constexpr auto | InvalidJointID = static_cast<JointID>(static_cast<JointID::underlying_type>(-1)) |
Invalid joint ID value. | |
Name space for all PlayRho related names.
using playrho::BodyCounter = typedef std::remove_const<decltype(MaxBodies)>::type |
Count type for bodies.
MaxBodies
value. using playrho::ChildCounter = typedef std::remove_const<decltype(MaxChildCount)>::type |
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 Wider<BodyCounter>::type |
Count type for contacts.
BodyCounter
. using playrho::Fixed32 = typedef Fixed<std::int32_t,9> |
32-bit fixed precision type.
This is a 32-bit fixed precision type with a Q number-format of Q23.9
.
using playrho::FixtureCounter = typedef std::remove_const<decltype(MaxFixtures)>::type |
Counter type for fixtures.
MaxFixtures
value. using playrho::Force2 = typedef Vector2<Force> |
2-element vector of Force quantities.
using playrho::HasNullaryFunctor = typedef HasFunctor<Type,Return()> |
Has nullary functor type alias.
using playrho::HasUnaryFunctor = typedef 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<decltype(MaxJoints)>::type |
Counter type for joints.
MaxJoints
value. 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 the necessary support: all common mathematical functions, support for infinity and NaN, and a specialization of the std::numeric_limits
class template for it. Fixed32
and Fixed64
aliases of the Fixed
template type are provided as examples of qualifying literal types though the usability of these are limited and their use is discouraged.Fixed32
is not advised as its numerical limitations are more likely to result in problems like overflows or underflows. Real
).using playrho::TimestepIters = typedef std::uint8_t |
Time step iterations type.
A type for counting iterations per time-step.
using playrho::TupleContainsType = typedef typename HasType<T, Tuple>::type |
Tuple contains type alias.
Alias in case the trait itself should be std::true_type
or std::false_type
.
using playrho::Vec2 = typedef Vector2<Real> |
Vector with 2 Real elements.
Real
type (or 8 using Real of float). using playrho::Vec3 = typedef Vector3<Real> |
A 3-dimensional column vector with 3 elements.
Real
- i.e. 12-bytes (with 4-byte Real). using playrho::Vector2 = typedef Vector<T, 2> |
using playrho::Vector3 = typedef Vector<T, 3> |
using playrho::VertexCounter = typedef std::remove_const<decltype(MaxShapeVertices)>::type |
Vertex count type.
ContactFeature::Index
type.
|
strong |
Type of body.
|
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(), playrho::StackAllocator::Allocate(), and playrho::StackAllocator::StackAllocator().
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.
|
constexpr |
Gets whether a given value is almost zero.
An almost zero value is "subnormal". Dividing by these values can lead to odd results like a divide by zero trap occurring.
true
if the given value is almost zero, false
otherwise. Referenced by AlmostEqual(), playrho::d2::ClipSegmentToLine(), ComputeCentroid(), playrho::d2::Distance(), playrho::d2::GetMassData(), playrho::d2::GetToiViaSat(), Invert(), Normalize(), playrho::d2::RayCast(), and Solve().
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. Referenced by playrho::d2::WorldImpl::Destroy().
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. void playrho::Free | ( | void * | mem | ) |
Frees memory.
Alloc
, consider also changing this function. Referenced by playrho::BlockAllocator::Clear(), playrho::d2::DynamicTree::Clear(), playrho::StackAllocator::Free(), playrho::BlockAllocator::Free(), playrho::GrowableStack< T, N >::push(), Realloc(), playrho::d2::DynamicTree::RebuildBottomUp(), and playrho::d2::DynamicTree::~DynamicTree().
|
constexprnoexcept |
Gets the center of the given interval.
Interval::value_type
. Referenced by playrho::d2::RayCast().
|
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.
|
constexprnoexcept |
Gets an invalid AABB value.
Gets an invalid value for the JointID type.
Gets an invalid value for the FixtureID type.
Gets an invalid value for the ContactID type.
Gets an invalid value for the BodyID type.
Gets an invalid value for the 3-element vector of real (Vec3
) type.
Gets an invalid value for the Vec2
type.
Gets an invalid value for the UnitVec
type.
Gets an invalid value for the TypeID type.
Gets an invalid value for the std::size_t type.
Gets an invalid value for the long double type.
Gets an invalid value for the double type.
Gets an invalid value for the float type.
Gets an invalid value for the type.
Gets an invalid value for a Mat22
.
Gets an invalid value.
T | Type to get an invalid value for. |
|
noexcept |
Gets the movement configuration from the given value.
maxTranslation
and maxRotation
fields of the given value respectively are returned. Referenced by playrho::d2::WorldImpl::SolveRegIslandViaGS(), and playrho::d2::WorldImpl::SolveToiViaGS().
|
constexprnoexcept |
|
constexprnoexcept |
Gets the size of the given interval.
Gets the difference between the max and min values.
Interval::value_type
. Referenced by playrho::detail::GetDimensions(), and playrho::d2::GetPerimeter().
|
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::IsAccelerable().
|
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::IsSpeedable().
|
constexprnoexcept |
Determines if the given value is valid.
Determines whether the given vector contains finite coordinates.
|
constexprnoexcept |
Determines if the given value is valid.
|
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::d2::Count().
|
constexpr |
Gets the maximum size of the given container of index pairs.
Mixes friction.
Friction mixing formula. The idea is to allow either fixture 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::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::GetDefaultRestitution().
|
constexprnoexcept |
Constrained value inequality operator for value types which support it.
LhsValueType | Type of the value used by the left hand side checked value. |
LhsCheckerType | Type of the checker used by the left hand side checked value. |
RhsValueType | Type of the value used by the right hand side checked value. |
RhsCheckerType | Type of the checker used by the right hand side checked value. |
|
constexpr |
Constrained value inequality operator.
ValueType | Type of the value used by the checked value. |
CheckerType | Type of the checker used by the checked value. |
Other | Type of the other value that this operation will operator with. |
|
constexprnoexcept |
Inequality operator.
EqualityComparable
named requirement for Interval objects.
|
constexpr |
Constrained value inequality operator.
ValueType | Type of the value used by the checked value. |
CheckerType | Type of the checker used by the checked value. |
Other | Type of the other value that this operation will operator with. |
|
constexpr |
Constrained value multiplication operator.
LhsValueType | Type of the value used by the left hand side checked value. |
LhsCheckerType | Type of the checker used by the left hand side checked value. |
RhsValueType | Type of the value used by the right hand side checked value. |
RhsCheckerType | Type of the checker used by the right hand side checked value. |
|
constexpr |
Constrained value multiplication operator.
ValueType | Type of the value used by the checked value. |
CheckerType | Type of the checker used by the checked value. |
Other | Type of the other value that this operation will operator with. |
|
constexpr |
Constrained value multiplication operator.
ValueType | Type of the value used by the checked value. |
CheckerType | Type of the checker used by the checked value. |
Other | Type of the other value that this operation will operator with. |
|
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 |
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 |
|
constexpr |
Constrained value addition operator.
LhsValueType | Type of the value used by the left hand side checked value. |
LhsCheckerType | Type of the checker used by the left hand side checked value. |
RhsValueType | Type of the value used by the right hand side checked value. |
RhsCheckerType | Type of the checker used by the right hand side checked value. |
|
constexpr |
Constrained value addition operator.
ValueType | Type of the value used by the checked value. |
CheckerType | Type of the checker used by the checked value. |
Other | Type of the other value that this operation will operator with. |
|
constexprnoexcept |
Matrix addition operator for two same-type, same-sized matrices.
|
constexpr |
Constrained value addition operator.
ValueType | Type of the value used by the checked value. |
CheckerType | Type of the checker used by the checked value. |
Other | Type of the other value that this operation will operator with. |
|
constexpr |
Constrained value subtraction operator.
LhsValueType | Type of the value used by the left hand side checked value. |
LhsCheckerType | Type of the checker used by the left hand side checked value. |
RhsValueType | Type of the value used by the right hand side checked value. |
RhsCheckerType | Type of the checker used by the right hand side checked value. |
|
constexpr |
Constrained value subtraction operator.
ValueType | Type of the value used by the checked value. |
CheckerType | Type of the checker used by the checked value. |
Other | Type of the other value that this operation will operator with. |
|
constexprnoexcept |
Matrix subtraction operator for two same-type, same-sized matrices.
|
constexpr |
Constrained value subtraction operator.
ValueType | Type of the value used by the checked value. |
CheckerType | Type of the checker used by the checked value. |
Other | Type of the other value that this operation will operator with. |
|
constexpr |
Constrained value division operator.
LhsValueType | Type of the value used by the left hand side checked value. |
LhsCheckerType | Type of the checker used by the left hand side checked value. |
RhsValueType | Type of the value used by the right hand side checked value. |
RhsCheckerType | Type of the checker used by the right hand side checked value. |
|
constexpr |
Constrained value division operator.
ValueType | Type of the value used by the checked value. |
CheckerType | Type of the checker used by the checked value. |
Other | Type of the other value that this operation will operator with. |
|
constexpr |
Constrained value division operator.
ValueType | Type of the value used by the checked value. |
CheckerType | Type of the checker used by the checked value. |
Other | Type of the other value that this operation will operator with. |
|
constexpr |
Constrained value less-than operator.
LhsValueType | Type of the value used by the left hand side checked value. |
LhsCheckerType | Type of the checker used by the left hand side checked value. |
RhsValueType | Type of the value used by the right hand side checked value. |
RhsCheckerType | Type of the checker used by the right hand side checked value. |
|
constexpr |
Constrained value less-than operator.
ValueType | Type of the value used by the checked value. |
CheckerType | Type of the checker used by the checked value. |
Other | Type of the other value that this operation will operator with. |
|
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).
|
constexpr |
Constrained value less-than operator.
ValueType | Type of the value used by the checked value. |
CheckerType | Type of the checker used by the checked value. |
Other | Type of the other value that this operation will operator with. |
auto operator<< | ( | ::std::ostream & | os, |
const CheckedValue< ValueType, CheckerType > & | value | ||
) | -> decltype(os << ValueType(value)) |
Constrained value stream output operator for value types which support it.
ValueType | Type of the value used by the checked value. |
CheckerType | Type of the checker used by the checked value. |
|
constexpr |
Constrained value less-than or equal-to operator.
LhsValueType | Type of the value used by the left hand side checked value. |
LhsCheckerType | Type of the checker used by the left hand side checked value. |
RhsValueType | Type of the value used by the right hand side checked value. |
RhsCheckerType | Type of the checker used by the right hand side checked value. |
|
constexpr |
Constrained value less-than or equal-to operator.
ValueType | Type of the value used by the checked value. |
CheckerType | Type of the checker used by the checked value. |
Other | Type of the other value that this operation will operator with. |
|
constexprnoexcept |
Less-than or equal-to operator.
|
constexpr |
Constrained value less-than or equal-to operator.
ValueType | Type of the value used by the checked value. |
CheckerType | Type of the checker used by the checked value. |
Other | Type of the other value that this operation will operator with. |
|
constexprnoexcept |
Constrained value equality operator for value types which support it.
LhsValueType | Type of the value used by the left hand side checked value. |
LhsCheckerType | Type of the checker used by the left hand side checked value. |
RhsValueType | Type of the value used by the right hand side checked value. |
RhsCheckerType | Type of the checker used by the right hand side checked value. |
|
constexpr |
Constrained value equality operator.
ValueType | Type of the value used by the checked value. |
CheckerType | Type of the checker used by the checked value. |
Other | Type of the other value that this operation will operator with. |
|
constexprnoexcept |
Equality operator.
EqualityComparable
named requirement for Interval objects.
|
constexpr |
Constrained value equality operator.
ValueType | Type of the value used by the checked value. |
CheckerType | Type of the checker used by the checked value. |
Other | Type of the other value that this operation will operator with. |
|
constexpr |
Constrained value greater-than operator.
LhsValueType | Type of the value used by the left hand side checked value. |
LhsCheckerType | Type of the checker used by the left hand side checked value. |
RhsValueType | Type of the value used by the right hand side checked value. |
RhsCheckerType | Type of the checker used by the right hand side checked value. |
|
constexpr |
Constrained value greater-than operator.
ValueType | Type of the value used by the checked value. |
CheckerType | Type of the checker used by the checked value. |
Other | Type of the other value that this operation will operator with. |
|
constexprnoexcept |
Greater-than operator.
|
constexpr |
Constrained value greater-than ooperator.
ValueType | Type of the value used by the checked value. |
CheckerType | Type of the checker used by the checked value. |
Other | Type of the other value that this operation will operator with. |
|
constexpr |
Constrained value greater-than or equal-to operator.
LhsValueType | Type of the value used by the left hand side checked value. |
LhsCheckerType | Type of the checker used by the left hand side checked value. |
RhsValueType | Type of the value used by the right hand side checked value. |
RhsCheckerType | Type of the checker used by the right hand side checked value. |
|
constexpr |
Constrained value greater-than or equal-to operator.
ValueType | Type of the value used by the checked value. |
CheckerType | Type of the checker used by the checked value. |
Other | Type of the other value that this operation will operator with. |
|
constexprnoexcept |
Greater-than or equal-to operator.
|
constexpr |
Constrained value greater-than or equal-to operator.
ValueType | Type of the value used by the checked value. |
CheckerType | Type of the checker used by the checked value. |
Other | Type of the other value that this operation will operator with. |
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.
|
constexpr |
Gets the dynamic size of the given collection of index pairs.
GetNumValidIndices
. Referenced by Alloc(), AllocArray(), playrho::BlockAllocator::Allocate(), playrho::StackAllocator::Allocate(), playrho::StackAllocator::AllocateArray(), Average(), ComputeCentroid(), Dot(), playrho::BlockAllocator::Free(), playrho::d2::ConvexHull::Get(), GetAreaOfPolygon(), playrho::BlockAllocator::GetMaxBlockSize(), GetPolarMoment(), playrho::detail::IsFull(), Realloc(), and playrho::detail::Size().
|
constexprnoexcept |
Converts the given value to the value as the underlying type.
std::to_underlying
slated for C++23. Referenced by playrho::d2::WorldImpl::Add(), playrho::d2::WorldImpl::AddContactsToIsland(), playrho::d2::WorldImpl::AddFixture(), playrho::d2::WorldImpl::AddJointsToIsland(), playrho::d2::WorldImpl::AddToIsland(), playrho::d2::At(), playrho::d2::WorldImpl::Clear(), playrho::d2::WorldImpl::CreateAndDestroyProxies(), playrho::d2::WorldImpl::CreateFixture(), playrho::d2::WorldImpl::Destroy(), playrho::d2::WorldImpl::DestroyContacts(), playrho::d2::WorldImpl::GetBody(), playrho::d2::WorldImpl::GetContact(), playrho::d2::WorldImpl::GetContacts(), playrho::d2::WorldImpl::GetFixture(), playrho::d2::WorldImpl::GetFixtures(), playrho::d2::WorldImpl::GetJoint(), playrho::d2::WorldImpl::GetJoints(), playrho::d2::WorldImpl::GetManifold(), GetName(), playrho::d2::VelocityConstraint::GetPoint(), playrho::d2::WorldImpl::GetProxies(), playrho::d2::WorldImpl::GetSoonestContact(), playrho::d2::WorldImpl::InternalDestroy(), playrho::d2::WorldImpl::IsDestroyed(), playrho::d2::WorldImpl::ProcessContactsForTOI(), playrho::d2::WorldImpl::Remove(), playrho::d2::WorldImpl::RemoveFixture(), playrho::d2::WorldImpl::RemoveUnspeedablesFromIslanded(), playrho::d2::WorldImpl::SetBody(), playrho::d2::WorldImpl::SetContact(), playrho::d2::WorldImpl::SetFixture(), playrho::d2::WorldImpl::SetJoint(), playrho::d2::WorldImpl::ShiftOrigin(), playrho::d2::WorldImpl::SolveReg(), playrho::d2::WorldImpl::SolveRegIslandViaGS(), playrho::d2::WorldImpl::SolveToi(), playrho::d2::WorldImpl::SolveToiViaGS(), playrho::d2::WorldImpl::Synchronize(), playrho::d2::WorldImpl::SynchronizeProxies(), playrho::d2::WorldImpl::Update(), playrho::d2::WorldImpl::UpdateContacts(), and playrho::d2::WorldImpl::UpdateContactTOIs().
|
noexcept |
Gets the number of elements that are used in the specified structure.
Referenced by playrho::d2::WorldImpl::SolveToi().
|
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.
Referenced by playrho::d2::DiskShapeConf::GetDefaultRadius(), playrho::d2::ChainShapeConf::GetDefaultVertexRadius(), playrho::d2::EdgeShapeConf::GetDefaultVertexRadius(), playrho::d2::MultiShapeConf::GetDefaultVertexRadius(), playrho::d2::PolygonShapeConf::GetDefaultVertexRadius(), and 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.
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 minimum still time to sleep.
The default minimum time bodies must be still for bodies to be put to sleep.
|
constexpr |
Invalid contact ID value.
Referenced by playrho::d2::WorldImpl::Destroy(), playrho::d2::WorldImpl::GetSoonestContact(), playrho::d2::WorldImpl::InternalDestroy(), and playrho::d2::WorldImpl::SolveToi().
|
constexpr |
|
constexpr |
Invalid index-pair value.
Referenced by playrho::d2::Distance(), playrho::d2::GetIndexPairs(), and GetNumValidIndices().
|
constexpr |
Invalid array of three index-pair elements.
|
constexpr |
Invalid type ID value.
|
constexpr |
Maximum number of bodies in a world.
std::uint16_t
and eliminating one value for invalid. Referenced by playrho::d2::WorldImpl::AddToIsland(), and playrho::d2::WorldImpl::CreateBody().
|
constexpr |
Maximum number of contacts in a world (2147319811).
Uses the formula for the maximum number of edges in an unidirectional graph of MaxBodies
nodes. This occurs when every possible body is connected to every other body.
Referenced by playrho::d2::WorldImpl::Add().
|
constexpr |
Maximum number of fixtures in a world.
std::uint16_t
and eliminating one value for invalid. Referenced by playrho::d2::WorldImpl::CreateFixture().
|
constexpr |
Maximum number of joints in a world.
std::uint16_t
and eliminating one value for invalid. Referenced by playrho::d2::WorldImpl::CreateJoint().
|
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::VelocityConstraint::AddPoint(), playrho::d2::WorldManifold::GetImpulses(), playrho::d2::WorldManifold::GetPoint(), playrho::d2::VelocityConstraint::GetPointAt(), playrho::d2::WorldManifold::GetSeparation(), playrho::d2::VelocityConstraint::PointAt(), and playrho::d2::Manifold::SetPointImpulses().
|
constexpr |
Maximum number of vertices for any shape type.
Referenced by playrho::d2::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(), GetDelta(), playrho::d2::ChainShapeConf::GetMassData(), playrho::d2::GetMassData(), GetNormalized(), and playrho::d2::InitVelocity().
|
constexpr |
Square root of two.
Referenced by playrho::d2::UnitVec::GetBottomRight(), and playrho::d2::UnitVec::GetTopRight().