Definition of an independent and simulatable "world". More...
#include <playrho/d2/World.hpp>
Public Member Functions | |
World (const World &other) | |
Copy constructs this world with a deep copy of the given world. More... | |
World (const WorldConf &def=WorldConf{}) | |
Constructs a world object. More... | |
template<typename T , typename DT = std::decay_t<T>, typename Tp = std::enable_if_t<!std::is_same_v<DT, World> && !std::is_same_v<DT, WorldConf>, DT>, typename = std::enable_if_t<std::is_constructible_v<DT, T>>> | |
World (T &&arg) | |
Polymorphic initializing constructor. More... | |
World (World &&other) noexcept | |
Move constructs this world. More... | |
~World () noexcept | |
Destroys all contained physics entities and releases all related resources. More... | |
World & | operator= (const World &other) |
Copy assigns this world with a deep copy of the given world. More... | |
World & | operator= (World &&other) noexcept |
Move assigns this world. More... | |
Friends | |
void | Clear (World &world) noexcept |
Clears the given world. More... | |
BodyID | CreateBody (World &world, const Body &body, bool resetMassData) |
Creates a rigid body within the world that's a copy of the given one. More... | |
JointID | CreateJoint (World &world, const Joint &def) |
Creates a new joint within the given world. More... | |
ShapeID | CreateShape (World &world, const Shape &def) |
Creates an identifiable copy of the given shape within the specified world. More... | |
void | Destroy (World &world, BodyID id) |
Destroys the identified body. More... | |
void | Destroy (World &world, JointID id) |
Destroys the identified joint. More... | |
void | Destroy (World &world, ShapeID id) |
Destroys the identified shape. More... | |
std::vector< BodyID > | GetBodies (const World &world) |
Gets the valid world body identifiers container for this constant world. More... | |
std::vector< BodyID > | GetBodiesForProxies (const World &world) |
Gets the bodies-for-proxies container for this world. More... | |
Body | GetBody (const World &world, BodyID id) |
Gets the state of the identified body. More... | |
BodyCounter | GetBodyRange (const World &world) noexcept |
Gets the extent of the currently valid body range. More... | |
Contact | GetContact (const World &world, ContactID id) |
Gets the identified contact. More... | |
ContactCounter | GetContactRange (const World &world) noexcept |
Gets the extent of the currently valid contact range. More... | |
std::vector< KeyedContactID > | GetContacts (const World &world) |
Gets the contacts identified within the given world. More... | |
std::vector< std::tuple< ContactKey, ContactID > > | GetContacts (const World &world, BodyID id) |
Gets the container of contacts attached to the identified body. More... | |
Frequency | GetInvDeltaTime (const World &world) noexcept |
Gets the inverse delta time. More... | |
Joint | GetJoint (const World &world, JointID id) |
Gets the value of the identified joint. More... | |
JointCounter | GetJointRange (const World &world) noexcept |
Gets the extent of the currently valid joint range. More... | |
std::vector< JointID > | GetJoints (const World &world) |
Gets the joints of the specified world. More... | |
std::vector< std::pair< BodyID, JointID > > | GetJoints (const World &world, BodyID id) |
Gets the container of valid joints attached to the identified body. More... | |
Manifold | GetManifold (const World &world, ContactID id) |
Gets the manifold for the identified contact. More... | |
std::optional< pmr::StatsResource::Stats > | GetResourceStats (const World &world) noexcept |
Gets the polymorphic memory resource allocator statistics of the specified world. More... | |
Shape | GetShape (const World &world, ShapeID id) |
Gets the shape associated with the identifier. More... | |
ShapeCounter | GetShapeRange (const World &world) noexcept |
Gets the extent of the currently valid shape range. More... | |
std::vector< ShapeID > | GetShapes (const World &world, BodyID id) |
Gets the identities of the shapes associated with the identified body. More... | |
bool | GetSubStepping (const World &world) noexcept |
Gets whether or not sub-stepping is enabled. More... | |
const DynamicTree & | GetTree (const World &world) |
Gets access to the broad-phase dynamic tree information. More... | |
TypeID | GetType (const World &world) noexcept |
Gets the identifier of the type of data the given world can be casted to. More... | |
Interval< Positive< Length > > | GetVertexRadiusInterval (const World &world) noexcept |
Gets the vertex radius interval allowable for the given world. More... | |
bool | IsLocked (const World &world) noexcept |
Is the specified world locked. More... | |
bool | IsStepComplete (const World &world) noexcept |
Whether or not "step" is complete. More... | |
bool | operator!= (const World &lhs, const World &rhs) noexcept |
Inequality operator for world comparisons. More... | |
bool | operator== (const World &lhs, const World &rhs) noexcept |
Equality operator for world comparisons. More... | |
void | SetBeginContactListener (World &world, ContactFunction listener) noexcept |
Sets the begin-contact lister. More... | |
void | SetBody (World &world, BodyID id, const Body &body) |
Sets the state of the identified body. More... | |
void | SetContact (World &world, ContactID id, const Contact &value) |
Sets the identified contact's state. More... | |
void | SetDetachListener (World &world, BodyShapeFunction listener) noexcept |
Sets the detach listener for shapes detaching from bodies. More... | |
void | SetEndContactListener (World &world, ContactFunction listener) noexcept |
Sets the end-contact lister. More... | |
void | SetJoint (World &world, JointID id, const Joint &def) |
Sets the value of the identified joint. More... | |
void | SetJointDestructionListener (World &world, JointFunction listener) noexcept |
Sets the destruction listener for joints. More... | |
void | SetManifold (World &world, ContactID id, const Manifold &value) |
Sets the identified manifold's state. More... | |
void | SetPostSolveContactListener (World &world, ContactImpulsesFunction listener) noexcept |
Sets the post-solve-contact lister. More... | |
void | SetPreSolveContactListener (World &world, ContactManifoldFunction listener) noexcept |
Sets the pre-solve-contact lister. More... | |
void | SetShape (World &world, ShapeID, const Shape &def) |
Sets the identified shape to the new value. More... | |
void | SetShapeDestructionListener (World &world, ShapeFunction listener) noexcept |
Sets the destruction listener for shapes. More... | |
void | SetSubStepping (World &world, bool flag) noexcept |
Enables/disables single stepped continuous physics. More... | |
void | ShiftOrigin (World &world, const Length2 &newOrigin) |
Shifts the origin of the specified world. More... | |
StepStats | Step (World &world, const StepConf &conf) |
Steps the given world simulation according to the given configuration. More... | |
template<typename T > | |
std::add_pointer_t< std::add_const_t< T > > | TypeCast (const World *value) noexcept |
Casts the given world into its current underlying configuration value. More... | |
template<typename T > | |
std::add_pointer_t< T > | TypeCast (World *value) noexcept |
Casts the given world into its current configuration value. More... | |
Related Functions | |
(Note that these are not member functions.) | |
void | ApplyAngularImpulse (World &world, BodyID id, AngularMomentum impulse) |
Applies an angular impulse. More... | |
void | ApplyForce (World &world, BodyID id, const Force2 &force, const Length2 &point) |
Apply a force at a world point. More... | |
void | ApplyForceToCenter (World &world, BodyID id, const Force2 &force) |
Applies a force to the center of mass of the given body. More... | |
void | ApplyLinearImpulse (World &world, BodyID id, const Momentum2 &impulse, const Length2 &point) |
Applies an impulse at a point. More... | |
void | ApplyTorque (World &world, BodyID id, Torque torque) |
Applies a torque. More... | |
void | Attach (World &world, BodyID id, const Shape &shape, bool resetMassData=true) |
Creates the shape within the world and then associates it with the validly identified body. More... | |
void | Attach (World &world, BodyID id, ShapeID shapeID, bool resetMassData=true) |
Associates a validly identified shape with the validly identified body. More... | |
BodyCounter | Awaken (World &world) |
Awakens all of the "speedable" bodies in the given world. More... | |
bool | Awaken (World &world, BodyID id) |
Awakens the body if it's asleep and "speedable". More... | |
Acceleration | CalcGravitationalAcceleration (const World &world, BodyID id) |
Calculates the gravitationally associated acceleration for the given body within its world. More... | |
void | ClearForces (World &world) |
Clears forces. More... | |
AABB | ComputeAABB (const World &world, BodyID bodyID, ShapeID shapeID) |
Computes the AABB for the identified shape relative to the identified body within the given world. More... | |
AABB | ComputeAABB (const World &world, BodyID id) |
Computes the AABB for the identified body within the given world. More... | |
AABB | ComputeIntersectingAABB (const World &world, BodyID bA, ShapeID sA, ChildCounter iA, BodyID bB, ShapeID sB, ChildCounter iB) |
Computes the intersecting AABB for the given pair of body-shape-index values. More... | |
AABB | ComputeIntersectingAABB (const World &world, const Contact &contact) |
Computes the intersecting AABB for the given contact. More... | |
MassData | ComputeMassData (const World &world, BodyID id) |
Computes the identified body's mass data. More... | |
MassData | ComputeMassData (const World &world, const Span< const ShapeID > &ids) |
Computes the mass data total of the identified shapes. More... | |
BodyID | CreateBody (World &world, const BodyConf &def, bool resetMassData=true) |
Creates a rigid body with the given configuration. More... | |
template<typename T > | |
JointID | CreateJoint (World &world, const T &value) |
Creates a new joint from a configuration. More... | |
template<typename T > | |
auto | CreateShape (World &world, const T &shapeConf) -> decltype(CreateShape(world, Shape{shapeConf})) |
Creates a shape within the specified world using a configuration of the shape. More... | |
bool | Detach (World &world, BodyID id, bool resetMassData=true) |
Disassociates all of the associated shape from the validly identified body. More... | |
bool | Detach (World &world, BodyID id, ShapeID shapeID, bool resetMassData=true) |
Disassociates a validly identified shape from the validly identified body. More... | |
void | EnableLimit (World &world, JointID id, bool value) |
Sets whether the identified joint's limit is enabled or not. More... | |
void | EnableMotor (World &world, JointID id, bool value) |
BodyID | FindClosestBody (const World &world, const Length2 &location) |
Finds body in given world that's closest to the given location. More... | |
Acceleration | GetAcceleration (const World &world, BodyID id) |
Gets the acceleration of the identified body. More... | |
Length2 | GetAnchorA (const World &world, JointID id) |
Length2 | GetAnchorB (const World &world, JointID id) |
Angle | GetAngle (const World &world, BodyID id) |
Gets the angle of the identified body. More... | |
Angle | GetAngle (const World &world, const RevoluteJointConf &conf) |
Gets the current angle of the given configuration in the given world. More... | |
Angle | GetAngle (const World &world, JointID id) |
Gets the angle property of the identified joint if it has it. More... | |
AngularAcceleration | GetAngularAcceleration (const World &world, BodyID id) |
Gets this body's angular acceleration. More... | |
Frequency | GetAngularDamping (const World &world, BodyID id) |
Gets the angular damping of the body. More... | |
Angle | GetAngularLowerLimit (const World &world, JointID id) |
RotInertia | GetAngularMass (const World &world, JointID id) |
Gets the computed angular rotational inertia used by the joint. More... | |
AngularMomentum | GetAngularMotorImpulse (const World &world, JointID id) |
Gets the angular motor impulse of the identified joint if it has this property. More... | |
Angle | GetAngularOffset (const World &world, JointID id) |
Gets the target angular offset. More... | |
AngularMomentum | GetAngularReaction (const World &world, JointID id) |
Get the angular reaction on body-B for the identified joint. More... | |
Angle | GetAngularUpperLimit (const World &world, JointID id) |
AngularVelocity | GetAngularVelocity (const World &world, BodyID id) |
Gets the angular velocity. More... | |
AngularVelocity | GetAngularVelocity (const World &world, const RevoluteJointConf &conf) |
Gets the current angular velocity of the given configuration. More... | |
AngularVelocity | GetAngularVelocity (const World &world, const WheelJointConf &conf) |
Gets the angular velocity for the given configuration within the specified world. More... | |
AngularVelocity | GetAngularVelocity (const World &world, JointID id) |
Gets the angular velocity of the identified joint if it has this property. More... | |
ShapeCounter | GetAssociationCount (const World &world) |
Gets the count of body-shape associations in the given world. More... | |
BodyCounter | GetAwakeCount (const World &world) |
Gets the count of awake bodies in the given world. More... | |
BodyID | GetBodyA (const World &world, ContactID id) |
Gets the body-A of the identified contact if it has one. More... | |
BodyID | GetBodyA (const World &world, JointID id) |
Gets the identifier of body-A of the identified joint. More... | |
BodyID | GetBodyB (const World &world, ContactID id) |
Gets the body-B of the identified contact if it has one. More... | |
BodyID | GetBodyB (const World &world, JointID id) |
Gets the identifier of body-B of the identified joint. More... | |
BodyCounter | GetBodyCount (const World &world) noexcept |
Gets the body count in the given world. More... | |
Force2 | GetCentripetalForce (const World &world, BodyID id, const Length2 &axis) |
Gets the centripetal force necessary to put the body into an orbit having the given radius. More... | |
ChildCounter | GetChildIndexA (const World &world, ContactID id) |
Gets the child primitive index A for the identified contact. More... | |
ChildCounter | GetChildIndexB (const World &world, ContactID id) |
Gets the child primitive index B for the identified contact. More... | |
bool | GetCollideConnected (const World &world, JointID id) |
Gets collide connected for the specified joint. More... | |
ContactCounter | GetContactCount (const World &world) noexcept |
Gets the count of contacts in the given world. More... | |
Length | GetCurrentLengthA (const World &world, JointID id) |
Get the current length of the segment attached to body-A. More... | |
Length | GetCurrentLengthB (const World &world, JointID id) |
Get the current length of the segment attached to body-B. More... | |
Real | GetDampingRatio (const World &world, JointID id) |
Gets the damping ratio associated with the identified joint if it has one. More... | |
Real | GetDefaultFriction (const World &world, ContactID id) |
Gets the default friction amount for the identified contact. More... | |
Real | GetDefaultRestitution (const World &world, ContactID id) |
Gets the default restitution amount for the identified contact. More... | |
NonNegative< AreaDensity > | GetDensity (const World &world, ShapeID id) |
Gets the density of this shape. More... | |
DistanceJointConf | GetDistanceJointConf (const World &world, BodyID bodyA, BodyID bodyB, const Length2 &anchorA=Length2{}, const Length2 &anchorB=Length2{}) |
Gets the configuration for a joint with the given parameters. More... | |
Filter | GetFilterData (const World &world, ShapeID id) |
Gets the filter data for the identified shape. More... | |
Frequency | GetFrequency (const World &world, JointID id) |
Gets the frequency of the identified joint if it has this property. More... | |
NonNegativeFF< Real > | GetFriction (const World &world, ContactID id) |
Gets the friction used with the identified contact. More... | |
NonNegativeFF< Real > | GetFriction (const World &world, ShapeID id) |
Gets the coefficient of friction of the specified shape. More... | |
FrictionJointConf | GetFrictionJointConf (const World &world, BodyID bodyA, BodyID bodyB, const Length2 &anchor) |
Gets the confguration for the given parameters. More... | |
GearJointConf | GetGearJointConf (const World &world, JointID id1, JointID id2, Real ratio=Real{1}) |
Gets the configuration for the given parameters. More... | |
Length2 | GetGroundAnchorA (const World &world, JointID id) |
Length2 | GetGroundAnchorB (const World &world, JointID id) |
InvMass | GetInvMass (const World &world, BodyID id) |
Gets the inverse total mass of the body. More... | |
InvRotInertia | GetInvRotInertia (const World &world, BodyID id) |
Gets the inverse rotational inertia of the body. More... | |
JointCounter | GetJointCount (const World &world) |
Length | GetJointTranslation (const World &world, JointID id) |
Gets the current joint translation. More... | |
Length | GetLength (const World &world, JointID id) |
Gets the length associated with the identified joint if it has one. More... | |
LimitState | GetLimitState (const World &world, JointID id) |
Gets the joint's limit state if it has one. More... | |
LinearAcceleration2 | GetLinearAcceleration (const World &world, BodyID id) |
Gets this body's linear acceleration. More... | |
Frequency | GetLinearDamping (const World &world, BodyID id) |
Gets the linear damping of the body. More... | |
Momentum | GetLinearMotorImpulse (const World &world, JointID id) |
Gets the linear motor impulse of the identified joint if it supports that. More... | |
Length2 | GetLinearOffset (const World &world, JointID id) |
Gets the target linear offset, in frame A. More... | |
Momentum2 | GetLinearReaction (const World &world, JointID id) |
Gets the linear reaction on body-B at the joint anchor. More... | |
LinearVelocity2 | GetLinearVelocity (const World &world, BodyID id) |
Gets the linear velocity of the center of mass of the identified body. More... | |
LinearVelocity | GetLinearVelocity (const World &world, const PrismaticJointConf &joint) noexcept |
Gets the current linear velocity of the given configuration. More... | |
Length2 | GetLocalAnchorA (const World &world, JointID id) |
Length2 | GetLocalAnchorB (const World &world, JointID id) |
Length2 | GetLocalCenter (const World &world, BodyID id) |
Gets the local position of the center of mass of the specified body. More... | |
Length2 | GetLocalPoint (const World &world, BodyID id, const Length2 &worldPoint) |
Gets a local point relative to the body's origin given a world point. More... | |
RotInertia | GetLocalRotInertia (const World &world, BodyID id) |
Gets the rotational inertia of the body about the local origin. More... | |
UnitVec | GetLocalVector (const World &world, BodyID body, const UnitVec &uv) |
Convenience function for getting the local vector of the identified body. More... | |
UnitVec | GetLocalXAxisA (const World &world, JointID id) |
Gets the local-X-axis-A property of the identified joint if it has it. More... | |
UnitVec | GetLocalYAxisA (const World &world, JointID id) |
Gets the local-Y-axis-A property of the identified joint if it has it. More... | |
Length2 | GetLocation (const World &world, BodyID id) |
Convenience function for getting just the location of the identified body. More... | |
Mass | GetMass (const World &world, BodyID id) |
Gets the mass of the body. More... | |
MassData | GetMassData (const World &world, BodyID id) |
Gets the mass data of the body. More... | |
MassData | GetMassData (const World &world, ShapeID id) |
Gets the mass data for the identified shape in the given world. More... | |
Torque | GetMaxMotorTorque (const World &world, JointID id) |
Gets the max motor torque. More... | |
Force | GetMotorForce (const World &world, JointID id, Frequency inv_dt) |
Gets the current motor force for the given joint, given the inverse time step. More... | |
MotorJointConf | GetMotorJointConf (const World &world, BodyID bA, BodyID bB) |
Gets the confguration for the given parameters. More... | |
AngularVelocity | GetMotorSpeed (const World &world, JointID id) |
Gets the motor-speed property of the identied joint if it supports it. More... | |
Torque | GetMotorTorque (const World &world, JointID id, Frequency inv_dt) |
Gets the current motor torque for the given joint given the inverse time step. More... | |
PrismaticJointConf | GetPrismaticJointConf (const World &world, BodyID bA, BodyID bB, const Length2 &anchor, const UnitVec &axis) |
Gets the configuration for the given parameters. More... | |
PulleyJointConf | GetPulleyJointConf (const World &world, BodyID bA, BodyID bB, const Length2 &groundA, const Length2 &groundB, const Length2 &anchorA, const Length2 &anchorB) |
Gets the configuration for the given parameters. More... | |
Real | GetRatio (const World &world, JointID id) |
Gets the ratio property of the identified joint if it has it. More... | |
Angle | GetReferenceAngle (const World &world, JointID id) |
Gets the reference-angle property of the identified joint if it has it. More... | |
Real | GetRestitution (const World &world, ContactID id) |
Gets the restitution used with the identified contact. More... | |
Real | GetRestitution (const World &world, ShapeID id) |
Gets the coefficient of restitution of the specified shape. More... | |
RevoluteJointConf | GetRevoluteJointConf (const World &world, BodyID bodyA, BodyID bodyB, const Length2 &anchor) |
Gets the configuration for the given parameters. More... | |
RotInertia | GetRotInertia (const World &world, BodyID id) |
Gets the rotational inertia of the body. More... | |
ShapeID | GetShapeA (const World &world, ContactID id) |
Gets shape A of the identified contact. More... | |
ShapeID | GetShapeB (const World &world, ContactID id) |
Gets shape B of the identified contact. More... | |
ShapeCounter | GetShapeCount (const World &world, BodyID id) |
Gets the count of shapes associated with the identified body. More... | |
LinearVelocity | GetTangentSpeed (const World &world, ContactID id) |
Gets the tangent speed of the identified contact. More... | |
Length2 | GetTarget (const World &world, JointID id) |
Gets the target point. More... | |
std::optional< UnitIntervalFF< Real > > | GetToi (const World &world, ContactID id) |
Gets the time of impact (TOI) as a fraction or empty value. More... | |
TimestepIters | GetToiCount (const World &world, ContactID id) |
Gets the Time Of Impact (TOI) count. More... | |
ContactCounter | GetTouchingCount (const World &world) |
Gets the touching count for the given world. More... | |
Transformation | GetTransformation (const World &world, BodyID id) |
Gets the body's transformation. More... | |
BodyType | GetType (const World &world, BodyID id) |
Gets the type of the identified body. More... | |
TypeID | GetType (const World &world, JointID id) |
Gets the type of the joint. More... | |
TypeID | GetType (const World &world, ShapeID id) |
Gets the type of the shape. More... | |
ShapeCounter | GetUsedShapesCount (const World &world) noexcept |
Gets the count of uniquely identified shapes that are in use - i.e. that are attached to bodies. More... | |
Velocity | GetVelocity (const World &world, BodyID id) |
Gets the velocity of the identified body. More... | |
WeldJointConf | GetWeldJointConf (const World &world, BodyID bodyA, BodyID bodyB, const Length2 &anchor=Length2{}) |
Gets the configuration for the given parameters. More... | |
WheelJointConf | GetWheelJointConf (const World &world, BodyID bodyA, BodyID bodyB, const Length2 &anchor, const UnitVec &axis=UnitVec::GetRight()) |
Gets the definition data for the given parameters. More... | |
Length2 | GetWorldCenter (const World &world, BodyID id) |
Get the world position of the center of mass of the specified body. More... | |
BodyCounter | GetWorldIndex (const World &, BodyID id) noexcept |
Gets the world index for the given body. More... | |
JointCounter | GetWorldIndex (const World &, JointID id) noexcept |
Gets the world index of the given joint. More... | |
WorldManifold | GetWorldManifold (const World &world, ContactID id) |
Gets the world manifold for the identified contact. More... | |
Length2 | GetWorldPoint (const World &world, BodyID id, const Length2 &localPoint) |
Gets the world coordinates of a point given in coordinates relative to the body's origin. More... | |
UnitVec | GetWorldVector (const World &world, BodyID id, const UnitVec &localVector) |
Convenience function for getting a world vector of the identified body. More... | |
bool | HasValidToi (const World &world, ContactID id) |
Whether or not the contact has a valid TOI. More... | |
bool | IsAccelerable (const World &world, BodyID id) |
Is identified body "accelerable"? More... | |
bool | IsAwake (const World &world, BodyID id) |
Gets the awake/asleep state of this body. More... | |
bool | IsAwake (const World &world, ContactID id) |
Gets the awake status of the specified contact. More... | |
bool | IsEnabled (const World &world, BodyID id) |
Gets the enabled/disabled state of the body. More... | |
bool | IsEnabled (const World &world, ContactID id) |
Gets the enabled status of the identified contact. More... | |
bool | IsEnabled (const World &world, JointID id) |
Gets the enabled/disabled state of the joint. More... | |
bool | IsFixedRotation (const World &world, BodyID id) |
Gets whether the body has fixed rotation. More... | |
bool | IsImpenetrable (const World &world, BodyID id) |
Is the body treated like a bullet for continuous collision detection? More... | |
bool | IsLimitEnabled (const World &world, JointID id) |
Gets whether the identified joint's limit is enabled. More... | |
bool | IsMassDataDirty (const World &world, BodyID id) |
Gets whether the body's mass-data is dirty. More... | |
bool | IsMotorEnabled (const World &world, JointID id) |
bool | IsSensor (const World &world, ShapeID id) |
Is the specified shape a sensor (non-solid)? More... | |
bool | IsSleepingAllowed (const World &world, BodyID id) |
Gets whether the identified body is allowed to sleep. More... | |
bool | IsSpeedable (const World &world, BodyID id) |
Is identified body "speedable". More... | |
bool | IsTouching (const World &world, ContactID id) |
Is this contact touching? More... | |
auto | MakeTouchingMap (const World &world) -> std::map< std::pair< Contactable, Contactable >, ContactID > |
Makes a map of contacts in the given world that are in the touching state. | |
bool | NeedsFiltering (const World &world, ContactID id) |
Whether or not the contact needs filtering. More... | |
bool | NeedsUpdating (const World &world, ContactID id) |
Whether or not the contact needs updating. More... | |
bool | RayCast (const World &world, const RayCastInput &input, const ShapeRayCastCB &callback) |
Ray-cast the world for all fixtures in the path of the ray. More... | |
void | ResetFriction (World &world, ContactID id) |
void | ResetMassData (World &world, BodyID id) |
Resets the mass data properties. More... | |
void | ResetRestitution (World &world, ContactID id) |
void | Rotate (World &world, ShapeID id, const UnitVec &value) |
Rotates all of the given shape's vertices by the given amount. More... | |
void | RotateAboutLocalPoint (World &world, BodyID id, Angle amount, const Length2 &localPoint) |
Rotates a body a given amount around a point in body local coordinates. More... | |
void | RotateAboutWorldPoint (World &world, BodyID id, Angle amount, const Length2 &worldPoint) |
Rotates a body a given amount around a point in world coordinates. More... | |
auto | SameTouching (const World &lhs, const World &rhs) -> bool |
Determines whether the given worlds have the same touching contacts & manifolds. | |
void | Scale (World &world, ShapeID id, const Vec2 &value) |
Scales all of the given shape's vertices by the given amount. More... | |
void | SetAcceleration (World &world, BodyID id, AngularAcceleration value) |
Sets the rotational accelerations on the body. More... | |
void | SetAcceleration (World &world, BodyID id, const Acceleration &value) |
Sets the accelerations on the given body. More... | |
void | SetAcceleration (World &world, BodyID id, const LinearAcceleration2 &linear, AngularAcceleration angular) |
Sets the linear and rotational accelerations on the body. More... | |
void | SetAcceleration (World &world, BodyID id, const LinearAcceleration2 &value) |
Sets the linear accelerations on the body. More... | |
void | SetAccelerations (World &world, const Acceleration &acceleration) |
Sets the accelerations of all the world's bodies to the given value. More... | |
void | SetAccelerations (World &world, const LinearAcceleration2 &acceleration) |
Sets the accelerations of all the world's bodies to the given value. More... | |
template<class F > | |
void | SetAccelerations (World &world, F fn) |
Sets the accelerations of all the world's bodies. More... | |
void | SetAngle (World &world, BodyID id, Angle value) |
Sets the body's angular orientation. More... | |
void | SetAngularDamping (World &world, BodyID id, NonNegative< Frequency > angularDamping) |
Sets the angular damping of the body. More... | |
void | SetAngularLimits (World &world, JointID id, Angle lower, Angle upper) |
void | SetAngularOffset (World &world, JointID id, Angle value) |
Sets the target angular offset. More... | |
void | SetAwake (World &world, BodyID id) |
Wakes up the identified body. More... | |
void | SetAwake (World &world, ContactID id) |
Sets awake the bodies of the given contact. More... | |
void | SetAwake (World &world, JointID id) |
Wakes up the joined bodies. More... | |
void | SetDensity (World &world, ShapeID id, NonNegative< AreaDensity > value) |
Sets the density of this shape. More... | |
void | SetEnabled (World &world, BodyID id, bool value) |
Sets the enabled state of the body. More... | |
void | SetEnabled (World &world, ContactID id) |
Sets the enabled status of the identified contact. More... | |
void | SetEnabled (World &world, ContactID id, bool value) |
Convenience function for setting/unsetting the enabled status of the identified contact based on the value parameter. More... | |
void | SetFilterData (World &world, ShapeID id, const Filter &filter) |
Convenience function for setting the contact filtering data. More... | |
void | SetFixedRotation (World &world, BodyID id, bool value) |
Sets this body to have fixed rotation. More... | |
void | SetForce (World &world, BodyID id, const Force2 &force, const Length2 &point) |
Sets the given amount of force at the given point to the given body. More... | |
void | SetFrequency (World &world, JointID id, Frequency value) |
Sets the frequency of the identified joint if it has this property. More... | |
void | SetFriction (World &world, ContactID id, NonNegative< Real > friction) |
Sets the friction value for the identified contact. More... | |
void | SetFriction (World &world, ShapeID id, NonNegative< Real > value) |
Convenience function for setting the coefficient of friction of the specified shape. More... | |
void | SetImpenetrable (World &world, BodyID id) |
Sets the impenetrable status of the identified body. More... | |
void | SetImpenetrable (World &world, BodyID id, bool value) |
Convenience function that sets/unsets the impenetrable status of the identified body. More... | |
template<typename T > | |
void | SetJoint (World &world, JointID id, const T &value) |
Sets a joint's value from a configuration. More... | |
void | SetLinearDamping (World &world, BodyID id, NonNegative< Frequency > linearDamping) |
Sets the linear damping of the body. More... | |
void | SetLinearOffset (World &world, JointID id, const Length2 &value) |
Sets the target linear offset, in frame A. More... | |
void | SetLocation (World &world, BodyID id, const Length2 &value) |
Sets the body's location. More... | |
void | SetMassData (World &world, BodyID id, const MassData &massData) |
Sets the mass properties to override the mass properties of the fixtures. More... | |
void | SetMaxMotorTorque (World &world, JointID id, Torque value) |
void | SetMotorSpeed (World &world, JointID id, AngularVelocity value) |
Sets the motor-speed property of the identied joint if it supports it. More... | |
void | SetRestitution (World &world, ContactID id, Real restitution) |
Sets the restitution value for the specified contact. More... | |
void | SetRestitution (World &world, ShapeID id, Real value) |
Sets the coefficient of restitution of the specified shape. More... | |
void | SetSensor (World &world, ShapeID id, bool value) |
Convenience function for setting whether the shape is a sensor or not. More... | |
void | SetSleepingAllowed (World &world, BodyID, bool value) |
Sets whether the identified body is allowed to sleep. More... | |
void | SetTangentSpeed (World &world, ContactID id, LinearVelocity value) |
Sets the desired tangent speed for a conveyor belt behavior. More... | |
void | SetTarget (World &world, JointID id, const Length2 &value) |
Sets the target point. More... | |
void | SetTorque (World &world, BodyID id, Torque torque) |
Sets the given amount of torque to the given body. More... | |
void | SetTransform (World &world, BodyID id, const Length2 &location, Angle angle) |
Sets the position of the body's origin and rotation. More... | |
void | SetTransformation (World &world, BodyID id, const Transformation &value) |
Sets the transformation of the body. More... | |
void | SetType (World &world, BodyID id, BodyType value, bool resetMassData=true) |
Sets the type of the given body. More... | |
void | SetVelocity (World &world, BodyID id, AngularVelocity value) |
Sets the velocity of the identified body. More... | |
void | SetVelocity (World &world, BodyID id, const LinearVelocity2 &value) |
Sets the velocity of the identified body. More... | |
void | SetVelocity (World &world, BodyID id, const Velocity &value) |
Sets the body's velocity (linear and angular velocity). More... | |
bool | ShiftOrigin (World &world, JointID id, const Length2 &value) |
Shifts the origin of the identified joint. More... | |
StepStats | Step (World &world, Time delta, TimestepIters velocityIterations=StepConf::DefaultRegVelocityIters, TimestepIters positionIterations=StepConf::DefaultRegPositionIters) |
Steps the world ahead by a given time amount. More... | |
bool | TestPoint (const World &world, BodyID bodyId, ShapeID shapeId, const Length2 &p) |
Tests a point for containment in a shape associated with a body. More... | |
void | Translate (World &world, ShapeID id, const Length2 &value) |
Translates all of the given shape's vertices by the given amount. More... | |
template<typename T > | |
T | TypeCast (const World &value) |
Converts the given joint into its current configuration value. More... | |
template<typename T > | |
T | TypeCast (World &&value) |
Converts the given joint into its current configuration value. More... | |
template<typename T > | |
T | TypeCast (World &value) |
Converts the given joint into its current configuration value. More... | |
void | UnsetAwake (World &world, BodyID id) |
Sleeps the identified body. More... | |
void | UnsetEnabled (World &world, ContactID id) |
Unsets the enabled status of the identified contact. More... | |
void | UnsetImpenetrable (World &world, BodyID id) |
Unsets the impenetrable status of the identified body. More... | |
Definition of an independent and simulatable "world".
The world class manages physics entities, dynamic simulation, and queries. In a physical sense, perhaps this is more like a universe in that entities in a world have no interaction with entities in other worlds. In any case, there's precedence, from a physics-engine standpoint, for this being called a world.
Box2D
which provides a world gravity property). BodyID
, ContactID
, ShapeID
, and JointID
values respectively. GetType(const World& world)
for a world in a valid and specified state, always returns the ID for the type which a TypeCast
function template can be instantiated for when called with the world
object, to access the underlying typed data of that world.Constructs a world object.
Constructs a world object using the default world implementation class that's instantiated with the given configuraion.
StepConf
data given to the Step(World&, const StepConf&)
function. def | A customized world configuration or its default value. |
GetType(const World&)
for the created object returns the value returned by GetTypeID<AabbTreeWorld>()
. GetBodyCount(const World&)
, GetJointCount(const World&)
, GetContactCount(const World&)
for the created object all return 0. GetBodies(const World&)
, GetJoints(const World&)
, GetContacts(const World&)
for the created object all return empty containers. IsLocked(const World&)
, GetSubStepping(const World&)
all return false. playrho::d2::World::World | ( | const World & | other | ) |
Copy constructs this world with a deep copy of the given world.
other | The world to copy construct this one from. |
std::bad_alloc | if memory cannot be allocated. |
|
inlinenoexcept |
Move constructs this world.
other | The world to move construct this one from. |
this
is what other
used to be. other
is in a "valid but unspecified state". The only thing it can be used for, is as the destination of an assignment.
|
inlineexplicit |
Polymorphic initializing constructor.
Constructor for constructing an instance from any class supporting the World
functionality.
arg | A value of a world-concept supporting type to construct this object from. |
std::bad_alloc | if there's a failure allocating storage for the given value. |
GetType(const World&)
for the created object returns the value returned by GetTypeID<std::decay_t<T>>()
.
|
noexcept |
Destroys all contained physics entities and releases all related resources.
Clear(World&)
function. Copy assigns this world with a deep copy of the given world.
other | The other world to copy assign from. |
std::bad_alloc | if memory cannot be allocated. |
Move assigns this world.
other | The other world to move assign from. |
this
is what other
used to be. other
is in a "valid but unspecified state". The only thing it can be used for, is as the destination of an assignment.
|
related |
Applies an angular impulse.
world | The world in which the identified body exists. |
id | Identifier of body to apply the angular impulse to. |
impulse | Angular impulse to be applied. |
WrongState | if this function is called while the world is locked. |
std::out_of_range | If given an invalid body identifier. |
Apply a force at a world point.
world | World in which body exists. |
id | Identity of body to apply the force to. |
force | World force vector. |
point | World position of the point of application. |
WrongState | if this function is called while the world is locked. |
std::out_of_range | If given an invalid body identifier. |
Applies a force to the center of mass of the given body.
world | The world in which the identified body exists. |
id | Identifier of body to apply the force to. |
force | World force vector. |
WrongState | if this function is called while the world is locked. |
std::out_of_range | If given an invalid body identifier. |
|
related |
Applies an impulse at a point.
world | The world in which the identified body exists. |
id | Identifier of body to apply the impulse to. |
impulse | the world impulse vector. |
point | the world position of the point of application. |
WrongState | if this function is called while the world is locked. |
std::out_of_range | If given an invalid body identifier. |
Applies a torque.
world | The world in which the identified body exists. |
id | Identifier of body to apply the torque to. |
torque | about the z-axis (out of the screen). |
WrongState | if this function is called while the world is locked. |
std::out_of_range | If given an invalid body identifier. |
Creates the shape within the world and then associates it with the validly identified body.
std::out_of_range | If given an invalid body. |
WrongState | if this function is called while the world is locked. |
Associates a validly identified shape with the validly identified body.
std::out_of_range | If given an invalid body or shape identifier. |
WrongState | if this function is called while the world is locked. |
|
related |
Awakens all of the "speedable" bodies in the given world.
Convenience function for calling Awaken(World&, BodyID)
for all bodies identified in the given world.
world | The world whose bodies are to be awoken. |
Awaken(World&, BodyID)
that returned true. IsAwake(const World&, BodyID)
returns true for all the "speedable" bodies of the given world. Awakens the body if it's asleep and "speedable".
world | The world for which the identified body is to be awoken. |
id | Identifier of the body within the world to awaken. |
SetAwake(World&, BodyID)
was called on the identified body, false otherwise. WrongState | if this function is called while the world is locked. |
std::out_of_range | If given an invalid body identifier. |
IsAwake(const World&, BodyID)
returns true for the given world and identified body.
|
related |
Calculates the gravitationally associated acceleration for the given body within its world.
std::out_of_range | If given an invalid body identifier. |
|
friend |
Clears the given world.
world | The world to clear. |
|
related |
Clears forces.
Manually clear the force buffer on all bodies.
WrongState | if this function is called while the world is locked. |
Computes the AABB for the identified shape relative to the identified body within the given world.
world | The world in which the given body and shape identifiers identify a body and shape. |
bodyID | Identifier of the body the identified shape is associated with. |
shapeID | Identifier of the shape associated with the identified body to compute the AABB for. |
Computes the AABB for the identified body within the given world.
world | The world in which the given body identifier identifies a body. |
id | Identifier of the body to compute the AABB for. |
|
related |
Computes the intersecting AABB for the given pair of body-shape-index values.
The intersecting AABB for the given pair of body-shape-index values is the intersection of the AABB for child A of shape A of body A with the AABB for child B of shape B of body B.
Computes the intersecting AABB for the given contact.
world | The world for which the given contact relates to. |
contact | The contact identifying bodies, shapes, and children with world to compute the intersecting AABB for. |
Computes the identified body's mass data.
This basically accumulates the mass data over all fixtures.
std::out_of_range | If given an invalid body identifier. |
Computes the mass data total of the identified shapes.
This basically accumulates the mass data over all shapes.
std::out_of_range | If given an invalid shape identifier. |
Creates a rigid body within the world that's a copy of the given one.
world | The world within which to create the body. |
body | A customized body or its default value. |
resetMassData | Whether or not the mass data of the body should be reset. |
Destroy(BodyID)
function. WrongState | if this function is called while the world is locked. |
LengthError | if this operation would create more than MaxBodies . |
std::out_of_range | if the given body references any out of range shape identifiers. |
GetBodies(const World&)
function. GetBody(const World&, BodyID)
with the returned body identifer returns the body given to this create function. Creates a rigid body with the given configuration.
GetBodies(const World&)
function. world | The world within which to create the body. |
def | A customized body configuration or its default value. |
resetMassData | Whether or not the mass data of the body should be reset. |
Destroy(World&, BodyID)
function. WrongState | if this function is called while the world is locked. |
LengthError | if this operation would create more than MaxBodies . |
Creates a new joint within the given world.
world | The world in which the specified joint is to be created within. |
def | State of the joint to create within the world. |
WrongState | if this function is called while the world is locked. |
GetJoints(const World&)
for this same world will contain the identifier returned by this function; GetJoint(const World&, JointID)
for world
and the returned identifier, returns def
. Creates a new joint from a configuration.
This is a convenience function for allowing limited implicit conversions to joints.
WrongState | if this function is called while the world is locked. |
Creates an identifiable copy of the given shape within the specified world.
InvalidArgument | if called for a shape with a vertex radius that's not within the world's allowable vertex radius interval. |
WrongState | if this function is called while the world is locked. |
LengthError | if this operation would create more than MaxShapes . |
|
related |
Creates a shape within the specified world using a configuration of the shape.
This is a convenience function for allowing limited implicit conversions to shapes.
InvalidArgument | if called for a shape with a vertex radius that's not within the world's allowable vertex radius interval. |
WrongState | if called while the world is "locked". |
Destroys the identified body.
Destroys the identified body that had previously been created by a call to this world's CreateBody(const BodyConf&)
function.
world | The world from which to delete the identified body from. |
id | Identifier of body to destroy that had been created in world . |
WrongState | if this function is called while the world is locked. |
std::out_of_range | If given an out of range body identifier. |
GetBodies(const World&)
function; the count returned by GetBodyCount(const World&)
will be one less than before this was called; GetBodyRange(const World&)
will be unchanged. Destroys the identified joint.
world | The world in which the specified joint is to be destroyed from. |
id | Identifier of the joint to destroy. |
WrongState | if this function is called while the world is locked. |
std::out_of_range | If given an out of range joint identifier. |
GetJoints(const World&)
, the count returned by GetJointCount(const World&)
will be one less than before this was called. Destroys the identified shape.
world | The world in which the specified shape is to be destroyed from. |
id | Identifier of the shape to destroy. |
WrongState | if this function is called while the world is locked. |
std::out_of_range | If given an out of range identifier. |
GetShapeRange(const World&)
will be unchanged. Disassociates all of the associated shape from the validly identified body.
std::out_of_range | If given an invalid body identifier. |
WrongState | if this function is called while the world is locked. |
Disassociates a validly identified shape from the validly identified body.
std::out_of_range | If given an invalid body or shape identifier. |
WrongState | if this function is called while the world is locked. |
Sets whether the identified joint's limit is enabled or not.
WrongState | if this function is called while the world is locked. |
std::out_of_range | If given an invalid joint identifier. |
Enable/disable the joint motor.
WrongState | if this function is called while the world is locked. |
std::out_of_range | If given an invalid joint identifier. |
Finds body in given world that's closest to the given location.
world | The world to find closest body to location in. |
location | Location in the given world to find the closest body to. |
InvalidBodyID
.
|
related |
Gets the acceleration of the identified body.
std::out_of_range | If given an invalid body identifier. |
Get the anchor point on body-A in world coordinates.
std::out_of_range | If given an invalid joint identifier. |
Get the anchor point on body-B in world coordinates.
std::out_of_range | If given an invalid joint identifier. |
Gets the angle of the identified body.
std::out_of_range | If given an invalid body identifier. |
|
related |
Gets the current angle of the given configuration in the given world.
world | The world the given joint configuration relates to. |
conf | Configuration of the joint to get the angle for. |
std::out_of_range | If given an invalid body identifier in the joint configuration. |
Gets the angle property of the identified joint if it has it.
std::out_of_range | If given an invalid joint identifier. |
|
related |
Gets this body's angular acceleration.
std::out_of_range | If given an invalid body identifier. |
Gets the angular damping of the body.
std::out_of_range | If given an invalid body identifier. |
Get the lower joint limit.
std::out_of_range | If given an invalid joint identifier. |
|
related |
Gets the computed angular rotational inertia used by the joint.
std::out_of_range | If given an invalid joint identifier. |
|
related |
Gets the angular motor impulse of the identified joint if it has this property.
std::out_of_range | If given an invalid joint identifier. |
Gets the target angular offset.
std::out_of_range | If given an invalid joint identifier. |
|
related |
Get the angular reaction on body-B for the identified joint.
std::out_of_range | If given an invalid joint identifier. |
Get the upper joint limit.
std::out_of_range | If given an invalid joint identifier. |
|
related |
Gets the angular velocity.
world | World in which body is identified for. |
id | Identifier of body to get the angular velocity for. |
std::out_of_range | If given an invalid body identifier. |
|
related |
Gets the current angular velocity of the given configuration.
world | The world the given joint configuration relates to. |
conf | Configuration of the joint to get the angular velocity for. |
std::out_of_range | If given an invalid body identifier in the joint configuration. |
|
related |
Gets the angular velocity for the given configuration within the specified world.
world | The world the given joint configuration relates to. |
conf | Configuration of the joint to get the angular velocity for. |
std::out_of_range | If given an invalid body identifier in the joint configuration. |
|
related |
Gets the angular velocity of the identified joint if it has this property.
std::out_of_range | If given an invalid joint identifier. |
|
related |
Gets the count of body-shape associations in the given world.
world | The world in which to get the shape association count for. |
|
related |
Gets the count of awake bodies in the given world.
world | The world for which to get the awake count for. |
Gets the valid world body identifiers container for this constant world.
Gets a container enumerating the identifiers of bodies currently existing within this world. These are the bodies that had been created from previous calls to CreateBody(World&, const Body&)
that haven't yet been destroyed by a call to Destroy(World& world, BodyID)
or to Clear(World&)
.
world | The world whose body identifiers are to be returned for. |
Gets the state of the identified body.
std::out_of_range | If given an out of range body identifier. |
Gets the body-A of the identified contact if it has one.
InvalidBodyID
. std::out_of_range | If given an invalid contact identifier. |
Gets the identifier of body-A of the identified joint.
std::out_of_range | If given an invalid joint identifier. |
Gets the body-B of the identified contact if it has one.
InvalidBodyID
. std::out_of_range | If given an invalid contact identifier. |
Gets the identifier of body-B of the identified joint.
std::out_of_range | If given an invalid joint identifier. |
|
related |
Gets the body count in the given world.
|
friend |
Gets the extent of the currently valid body range.
BodyID
that is in range for body related functions. world | The world whose body range is to be returned for. |
Gets the centripetal force necessary to put the body into an orbit having the given radius.
std::out_of_range | If given an invalid body identifier. |
|
related |
Gets the child primitive index A for the identified contact.
std::out_of_range | If given an invalid contact identifier. |
|
related |
Gets the child primitive index B for the identified contact.
std::out_of_range | If given an invalid contact identifier. |
Gets collide connected for the specified joint.
std::out_of_range | If given an invalid joint identifier. |
Gets the identified contact.
std::out_of_range | If given an out of range contact identifier. |
|
related |
Gets the count of contacts in the given world.
|
friend |
Gets the extent of the currently valid contact range.
ContactID
that is in range for contact related functions.
|
friend |
Gets the contacts identified within the given world.
GetContact
or GetManifold
.
|
friend |
Gets the container of contacts attached to the identified body.
ContactFunction
. std::out_of_range | If given an out of range body identifier. |
Get the current length of the segment attached to body-A.
std::out_of_range | If given an invalid joint identifier. |
Get the current length of the segment attached to body-B.
std::out_of_range | If given an invalid joint identifier. |
Gets the damping ratio associated with the identified joint if it has one.
std::out_of_range | If given an invalid joint identifier. |
std::invalid_argument | If the identified joint's type doesn't support this. |
Gets the default friction amount for the identified contact.
std::out_of_range | If given an invalid contact identifier. |
Gets the default restitution amount for the identified contact.
std::out_of_range | If given an invalid contact identifier. |
|
related |
Gets the density of this shape.
std::out_of_range | If given an invalid identifier. |
|
related |
Gets the configuration for a joint with the given parameters.
std::out_of_range | If given an invalid body identifier. |
Gets the filter data for the identified shape.
std::out_of_range | If given an invalid identifier. |
Gets the frequency of the identified joint if it has this property.
std::out_of_range | If given an invalid joint identifier. |
|
related |
Gets the friction used with the identified contact.
std::out_of_range | If given an invalid contact identifier. |
|
related |
Gets the coefficient of friction of the specified shape.
std::out_of_range | If given an invalid identifier. |
|
related |
Gets the confguration for the given parameters.
std::out_of_range | If given an invalid body identifier. |
|
related |
Gets the configuration for the given parameters.
std::out_of_range | If given an invalid joint identifier. |
Get the first ground anchor.
std::out_of_range | If given an invalid joint identifier. |
Get the second ground anchor.
std::out_of_range | If given an invalid joint identifier. |
Gets the inverse delta time.
Gets the inverse delta time that was set on construction or assignment, and updated on every call to the Step
function having a non-zero delta-time.
world | The world whose inverse delta time is to be returned for. |
Gets the inverse total mass of the body.
std::out_of_range | If given an invalid body identifier. |
|
related |
Gets the inverse rotational inertia of the body.
std::out_of_range | If given an invalid body identifier. |
Gets the value of the identified joint.
std::out_of_range | If given an out of range joint identifier. |
|
related |
Gets the count of joints in the given world.
|
friend |
Gets the extent of the currently valid joint range.
JointID
that is in range for joint related functions. Gets the joints of the specified world.
CreateJoint(World&, const Joint&)
that haven't yet been destroyed by a call to Destroy(World& world, JointID)
or Clear(World&)
. Gets the container of valid joints attached to the identified body.
std::out_of_range | If given an out of range body identifier. |
Gets the current joint translation.
std::out_of_range | If given an invalid joint identifier. |
Gets the length associated with the identified joint if it has one.
std::out_of_range | If given an invalid joint identifier. |
std::invalid_argument | If the identified joint's type doesn't support this. |
|
related |
Gets the joint's limit state if it has one.
std::out_of_range | If given an invalid joint identifier. |
std::invalid_argument | If the identified joint's type doesn't support this. |
|
related |
Gets this body's linear acceleration.
std::out_of_range | If given an invalid body identifier. |
Gets the linear damping of the body.
std::out_of_range | If given an invalid body identifier. |
Gets the linear motor impulse of the identified joint if it supports that.
std::out_of_range | If given an invalid joint identifier. |
Gets the target linear offset, in frame A.
std::out_of_range | If given an invalid joint identifier. |
Gets the linear reaction on body-B at the joint anchor.
std::out_of_range | If given an invalid joint identifier. |
|
related |
Gets the linear velocity of the center of mass of the identified body.
world | World in which body is identified for. |
id | Identifier of body to get the linear velocity for. |
std::out_of_range | If given an invalid body identifier. |
|
related |
Gets the current linear velocity of the given configuration.
std::out_of_range | If given an invalid body identifier in the given joint conifguration. |
Get the anchor point on body-A in local coordinates.
std::out_of_range | If given an invalid joint identifier. |
Get the anchor point on body-B in local coordinates.
std::out_of_range | If given an invalid joint identifier. |
Gets the local position of the center of mass of the specified body.
std::out_of_range | If given an invalid body identifier. |
Gets a local point relative to the body's origin given a world point.
world | The world in which the identified body exists. |
id | Identifier of body that the returned point should be relative to. |
worldPoint | point in world coordinates. |
std::out_of_range | If given an invalid body identifier. |
|
related |
Gets the rotational inertia of the body about the local origin.
std::out_of_range | If given an invalid body identifier. |
Convenience function for getting the local vector of the identified body.
std::out_of_range | If given an invalid body identifier. |
Gets the local-X-axis-A property of the identified joint if it has it.
std::out_of_range | If given an invalid joint identifier. |
Gets the local-Y-axis-A property of the identified joint if it has it.
std::out_of_range | If given an invalid joint identifier. |
Convenience function for getting just the location of the identified body.
std::out_of_range | If given an invalid body identifier. |
Gets the manifold for the identified contact.
std::out_of_range | If given an out of range contact identifier. |
Gets the mass of the body.
std::out_of_range | If given an invalid body identifier. |
Gets the mass data of the body.
std::out_of_range | If given an invalid body identifier. |
Gets the mass data for the identified shape in the given world.
std::out_of_range | If given an invalid identifier. |
Gets the max motor torque.
std::out_of_range | If given an invalid joint identifier. |
Gets the current motor force for the given joint, given the inverse time step.
std::out_of_range | If given an invalid joint identifier. |
|
related |
Gets the confguration for the given parameters.
std::out_of_range | If given an invalid body identifier. |
|
related |
Gets the motor-speed property of the identied joint if it supports it.
std::out_of_range | If given an invalid joint identifier. |
Gets the current motor torque for the given joint given the inverse time step.
std::out_of_range | If given an invalid joint identifier. |
|
related |
Gets the configuration for the given parameters.
std::out_of_range | If given an invalid body identifier. |
|
related |
Gets the configuration for the given parameters.
std::out_of_range | If given an invalid body identifier. |
Gets the ratio property of the identified joint if it has it.
std::out_of_range | If given an invalid joint identifier. |
Gets the reference-angle property of the identified joint if it has it.
std::out_of_range | If given an invalid joint identifier. |
|
friend |
Gets the polymorphic memory resource allocator statistics of the specified world.
world | The world to get the memory resource allocator statistics for. |
Gets the restitution used with the identified contact.
std::out_of_range | If given an invalid contact identifier. |
Gets the coefficient of restitution of the specified shape.
std::out_of_range | If given an invalid identifier. |
|
related |
Gets the configuration for the given parameters.
std::out_of_range | If given an invalid body identifier. |
|
related |
Gets the rotational inertia of the body.
world | The world in which the identified body exists. |
id | Identifier of body to get the rotational inertia for. |
std::out_of_range | If given an invalid body identifier. |
Gets the shape associated with the identifier.
std::out_of_range | If given an out of range identifier. |
Gets shape A of the identified contact.
std::out_of_range | If given an invalid contact identifier. |
Gets shape B of the identified contact.
std::out_of_range | If given an invalid contact identifier. |
|
related |
Gets the count of shapes associated with the identified body.
std::out_of_range | If given an invalid body identifier. |
|
friend |
Gets the extent of the currently valid shape range.
ShapeID
that is in range for shape related functions. Gets the identities of the shapes associated with the identified body.
std::out_of_range | If given an out of range body identifier. |
|
friend |
Gets whether or not sub-stepping is enabled.
world | The world to return whether sub-stepping is enabled for. |
|
related |
Gets the tangent speed of the identified contact.
std::out_of_range | If given an invalid contact identifier. |
Gets the target point.
std::out_of_range | If given an invalid joint identifier. |
|
related |
Gets the time of impact (TOI) as a fraction or empty value.
std::out_of_range | If given an invalid contact identifier. |
|
related |
Gets the Time Of Impact (TOI) count.
std::out_of_range | If given an invalid contact identifier. |
|
related |
Gets the touching count for the given world.
Basically a convenience function for iterating over all contact identifiers returned from GetContacts(const World&)
for the given world and counting for how many IsTouching(const World&, ContactID)
returns true.
|
related |
Gets the body's transformation.
std::out_of_range | If given an invalid body identifier. |
|
friend |
Gets access to the broad-phase dynamic tree information.
Gets the identifier of the type of data the given world can be casted to.
world | The world for which an identifier of the type of its underlying value is to be returned. |
Gets the type of the identified body.
Gets the type of the joint.
std::out_of_range | If given an invalid joint identifier. |
Gets the type of the shape.
std::out_of_range | If given an invalid identifier. |
|
related |
Gets the count of uniquely identified shapes that are in use - i.e. that are attached to bodies.
world | The world in which to get the used shapes count for. |
Gets the velocity of the identified body.
std::out_of_range | If given an invalid body identifier. |
Gets the vertex radius interval allowable for the given world.
world | The world whose allowable vertex radius interval is to be returned for. |
|
related |
Gets the configuration for the given parameters.
std::out_of_range | If given an invalid body identifier. |
|
related |
Gets the definition data for the given parameters.
std::out_of_range | If given an invalid body identifier. |
Get the world position of the center of mass of the specified body.
std::out_of_range | If given an invalid body identifier. |
|
related |
Gets the world index for the given body.
std::out_of_range | If given an invalid body identifier. |
|
related |
Gets the world index of the given joint.
std::out_of_range | If given an invalid joint identifier. |
|
related |
Gets the world manifold for the identified contact.
std::out_of_range | If given an invalid contact identifier. |
Gets the world coordinates of a point given in coordinates relative to the body's origin.
world | World context. |
id | Identifier of body that the given point is relative to. |
localPoint | a point measured relative the the body's origin. |
std::out_of_range | If given an invalid body identifier. |
Convenience function for getting a world vector of the identified body.
std::out_of_range | If given an invalid body identifier. |
Whether or not the contact has a valid TOI.
std::out_of_range | If given an invalid contact identifier. |
Is identified body "accelerable"?
Indicates whether the body is accelerable, i.e. whether it is effected by forces. Only Dynamic bodies are accelerable.
std::out_of_range | If given an invalid body identifier. |
Gets the awake/asleep state of this body.
std::out_of_range | If given an invalid body identifier. |
Gets the awake status of the specified contact.
std::out_of_range | If given an invalid contact identifier. |
Gets the enabled/disabled state of the body.
std::out_of_range | If given an invalid body identifier. |
Gets the enabled status of the identified contact.
std::out_of_range | If given an invalid contact identifier. |
Gets the enabled/disabled state of the joint.
std::out_of_range | If given an invalid joint identifier. |
Gets whether the body has fixed rotation.
std::out_of_range | If given an invalid body identifier. |
Is the body treated like a bullet for continuous collision detection?
std::out_of_range | If given an invalid body identifier. |
Gets whether the identified joint's limit is enabled.
std::out_of_range | If given an invalid joint identifier. |
|
friend |
Is the specified world locked.
Used to detect whether being called while already within the execution of the Step(World&, const StepConf&)
function - which sets this "lock".
world | The world to return whether it's in a locked state or not. |
Gets whether the body's mass-data is dirty.
std::out_of_range | If given an invalid body identifier. |
Is the joint motor enabled?
std::out_of_range | If given an invalid joint identifier. |
Is the specified shape a sensor (non-solid)?
std::out_of_range | If given an invalid identifier. |
Gets whether the identified body is allowed to sleep.
std::out_of_range | If given an invalid body identifier. |
Is identified body "speedable".
Is the body able to have a non-zero speed associated with it. Kinematic and Dynamic bodies are speedable. Static bodies are not.
std::out_of_range | If given an invalid body identifier. |
|
friend |
Whether or not "step" is complete.
The "step" is completed when there are no more TOI events for the current time step.
world | The world to return whether the step is completed for. |
true
unless sub-stepping is enabled and the step function returned without finishing all of its sub-steps. Is this contact touching?
Touching is defined as either:
std::out_of_range | If given an invalid contact identifier. |
Whether or not the contact needs filtering.
std::out_of_range | If given an invalid contact identifier. |
Whether or not the contact needs updating.
std::out_of_range | If given an invalid contact identifier. |
Inequality operator for world comparisons.
lhs | Left hand side world of the infix binary inequality operator. |
rhs | Right hand side world of the infix binary inequality operator. |
lhs
is not equal to rhs
, false otherwise. Equality operator for world comparisons.
lhs | Left hand side world of the infix binary equality operator. |
rhs | Right hand side world of the infix binary equality operator. |
lhs
is equal to rhs
, false otherwise. Resets the friction mixture to the default value.
std::out_of_range | If given an invalid contact identifier. |
Resets the mass data properties.
This resets the mass data to the sum of the mass properties of the fixtures.
SetMassData
is used. WrongState | if this function is called while the world is locked. |
std::out_of_range | If given an invalid body identifier. |
Resets the restitution to the default value.
std::out_of_range | If given an invalid contact identifier. |
Rotates all of the given shape's vertices by the given amount.
std::bad_alloc
or any exception that's thrown by the constructor for the model's underlying data type. std::bad_alloc | if there's a failure allocating storage. |
std::out_of_range | If given an invalid identifier. |
|
related |
Rotates a body a given amount around a point in body local coordinates.
This changes both the linear and angular positions of the body.
RotateAboutWorldPoint
function. world | The world in which the identified body exists. |
id | Identifier of body to rotate. |
amount | Amount to rotate body by (in counter-clockwise direction). |
localPoint | Point in local coordinates. |
WrongState | if this function is called while the world is locked. |
std::out_of_range | If given an invalid body identifier. |
|
related |
Rotates a body a given amount around a point in world coordinates.
This changes both the linear and angular positions of the body.
world | The world in which the identified body exists. |
id | Identifier of body to rotate. |
amount | Amount to rotate body by (in counter-clockwise direction). |
worldPoint | Point in world coordinates. |
WrongState | if this function is called while the world is locked. |
std::out_of_range | If given an invalid body identifier. |
Scales all of the given shape's vertices by the given amount.
std::bad_alloc
or any exception that's thrown by the constructor for the model's underlying data type. std::bad_alloc | if there's a failure allocating storage. |
std::out_of_range | If given an invalid identifier. |
|
related |
Sets the rotational accelerations on the body.
WrongState | if this function is called while the world is locked. |
std::out_of_range | If given an invalid body identifier. |
|
related |
Sets the accelerations on the given body.
world | The world in which the identified body's acceleration should be set. |
id | Identifier of body whose acceleration should be set. |
value | Acceleration value to set. |
WrongState | if this function is called while the world is locked. |
std::out_of_range | If given an invalid body identifier. |
|
related |
Sets the linear and rotational accelerations on the body.
world | World in which it all happens. |
id | Identifier of body whose acceleration should be set. |
linear | Linear acceleration. |
angular | Angular acceleration. |
WrongState | if this function is called while the world is locked. |
std::out_of_range | If given an invalid body identifier. |
|
related |
Sets the linear accelerations on the body.
WrongState | if this function is called while the world is locked. |
std::out_of_range | If given an invalid body identifier. |
|
related |
Sets the accelerations of all the world's bodies to the given value.
WrongState | if this function is called while the world is locked. |
|
related |
Sets the accelerations of all the world's bodies to the given value.
WrongState | if this function is called while the world is locked. |
|
related |
Sets the accelerations of all the world's bodies.
world | World instance to set the acceleration of all contained bodies for. |
fn | Function or functor with a signature like: Acceleration (*fn)(World&,BodyID) . |
WrongState | if this function is called while the world is locked. |
GetAcceleration(const World&, BodyID)
will return the acceleration assigned to it by the given function. Sets the body's angular orientation.
This instantly adjusts the body to be at the new angular orientation.
world | The world in which the identified body's angle should be set. |
id | Identifier of body to move. |
value | Valid world angle of the body's local origin. |
WrongState | if this function is called while the world is locked. |
std::out_of_range | If given an invalid body identifier. |
|
related |
Sets the angular damping of the body.
WrongState | if this function is called while the world is locked. |
std::out_of_range | If given an invalid body identifier. |
Set the joint limits.
WrongState | if this function is called while the world is locked. |
std::out_of_range | If given an invalid joint identifier. |
Sets the target angular offset.
WrongState | if this function is called while the world is locked. |
std::out_of_range | If given an invalid joint identifier. |
Wakes up the identified body.
WrongState | if this function is called while the world is locked. |
std::out_of_range | If given an invalid body identifier. |
Sets awake the bodies of the given contact.
std::out_of_range | If given an invalid contact identifier. |
Wakes up the joined bodies.
WrongState | if this function is called while the world is locked. |
std::out_of_range | If given an invalid joint identifier. |
|
friend |
Sets the begin-contact lister.
Step(World&,const StepConf&)
function for every contact that transitions from not previously touching, to touching in the step. world | The world to set the listener for. |
listener | Function that the world is to call on these events. |
Sets the state of the identified body.
world | The world containing the identified body whose state is to be set. |
id | Identifier of the body whose state is to be set. |
body | New state of the identified body. |
std::out_of_range | if id is out of range, or if the given body references any shape identifiers that are out of range. |
InvalidArgument | if the specified ID was destroyed. |
GetBody(const World&, BodyID)
for world
and id
returns the value of body
. Sets the identified contact's state.
world | The world of the contact whose state is to be set. |
id | Identifier of the contact whose state is to be set. |
value | Value the contact is to be set to. The new state: is not allowed to change whether the contact is awake, is not allowed to change whether the contact is impenetrable, is not allowed to change whether the contact is for a sensor, is not allowed to change the TOI of the contact, is not allowed to change the TOI count of the contact. Otherwise, this function will throw an InvalidArgument exception and not change anything. |
std::out_of_range | If given an out of range contact identifier or the new contact value references an out of range identifier. |
InvalidArgument | if the identifier is to a freed contact or if the new state is not allowable. |
|
related |
Sets the density of this shape.
std::out_of_range | If given an invalid identifier. |
|
friend |
Sets the detach listener for shapes detaching from bodies.
Destroy(World&,BodyID)
for every shape associated with that identified body. world | The world to set the listener for. |
listener | Function that the world is to call on these events. |
Sets the enabled state of the body.
A disabled body is not simulated and cannot be collided with or woken up. If you pass a flag of true, all fixtures will be added to the broad-phase. If you pass a flag of false, all fixtures will be removed from the broad-phase and all contacts will be destroyed. Fixtures and joints are otherwise unaffected.
WrongState | If call would change body's state when world is locked. |
std::out_of_range | If given an invalid body identifier. |
IsEnabled()
returns the state given to this function. Sets the enabled status of the identified contact.
std::out_of_range | If given an invalid contact identifier. |
Convenience function for setting/unsetting the enabled status of the identified contact based on the value parameter.
std::out_of_range | If given an invalid contact identifier. |
|
friend |
Sets the end-contact lister.
Step(World&,const StepConf&)
function for every contact that transitions from previously touching, to no longer touching in the step. world | The world to set the listener for. |
listener | Function that the world is to call on these events. |
Convenience function for setting the contact filtering data.
std::out_of_range | If given an invalid identifier. |
Sets this body to have fixed rotation.
WrongState | if this function is called while the world is locked. |
std::out_of_range | If given an invalid body identifier. |
Sets the given amount of force at the given point to the given body.
WrongState | if this function is called while the world is locked. |
std::out_of_range | If given an invalid body identifier. |
Sets the frequency of the identified joint if it has this property.
WrongState | if this function is called while the world is locked. |
std::out_of_range | If given an invalid joint identifier. |
|
related |
Sets the friction value for the identified contact.
world | The world in which the contact is identified in. |
id | Identifier of the contact whose friction value should be set. |
friction | Co-efficient of friction value of zero or greater. |
GetFriction(world, id)
returns the value set. std::out_of_range | If given an invalid contact identifier. |
|
related |
Convenience function for setting the coefficient of friction of the specified shape.
std::out_of_range | If given an invalid identifier. |
Sets the impenetrable status of the identified body.
Sets that the body should be treated like a bullet for continuous collision detection.
WrongState | if this function is called while the world is locked. |
std::out_of_range | If given an invalid body identifier. |
Convenience function that sets/unsets the impenetrable status of the identified body.
WrongState | if this function is called while the world is locked. |
std::out_of_range | If given an invalid body identifier. |
Sets the value of the identified joint.
WrongState | if this function is called while the world is locked. |
std::out_of_range | If given an out of range joint identifier. |
Sets a joint's value from a configuration.
This is a convenience function for allowing limited implicit conversions to joints.
WrongState | if this function is called while the world is locked. |
std::out_of_range | If given an out of range joint identifier. |
|
friend |
Sets the destruction listener for joints.
Clear(World&)
for every joint. It's also called on Destroy(BodyID)
for every joint associated with the identified body. world | The world to set the listener for. |
listener | Function that the world is to call on these events. |
|
related |
Sets the linear damping of the body.
WrongState | if this function is called while the world is locked. |
std::out_of_range | If given an invalid body identifier. |
Sets the target linear offset, in frame A.
std::out_of_range | If given an invalid joint identifier. |
Sets the body's location.
This instantly adjusts the body to be at the new location.
world | The world in which the identified body's location should be set. |
id | Identifier of body to move. |
value | Valid world location of the body's local origin. |
WrongState | if this function is called while the world is locked. |
std::out_of_range | If given an invalid body identifier. |
Sets the identified manifold's state.
world | The world of the manifold whose state is to be set. |
id | Identifier of the manifold whose state is to be set. |
value | Value the manifold is to be set to. The new state: TODO: is not allowed to change whether the contact is awake, TODO: is not allowed to change whether the contact is impenetrable. Otherwise, throws InvalidArgument exception and doesn't change anything. |
std::out_of_range | If given an out of range contact identifier or the new manifold value references an out of range identifier. |
InvalidArgument | if the identifier is to a freed contact or if the new state is not allowable. |
Sets the mass properties to override the mass properties of the fixtures.
world | The world in which the identified body exists. |
id | Identifier of the body. |
massData | the mass properties. |
WrongState | if this function is called while the world is locked. |
std::out_of_range | If given an invalid body identifier. |
Sets the maximum motor torque.
WrongState | if this function is called while the world is locked. |
std::out_of_range | If given an invalid joint identifier. |
|
related |
Sets the motor-speed property of the identied joint if it supports it.
WrongState | if this function is called while the world is locked. |
std::out_of_range | If given an invalid joint identifier. |
|
friend |
Sets the post-solve-contact lister.
Step(World&,const StepConf&)
function for every contact that was "solved" during regular processing or TOI processing (or both). world | The world to set the listener for. |
listener | Function that the world is to call on these events. |
|
friend |
Sets the pre-solve-contact lister.
Step(World&,const StepConf&)
function for every non-sensor contact that is touching. world | The world to set the listener for. |
listener | Function that the world is to call on these events. |
Sets the restitution value for the specified contact.
This override the default restitution mixture.
Sets the coefficient of restitution of the specified shape.
std::out_of_range | If given an invalid identifier. |
Convenience function for setting whether the shape is a sensor or not.
std::out_of_range | If given an invalid identifier. |
Sets the identified shape to the new value.
std::out_of_range | If given an out of range shape identifier. |
|
friend |
Sets the destruction listener for shapes.
Clear(World&)
for every shape. world | The world to set the listener for. |
listener | Function that the world is to call on these events. |
Sets whether the identified body is allowed to sleep.
WrongState | if this function is called while the world is locked. |
std::out_of_range | If given an invalid body identifier. |
|
friend |
Enables/disables single stepped continuous physics.
world | The world to set whether or not to do sub-stepping for. |
flag | true to enable sub-stepping, false to disable it. |
GetSubStepping()
function will return the value this function was called with.
|
related |
Sets the desired tangent speed for a conveyor belt behavior.
std::out_of_range | If given an invalid contact identifier. |
Sets the target point.
WrongState | if this function is called while the world is locked. |
std::out_of_range | If given an invalid joint identifier. |
Sets the given amount of torque to the given body.
WrongState | if this function is called while the world is locked. |
std::out_of_range | If given an invalid body identifier. |
Sets the position of the body's origin and rotation.
This instantly adjusts the body to be at the new position and new orientation.
world | The world in which the identified body's transform should be set. |
id | Identifier of body whose transform is to be set. |
location | Valid world location of the body's local origin. |
angle | Valid world rotation. |
WrongState | if this function is called while the world is locked. |
std::out_of_range | If given an invalid body identifier. |
|
related |
Sets the transformation of the body.
This instantly adjusts the body to be at the new transformation.
WrongState | if this function is called while the world is locked. |
std::out_of_range | If given an invalid body identifier. |
Sets the type of the given body.
WrongState | if this function is called while the world is locked. |
std::out_of_range | If given an invalid body identifier. |
|
related |
Sets the velocity of the identified body.
WrongState | if this function is called while the world is locked. |
std::out_of_range | If given an invalid body identifier. |
|
related |
Sets the velocity of the identified body.
WrongState | if this function is called while the world is locked. |
std::out_of_range | If given an invalid body identifier. |
Sets the body's velocity (linear and angular velocity).
WrongState | if this function is called while the world is locked. |
std::out_of_range | If given an invalid body identifier. |
Shifts the origin of the specified world.
position -= newOrigin
. world | The world whose origin is to be shifted. |
newOrigin | the new origin with respect to the old origin |
WrongState | if this function is called while the world is locked. |
Shifts the origin of the identified joint.
WrongState | if this function is called while the world is locked. |
std::out_of_range | If given an invalid joint identifier. |
Steps the given world simulation according to the given configuration.
Performs position and velocity updating, sleeping of non-moving bodies, updating of the contacts, and notifying the contact listener of begin-contact, end-contact, pre-solve, and post-solve events.
p0
) going velocity 0 (v0
) fast with a sum acceleration of a
, after time t
and barring any collisions, will have a new velocity (v1
) of v0 + (a * t)
and a new position (p1
) of p0 + v1 * t
. World
can only operate while the world is not in the middle of being updated by this function. Listeners can use the IsLocked(const World& world)
function to detect whether they've been called in this case or not and then act accordingly. world | The world to simulate a step for. |
conf | Configuration for the simulation step. |
WrongState | if this function is called while the world is locked. |
|
related |
Steps the world ahead by a given time amount.
Performs position and velocity updating, sleeping of non-moving bodies, updating of the contacts, and notifying the contact listener of begin-contact, end-contact, pre-solve, and post-solve events. If the given velocity and position iterations are more than zero, this function also respectively performs velocity and position resolution of the contacting bodies.
p0
going v0
fast with a sum acceleration of a
, after time t
and barring any collisions, will have a new velocity (v1
) of v0 + (a * t)
and a new position (p1
) of p0 + v1 * t
.world | World to step. |
delta | Time to simulate as a delta from the current state. This should not vary. |
velocityIterations | Number of iterations for the velocity constraint solver. |
positionIterations | Number of iterations for the position constraint solver. The position constraint solver resolves the positions of bodies that overlap. |
Translates all of the given shape's vertices by the given amount.
std::bad_alloc
or any exception that's thrown by the constructor for the model's underlying data type. std::bad_alloc | if there's a failure allocating storage. |
std::out_of_range | If given an invalid identifier. |
|
related |
Converts the given joint into its current configuration value.
std::any
class and its associated std::any_cast
function. The code for this is based off of the std::any
implementation from the LLVM Project. std::bad_cast | If the given template parameter type isn't the type of this joint's configuration value. |
|
friend |
Casts the given world into its current underlying configuration value.
std::any
class and its associated std::any_cast
function. The code for this is based off of the std::any
code from the LLVM Project. T | type to cast the underlying value of the given world to, if matching the actual type of the underlying value. |
value | Pointer to the world whose underlying value, if it's type is the type of the template parameter, is to be returned. |
|
related |
Converts the given joint into its current configuration value.
std::any
class and its associated std::any_cast
function. The code for this is based off of the std::any
implementation from the LLVM Project.
|
related |
Converts the given joint into its current configuration value.
std::any
class and its associated std::any_cast
function. The code for this is based off of the std::any
implementation from the LLVM Project.
|
friend |
Casts the given world into its current configuration value.
std::any
class and its associated std::any_cast
function. The code for this is based off of the std::any
implementation from the LLVM Project. T | type to cast the underlying value of the given world to, if matching the actual type of the underlying value. |
value | Pointer to the world whose underlying value, if it's type is the type of the template parameter, is to be returned. |
Sleeps the identified body.
WrongState | if this function is called while the world is locked. |
std::out_of_range | If given an invalid body identifier. |
Unsets the enabled status of the identified contact.
std::out_of_range | If given an invalid contact identifier. |
Unsets the impenetrable status of the identified body.
WrongState | if this function is called while the world is locked. |
std::out_of_range | If given an invalid body identifier. |