Namespaces | |
detail | |
part | |
Classes | |
class | AabbTreeWorld |
An AABB dynamic-tree based world implementation. More... | |
struct | Acceleration |
2-D acceleration related data structure. More... | |
struct | BaseShapeConf |
Base configuration for initializing shapes. More... | |
class | Body |
A "body" physical entity. More... | |
struct | BodyConf |
Configuration for a body. More... | |
class | BodyConstraint |
Constraint for a body. More... | |
struct | ChainShapeConf |
Chain shape configuration. More... | |
class | ContactImpulsesList |
class | ConvexHull |
Convex hull. More... | |
struct | DiskShapeConf |
Disk shape configuration. More... | |
struct | DistanceConf |
Distance Configuration. More... | |
struct | DistanceJointConf |
Distance joint definition. More... | |
struct | DistanceOutput |
Distance Output. More... | |
class | DistanceProxy |
Distance Proxy. More... | |
class | DynamicTree |
A dynamic AABB tree broad-phase. More... | |
struct | EdgeShapeConf |
Edge shape configuration. More... | |
struct | FrictionJointConf |
Friction joint definition. More... | |
struct | GearJointConf |
Gear joint definition. More... | |
class | Joint |
A joint-like constraint on one or more bodies. More... | |
struct | JointBuilder |
Joint builder definition structure. More... | |
struct | JointConf |
Base joint definition class. More... | |
class | Manifold |
A collision response oriented description of the intersection of two convex shapes. More... | |
struct | MotorJointConf |
Motor joint definition. More... | |
struct | MultiShapeConf |
The "multi-shape" shape configuration. More... | |
class | NgonWithFwdNormals |
N-gon of vertices with counter-clockwise "forward" normals. More... | |
class | NgonWithFwdNormals< static_cast< std::size_t >(-1)> |
N-gon of runtime-arbitray vertices with counter-clockwise "forward" normals. More... | |
struct | PointStates |
Point states. More... | |
struct | PolygonShapeConf |
An n-vertex convex polygon shaped part eligible for use with a Shape . More... | |
struct | Position |
2-D positional data structure. More... | |
struct | PositionConstraint |
The per-contact position constraint data structure. More... | |
struct | PositionSolution |
Solution for position constraint. More... | |
struct | PrismaticJointConf |
Prismatic joint definition. More... | |
struct | PulleyJointConf |
Pulley joint definition. More... | |
struct | RayCastHit |
Ray-cast hit data. More... | |
struct | RevoluteJointConf |
Revolute joint definition. More... | |
struct | RopeJointConf |
Rope joint definition. More... | |
struct | SeparationScenarioFaceA |
Face A separation scenario. More... | |
struct | SeparationScenarioFaceB |
Face B separation scenario. More... | |
struct | SeparationScenarioPoints |
Points separation scenario. More... | |
class | Shape |
Shape. More... | |
struct | ShapeBuilder |
Builder configuration structure. More... | |
struct | ShapeConf |
Shape configuration structure. More... | |
class | Simplex |
An encapsulation of a point, line segment, or triangle. More... | |
class | SimplexEdge |
Simplex edge. More... | |
struct | Sweep |
Description of a "sweep" of motion in 2-D space. More... | |
struct | TargetJointConf |
Target joint definition. More... | |
struct | Transformation |
Describes a geometric transformation. More... | |
class | UnitVec |
2-D unit vector. More... | |
struct | Velocity |
2-D velocity related data structure. More... | |
class | VelocityConstraint |
The per-contact velocity constraint data structure. More... | |
class | VertexSet |
Vertex Set. More... | |
struct | WeldJointConf |
Weld joint definition. More... | |
struct | WheelJointConf |
Wheel joint definition. More... | |
class | World |
Definition of an independent and simulatable "world". More... | |
struct | WorldConf |
World configuration data. More... | |
class | WorldManifold |
Essentially a Manifold expressed in world coordinate terms. More... | |
Typedefs | |
using | AABB = ::playrho::detail::AABB< 2 > |
2-Dimensional Axis Aligned Bounding Box. | |
using | BodyConstraints = std::vector< BodyConstraint, pmr::polymorphic_allocator< BodyConstraint > > |
Collection of body constraints. | |
using | BodyContactIDs = std::vector< std::tuple< ContactKey, ContactID > > |
Container type for Body associated contact information. | |
using | BodyIDs = std::vector< BodyID > |
Body IDs container type. | |
using | BodyJointIDs = std::vector< std::pair< BodyID, JointID > > |
Body joint IDs container type. | |
using | BodyShapeIDs = std::vector< std::pair< BodyID, ShapeID > > |
Body shape IDs container type. | |
using | ContactImpulsesFunction = std::function< void(ContactID, const ContactImpulsesList &, unsigned)> |
Contact-impulses function. | |
using | ContactManifoldFunction = std::function< void(ContactID, const Manifold &)> |
Contact-manifolds function. | |
using | DynamicTreeRayCastCB = std::function< Real(BodyID body, ShapeID shape, ChildCounter child, const RayCastInput &input)> |
Ray cast callback function. More... | |
using | DynamicTreeSizeCB = std::function< DynamicTreeOpcode(DynamicTree::Size)> |
Query callback type. | |
using | JointIDs = std::vector< JointID > |
Joint IDs container type. More... | |
using | KeyedContactIDs = std::vector< KeyedContactID > |
Keyed contact IDs container type. | |
using | LengthIndices = ::playrho::detail::LengthIndices< 2 > |
Length and vertex counter array of indices for 2-D space. | |
using | MassData = ::playrho::detail::MassData< 2 > |
Mass data alias for 2-D objects. | |
using | PositionConstraints = std::vector< PositionConstraint, pmr::polymorphic_allocator< PositionConstraint > > |
Collection of position constraints. | |
using | ProxyIDs = std::vector< DynamicTree::Size > |
Proxy container type alias. | |
using | QueryShapeCallback = std::function< bool(BodyID body, ShapeID shape, ChildCounter child)> |
Query AABB for fixtures callback function type. More... | |
using | RayCastInput = playrho::detail::RayCastInput< 2 > |
Ray cast input data for 2-dimensions. | |
using | RayCastOutput = std::optional< RayCastHit > |
Ray cast output. More... | |
using | SeparationInfo = ::playrho::detail::SeparationInfo< 2 > |
Separation information alias for 2-D space. | |
using | SeparationScenario = std::variant< SeparationScenarioPoints, SeparationScenarioFaceA, SeparationScenarioFaceB > |
Separation scenario. | |
using | ShapeRayCastCB = std::function< RayCastOpcode(BodyID body, ShapeID shape, ChildCounter child, const Length2 &point, UnitVec normal)> |
Ray cast callback function signature. | |
using | SimplexEdges = ArrayList< SimplexEdge, MaxSimplexEdges, std::remove_const_t< decltype(MaxSimplexEdges)> > |
Simplex edge collection. | |
using | VelocityConstraints = std::vector< VelocityConstraint, pmr::polymorphic_allocator< VelocityConstraint > > |
Collection of velocity constraints. | |
using | VelocityPair = std::pair< Velocity, Velocity > |
Velocity pair. | |
Enumerations | |
enum class | DynamicTreeOpcode { End , Continue } |
Opcodes for dynamic tree callbacks. | |
Functions | |
void | Advance (Body &body, ZeroToUnderOneFF< Real > value) noexcept |
void | Advance0 (Body &body, ZeroToUnderOneFF< Real > value) noexcept |
Calls the body sweep's Advance0 function to advance to the given value. More... | |
Sweep | Advance0 (const Sweep &sweep, ZeroToUnderOneFF< Real > alpha) noexcept |
Advances the sweep by a factor of the difference between the given time alpha and the sweep's alpha 0. More... | |
void | ApplyAngularImpulse (Body &body, AngularMomentum impulse) noexcept |
Applies an angular impulse. More... | |
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 (Body &body, const Momentum2 &impulse, const Length2 &point) noexcept |
Applies an impulse at a point. 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... | |
BodyConstraint & | At (const Span< BodyConstraint > &container, BodyID key) |
Provides referenced access to the identified element of the given container. | |
void | Attach (AabbTreeWorld &world, BodyID id, ShapeID shapeID) |
Associates a validly identified shape with the validly identified body. 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... | |
bool | Awaken (Body &body) noexcept |
Awakens the body if it's asleep. 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... | |
Length2 | CalcSearchDirection (const SimplexEdges &simplexEdges) noexcept |
Calculates the "search direction" for the given simplex edge list. More... | |
Position | Cap (Position pos, const ConstraintSolverConf &conf) |
Caps the given position by the amounts specified in the given configuration. | |
Velocity | Cap (Velocity velocity, Time h, const MovementConf &conf) noexcept |
Caps velocity. More... | |
void | Clear (World &world) noexcept |
Clears the given world. More... | |
void | ClearForces (World &world) |
Clears forces. More... | |
Manifold | CollideShapes (const DistanceProxy &shapeA, const Transformation &xfA, const DistanceProxy &shapeB, const Transformation &xfB, const Manifold::Conf &conf=GetDefaultManifoldConf()) |
Calculates the relevant collision manifold. More... | |
AABB | ComputeAABB (const DistanceProxy &proxy, const Transformation &xf) noexcept |
Computes the AABB. More... | |
AABB | ComputeAABB (const DistanceProxy &proxy, const Transformation &xfm0, const Transformation &xfm1) noexcept |
Computes the AABB. More... | |
AABB | ComputeAABB (const Shape &shape, const Transformation &xf) |
Computes the AABB for the given shape with the given transformation. | |
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... | |
DynamicTree::Height | ComputeHeight (const DynamicTree &tree) noexcept |
Computes the height of the given dynamic tree. | |
DynamicTree::Height | ComputeHeight (const DynamicTree &tree, DynamicTree::Size index) noexcept |
Computes the height of the tree from a given node. 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... | |
Real | ComputePerimeterRatio (const DynamicTree &tree) noexcept |
Gets the ratio of the sum of the perimeters of nodes to the root perimeter. More... | |
Length | ComputeTotalPerimeter (const DynamicTree &tree) noexcept |
Gets the sum of the perimeters of nodes. More... | |
BodyID | CreateBody (AabbTreeWorld &world, const BodyConf &def) |
Creates a body within the world that's a copy of the given one. | |
BodyID | CreateBody (World &world, const Body &body=Body{}, bool resetMassData=true) |
Creates a rigid body within the world that's a copy of the given one. More... | |
BodyID | CreateBody (World &world, const BodyConf &def, bool resetMassData=true) |
Creates a rigid body with the given configuration. More... | |
JointID | CreateJoint (World &world, const Joint &def) |
Creates a new joint within the given world. More... | |
template<typename T > | |
JointID | CreateJoint (World &world, const T &value) |
Creates a new joint from a configuration. More... | |
ShapeID | CreateShape (World &world, const Shape &def) |
Creates an identifiable copy of the given shape within the specified world. 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... | |
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... | |
bool | Detach (AabbTreeWorld &world, BodyID id, ShapeID shapeID) |
Disassociates a validly identified shape from the validly identified body. 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... | |
DistanceOutput | Distance (const DistanceProxy &proxyA, const Transformation &transformA, const DistanceProxy &proxyB, const Transformation &transformB, DistanceConf conf=DistanceConf{}) |
Determines the closest points between two shapes using an iterative method. More... | |
void | EnableLimit (Joint &object, bool value) |
Enables the specified joint's limit property if it supports one. More... | |
template<typename T > | |
constexpr auto | EnableLimit (T &conf, bool v) noexcept -> decltype(std::declval< T >().UseEnableLimit(bool{})) |
Enables or disables the limit based on the given value. | |
void | EnableLimit (World &world, JointID id, bool value) |
Sets whether the identified joint's limit is enabled or not. More... | |
void | EnableMotor (Joint &object, bool value) |
Enables the specified joint's motor property if it supports one. More... | |
template<typename T > | |
constexpr auto | EnableMotor (T &conf, bool v) noexcept -> decltype(std::declval< T >().UseEnableMotor(bool{})) |
Enables or disables the motor property of the given object. | |
void | EnableMotor (World &world, JointID id, bool value) |
Length | Evaluate (const SeparationScenario &scenario, const DistanceProxy &proxyA, const Transformation &xfA, const DistanceProxy &proxyB, const Transformation &xfB, IndexPair indexPair) |
BodyID | FindClosestBody (const World &world, const Length2 &location) |
Finds body in given world that's closest to the given location. More... | |
auto | FindIndex (const DynamicTree &tree, const Contactable &c) noexcept -> DynamicTree::Size |
Finds index of node matching given contactble using a linear search. More... | |
std::size_t | FindLowestRightMostVertex (Span< const Length2 > vertices) noexcept |
Finds the index of the lowest right most vertex in the given collection. More... | |
LengthIndexPair | FindMinSeparation (const SeparationScenario &scenario, const DistanceProxy &proxyA, const Transformation &xfA, const DistanceProxy &proxyB, const Transformation &xfB) |
Finds the minimum separation. More... | |
template<std::size_t I> | |
constexpr UnitVec::value_type | get (const UnitVec &v) noexcept |
Gets the specified element of the given collection. | |
template<> | |
constexpr UnitVec::value_type | get< 0 > (const UnitVec &v) noexcept |
Gets element 0 of the given collection. | |
template<> | |
constexpr UnitVec::value_type | get< 1 > (const UnitVec &v) noexcept |
Gets element 1 of the given collection. | |
AABB | GetAABB (const DynamicTree &tree) noexcept |
Gets the AABB for the given dynamic tree. More... | |
constexpr AABB | GetAABB (const DynamicTree::TreeNode &node) noexcept |
Gets the AABB of the given dynamic tree node. More... | |
AABB | GetAABB (const playrho::detail::RayCastInput< 2 > &input) noexcept |
Gets the AABB for the given ray cast input data. <2> | |
Acceleration | GetAcceleration (const Body &body) noexcept |
Gets the given body's acceleration. 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 Body &body) noexcept |
Gets the body's angle. More... | |
constexpr auto | GetAngle (const BodyConf &conf) noexcept -> Angle |
Gets the angle of the given configuration. | |
Angle | GetAngle (const Transformation &value) |
Gets the angle of the given transformation. | |
Angle | GetAngle (const UnitVec &value) |
Gets the angle of the given unit vector. | |
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 Body &body) noexcept |
Gets this body's angular acceleration. More... | |
AngularAcceleration | GetAngularAcceleration (const World &world, BodyID id) |
Gets this body's angular acceleration. More... | |
NonNegative< Frequency > | GetAngularDamping (const Body &body) noexcept |
Gets the angular damping of the body. More... | |
Frequency | GetAngularDamping (const World &world, BodyID id) |
Gets the angular damping of the body. More... | |
constexpr auto | GetAngularError (const MotorJointConf &object) noexcept |
Free function for getting the angular error value of the given configuration. | |
Angle | GetAngularLowerLimit (const Joint &object) |
constexpr Angle | GetAngularLowerLimit (const RevoluteJointConf &conf) noexcept |
Free function for getting the angular lower limit value of the given configuration. | |
Angle | GetAngularLowerLimit (const World &world, JointID id) |
RotInertia | GetAngularMass (const Joint &object) |
Gets the given joint's angular mass. More... | |
template<typename T > | |
constexpr auto | GetAngularMass (const T &conf) noexcept -> decltype(std::declval< T >().angularMass) |
Gets the angular mass property of the given object. | |
RotInertia | GetAngularMass (const World &world, JointID id) |
Gets the computed angular rotational inertia used by the joint. More... | |
AngularMomentum | GetAngularMotorImpulse (const Joint &object) |
Gets the angular motor impulse of the joint if it has this property. More... | |
template<typename T > | |
constexpr auto | GetAngularMotorImpulse (const T &conf) noexcept -> decltype(std::declval< T >().angularMotorImpulse) |
Gets the angular motor impulse property of the given object. | |
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 Joint &object) |
Gets the angular offset property of the specified joint if its type has one. More... | |
constexpr auto | GetAngularOffset (const MotorJointConf &object) noexcept |
Free function for getting the angular offset value of the given configuration. | |
template<typename T > | |
constexpr auto | GetAngularOffset (const T &conf) noexcept -> decltype(std::declval< T >().angularOffset) |
Gets the angular offset property of the given object. | |
Angle | GetAngularOffset (const World &world, JointID id) |
Gets the target angular offset. More... | |
constexpr AngularMomentum | GetAngularReaction (const DistanceJointConf &) noexcept |
Gets the current angular reaction for the given configuration. | |
constexpr AngularMomentum | GetAngularReaction (const FrictionJointConf &object) noexcept |
Gets the current angular reaction for the given configuration. | |
constexpr AngularMomentum | GetAngularReaction (const GearJointConf &object) |
Gets the current angular reaction for the given configuration. | |
AngularMomentum | GetAngularReaction (const Joint &object) |
AngularMomentum | GetAngularReaction (const PrismaticJointConf &conf) |
Gets the current angular reaction of the given configuration. | |
constexpr AngularMomentum | GetAngularReaction (const PulleyJointConf &) noexcept |
Gets the current angular reaction of the given configuration. | |
constexpr AngularMomentum | GetAngularReaction (const RevoluteJointConf &conf) noexcept |
Gets the current angular reaction of the given configuration. | |
constexpr AngularMomentum | GetAngularReaction (const RopeJointConf &) noexcept |
Gets the current angular reaction of the given configuration. | |
template<typename T > | |
constexpr auto | GetAngularReaction (const T &conf) noexcept -> decltype(std::declval< T >().angularImpulse) |
Gets the angular reaction property of the given object. | |
constexpr AngularMomentum | GetAngularReaction (const TargetJointConf &) |
Gets the current angular reaction of the given configuration. | |
constexpr AngularMomentum | GetAngularReaction (const WeldJointConf &object) noexcept |
Gets the current angular reaction of the given configuration. | |
AngularMomentum | GetAngularReaction (const World &world, JointID id) |
Get the angular reaction on body-B for the identified joint. More... | |
Angle | GetAngularUpperLimit (const Joint &object) |
Gets the upper joint limit. More... | |
constexpr Angle | GetAngularUpperLimit (const RevoluteJointConf &conf) noexcept |
Free function for getting the angular upper limit value of the given configuration. | |
Angle | GetAngularUpperLimit (const World &world, JointID id) |
AngularVelocity | GetAngularVelocity (const Body &body) noexcept |
Gets the angular velocity. More... | |
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... | |
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... | |
BodyID | GetBodyA (const Joint &object) noexcept |
Gets the first body attached to this joint. | |
constexpr BodyID | GetBodyA (const JointConf &object) noexcept |
Gets the first body attached to this joint. | |
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 Joint &object) noexcept |
Gets the second body attached to this joint. | |
constexpr BodyID | GetBodyB (const JointConf &object) noexcept |
Gets the second body attached to this joint. | |
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... | |
BodyConf | GetBodyConf (const Body &body) |
Gets the body definition for the given body. More... | |
BodyConstraint | GetBodyConstraint (const Body &body, Time time, const MovementConf &conf) noexcept |
Gets the BodyConstraint based on the given parameters. | |
BodyCounter | GetBodyCount (const World &world) noexcept |
Gets the body count in the given world. More... | |
BodyCounter | GetBodyRange (const World &world) noexcept |
Gets the extent of the currently valid body range. 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... | |
ChainShapeConf | GetChainShapeConf (const AABB &arg) |
Gets an enclosing chain shape configuration for the given axis aligned box. | |
ChainShapeConf | GetChainShapeConf (const Length2 &dimensions) |
Gets an enclosing chain shape configuration for an axis aligned rectangle of the given dimensions (width and height). | |
ChainShapeConf | GetChainShapeConf (Length dimension) |
Gets an enclosing chain shape configuration for an axis aligned square of the given dimension. | |
DistanceProxy | GetChild (const ChainShapeConf &arg, ChildCounter index) |
Gets the "child" shape for a given chain shape configuration. | |
DistanceProxy | GetChild (const DiskShapeConf &arg, ChildCounter index) |
Gets the "child" of the given disk shape configuration. | |
DistanceProxy | GetChild (const EdgeShapeConf &arg, ChildCounter index) |
Gets the "child" shape for the given shape configuration. | |
DistanceProxy | GetChild (const MultiShapeConf &arg, ChildCounter index) |
Gets the "child" shape for the given shape configuration. | |
DistanceProxy | GetChild (const PolygonShapeConf &arg, ChildCounter index) |
Gets the "child" shape for the given shape configuration. | |
DistanceProxy | GetChild (const Shape &shape, ChildCounter index) |
Gets the "child" for the given index. More... | |
DistanceProxy | GetChild (Shape &&shape, ChildCounter index)=delete |
Getting the "child" for a temporary is deleted to prevent dangling references. | |
ChildCounter | GetChildCount (const ChainShapeConf &arg) noexcept |
Gets the child count for a given chain shape configuration. | |
constexpr ChildCounter | GetChildCount (const DiskShapeConf &) noexcept |
Gets the "child" count of the given disk shape configuration. | |
constexpr ChildCounter | GetChildCount (const EdgeShapeConf &) noexcept |
Gets the "child" count for the given shape configuration. More... | |
ChildCounter | GetChildCount (const MultiShapeConf &arg) noexcept |
Gets the "child" count for the given shape configuration. | |
constexpr ChildCounter | GetChildCount (const PolygonShapeConf &) noexcept |
Gets the "child" count for the given shape configuration. More... | |
ChildCounter | GetChildCount (const Shape &shape) noexcept |
Gets the number of child primitives of the shape. 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... | |
constexpr Length2 | GetClosestPoint (const Simplex &simplex) |
Gets the "closest point". | |
bool | GetCollideConnected (const Joint &object) noexcept |
Gets collide connected. More... | |
constexpr bool | GetCollideConnected (const JointConf &object) noexcept |
Gets whether attached bodies should collide or not. | |
bool | GetCollideConnected (const World &world, JointID id) |
Gets collide connected for the specified joint. More... | |
constexpr auto | GetConstant (const GearJointConf &object) noexcept |
Free function for getting the constant value of the given configuration. | |
Contact | GetContact (const World &world, ContactID id) |
Gets the identified contact. More... | |
ContactCounter | GetContactCount (const World &world) noexcept |
Gets the count of contacts in the given world. More... | |
ContactImpulsesList | GetContactImpulses (const VelocityConstraint &vc) |
Gets the contact impulses for the given velocity constraint. | |
ContactCounter | GetContactRange (const World &world) noexcept |
Gets the extent of the currently valid contact range. More... | |
LinearVelocity2 | GetContactRelVelocity (const Velocity &velA, const Length2 &relA, const Velocity &velB, const Length2 &relB) noexcept |
Gets the contact relative velocity. 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... | |
std::vector< Length2 > | GetConvexHullAsVector (Span< const Length2 > vertices) |
Gets the convex hull for the given collection of vertices as a vector. More... | |
constexpr auto | GetCorrectionFactor (const MotorJointConf &object) noexcept |
Free function for getting the correction factor value of the given configuration. | |
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 Joint &object) |
Gets the given joint's damping ratio property if it has one. More... | |
template<typename T > | |
constexpr auto | GetDampingRatio (const T &conf) noexcept -> decltype(std::declval< T >().dampingRatio) |
Gets the damping ratio property of the given object. | |
Real | GetDampingRatio (const World &world, JointID id) |
Gets the damping ratio associated with the identified joint if it has one. More... | |
const void * | GetData (const Shape &shape) noexcept |
Gets a pointer to the underlying data. More... | |
constexpr BodyConf | GetDefaultBodyConf () noexcept |
Gets the default body definition. | |
NonNegativeFF< Real > | GetDefaultFriction (const Shape &a, const Shape &b) |
Gets the default friction amount for the given shapes. | |
Real | GetDefaultFriction (const World &world, ContactID id) |
Gets the default friction amount for the identified contact. More... | |
constexpr Manifold::Conf | GetDefaultManifoldConf () noexcept |
Gets the default manifold configuration. | |
Real | GetDefaultRestitution (const Shape &a, const Shape &b) |
Gets the default restitution amount for the given shapes. | |
Real | GetDefaultRestitution (const World &world, ContactID id) |
Gets the default restitution amount for the identified contact. More... | |
constexpr Length2 | GetDelta (PairLength2 arg) noexcept |
Gets the delta to go from the first element to the second. | |
constexpr NonNegative< AreaDensity > | GetDensity (const BaseShapeConf &arg) noexcept |
Gets the density of the given shape configuration. | |
NonNegative< AreaDensity > | GetDensity (const Shape &shape) noexcept |
Gets the density of the given shape. More... | |
NonNegative< AreaDensity > | GetDensity (const World &world, ShapeID id) |
Gets the density of this shape. More... | |
constexpr UnitVec | GetDirection (const Transformation &value) noexcept |
Gets the directional information from the given transformation. | |
DistanceConf | GetDistanceConf (const StepConf &conf) noexcept |
Gets the distance configuration for the given step configuration. | |
DistanceConf | GetDistanceConf (const ToiConf &conf) noexcept |
Gets the distance configuration for the given time of impact configuration. | |
DistanceJointConf | GetDistanceJointConf (const Joint &joint) |
Gets the definition data for the given joint. 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... | |
InvMass | GetEffectiveInvMass (const InvRotInertia &invRotI, const Length2 &p, const UnitVec &q) |
Gets the "effective" inverse mass. | |
Mass22 | GetEffectiveMassMatrix (const TargetJointConf &object, const BodyConstraint &body) noexcept |
Gets the effective mass matrix for the given configuration and body information. | |
constexpr Filter | GetFilter (const BaseShapeConf &arg) noexcept |
Gets the filter of the given shape configuration. | |
Filter | GetFilter (const Shape &shape) noexcept |
Gets the filter value for the given shape. More... | |
Filter | GetFilterData (const World &world, ShapeID id) |
Gets the filter data for the identified shape. More... | |
Force2 | GetForce (const Body &body) noexcept |
Gets the net force that the given body is currently experiencing. | |
Frequency | GetFrequency (const Joint &object) |
Gets the frequency of the joint if it has this property. More... | |
template<typename T > | |
constexpr auto | GetFrequency (const T &conf) noexcept -> decltype(std::declval< T >().frequency) |
Gets the frequency property of the given object. | |
Frequency | GetFrequency (const World &world, JointID id) |
Gets the frequency of the identified joint if it has this property. More... | |
constexpr NonNegativeFF< Real > | GetFriction (const BaseShapeConf &arg) noexcept |
Gets the friction of the given shape. | |
NonNegativeFF< Real > | GetFriction (const Shape &shape) noexcept |
Gets the coefficient of friction. 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 Joint &joint) |
Gets the definition data for the given joint. More... | |
FrictionJointConf | GetFrictionJointConf (const World &world, BodyID bodyA, BodyID bodyB, const Length2 &anchor) |
Gets the confguration for the given parameters. More... | |
template<std::size_t N> | |
std::array< UnitVec, N > | GetFwdNormalsArray (const std::array< Length2, N > &vertices) |
Gets forward normals for the given vertices. | |
template<class T , T... ints> | |
std::array< UnitVec, sizeof...(ints)> | GetFwdNormalsArray (const std::array< Length2, sizeof...(ints)> &vertices, std::integer_sequence< T, ints... > int_seq) |
Gets forward normals for the given vertices. | |
std::vector< UnitVec > | GetFwdNormalsVector (const std::vector< Length2 > &vertices) |
Gets the forward normals for the given container of vertices. | |
constexpr UnitVec | GetFwdPerpendicular (const UnitVec &vector) noexcept |
Gets a vector clockwise (forward-clockwise) perpendicular to the given vector. More... | |
GearJointConf | GetGearJointConf (const Joint &joint) |
Gets the definition data for the given joint. 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 Joint &object) |
template<typename T > | |
constexpr auto | GetGroundAnchorA (const T &conf) noexcept -> decltype(std::declval< T >().groundAnchorA) |
Gets the ground anchor A property of the given object. | |
Length2 | GetGroundAnchorA (const World &world, JointID id) |
Length2 | GetGroundAnchorB (const Joint &object) |
template<typename T > | |
constexpr auto | GetGroundAnchorB (const T &conf) noexcept -> decltype(std::declval< T >().groundAnchorB) |
Gets the ground anchor B property of the given object. | |
Length2 | GetGroundAnchorB (const World &world, JointID id) |
DynamicTree::Height | GetHeight (const DynamicTree &tree) noexcept |
Gets the height of the binary tree. More... | |
IndexPair3 | GetIndexPairs (const SimplexEdges &collection) noexcept |
Gets index pairs for the given edges collection. | |
Frequency | GetInvDeltaTime (const World &world) noexcept |
Gets the inverse delta time. More... | |
NonNegativeFF< InvMass > | GetInvMass (const Body &body) noexcept |
Gets the inverse total mass of the body. More... | |
InvMass | GetInvMass (const World &world, BodyID id) |
Gets the inverse total mass of the body. More... | |
NonNegativeFF< InvRotInertia > | GetInvRotInertia (const Body &body) noexcept |
Gets the inverse rotational inertia of the body. More... | |
InvRotInertia | GetInvRotInertia (const World &world, BodyID id) |
Gets the inverse rotational inertia of the body. More... | |
Joint | GetJoint (const World &world, JointID id) |
Gets the value of the identified joint. More... | |
JointCounter | GetJointCount (const World &world) |
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... | |
Length | GetJointTranslation (const World &world, JointID id) |
Gets the current joint translation. More... | |
constexpr auto | GetLength (const DistanceJointConf &object) noexcept |
Free function for getting the length value of the given configuration. | |
Length | GetLength (const Joint &object) |
Gets the length property of the specified joint if its type has one. More... | |
template<typename T > | |
constexpr auto | GetLength (const T &conf) noexcept -> decltype(std::declval< T >().length) |
Gets the length property of the given object. | |
Length | GetLength (const World &world, JointID id) |
Gets the length associated with the identified joint if it has one. More... | |
constexpr auto | GetLengthA (const PulleyJointConf &object) noexcept |
Free function for getting the length A value of the given configuration. | |
constexpr auto | GetLengthB (const PulleyJointConf &object) noexcept |
Free function for getting the length B value of the given configuration. | |
LimitState | GetLimitState (const Joint &object) |
template<typename T > | |
constexpr auto | GetLimitState (const T &conf) noexcept -> decltype(std::declval< T >().limitState) |
Gets the limit state property of the given object. | |
LimitState | GetLimitState (const World &world, JointID id) |
Gets the joint's limit state if it has one. More... | |
LinearAcceleration2 | GetLinearAcceleration (const Body &body) noexcept |
Gets this body's linear acceleration. More... | |
LinearAcceleration2 | GetLinearAcceleration (const World &world, BodyID id) |
Gets this body's linear acceleration. More... | |
NonNegative< Frequency > | GetLinearDamping (const Body &body) noexcept |
Gets the linear damping of the body. More... | |
Frequency | GetLinearDamping (const World &world, BodyID id) |
Gets the linear damping of the body. More... | |
constexpr auto | GetLinearError (const MotorJointConf &object) noexcept |
Free function for getting the linear error value of the given configuration. | |
Length | GetLinearLowerLimit (const Joint &object) |
constexpr auto | GetLinearLowerLimit (const PrismaticJointConf &conf) noexcept |
Free function for getting the linear lower limit value of the given configuration. | |
Momentum | GetLinearMotorImpulse (const Joint &object) |
template<typename T > | |
constexpr auto | GetLinearMotorImpulse (const T &conf) noexcept -> decltype(std::declval< T >().motorImpulse) |
Gets the linear motor impulse property of the given object. | |
Momentum | GetLinearMotorImpulse (const World &world, JointID id) |
Gets the linear motor impulse of the identified joint if it supports that. More... | |
Length2 | GetLinearOffset (const Joint &object) |
Gets the linear offset property of the specified joint if its type has one. More... | |
constexpr auto | GetLinearOffset (const MotorJointConf &object) noexcept |
Free function for getting the linear offset value of the given configuration. | |
template<typename T > | |
constexpr auto | GetLinearOffset (const T &conf) noexcept -> decltype(std::declval< T >().linearOffset) |
Gets the linear offset property of the given object. | |
Length2 | GetLinearOffset (const World &world, JointID id) |
Gets the target linear offset, in frame A. More... | |
constexpr Momentum2 | GetLinearReaction (const DistanceJointConf &object) noexcept |
Gets the current linear reaction for the given configuration. | |
constexpr Momentum2 | GetLinearReaction (const FrictionJointConf &object) noexcept |
Gets the current linear reaction for the given configuration. | |
constexpr Momentum2 | GetLinearReaction (const GearJointConf &object) |
Gets the current linear reaction for the given configuration. | |
Momentum2 | GetLinearReaction (const Joint &object) |
Momentum2 | GetLinearReaction (const PrismaticJointConf &conf) |
Gets the current linear reaction of the given configuration. | |
constexpr Momentum2 | GetLinearReaction (const PulleyJointConf &object) noexcept |
Gets the current linear reaction of the given configuration. | |
constexpr Momentum2 | GetLinearReaction (const RevoluteJointConf &conf) noexcept |
Gets the current linear reaction of the given configuration. | |
constexpr Momentum2 | GetLinearReaction (const RopeJointConf &object) noexcept |
Gets the current linear reaction of the given configuration. | |
template<typename T > | |
constexpr auto | GetLinearReaction (const T &conf) noexcept -> decltype(std::declval< T >().linearImpulse) |
Gets the linear reaction property of the given object. | |
constexpr Momentum2 | GetLinearReaction (const TargetJointConf &object) |
Gets the current linear reaction of the given configuration. | |
constexpr Momentum2 | GetLinearReaction (const WeldJointConf &object) noexcept |
Gets the current linear reaction of the given configuration. | |
constexpr Momentum2 | GetLinearReaction (const WheelJointConf &object) |
Gets the current linear reaction for the given configuration. | |
Momentum2 | GetLinearReaction (const World &world, JointID id) |
Gets the linear reaction on body-B at the joint anchor. More... | |
Length | GetLinearUpperLimit (const Joint &object) |
constexpr auto | GetLinearUpperLimit (const PrismaticJointConf &conf) noexcept |
Free function for getting the linear upper limit value of the given configuration. | |
LinearVelocity2 | GetLinearVelocity (const Body &body) noexcept |
Gets the linear velocity of the center of mass. 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... | |
LinearVelocity2 | GetLinearVelocityFromLocalPoint (const Body &body, const Length2 &localPoint) noexcept |
Gets the linear velocity from a local point. More... | |
LinearVelocity2 | GetLinearVelocityFromWorldPoint (const Body &body, const Length2 &worldPoint) noexcept |
Gets the linear velocity from a world point attached to this body. More... | |
Length2 | GetLocalAnchorA (const GearJointConf &conf) |
Gets the local anchor A property of the given joint. | |
Length2 | GetLocalAnchorA (const Joint &object) |
constexpr auto | GetLocalAnchorA (const MotorJointConf &) noexcept |
Gets the local anchor A. | |
template<typename T > | |
constexpr auto | GetLocalAnchorA (const T &conf) noexcept -> decltype(std::declval< T >().localAnchorA) |
Gets the local anchor A property of the given object. | |
constexpr auto | GetLocalAnchorA (const TargetJointConf &) noexcept |
Gets the local anchar A for the given configuration. | |
Length2 | GetLocalAnchorA (const World &world, JointID id) |
Length2 | GetLocalAnchorB (const GearJointConf &conf) |
Gets the local anchor B property of the given joint. | |
Length2 | GetLocalAnchorB (const Joint &object) |
constexpr auto | GetLocalAnchorB (const MotorJointConf &) noexcept |
Gets the local anchor B. | |
template<typename T > | |
constexpr auto | GetLocalAnchorB (const T &conf) noexcept -> decltype(std::declval< T >().localAnchorB) |
Gets the local anchor B property of the given object. | |
Length2 | GetLocalAnchorB (const World &world, JointID id) |
Length2 | GetLocalCenter (const Body &body) noexcept |
Gets the local position of the center of mass. | |
Length2 | GetLocalCenter (const World &world, BodyID id) |
Gets the local position of the center of mass of the specified body. More... | |
Length2 | GetLocalPoint (const Body &body, const Length2 &worldPoint) noexcept |
Gets a local point relative to the body's origin given a world point. 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 Body &body) noexcept |
Gets the rotational inertia of the body about the local origin. More... | |
RotInertia | GetLocalRotInertia (const World &world, BodyID id) |
Gets the rotational inertia of the body about the local origin. More... | |
UnitVec | GetLocalVector (const Body &body, const UnitVec &uv) noexcept |
Gets a locally oriented unit vector given a world oriented unit vector. 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 Joint &object) |
Gets the given joint's local X axis A if its type supports that. More... | |
template<typename T > | |
constexpr auto | GetLocalXAxisA (const T &conf) noexcept -> decltype(std::declval< T >().localXAxisA) |
Gets the local X axis A property of the given object. | |
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 Joint &object) |
Gets the given joint's local Y axis A if its type supports that. More... | |
template<typename T > | |
constexpr auto | GetLocalYAxisA (const T &conf) noexcept -> decltype(std::declval< T >().localYAxisA) |
Gets the local Y axis A property of the given object. | |
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 Body &body) noexcept |
Gets the body's origin location. More... | |
constexpr auto | GetLocation (const BodyConf &conf) noexcept -> Length2 |
Gets the location of the given configuration. | |
constexpr Length2 | GetLocation (const Transformation &value) noexcept |
Gets the location information from the given transformation. | |
Length2 | GetLocation (const World &world, BodyID id) |
Convenience function for getting just the location of the identified body. More... | |
Manifold | GetManifold (bool flipped, const DistanceProxy &shape0, const Transformation &xf0, VertexCounter idx0, const DistanceProxy &shape1, const Transformation &xf1, VertexCounter2 indices1, const Manifold::Conf &conf) |
Gets a face-to-face based manifold. More... | |
Manifold | GetManifold (bool flipped, Length totalRadius, const DistanceProxy &shape, const Transformation &sxf, const Length2 &point, const Transformation &xfm) |
Computes manifolds for face-to-point collision. More... | |
Manifold | GetManifold (const Length2 &locationA, const Transformation &xfA, const Length2 &locationB, const Transformation &xfB, Length totalRadius) noexcept |
Gets a point-to-point based manifold. | |
Manifold | GetManifold (const World &world, ContactID id) |
Gets the manifold for the identified contact. More... | |
Manifold::Conf | GetManifoldConf (const StepConf &conf) noexcept |
Gets the manifold configuration for the given step configuration. | |
Mass | GetMass (const Body &body) noexcept |
Gets the mass of the body. More... | |
Mass | GetMass (const World &world, BodyID id) |
Gets the mass of the body. More... | |
MassData | GetMassData (const ChainShapeConf &arg) |
Gets the mass data for a given chain shape configuration. | |
MassData | GetMassData (const DiskShapeConf &arg) |
Gets the mass data of the given disk shape configuration. | |
MassData | GetMassData (const EdgeShapeConf &arg) |
Gets the mass data for the given shape configuration. | |
MassData | GetMassData (const MultiShapeConf &arg) |
Gets the mass data for the given shape configuration. More... | |
MassData | GetMassData (const PolygonShapeConf &arg) |
Gets the mass data for the given shape configuration. | |
MassData | GetMassData (const Shape &shape) |
Gets the mass properties of this shape using its dimensions and density. 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... | |
MassData | GetMassData (Length r, NonNegative< AreaDensity > density, const Length2 &location) |
Computes the mass data for a circular shape. More... | |
MassData | GetMassData (Length r, NonNegative< AreaDensity > density, const Length2 &v0, const Length2 &v1) |
Computes the mass data for a linear shape. More... | |
MassData | GetMassData (Length vertexRadius, NonNegative< AreaDensity > density, Span< const Length2 > vertices) |
Gets the mass data for the given collection of vertices with the given properties. | |
constexpr auto | GetMaxForce (const FrictionJointConf &object) noexcept |
Free function for getting the max force value of the given configuration. | |
Force | GetMaxForce (const Joint &object) |
Gets the given joint's max force if its type supports that. More... | |
constexpr auto | GetMaxForce (const MotorJointConf &object) noexcept |
Free function for getting the maximum force value of the given configuration. | |
template<typename T > | |
constexpr auto | GetMaxForce (const T &conf) noexcept -> decltype(std::declval< T >().maxForce) |
Gets the max force property of the given object. | |
constexpr auto | GetMaxForce (const TargetJointConf &object) noexcept |
Free function for getting the maximum force value of the given configuration. | |
DynamicTree::Height | GetMaxImbalance (const DynamicTree &tree) noexcept |
Gets the maximum imbalance. More... | |
constexpr auto | GetMaxLength (const RopeJointConf &object) noexcept |
Free function for getting the maximum length value of the given configuration. | |
Force | GetMaxMotorForce (const Joint &object) |
Gets the given joint's max motor force if its type supports that. More... | |
template<typename T > | |
constexpr auto | GetMaxMotorForce (const T &conf) noexcept -> decltype(std::declval< T >().maxMotorForce) |
Gets the max motor force property of the given object. | |
Torque | GetMaxMotorTorque (const Joint &object) |
Gets the given joint's max motor torque if its type supports that. More... | |
template<typename T > | |
constexpr auto | GetMaxMotorTorque (const T &conf) noexcept -> decltype(std::declval< T >().maxMotorTorque) |
Gets the max motor torque property of the given object. | |
Torque | GetMaxMotorTorque (const World &world, JointID id) |
Gets the max motor torque. More... | |
Momentum | GetMaxNormalImpulse (const ContactImpulsesList &impulses) noexcept |
Gets the maximum normal impulse from the given contact impulses list. | |
SeparationInfo | GetMaxSeparation (const DistanceProxy &proxy1, const DistanceProxy &proxy2, Length stop=MaxFloat *Meter) |
Gets the max separation information. More... | |
SeparationInfo | GetMaxSeparation (const DistanceProxy &proxy1, const Transformation &xf1, const DistanceProxy &proxy2, const Transformation &xf2) |
Gets the max separation information. More... | |
SeparationInfo | GetMaxSeparation (const DistanceProxy &proxy1, const Transformation &xf1, const DistanceProxy &proxy2, const Transformation &xf2, Length stop) |
Gets the max separation information. More... | |
SeparationInfo | GetMaxSeparation4x4 (const DistanceProxy &proxy1, const Transformation &xf1, const DistanceProxy &proxy2, const Transformation &xf2) |
Gets the max separation information for the first four vertices of the two given shapes. More... | |
constexpr auto | GetMaxTorque (const FrictionJointConf &object) noexcept |
Free function for getting the max torque value of the given configuration. | |
Torque | GetMaxTorque (const Joint &object) |
Gets the given joint's max torque if its type supports that. More... | |
constexpr auto | GetMaxTorque (const MotorJointConf &object) noexcept |
Free function for getting the maximum torque value of the given configuration. | |
template<typename T > | |
constexpr auto | GetMaxTorque (const T &conf) noexcept -> decltype(std::declval< T >().maxTorque) |
Gets the max torque property of the given object. | |
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 Joint &joint) |
Gets the definition data for the given joint. More... | |
MotorJointConf | GetMotorJointConf (const World &world, BodyID bA, BodyID bB) |
Gets the confguration for the given parameters. More... | |
AngularVelocity | GetMotorSpeed (const Joint &object) |
Gets the given joint's motor speed if its type supports that. More... | |
template<typename T > | |
constexpr auto | GetMotorSpeed (const T &conf) noexcept -> decltype(std::declval< T >().motorSpeed) |
Gets the motor speed property of the given object. | |
AngularVelocity | GetMotorSpeed (const World &world, JointID id) |
Gets the motor-speed property of the identied joint if it supports it. More... | |
Torque | GetMotorTorque (const Joint &joint, Frequency inv_dt) |
Gets the current motor torque for the given joint given the inverse time step. 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... | |
const char * | GetName (Manifold::Type type) noexcept |
Gets a unique name for the given manifold type. More... | |
constexpr DynamicTree::Size | GetNext (const DynamicTree::TreeNode &node) noexcept |
Gets the next index of the given node. More... | |
ChildCounter | GetNextIndex (const ChainShapeConf &shape, ChildCounter index) noexcept |
Gets the next index after the given index for the given shape. | |
UnitVec | GetNormal (const VelocityConstraint &vc) noexcept |
Momentum | GetNormalImpulseAtPoint (const VelocityConstraint &vc, VelocityConstraint::size_type index) |
Gets the normal impulse at the given point from the given velocity constraint. | |
Momentum2 | GetNormalImpulses (const VelocityConstraint &vc) |
Gets the normal impulses of the given velocity constraint. | |
Position | GetNormalized (const Position &val) noexcept |
Gets the "normalized" position. More... | |
Sweep | GetNormalized (Sweep sweep) noexcept |
Gets a sweep with the given sweep's angles normalized. More... | |
Mass | GetNormalMassAtPoint (const VelocityConstraint &vc, VelocityConstraint::size_type index) |
Gets the normal mass at the given point from the given velocity constraint. | |
constexpr Length | GetPerimeter (const AABB &aabb) noexcept |
Gets the perimeter length of the 2-dimensional AABB. More... | |
constexpr Length2 | GetPointDelta (const SimplexEdge &sv) noexcept |
Gets "w". More... | |
Length2 | GetPointRelPosA (const VelocityConstraint &vc, VelocityConstraint::size_type index) |
Gets the point relative position A data. | |
Length2 | GetPointRelPosB (const VelocityConstraint &vc, VelocityConstraint::size_type index) |
Gets the point relative position B data. | |
PointStates | GetPointStates (const Manifold &manifold1, const Manifold &manifold2) noexcept |
Computes the before and after like point states given two manifolds. More... | |
Position | GetPosition (const Body &body) noexcept |
Gets the body's position. | |
Position | GetPosition (const Position &pos0, const Position &pos1, Real beta) noexcept |
Position | GetPosition (const World &world, BodyID id) |
Convenience function for getting the position of the identified body. | |
Position | GetPosition0 (const Body &body) noexcept |
Gets the "position 0" Position information for the given body. | |
Position | GetPosition1 (const Body &body) noexcept |
Gets the "position 1" Position information for the given body. | |
PrismaticJointConf | GetPrismaticJointConf (const Joint &joint) |
Gets the definition data for the given joint. More... | |
PrismaticJointConf | GetPrismaticJointConf (const World &world, BodyID bA, BodyID bB, const Length2 &anchor, const UnitVec &axis) |
Gets the configuration for the given parameters. More... | |
PositionSolverManifold | GetPSM (const Manifold &manifold, Manifold::size_type index, const Transformation &xfA, const Transformation &xfB) |
Gets the normal-point-separation data in world coordinates for the given inputs. More... | |
PulleyJointConf | GetPulleyJointConf (const Joint &joint) |
Gets the definition data for the given joint. 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... | |
constexpr auto | GetRatio (const GearJointConf &object) noexcept |
Free function for getting the ratio value of the given configuration. | |
Real | GetRatio (const Joint &object) |
Gets the given joint's ratio property if it has one. More... | |
template<typename T > | |
constexpr auto | GetRatio (const T &conf) noexcept -> decltype(std::declval< T >().ratio) |
Gets the ratio property of the given object. | |
Real | GetRatio (const World &world, JointID id) |
Gets the ratio property of the identified joint if it has it. More... | |
Angle | GetReferenceAngle (const Joint &object) |
Gets the reference angle of the joint if it has one. More... | |
template<typename T > | |
constexpr auto | GetReferenceAngle (const T &conf) noexcept -> decltype(std::declval< T >().referenceAngle) |
Gets the reference angle property of the given object. | |
Angle | GetReferenceAngle (const World &world, JointID id) |
Gets the reference-angle property of the identified joint if it has it. More... | |
constexpr auto | GetReflectionMatrix (const UnitVec &axis) |
Gets the reflection matrix for the given unit vector that defines the normal of the line through the origin that points should be reflected against. More... | |
VelocityConstraint::Conf | GetRegVelocityConstraintConf (const StepConf &conf) noexcept |
Gets the regular phase velocity constraint configuration from the given step configuration. | |
std::optional< pmr::StatsResource::Stats > | GetResourceStats (const World &world) noexcept |
Gets the polymorphic memory resource allocator statistics of the specified world. More... | |
constexpr Finite< Real > | GetRestitution (const BaseShapeConf &arg) noexcept |
Gets the restitution of the given shape. | |
Real | GetRestitution (const Shape &shape) noexcept |
Gets the coefficient of restitution value of the given shape. 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 Joint &joint) |
Gets the definition data for the given joint. More... | |
RevoluteJointConf | GetRevoluteJointConf (const World &world, BodyID bodyA, BodyID bodyB, const Length2 &anchor) |
Gets the configuration for the given parameters. More... | |
constexpr UnitVec | GetRevPerpendicular (const UnitVec &vector) noexcept |
Gets a vector counter-clockwise (reverse-clockwise) perpendicular to the given vector. More... | |
RopeJointConf | GetRopeJointConf (const Joint &joint) |
Gets the definition data for the given joint. More... | |
RotInertia | GetRotInertia (const Body &body) noexcept |
Gets the rotational inertia of the body. More... | |
RotInertia | GetRotInertia (const World &world, BodyID id) |
Gets the rotational inertia of the body. More... | |
Length2 | GetScaledDelta (const Simplex &simplex, Simplex::size_type index) |
Gets the scaled delta for the given indexed element of the given simplex. | |
SeparationScenario | GetSeparationScenario (IndexPair3 indices, const DistanceProxy &proxyA, const Transformation &xfA, const DistanceProxy &proxyB, const Transformation &xfB) |
Gets a separation finder for the given inputs. More... | |
Shape | GetShape (const World &world, ShapeID id) |
Gets the shape associated with the identifier. 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... | |
ShapeCounter | GetShapeRange (const World &world) noexcept |
Gets the extent of the currently valid shape range. More... | |
const std::vector< ShapeID > & | GetShapes (const AabbTreeWorld &world, BodyID id) |
Disassociates all of the associated shape from the validly identified body. More... | |
const std::vector< ShapeID > & | GetShapes (const Body &body) noexcept |
Gets the identifiers of the shapes attached to the body. | |
std::vector< ShapeID > | GetShapes (const World &world, BodyID id) |
Gets the identities of the shapes associated with the identified body. More... | |
ContactID | GetSoonestContact (const Span< const KeyedContactID > &ids, const Span< const Contact > &contacts) noexcept |
Gets the identifier of the contact with the lowest time of impact. More... | |
bool | GetSubStepping (const World &world) noexcept |
Gets whether or not sub-stepping is enabled. More... | |
template<class T > | |
VertexCounter | GetSupportIndex (const DistanceProxy &proxy, T dir) noexcept |
Gets the supporting vertex index in given direction for given distance proxy. More... | |
const Sweep & | GetSweep (const Body &body) noexcept |
Gets the body's sweep. More... | |
UnitVec | GetTangent (const VelocityConstraint &vc) noexcept |
Gets the tangent from the given velocity constraint data. | |
Momentum | GetTangentImpulseAtPoint (const VelocityConstraint &vc, VelocityConstraint::size_type index) |
Gets the tangent impulse at the given point from the given velocity constraint. | |
Momentum2 | GetTangentImpulses (const VelocityConstraint &vc) |
Gets the tangent impulses of the given velocity constraint. | |
Mass | GetTangentMassAtPoint (const VelocityConstraint &vc, VelocityConstraint::size_type index) |
Gets the tangent mass at the given point from the given velocity constraint. | |
LinearVelocity | GetTangentSpeed (const World &world, ContactID id) |
Gets the tangent speed of the identified contact. More... | |
Length2 | GetTarget (const Joint &object) |
Gets the given joint's target property if it has one. More... | |
constexpr auto | GetTarget (const TargetJointConf &object) noexcept |
Free function for getting the target value of the given configuration. | |
Length2 | GetTarget (const World &world, JointID id) |
Gets the target point. More... | |
TargetJointConf | GetTargetJointConf (const Joint &joint) |
Gets the definition data for the given joint. 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... | |
VelocityConstraint::Conf | GetToiVelocityConstraintConf (const StepConf &conf) noexcept |
Gets the TOI phase velocity constraint configuration from the given step configuration. | |
ToiOutput | GetToiViaSat (const DistanceProxy &proxyA, const Sweep &sweepA, const DistanceProxy &proxyB, const Sweep &sweepB, const ToiConf &conf=GetDefaultToiConf()) |
Gets the time of impact for two disjoint convex sets using the Separating Axis Theorem. More... | |
Torque | GetTorque (const Body &body) noexcept |
Gets the net torque that the given body is currently experiencing. | |
ContactCounter | GetTouchingCount (const World &world) |
Gets the touching count for the given world. More... | |
Transformation | GetTransform0 (const Sweep &sweep) noexcept |
Gets the transform at "time" zero. More... | |
Transformation | GetTransform1 (const Sweep &sweep) noexcept |
Gets the transform at "time" one. More... | |
const Transformation & | GetTransformation (const Body &body) noexcept |
Gets the body's transformation. More... | |
constexpr Transformation | GetTransformation (const Length2 &ctr, const UnitVec &rot, const Length2 &localCtr) noexcept |
Gets the transformation for the given values. | |
Transformation | GetTransformation (const Position &pos, const Length2 &local_ctr) noexcept |
Gets the transformation for the given values. | |
Transformation | GetTransformation (const Sweep &sweep, const UnitIntervalFF< Real > beta) noexcept |
Gets the interpolated transform at a specific time. More... | |
Transformation | GetTransformation (const World &world, BodyID id) |
Gets the body's transformation. More... | |
const DynamicTree & | GetTree (const World &world) |
Gets access to the broad-phase dynamic tree information. More... | |
BodyType | GetType (const Body &body) noexcept |
Gets the type of this body. More... | |
TypeID | GetType (const Joint &object) noexcept |
Gets the identifier of the type of data this can be casted to. | |
TypeID | GetType (const Shape &shape) noexcept |
Gets the type info of the use of the given shape. More... | |
TypeID | GetType (const World &world) noexcept |
Gets the identifier of the type of data the given world can be casted to. 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... | |
TypeID | GetTypeAC (const GearJointConf &object) noexcept |
Free function for getting joint 1 type value of the given configuration. | |
TypeID | GetTypeBD (const GearJointConf &object) noexcept |
Free function for getting joint 2 type value of the given configuration. | |
Time | GetUnderActiveTime (const Body &body) noexcept |
Gets the given body's under-active time. More... | |
template<class T > | |
UnitVec | GetUnitVector (const Vector2< T > &value, const UnitVec &fallback=UnitVec::GetDefaultFallback()) noexcept |
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... | |
constexpr Vec2 | GetVec2 (const UnitVec &value) |
Gets a Vec2 representation of the given value. | |
Velocity | GetVelocity (const Body &body) noexcept |
Gets the velocity. More... | |
Velocity | GetVelocity (const Body &body, Time h) noexcept |
Gets the velocity of the body after the given time accounting for the body's acceleration and capped by the given configuration. More... | |
Velocity | GetVelocity (const World &world, BodyID id) |
Gets the velocity of the identified body. More... | |
LinearVelocity | GetVelocityBiasAtPoint (const VelocityConstraint &vc, VelocityConstraint::size_type index) |
Gets the velocity bias at the given point from the given velocity constraint. | |
VertexCounter | GetVertexCount (const Shape &shape, ChildCounter index) |
Gets the vertex count for the specified child of the given shape. | |
NonNegative< Length > | GetVertexRadius (const ChainShapeConf &arg) noexcept |
Gets the vertex radius of the given shape configuration. | |
NonNegative< Length > | GetVertexRadius (const ChainShapeConf &arg, ChildCounter) noexcept |
Gets the vertex radius of the given shape configuration. | |
constexpr NonNegative< Length > | GetVertexRadius (const DiskShapeConf &arg) noexcept |
Gets the vertex radius of the given shape configuration. | |
constexpr NonNegative< Length > | GetVertexRadius (const DiskShapeConf &arg, ChildCounter) noexcept |
Gets the vertex radius of the given shape configuration. | |
auto | GetVertexRadius (const DistanceProxy &arg) noexcept |
Gets the vertex radius property of a given distance proxy. | |
NonNegative< Length > | GetVertexRadius (const EdgeShapeConf &arg) noexcept |
Gets the vertex radius of the given shape configuration. | |
NonNegative< Length > | GetVertexRadius (const EdgeShapeConf &arg, ChildCounter) noexcept |
Gets the vertex radius of the given shape configuration. | |
NonNegative< Length > | GetVertexRadius (const MultiShapeConf &arg, ChildCounter index) |
Gets the vertex radius of the given shape configuration. | |
NonNegative< Length > | GetVertexRadius (const PolygonShapeConf &arg) noexcept |
Gets the vertex radius of the given shape configuration. | |
NonNegative< Length > | GetVertexRadius (const PolygonShapeConf &arg, ChildCounter) noexcept |
Gets the vertex radius of the given shape configuration. | |
NonNegative< Length > | GetVertexRadius (const Shape &shape, ChildCounter idx) |
Gets the vertex radius of the indexed child of the given shape. More... | |
Interval< Positive< Length > > | GetVertexRadiusInterval (const World &world) noexcept |
Gets the vertex radius interval allowable for the given world. More... | |
WeldJointConf | GetWeldJointConf (const Joint &joint) |
Gets the definition data for the given joint. 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 Joint &joint) |
Gets the definition data for the given joint. 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... | |
PairLength2 | GetWitnessPoints (const Simplex &simplex) noexcept |
Gets the witness points of the given simplex. | |
Length2 | GetWorldCenter (const Body &body) noexcept |
Get the world position of the center of mass. | |
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 Manifold &manifold, const Transformation &xfA, Length radiusA, const Transformation &xfB, Length radiusB) |
Gets the world manifold for the given data. More... | |
WorldManifold | GetWorldManifold (const World &world, const Contact &contact, const Manifold &manifold) |
WorldManifold | GetWorldManifold (const World &world, ContactID id) |
Gets the world manifold for the identified contact. More... | |
Length2 | GetWorldPoint (const Body &body, const Length2 &localPoint) noexcept |
Gets the world coordinates of a point given in coordinates relative to the body's origin. 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... | |
Length2 | GetWorldVector (const Body &body, const Length2 &localVector) noexcept |
Gets the world coordinates of a vector given the local coordinates. More... | |
UnitVec | GetWorldVector (const Body &body, const UnitVec &localVector) noexcept |
Gets the world vector for the given local vector from the given body's transformation. | |
UnitVec | GetWorldVector (const World &world, BodyID id, const UnitVec &localVector) |
Convenience function for getting a world vector of the identified body. More... | |
constexpr auto | GetX (const UnitVec &value) |
Gets the "X" element of the given value - i.e. the first element. | |
constexpr UnitVec | GetXAxis (const UnitVec &rot) noexcept |
Gets the "X-axis". | |
constexpr auto | GetY (const UnitVec &value) -> decltype(get< 1 >(value)) |
Gets the "Y" element of the given value - i.e. the second element. | |
constexpr UnitVec | GetYAxis (const UnitVec &rot) noexcept |
Gets the "Y-axis". More... | |
bool | HasValidToi (const World &world, ContactID id) |
Whether or not the contact has a valid TOI. More... | |
void | InitVelocity (DistanceJointConf &object, const Span< BodyConstraint > &bodies, const StepConf &step, const ConstraintSolverConf &conf) |
Initializes velocity constraint data based on the given solver data. More... | |
void | InitVelocity (FrictionJointConf &object, const Span< BodyConstraint > &bodies, const StepConf &step, const ConstraintSolverConf &conf) |
Initializes velocity constraint data based on the given solver data. More... | |
void | InitVelocity (GearJointConf &object, const Span< BodyConstraint > &bodies, const StepConf &step, const ConstraintSolverConf &conf) |
Initializes velocity constraint data based on the given solver data. More... | |
void | InitVelocity (Joint &object, const Span< BodyConstraint > &bodies, const StepConf &step, const ConstraintSolverConf &conf) |
Initializes velocity constraint data based on the given solver data. More... | |
void | InitVelocity (MotorJointConf &object, const Span< BodyConstraint > &bodies, const StepConf &step, const ConstraintSolverConf &conf) |
Initializes velocity constraint data based on the given solver data. More... | |
void | InitVelocity (PrismaticJointConf &object, const Span< BodyConstraint > &bodies, const StepConf &step, const ConstraintSolverConf &conf) |
Initializes velocity constraint data based on the given solver data. More... | |
void | InitVelocity (PulleyJointConf &object, const Span< BodyConstraint > &bodies, const StepConf &step, const ConstraintSolverConf &conf) |
Initializes velocity constraint data based on the given solver data. More... | |
void | InitVelocity (RevoluteJointConf &object, const Span< BodyConstraint > &bodies, const StepConf &step, const ConstraintSolverConf &conf) |
Initializes velocity constraint data based on the given solver data. More... | |
void | InitVelocity (RopeJointConf &object, const Span< BodyConstraint > &bodies, const StepConf &step, const ConstraintSolverConf &conf) |
Initializes velocity constraint data based on the given solver data. More... | |
void | InitVelocity (TargetJointConf &object, const Span< BodyConstraint > &bodies, const StepConf &step, const ConstraintSolverConf &conf) |
Initializes velocity constraint data based on the given solver data. More... | |
void | InitVelocity (WeldJointConf &object, const Span< BodyConstraint > &bodies, const StepConf &step, const ConstraintSolverConf &conf) |
Initializes velocity constraint data based on the given solver data. More... | |
void | InitVelocity (WheelJointConf &object, const Span< BodyConstraint > &bodies, const StepConf &step, const ConstraintSolverConf &conf) |
Initializes velocity constraint data based on the given solver data. More... | |
constexpr UnitVec | InverseRotate (const UnitVec &vector, const UnitVec &angle) noexcept |
Inverse rotates a vector. | |
template<class T > | |
constexpr auto | InverseRotate (const Vector2< T > &vector, const UnitVec &angle) noexcept |
Inverse rotates a vector. More... | |
constexpr Length2 | InverseTransform (const Length2 &v, const Transformation &xfm) noexcept |
Inverse transforms the given 2-D vector with the given transformation. More... | |
bool | IsAccelerable (const Body &body) noexcept |
Is "accelerable". More... | |
bool | IsAccelerable (const World &world, BodyID id) |
Is identified body "accelerable"? More... | |
bool | IsAwake (const Body &body) noexcept |
Gets the awake/asleep state of this body. 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... | |
constexpr bool | IsBranch (const DynamicTree::TreeNode &node) noexcept |
Is branch. More... | |
constexpr auto | IsDestroyed (const Body &body) noexcept -> bool |
Whether or not the given body was destroyed. More... | |
auto | IsDestroyed (const Joint &object) noexcept -> bool |
Gets whether the given entity is in the is-destroyed state. | |
auto | IsDestroyed (const Shape &value) noexcept -> bool |
Gets whether the given entity is in the is-destroyed state. | |
auto | IsDestroyed (const World &world, BodyID id) -> bool |
Gets whether the given identifier is to a body that's been destroyed. More... | |
auto | IsDestroyed (const World &world, ContactID id) -> bool |
Gets whether the given identifier is to a contact that's been destroyed. More... | |
auto | IsDestroyed (const World &world, JointID id) -> bool |
Gets whether the given identifier is to a joint that's been destroyed. More... | |
auto | IsDestroyed (const World &world, ShapeID id) -> bool |
Gets whether the given identifier is to a shape that's been destroyed. More... | |
bool | IsEnabled (const Body &body) noexcept |
Gets the enabled/disabled state of the body. 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 Body &body) noexcept |
Does this body have fixed rotation? More... | |
bool | IsFixedRotation (const World &world, BodyID id) |
Gets whether the body has fixed rotation. More... | |
bool | IsImpenetrable (const Body &body) noexcept |
Is this body treated like a bullet for continuous collision detection? More... | |
bool | IsImpenetrable (const World &world, BodyID id) |
Is the body treated like a bullet for continuous collision detection? More... | |
constexpr bool | IsLeaf (const DynamicTree::TreeNode &node) noexcept |
Is leaf. More... | |
bool | IsLimitEnabled (const Joint &object) |
Gets the specified joint's limit property if it supports one. More... | |
template<typename T > | |
constexpr auto | IsLimitEnabled (const T &conf) noexcept -> decltype(std::declval< T >().enableLimit) |
Gets whether or not the limit property of the given object is enabled. | |
bool | IsLimitEnabled (const World &world, JointID id) |
Gets whether the identified joint's limit is enabled. More... | |
bool | IsLocked (const World &world) noexcept |
Is the specified world locked. More... | |
bool | IsLooped (const ChainShapeConf &shape) noexcept |
Determines whether the given shape is looped. | |
bool | IsMassDataDirty (const Body &body) noexcept |
Gets whether the mass data for this body is "dirty". | |
bool | IsMassDataDirty (const World &world, BodyID id) |
Gets whether the body's mass-data is dirty. More... | |
bool | IsMotorEnabled (const Joint &object) |
Gets the specified joint's motor property value if it supports one. More... | |
template<typename T > | |
constexpr auto | IsMotorEnabled (const T &conf) noexcept -> decltype(std::declval< T >().enableMotor) |
Gets the motor enabled property of the given object. | |
bool | IsMotorEnabled (const World &world, JointID id) |
constexpr bool | IsSensor (const BaseShapeConf &arg) noexcept |
Gets the is-sensor state of the given shape configuration. | |
bool | IsSensor (const Shape &shape) noexcept |
Gets whether or not the given shape is a sensor. More... | |
bool | IsSensor (const World &world, ShapeID id) |
Is the specified shape a sensor (non-solid)? More... | |
bool | IsSleepingAllowed (const Body &body) noexcept |
Gets whether or not this body allowed to sleep. More... | |
bool | IsSleepingAllowed (const World &world, BodyID id) |
Gets whether the identified body is allowed to sleep. More... | |
bool | IsSpeedable (const Body &body) noexcept |
Is "speedable". More... | |
bool | IsSpeedable (const World &world, BodyID id) |
Is identified body "speedable". More... | |
bool | IsStepComplete (const World &world) noexcept |
Whether or not "step" is complete. More... | |
bool | IsTouching (const World &world, ContactID id) |
Is this contact touching? More... | |
bool | IsUnderActive (const Velocity &velocity, const LinearVelocity &linSleepTol, const AngularVelocity &angSleepTol) noexcept |
Gets whether the given velocity is "under active" based on the given tolerances. | |
constexpr bool | IsUnused (const DynamicTree::TreeNode &node) noexcept |
Is unused. 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. | |
constexpr Transformation | Mul (const Transformation &A, const Transformation &B) noexcept |
Multiplies a given transformation by another given transformation. More... | |
constexpr Transformation | MulT (const Transformation &A, const Transformation &B) noexcept |
Inverse multiplies a given transformation by another given transformation. More... | |
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... | |
constexpr bool | operator!= (const Acceleration &lhs, const Acceleration &rhs) |
Inequality operator. | |
bool | operator!= (const Body &lhs, const Body &rhs) |
Not-equals operator. More... | |
constexpr bool | operator!= (const BodyConf &lhs, const BodyConf &rhs) noexcept |
Operator not-equals. | |
bool | operator!= (const DiskShapeConf &lhs, const DiskShapeConf &rhs) noexcept |
Inequality operator. | |
constexpr bool | operator!= (const DistanceJointConf &lhs, const DistanceJointConf &rhs) noexcept |
Inequality operator. | |
bool | operator!= (const DistanceProxy &lhs, const DistanceProxy &rhs) noexcept |
Determines with the two given distance proxies are not equal. | |
bool | operator!= (const EdgeShapeConf &lhs, const EdgeShapeConf &rhs) noexcept |
Inequality operator. | |
constexpr bool | operator!= (const FrictionJointConf &lhs, const FrictionJointConf &rhs) noexcept |
Inequality operator. | |
constexpr bool | operator!= (const GearJointConf &lhs, const GearJointConf &rhs) noexcept |
Inequality operator. | |
constexpr bool | operator!= (const GearJointConf::PrismaticData &lhs, const GearJointConf::PrismaticData &rhs) noexcept |
Not equals operator. | |
constexpr bool | operator!= (const GearJointConf::RevoluteData &lhs, const GearJointConf::RevoluteData &rhs) noexcept |
Not equals operator. | |
bool | operator!= (const Joint &lhs, const Joint &rhs) noexcept |
Inequality operator for joint comparisons. | |
bool | operator!= (const Manifold &lhs, const Manifold &rhs) noexcept |
Manifold inequality operator. More... | |
bool | operator!= (const Manifold::Point &lhs, const Manifold::Point &rhs) noexcept |
Determines whether the two given manifold points are not equal. | |
constexpr bool | operator!= (const MotorJointConf &lhs, const MotorJointConf &rhs) noexcept |
Inequality operator. | |
bool | operator!= (const MultiShapeConf &lhs, const MultiShapeConf &rhs) noexcept |
Inequality operator. | |
constexpr bool | operator!= (const Position &lhs, const Position &rhs) |
Inequality operator. | |
constexpr bool | operator!= (const PrismaticJointConf &lhs, const PrismaticJointConf &rhs) noexcept |
Inequality operator. | |
constexpr bool | operator!= (const PulleyJointConf &lhs, const PulleyJointConf &rhs) noexcept |
Inequality operator. | |
constexpr bool | operator!= (const RevoluteJointConf &lhs, const RevoluteJointConf &rhs) noexcept |
Inequality operator. | |
constexpr bool | operator!= (const RopeJointConf &lhs, const RopeJointConf &rhs) noexcept |
Inequality operator. | |
bool | operator!= (const Shape &lhs, const Shape &rhs) noexcept |
Inequality operator for shape to shape comparisons. | |
constexpr bool | operator!= (const SimplexEdge &lhs, const SimplexEdge &rhs) noexcept |
Inequality operator for SimplexEdge . | |
constexpr bool | operator!= (const Sweep &lhs, const Sweep &rhs) |
Not-equals operator. | |
constexpr bool | operator!= (const TargetJointConf &lhs, const TargetJointConf &rhs) noexcept |
Inequality operator. | |
constexpr bool | operator!= (const Transformation &lhs, const Transformation &rhs) noexcept |
Inequality operator. | |
constexpr bool | operator!= (const UnitVec &a, const UnitVec &b) noexcept |
Inequality operator. | |
constexpr bool | operator!= (const Velocity &lhs, const Velocity &rhs) |
Inequality operator. | |
constexpr bool | operator!= (const WeldJointConf &lhs, const WeldJointConf &rhs) noexcept |
Inequality operator. | |
constexpr bool | operator!= (const WheelJointConf &lhs, const WheelJointConf &rhs) noexcept |
Inequality operator. | |
bool | operator!= (const World &lhs, const World &rhs) noexcept |
Inequality operator for world comparisons. More... | |
constexpr Acceleration | operator* (const Acceleration &lhs, const Real rhs) |
Multiplication operator. | |
template<class T , typename U , bool NoExcept> | |
constexpr Vector2< T > | operator* (const playrho::detail::Checked< T, U, NoExcept > &s, const UnitVec &u) noexcept |
Multiplication operator. | |
constexpr Position | operator* (const Position &pos, const Real scalar) |
Multiplication operator. | |
constexpr Acceleration | operator* (const Real lhs, const Acceleration &rhs) |
Multiplication operator. | |
constexpr Velocity | operator* (const Real lhs, const Velocity &rhs) |
Multiplication operator. | |
constexpr Position | operator* (const Real scalar, const Position &pos) |
Multiplication operator. | |
template<class T > | |
constexpr Vector2< T > | operator* (const T &s, const UnitVec &u) noexcept |
Multiplication operator. | |
template<class T , class U , bool NoExcept> | |
constexpr Vector2< T > | operator* (const UnitVec &u, const playrho::detail::Checked< T, U, NoExcept > &s) noexcept |
Multiplication operator. | |
template<class T > | |
constexpr Vector2< T > | operator* (const UnitVec &u, const T &s) noexcept |
Multiplication operator. | |
constexpr Velocity | operator* (const Velocity &lhs, const Real rhs) |
Multiplication operator. | |
constexpr Acceleration & | operator*= (Acceleration &lhs, const Real rhs) |
Multiplication assignment operator. | |
constexpr Velocity & | operator*= (Velocity &lhs, const Real rhs) |
Multiplication assignment operator. | |
constexpr Acceleration | operator+ (const Acceleration &lhs, const Acceleration &rhs) |
Addition operator. | |
constexpr Acceleration | operator+ (const Acceleration &value) |
Positive operator. | |
constexpr Position | operator+ (const Position &lhs, const Position &rhs) |
Addition operator. | |
constexpr Position | operator+ (const Position &value) |
Positive operator. | |
PositionSolution | operator+ (const PositionSolution &lhs, const PositionSolution &rhs) |
Addition operator. | |
constexpr Velocity | operator+ (const Velocity &lhs, const Velocity &rhs) |
Addition operator. | |
constexpr Velocity | operator+ (const Velocity &value) |
Positive operator. | |
constexpr Acceleration & | operator+= (Acceleration &lhs, const Acceleration &rhs) |
Addition assignment operator. | |
constexpr Position & | operator+= (Position &lhs, const Position &rhs) |
Addition assignment operator. | |
constexpr Velocity & | operator+= (Velocity &lhs, const Velocity &rhs) |
Addition assignment operator. | |
constexpr Acceleration | operator- (const Acceleration &lhs, const Acceleration &rhs) |
Subtraction operator. | |
constexpr Acceleration | operator- (const Acceleration &value) |
Negation operator. | |
constexpr Position | operator- (const Position &lhs, const Position &rhs) |
Subtraction operator. | |
constexpr Position | operator- (const Position &value) |
Negation operator. | |
PositionSolution | operator- (const PositionSolution &lhs, const PositionSolution &rhs) |
Subtraction operator. | |
constexpr Velocity | operator- (const Velocity &lhs, const Velocity &rhs) |
Subtraction operator. | |
constexpr Velocity | operator- (const Velocity &value) |
Negation operator. | |
constexpr Acceleration & | operator-= (Acceleration &lhs, const Acceleration &rhs) |
Subtraction assignment operator. | |
constexpr Position & | operator-= (Position &lhs, const Position &rhs) |
Subtraction assignment operator. | |
constexpr Velocity & | operator-= (Velocity &lhs, const Velocity &rhs) |
Subtraction assignment operator. | |
constexpr Acceleration | operator/ (const Acceleration &lhs, const Real rhs) |
Division operator. | |
constexpr Vec2 | operator/ (const UnitVec &u, const UnitVec::value_type s) noexcept |
Division operator. | |
constexpr Velocity | operator/ (const Velocity &lhs, const Real rhs) |
Division operator. | |
constexpr Acceleration & | operator/= (Acceleration &lhs, const Real rhs) |
Division assignment operator. | |
constexpr Velocity & | operator/= (Velocity &lhs, const Real rhs) |
Division assignment operator. | |
inline ::std::ostream & | operator<< (::std::ostream &os, const UnitVec &value) |
Output stream operator. | |
constexpr bool | operator== (const Acceleration &lhs, const Acceleration &rhs) |
Equality operator. | |
bool | operator== (const Body &lhs, const Body &rhs) |
Equals operator. More... | |
constexpr bool | operator== (const BodyConf &lhs, const BodyConf &rhs) noexcept |
Operator equals. | |
bool | operator== (const DiskShapeConf &lhs, const DiskShapeConf &rhs) noexcept |
Equality operator. | |
constexpr bool | operator== (const DistanceJointConf &lhs, const DistanceJointConf &rhs) noexcept |
Equality operator. | |
bool | operator== (const DistanceProxy &lhs, const DistanceProxy &rhs) noexcept |
Determines with the two given distance proxies are equal. | |
bool | operator== (const EdgeShapeConf &lhs, const EdgeShapeConf &rhs) noexcept |
Equality operator. | |
constexpr bool | operator== (const FrictionJointConf &lhs, const FrictionJointConf &rhs) noexcept |
Equality operator. | |
constexpr bool | operator== (const GearJointConf &lhs, const GearJointConf &rhs) noexcept |
Equality operator. | |
constexpr bool | operator== (const GearJointConf::PrismaticData &lhs, const GearJointConf::PrismaticData &rhs) noexcept |
Equals operator. | |
constexpr bool | operator== (const GearJointConf::RevoluteData &lhs, const GearJointConf::RevoluteData &rhs) noexcept |
Equals operator. | |
bool | operator== (const Joint &lhs, const Joint &rhs) noexcept |
Equality operator for joint comparisons. | |
bool | operator== (const Manifold &lhs, const Manifold &rhs) noexcept |
Manifold equality operator. More... | |
bool | operator== (const Manifold::Point &lhs, const Manifold::Point &rhs) noexcept |
Determines whether the two given manifold points are equal. | |
constexpr bool | operator== (const MotorJointConf &lhs, const MotorJointConf &rhs) noexcept |
Equality operator. | |
bool | operator== (const MultiShapeConf &lhs, const MultiShapeConf &rhs) noexcept |
Equality operator. | |
constexpr bool | operator== (const Position &lhs, const Position &rhs) |
Equality operator. | |
constexpr bool | operator== (const PrismaticJointConf &lhs, const PrismaticJointConf &rhs) noexcept |
Equality operator. | |
constexpr bool | operator== (const PulleyJointConf &lhs, const PulleyJointConf &rhs) noexcept |
Equality operator. | |
constexpr bool | operator== (const RevoluteJointConf &lhs, const RevoluteJointConf &rhs) noexcept |
Equality operator. | |
constexpr bool | operator== (const RopeJointConf &lhs, const RopeJointConf &rhs) noexcept |
Equality operator. | |
bool | operator== (const Shape &lhs, const Shape &rhs) noexcept |
Equality operator for shape to shape comparisons. | |
constexpr bool | operator== (const SimplexEdge &lhs, const SimplexEdge &rhs) noexcept |
Equality operator for SimplexEdge . | |
constexpr bool | operator== (const Sweep &lhs, const Sweep &rhs) |
Equals operator. | |
constexpr bool | operator== (const TargetJointConf &lhs, const TargetJointConf &rhs) noexcept |
Equality operator. | |
constexpr bool | operator== (const Transformation &lhs, const Transformation &rhs) noexcept |
Equality operator. | |
constexpr bool | operator== (const UnitVec &a, const UnitVec &b) noexcept |
Equality operator. | |
constexpr bool | operator== (const Velocity &lhs, const Velocity &rhs) |
Equality operator. | |
constexpr bool | operator== (const WeldJointConf &lhs, const WeldJointConf &rhs) noexcept |
Equality operator. | |
constexpr bool | operator== (const WheelJointConf &lhs, const WheelJointConf &rhs) noexcept |
Equality operator. | |
bool | operator== (const World &lhs, const World &rhs) noexcept |
Equality operator for world comparisons. More... | |
void | Query (const DynamicTree &tree, const AABB &aabb, const DynamicTreeSizeCB &callback) |
Query the given dynamic tree and find nodes overlapping the given AABB. More... | |
void | Query (const DynamicTree &tree, const AABB &aabb, QueryShapeCallback callback) |
Queries the world for all fixtures that potentially overlap the provided AABB. More... | |
RayCastOutput | RayCast (const ::playrho::detail::AABB< 2 > &aabb, const RayCastInput &input) noexcept |
Cast a ray against the given AABB. More... | |
RayCastOutput | RayCast (const DistanceProxy &proxy, const RayCastInput &input, const Transformation &transform) noexcept |
Cast a ray against the distance proxy. More... | |
bool | RayCast (const DynamicTree &tree, RayCastInput input, const DynamicTreeRayCastCB &callback) |
Cast rays against the leafs in the given tree. More... | |
RayCastOutput | RayCast (const Shape &shape, ChildCounter childIndex, const RayCastInput &input, const Transformation &transform) noexcept |
Cast a ray against the child of the given shape. 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... | |
RayCastOutput | RayCast (Length radius, const Length2 &location, const RayCastInput &input) noexcept |
Cast a ray against a circle of a given radius at the given location. More... | |
constexpr DynamicTreeBranchData | ReplaceChild (DynamicTreeBranchData bd, DynamicTree::Size oldChild, DynamicTree::Size newChild) |
Replaces the old child with the new child. 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 (ChainShapeConf &arg, const UnitVec &value) |
Rotates the given shape's vertices by the given amount. | |
constexpr UnitVec | Rotate (const UnitVec &vector, const UnitVec &angle) noexcept |
Rotates a unit vector by the angle expressed by the second unit vector. More... | |
template<class T > | |
constexpr auto | Rotate (const Vector2< T > &vector, const UnitVec &angle) noexcept |
Rotates a vector by a given angle. More... | |
void | Rotate (DiskShapeConf &arg, const UnitVec &value) noexcept |
Rotates the given shape configuration's vertices by the given amount. | |
void | Rotate (EdgeShapeConf &arg, const UnitVec &value) noexcept |
Rotates the given shape's vertices by the given amount. | |
void | Rotate (MultiShapeConf &arg, const UnitVec &value) |
Rotates the given shape configuration's vertices by the given amount. | |
void | Rotate (PolygonShapeConf &arg, const UnitVec &value) |
Rotates the given shape configuration's vertices by the given amount. | |
void | Rotate (Shape &shape, const UnitVec &value) |
Rotates all of the given shape's vertices by the given amount. More... | |
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 (ChainShapeConf &arg, const Vec2 &value) |
Scales the given shape's vertices by the given amount. | |
void | Scale (DiskShapeConf &arg, const Vec2 &value) noexcept |
Scales the given shape configuration's vertices by the given amount. | |
void | Scale (EdgeShapeConf &arg, const Vec2 &value) noexcept |
Scales the given shape's vertices by the given amount. | |
void | Scale (MultiShapeConf &arg, const Vec2 &value) |
Scales the given shape configuration's vertices by the given amount. | |
void | Scale (PolygonShapeConf &arg, const Vec2 &value) |
Scales the given shape configuration's vertices by the given amount. | |
void | Scale (Shape &shape, const Vec2 &value) |
Scales all of the given shape's vertices by the given amount. More... | |
void | Scale (World &world, ShapeID id, const Vec2 &value) |
Scales all of the given shape's vertices by the given amount. More... | |
void | Set (JointConf &def, const Joint &joint) noexcept |
Sets the joint definition data for the given joint. | |
void | SetAcceleration (Body &body, AngularAcceleration value) noexcept |
Sets the given angular acceleration of the given body. More... | |
void | SetAcceleration (Body &body, const Acceleration &value) noexcept |
Sets the accelerations on the given body. More... | |
void | SetAcceleration (Body &body, const LinearAcceleration2 &linear, AngularAcceleration angular) noexcept |
Sets the linear and rotational accelerations on this body. More... | |
void | SetAcceleration (Body &body, const LinearAcceleration2 &value) noexcept |
Sets the given linear acceleration of the given body. 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 (Body &body, Angle value) |
Sets the body's angular orientation. More... | |
void | SetAngle (World &world, BodyID id, Angle value) |
Sets the body's angular orientation. More... | |
void | SetAngularDamping (Body &body, NonNegative< Frequency > value) noexcept |
Sets the angular damping of the body. More... | |
void | SetAngularDamping (World &world, BodyID id, NonNegative< Frequency > angularDamping) |
Sets the angular damping of the body. More... | |
void | SetAngularLimits (Joint &object, Angle lower, Angle upper) |
Sets the joint limits. More... | |
constexpr void | SetAngularLimits (RevoluteJointConf &object, Angle lower, Angle upper) noexcept |
Free function for setting the angular limits of the given configuration. | |
void | SetAngularLimits (World &world, JointID id, Angle lower, Angle upper) |
void | SetAngularOffset (Joint &object, Angle value) |
Sets the angular offset property of the specified joint if its type has one. More... | |
constexpr auto | SetAngularOffset (MotorJointConf &object, Angle value) noexcept |
Free function for setting the angular offset value of the given configuration. | |
void | SetAngularOffset (World &world, JointID id, Angle value) |
Sets the target angular offset. More... | |
void | SetAwake (Body &body) noexcept |
Awakens this body. 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 | 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... | |
constexpr auto | SetCorrectionFactor (MotorJointConf &object, Real value) noexcept |
Free function for setting the correction factor value of the given configuration. | |
constexpr void | SetDampingRatio (DistanceJointConf &object, Real value) noexcept |
Free function for setting the damping ratio value of the given configuration. | |
constexpr void | SetDampingRatio (TargetJointConf &object, Real value) noexcept |
Free function for setting the damping ratio value of the given configuration. | |
constexpr void | SetDampingRatio (WeldJointConf &object, Real value) noexcept |
Free function for setting the damping ratio of the given configuration. | |
constexpr void | SetDampingRatio (WheelJointConf &object, Real value) noexcept |
Free function for setting the damping ratio of the given configuration. | |
void | SetDensity (BaseShapeConf &arg, NonNegative< AreaDensity > value) |
Sets the density of the given shape configuration. | |
void | SetDensity (Shape &shape, NonNegative< AreaDensity > value) |
Sets the density of the given shape. More... | |
void | SetDensity (World &world, ShapeID id, NonNegative< AreaDensity > value) |
Sets the density of this shape. More... | |
constexpr void | SetDestroyed (Body &body) noexcept |
Sets the destroyed property of the given body. More... | |
void | SetDetachListener (World &world, BodyShapeFunction listener) noexcept |
Sets the detach listener for shapes detaching from bodies. More... | |
void | SetEnabled (Body &body) noexcept |
Sets the enabled state. More... | |
void | SetEnabled (Body &body, bool value) noexcept |
Sets the enabled state to the given value. 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 | SetEndContactListener (World &world, ContactFunction listener) noexcept |
Sets the end-contact lister. More... | |
void | SetFilter (BaseShapeConf &arg, Filter value) |
Sets the filter of the given shape configuration. | |
void | SetFilter (Shape &shape, Filter value) |
Sets the filter value for the given shape. More... | |
void | SetFilterData (World &world, ShapeID id, const Filter &filter) |
Convenience function for setting the contact filtering data. More... | |
void | SetFixedRotation (Body &body, bool value) |
Sets this body to have fixed rotation. 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... | |
constexpr void | SetFrequency (DistanceJointConf &object, NonNegative< Frequency > value) noexcept |
Free function for setting the frequency value of the given configuration. | |
void | SetFrequency (Joint &object, Frequency value) |
Sets the frequency of the joint if it has this property. More... | |
constexpr void | SetFrequency (TargetJointConf &object, NonNegative< Frequency > value) noexcept |
Free function for setting the frequency value of the given configuration. | |
constexpr void | SetFrequency (WeldJointConf &object, NonNegative< Frequency > value) noexcept |
Free function for setting the frequency of the given configuration. | |
constexpr void | SetFrequency (WheelJointConf &object, NonNegative< Frequency > value) noexcept |
Free function for setting the frequency of the given configuration. | |
void | SetFrequency (World &world, JointID id, Frequency value) |
Sets the frequency of the identified joint if it has this property. More... | |
void | SetFriction (BaseShapeConf &arg, NonNegative< Real > value) |
Sets the friction of the given shape. | |
void | SetFriction (Shape &shape, NonNegative< Real > value) |
Sets the coefficient of friction. 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 (Body &body) noexcept |
Sets the impenetrable status of this body. 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... | |
void | SetJoint (World &world, JointID id, const Joint &def) |
Sets the value of the identified joint. More... | |
template<typename T > | |
void | SetJoint (World &world, JointID id, const T &value) |
Sets a joint's value from a configuration. More... | |
void | SetJointDestructionListener (World &world, JointFunction listener) noexcept |
Sets the destruction listener for joints. More... | |
constexpr auto | SetLength (DistanceJointConf &object, Length value) noexcept |
Free function for setting the length value of the given configuration. | |
void | SetLinearDamping (Body &body, NonNegative< Frequency > value) noexcept |
Sets the linear damping of the body. More... | |
void | SetLinearDamping (World &world, BodyID id, NonNegative< Frequency > linearDamping) |
Sets the linear damping of the body. More... | |
void | SetLinearLimits (Joint &object, Length lower, Length upper) |
constexpr void | SetLinearLimits (PrismaticJointConf &conf, Length lower, Length upper) noexcept |
Free function for setting the linear limits of the given configuration. | |
void | SetLinearOffset (Joint &object, const Length2 &value) |
Sets the linear offset property of the specified joint if its type has one. More... | |
constexpr auto | SetLinearOffset (MotorJointConf &object, const Length2 &value) noexcept |
Free function for setting the linear offset value of the given configuration. | |
void | SetLinearOffset (World &world, JointID id, const Length2 &value) |
Sets the target linear offset, in frame A. More... | |
void | SetLocalCenter (Sweep &sweep, const Length2 &value) noexcept |
Convenience function for setting the sweep's local center. | |
void | SetLocation (Body &body, const Length2 &value) |
Sets the body's location. More... | |
void | SetLocation (World &world, BodyID id, const Length2 &value) |
Sets the body's location. More... | |
void | SetManifold (World &world, ContactID id, const Manifold &value) |
Sets the identified manifold's state. More... | |
void | SetMass (Body &body, Mass mass) |
Sets the mass of the given body. | |
void | SetMassData (World &world, BodyID id, const MassData &massData) |
Sets the mass properties to override the mass properties of the fixtures. More... | |
constexpr void | SetMaxForce (FrictionJointConf &object, NonNegative< Force > value) noexcept |
Free function for setting the max force value of the given configuration. | |
constexpr auto | SetMaxForce (MotorJointConf &object, NonNegative< Force > value) noexcept |
Free function for setting the maximum force value of the given configuration. | |
constexpr auto | SetMaxForce (TargetJointConf &object, NonNegative< Force > value) noexcept |
Free function for setting the maximum force value of the given configuration. | |
constexpr auto | SetMaxLength (RopeJointConf &object, Length value) noexcept |
Free function for setting the maximum length value of the given configuration. | |
void | SetMaxMotorForce (Joint &object, Force value) |
Sets the given joint's max motor force if its type supports that. More... | |
constexpr void | SetMaxMotorForce (PrismaticJointConf &object, Force value) |
Free function for setting the maximum motor torque value of the given configuration. | |
void | SetMaxMotorTorque (Joint &object, Torque value) |
Sets the given joint's max motor torque if its type supports that. More... | |
constexpr void | SetMaxMotorTorque (RevoluteJointConf &object, Torque value) |
Free function for setting the max motor torque of the given configuration. | |
constexpr void | SetMaxMotorTorque (WheelJointConf &object, Torque value) noexcept |
Sets the maximum motor torque for the given configuration. | |
void | SetMaxMotorTorque (World &world, JointID id, Torque value) |
constexpr auto | SetMaxTorque (FrictionJointConf &object, NonNegative< Torque > value) noexcept |
Free function for setting the max force value of the given configuration. | |
constexpr auto | SetMaxTorque (MotorJointConf &object, NonNegative< Torque > value) noexcept |
Free function for setting the maximum torque value of the given configuration. | |
void | SetMotorSpeed (Joint &object, AngularVelocity value) |
Sets the given joint's motor speed if its type supports that. More... | |
template<typename T > | |
constexpr auto | SetMotorSpeed (T &conf, AngularVelocity v) noexcept -> decltype(std::declval< T >().UseMotorSpeed(AngularVelocity{})) |
Sets the motor speed property of the given object. | |
void | SetMotorSpeed (World &world, JointID id, AngularVelocity value) |
Sets the motor-speed property of the identied joint if it supports it. More... | |
void | SetNormalImpulseAtPoint (VelocityConstraint &vc, VelocityConstraint::size_type index, Momentum value) |
Sets the normal impulse at the given point of the given velocity constraint. | |
void | SetNormalImpulses (VelocityConstraint &vc, const Momentum2 &impulses) |
Sets the normal impulses of the given velocity constraint. | |
void | SetPosition0 (Body &body, const Position &value) noexcept |
Sets the "position 0" Position information for the given body. | |
void | SetPosition1 (Body &body, const Position &value) noexcept |
Sets the "position 1" Position information for the given body. | |
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... | |
constexpr auto | SetRatio (GearJointConf &object, Real value) noexcept |
Free function for setting the ratio value of the given configuration. | |
constexpr auto | SetRatio (PulleyJointConf &object, Real value) noexcept |
Free function for setting the ratio value of the given configuration. | |
void | SetRestitution (BaseShapeConf &arg, Real value) noexcept |
Sets the restitution of the given shape. | |
void | SetRestitution (Shape &shape, Real value) |
Sets the coefficient of restitution value of the given shape. 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 | SetRotInertia (Body &body, RotInertia value) noexcept |
Sets the rotational inertia of the body. | |
void | SetSensor (BaseShapeConf &arg, bool value) |
Sets the is-sensor state of the given shape configuration. | |
void | SetSensor (Shape &shape, bool value) |
Sets whether or not the given shape is a sensor. More... | |
void | SetSensor (World &world, ShapeID id, bool value) |
Convenience function for setting whether the shape is a sensor or not. 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 | SetSleepingAllowed (Body &body, bool value) noexcept |
void | SetSleepingAllowed (World &world, BodyID, bool value) |
Sets whether the identified body is allowed to sleep. More... | |
void | SetSubStepping (World &world, bool flag) noexcept |
Enables/disables single stepped continuous physics. More... | |
void | SetSweep (Body &body, const Sweep &value) noexcept |
Sets the sweep value of the given body. More... | |
void | SetTangentImpulseAtPoint (VelocityConstraint &vc, VelocityConstraint::size_type index, Momentum value) |
Sets the tangent impulse at the given point of the given velocity constraint. | |
void | SetTangentImpulses (VelocityConstraint &vc, const Momentum2 &impulses) |
Sets the tangent impulses of the given velocity constraint. | |
void | SetTangentSpeed (World &world, ContactID id, LinearVelocity value) |
Sets the desired tangent speed for a conveyor belt behavior. More... | |
void | SetTarget (Joint &object, const Length2 &value) |
Sets the given joint's target property if it has one. More... | |
constexpr void | SetTarget (TargetJointConf &object, const Length2 &value) noexcept |
Free function for setting the target value of the given configuration. | |
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 (Body &body, const Transformation &value) noexcept |
Sets the body's transformation. More... | |
void | SetTransformation (World &world, BodyID id, const Transformation &value) |
Sets the transformation of the body. More... | |
void | SetType (Body &body, BodyType value) noexcept |
Sets the type of this body. More... | |
void | SetType (World &world, BodyID id, BodyType value, bool resetMassData=true) |
Sets the type of the given body. More... | |
void | SetVelocity (Body &body, AngularVelocity value) noexcept |
Sets the angular velocity. More... | |
void | SetVelocity (Body &body, const LinearVelocity2 &value) noexcept |
Sets the linear velocity of the center of mass. More... | |
void | SetVelocity (Body &body, const Velocity &value) noexcept |
Sets the body's velocity (linear and angular velocity). 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... | |
void | SetVertexRadius (ChainShapeConf &arg, ChildCounter, NonNegative< Length > value) noexcept |
Sets the vertex radius of the shape for the given index. | |
void | SetVertexRadius (ChainShapeConf &arg, NonNegative< Length > value) noexcept |
Sets the vertex radius of the shape. | |
void | SetVertexRadius (DiskShapeConf &arg, ChildCounter, NonNegative< Length > value) |
Sets the vertex radius of shape for the given index. | |
void | SetVertexRadius (EdgeShapeConf &arg, ChildCounter, NonNegative< Length > value) |
Sets the vertex radius of the shape for the given index. | |
void | SetVertexRadius (EdgeShapeConf &arg, NonNegative< Length > value) |
Sets the vertex radius of the shape. | |
void | SetVertexRadius (MultiShapeConf &arg, ChildCounter index, NonNegative< Length > value) |
Sets the vertex radius of shape for the given index. | |
void | SetVertexRadius (PolygonShapeConf &arg, ChildCounter, NonNegative< Length > value) |
Sets the vertex radius of the shape for the given index. | |
void | SetVertexRadius (PolygonShapeConf &arg, NonNegative< Length > value) |
Sets the vertex radius of the shape. | |
void | SetVertexRadius (Shape &shape, ChildCounter idx, NonNegative< Length > value) |
Sets the vertex radius of the indexed child of the given shape. More... | |
constexpr bool | ShiftOrigin (DistanceJointConf &, Length2) noexcept |
Shifts the origin notion of the given configuration. | |
constexpr bool | ShiftOrigin (FrictionJointConf &, Length2) noexcept |
Shifts the origin notion of the given configuration. | |
constexpr bool | ShiftOrigin (GearJointConf &, const Length2 &) noexcept |
Shifts the origin notion of the given configuration. | |
bool | ShiftOrigin (Joint &object, const Length2 &value) noexcept |
Shifts the origin for any points stored in world coordinates. More... | |
constexpr auto | ShiftOrigin (MotorJointConf &, const Length2 &) noexcept |
Shifts the origin notion of the given configuration. | |
constexpr auto | ShiftOrigin (PrismaticJointConf &, const Length2 &) noexcept |
Shifts the origin notion of the given configuration. | |
bool | ShiftOrigin (PulleyJointConf &object, const Length2 &newOrigin) noexcept |
Shifts the origin notion of the given configuration. | |
constexpr auto | ShiftOrigin (RevoluteJointConf &, const Length2 &) noexcept |
Shifts the origin notion of the given configuration. | |
constexpr auto | ShiftOrigin (RopeJointConf &, const Length2 &) noexcept |
Shifts the origin notion of the given configuration. | |
constexpr bool | ShiftOrigin (TargetJointConf &object, const Length2 &newOrigin) |
Shifts the origin notion of the given configuration. | |
constexpr auto | ShiftOrigin (WeldJointConf &, const Length2 &) noexcept |
Shifts the origin notion of the given configuration. | |
constexpr auto | ShiftOrigin (WheelJointConf &, const Length2 &) |
Shifts the origin notion of the given configuration. | |
void | ShiftOrigin (World &world, const Length2 &newOrigin) |
Shifts the origin of the specified world. More... | |
bool | ShiftOrigin (World &world, JointID id, const Length2 &value) |
Shifts the origin of the identified joint. More... | |
bool | ShouldCollide (const Shape &a, const Shape &b) noexcept |
Whether contact calculations should be performed between the two instances. More... | |
std::size_t | size (const DynamicTree &tree) noexcept |
Gets the "size" of the given tree. More... | |
bool | SolvePosition (const DistanceJointConf &object, const Span< BodyConstraint > &bodies, const ConstraintSolverConf &conf) |
Solves the position constraint. More... | |
bool | SolvePosition (const FrictionJointConf &object, const Span< BodyConstraint > &bodies, const ConstraintSolverConf &conf) |
Solves the position constraint. More... | |
bool | SolvePosition (const GearJointConf &object, const Span< BodyConstraint > &bodies, const ConstraintSolverConf &conf) |
Solves the position constraint. More... | |
bool | SolvePosition (const Joint &object, const Span< BodyConstraint > &bodies, const ConstraintSolverConf &conf) |
Solves the position constraint. More... | |
bool | SolvePosition (const MotorJointConf &object, const Span< BodyConstraint > &bodies, const ConstraintSolverConf &conf) |
Solves the position constraint. More... | |
bool | SolvePosition (const PrismaticJointConf &object, const Span< BodyConstraint > &bodies, const ConstraintSolverConf &conf) |
Solves the position constraint. More... | |
bool | SolvePosition (const PulleyJointConf &object, const Span< BodyConstraint > &bodies, const ConstraintSolverConf &conf) |
Solves the position constraint. More... | |
bool | SolvePosition (const RevoluteJointConf &object, const Span< BodyConstraint > &bodies, const ConstraintSolverConf &conf) |
Solves the position constraint. More... | |
bool | SolvePosition (const RopeJointConf &object, const Span< BodyConstraint > &bodies, const ConstraintSolverConf &conf) |
Solves the position constraint. More... | |
bool | SolvePosition (const TargetJointConf &object, const Span< BodyConstraint > &bodies, const ConstraintSolverConf &conf) |
Solves the position constraint. More... | |
bool | SolvePosition (const WeldJointConf &object, const Span< BodyConstraint > &bodies, const ConstraintSolverConf &conf) |
Solves the position constraint. More... | |
bool | SolvePosition (const WheelJointConf &object, const Span< BodyConstraint > &bodies, const ConstraintSolverConf &conf) |
Solves the position constraint. More... | |
bool | SolveVelocity (DistanceJointConf &object, const Span< BodyConstraint > &bodies, const StepConf &step) |
Solves velocity constraint. More... | |
bool | SolveVelocity (FrictionJointConf &object, const Span< BodyConstraint > &bodies, const StepConf &step) |
Solves velocity constraint. More... | |
bool | SolveVelocity (GearJointConf &object, const Span< BodyConstraint > &bodies, const StepConf &step) |
Solves velocity constraint. More... | |
bool | SolveVelocity (Joint &object, const Span< BodyConstraint > &bodies, const StepConf &step) |
Solves velocity constraint. More... | |
bool | SolveVelocity (MotorJointConf &object, const Span< BodyConstraint > &bodies, const StepConf &step) |
Solves velocity constraint. More... | |
bool | SolveVelocity (PrismaticJointConf &object, const Span< BodyConstraint > &bodies, const StepConf &step) |
Solves velocity constraint. More... | |
bool | SolveVelocity (PulleyJointConf &object, const Span< BodyConstraint > &bodies, const StepConf &step) |
Solves velocity constraint. More... | |
bool | SolveVelocity (RevoluteJointConf &object, const Span< BodyConstraint > &bodies, const StepConf &step) |
Solves velocity constraint. More... | |
bool | SolveVelocity (RopeJointConf &object, const Span< BodyConstraint > &bodies, const StepConf &step) |
Solves velocity constraint. More... | |
bool | SolveVelocity (TargetJointConf &object, const Span< BodyConstraint > &bodies, const StepConf &step) |
Solves velocity constraint. More... | |
bool | SolveVelocity (WeldJointConf &object, const Span< BodyConstraint > &bodies, const StepConf &step) |
Solves velocity constraint. More... | |
bool | SolveVelocity (WheelJointConf &object, const Span< BodyConstraint > &bodies, const StepConf &step) |
Solves velocity constraint. More... | |
StepStats | Step (World &world, const StepConf &conf=StepConf{}) |
Steps the given world simulation according to the given configuration. 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... | |
void | swap (DynamicTree &lhs, DynamicTree &rhs) noexcept |
Area | TestOverlap (const DistanceProxy &proxyA, const Transformation &xfA, const DistanceProxy &proxyB, const Transformation &xfB, DistanceConf conf=DistanceConf{}) |
Determine if two generic shapes overlap. More... | |
bool | TestOverlap (const DynamicTree &tree, DynamicTree::Size leafIdA, DynamicTree::Size leafIdB) noexcept |
Tests for overlap of the elements identified in the given dynamic tree. | |
bool | TestPoint (const DistanceProxy &proxy, const Length2 &point) noexcept |
Tests a point for containment in the given distance proxy. More... | |
bool | TestPoint (const Shape &shape, const Length2 &point) noexcept |
Test a point for containment in the given shape. 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... | |
constexpr Length2 | Transform (const Length2 &v, const Transformation &xfm) noexcept |
Transforms the given 2-D vector with the given transformation. More... | |
void | Transform (PolygonShapeConf &arg, const Mat22 &m) |
Transforms the given polygon configuration's vertices by the given transformation matrix. More... | |
void | Translate (ChainShapeConf &arg, const Length2 &value) |
Translates the given shape's vertices by the given amount. | |
void | Translate (DiskShapeConf &arg, const Length2 &value) noexcept |
Translates the given shape configuration's vertices by the given amount. | |
void | Translate (EdgeShapeConf &arg, const Length2 &value) noexcept |
Translates the given shape's vertices by the given amount. | |
void | Translate (MultiShapeConf &arg, const Length2 &value) |
Translates the given shape configuration's vertices by the given amount. | |
void | Translate (PolygonShapeConf &arg, const Length2 &value) |
Translates the given shape configuration's vertices by the given amount. | |
void | Translate (Shape &shape, const Length2 &value) |
Translates all of the given shape's vertices by the given amount. 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 Joint &value) |
Converts the given joint into its current configuration value. More... | |
template<typename T > | |
std::add_pointer_t< std::add_const_t< T > > | TypeCast (const Joint *value) noexcept |
Converts the given joint into its current configuration value. More... | |
template<typename T > | |
T | TypeCast (const Shape &value) |
Casts the specified instance into the template specified type. More... | |
template<typename T > | |
std::add_pointer_t< std::add_const_t< T > > | TypeCast (const Shape *value) noexcept |
Converts the given shape into its current configuration value. More... | |
template<typename T > | |
T | TypeCast (const World &value) |
Converts the given joint into its current configuration value. 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 > | |
T | TypeCast (Joint &&value) |
Converts the given joint into its current configuration value. More... | |
template<typename T > | |
T | TypeCast (Joint &value) |
Converts the given joint into its current configuration value. More... | |
template<typename T > | |
std::add_pointer_t< T > | TypeCast (Joint *value) noexcept |
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... | |
template<typename T > | |
std::add_pointer_t< T > | TypeCast (World *value) noexcept |
Casts the given world into its current configuration value. More... | |
bool | Unawaken (Body &body) noexcept |
Puts the body to sleep if it's awake. More... | |
void | UnsetAwake (Body &body) noexcept |
Sets this body to asleep if sleeping is allowed. More... | |
void | UnsetAwake (World &world, BodyID id) |
Sleeps the identified body. More... | |
constexpr void | UnsetDestroyed (Body &body) noexcept |
Unsets the destroyed property of the given body. More... | |
void | UnsetEnabled (Body &body) noexcept |
Unsets the enabled state. More... | |
void | UnsetEnabled (World &world, ContactID id) |
Unsets the enabled status of the identified contact. More... | |
void | UnsetImpenetrable (Body &body) noexcept |
Unsets the impenetrable status of this body. More... | |
void | UnsetImpenetrable (World &world, BodyID id) |
Unsets the impenetrable status of the identified body. More... | |
bool | Validate (const Span< const Length2 > &verts) |
Validates the convexity of the given collection of vertices. More... | |
bool | ValidateMetrics (const DynamicTree &tree, DynamicTree::Size index) noexcept |
Validates the metrics of the given tree from the given index. More... | |
bool | ValidateStructure (const DynamicTree &tree, DynamicTree::Size index) noexcept |
Validates the structure of the given tree from the given index. More... | |
AabbTreeWorld Listener Non-Member Functions | |
void | SetShapeDestructionListener (AabbTreeWorld &world, ShapeFunction listener) noexcept |
Registers a destruction listener for shapes. More... | |
void | SetDetachListener (AabbTreeWorld &world, BodyShapeFunction listener) noexcept |
Registers a detach listener for shapes detaching from bodies. | |
void | SetJointDestructionListener (AabbTreeWorld &world, JointFunction listener) noexcept |
Register a destruction listener for joints. More... | |
void | SetBeginContactListener (AabbTreeWorld &world, ContactFunction listener) noexcept |
Register a begin contact event listener. | |
void | SetEndContactListener (AabbTreeWorld &world, ContactFunction listener) noexcept |
Register an end contact event listener. | |
void | SetPreSolveContactListener (AabbTreeWorld &world, ContactManifoldFunction listener) noexcept |
Register a pre-solve contact event listener. | |
void | SetPostSolveContactListener (AabbTreeWorld &world, ContactImpulsesFunction listener) noexcept |
Register a post-solve contact event listener. | |
AabbTreeWorld Miscellaneous Non-Member Functions | |
bool | operator== (const AabbTreeWorld &lhs, const AabbTreeWorld &rhs) |
Equality operator for world comparisons. | |
bool | operator!= (const AabbTreeWorld &lhs, const AabbTreeWorld &rhs) |
Inequality operator for world comparisons. | |
std::optional< pmr::StatsResource::Stats > | GetResourceStats (const AabbTreeWorld &world) noexcept |
Gets the resource statistics of the specified world. | |
void | Clear (AabbTreeWorld &world) noexcept |
Clears this world. More... | |
StepStats | Step (AabbTreeWorld &world, const StepConf &conf) |
Steps the world simulation according to the given configuration. More... | |
bool | IsStepComplete (const AabbTreeWorld &world) noexcept |
Whether or not "step" is complete. More... | |
bool | GetSubStepping (const AabbTreeWorld &world) noexcept |
Gets whether or not sub-stepping is enabled. More... | |
void | SetSubStepping (AabbTreeWorld &world, bool flag) noexcept |
Enables/disables single stepped continuous physics. More... | |
const DynamicTree & | GetTree (const AabbTreeWorld &world) noexcept |
Gets access to the broad-phase dynamic tree information. | |
bool | IsLocked (const AabbTreeWorld &world) noexcept |
Is the world locked (in the middle of a time step). | |
void | ShiftOrigin (AabbTreeWorld &world, const Length2 &newOrigin) |
Shifts the world origin. More... | |
Interval< Positive< Length > > | GetVertexRadiusInterval (const AabbTreeWorld &world) noexcept |
Gets the vertex radius interval allowable for the given world. More... | |
Frequency | GetInvDeltaTime (const AabbTreeWorld &world) noexcept |
Gets the inverse delta time. More... | |
const ProxyIDs & | GetProxies (const AabbTreeWorld &world) noexcept |
Gets the dynamic tree leaves queued for finding new contacts. | |
const BodyShapeIDs & | GetFixturesForProxies (const AabbTreeWorld &world) noexcept |
Gets the fixtures-for-proxies for this world. More... | |
AabbTreeWorld Body Member Functions | |
Member functions relating to bodies. | |
BodyCounter | GetBodyRange (const AabbTreeWorld &world) noexcept |
Gets the extent of the currently valid body range. More... | |
const BodyIDs & | GetBodies (const AabbTreeWorld &world) noexcept |
Gets a container of valid world body identifiers for this constant world. More... | |
const BodyIDs & | GetBodiesForProxies (const AabbTreeWorld &world) noexcept |
Gets the bodies-for-proxies container for this world. More... | |
BodyID | CreateBody (AabbTreeWorld &world, Body body=Body{}) |
Creates a rigid body that's a copy of the given one. More... | |
const Body & | GetBody (const AabbTreeWorld &world, BodyID id) |
Gets the identified body. More... | |
void | SetBody (AabbTreeWorld &world, BodyID id, Body value) |
Sets the identified body. More... | |
void | Destroy (AabbTreeWorld &world, BodyID id) |
Destroys the identified body. More... | |
auto | IsDestroyed (const AabbTreeWorld &world, BodyID id) -> bool |
Gets whether the given identifier is to a body that's been destroyed. More... | |
const ProxyIDs & | GetProxies (const AabbTreeWorld &world, BodyID id) |
Gets the proxies for the identified body. More... | |
const BodyContactIDs & | GetContacts (const AabbTreeWorld &world, BodyID id) |
Gets the contacts associated with the identified body. More... | |
const BodyJointIDs & | GetJoints (const AabbTreeWorld &world, BodyID id) |
AabbTreeWorld Joint Member Functions | |
Member functions relating to joints. | |
JointCounter | GetJointRange (const AabbTreeWorld &world) noexcept |
Gets the extent of the currently valid joint range. More... | |
const JointIDs & | GetJoints (const AabbTreeWorld &world) noexcept |
Gets the container of joint IDs of the given world. More... | |
JointID | CreateJoint (AabbTreeWorld &world, Joint def) |
Creates a joint to constrain one or more bodies. More... | |
const Joint & | GetJoint (const AabbTreeWorld &world, JointID id) |
Gets the identified joint. More... | |
void | SetJoint (AabbTreeWorld &world, JointID id, Joint def) |
Sets the identified joint. More... | |
void | Destroy (AabbTreeWorld &world, JointID id) |
Destroys a joint. More... | |
auto | IsDestroyed (const AabbTreeWorld &world, JointID id) -> bool |
Gets whether the given identifier is to a joint that's been destroyed. More... | |
AabbTreeWorld Shape Member Functions | |
Member functions relating to shapes. | |
ShapeCounter | GetShapeRange (const AabbTreeWorld &world) noexcept |
Gets the extent of the currently valid shape range. More... | |
ShapeID | CreateShape (AabbTreeWorld &world, Shape def) |
Creates an identifiable copy of the given shape within this world. More... | |
const Shape & | GetShape (const AabbTreeWorld &world, ShapeID id) |
Gets the identified shape. More... | |
void | SetShape (AabbTreeWorld &world, ShapeID id, Shape def) |
Sets the value of the identified shape. More... | |
void | Destroy (AabbTreeWorld &world, ShapeID id) |
Destroys the identified shape removing any body associations with it first. More... | |
auto | IsDestroyed (const AabbTreeWorld &world, ShapeID id) -> bool |
Gets whether the given identifier is to a shape that's been destroyed. More... | |
AabbTreeWorld Contact Member Functions | |
Member functions relating to contacts. | |
ContactCounter | GetContactRange (const AabbTreeWorld &world) noexcept |
Gets the extent of the currently valid contact range. More... | |
KeyedContactIDs | GetContacts (const AabbTreeWorld &world) |
Gets a container of valid world contact identifiers. More... | |
const Contact & | GetContact (const AabbTreeWorld &world, ContactID id) |
Gets the identified contact. More... | |
void | SetContact (AabbTreeWorld &world, ContactID id, Contact value) |
Sets the identified contact's state. More... | |
const Manifold & | GetManifold (const AabbTreeWorld &world, ContactID id) |
Gets the identified manifold. More... | |
void | SetManifold (AabbTreeWorld &world, ContactID id, const Manifold &value) |
Sets the identified manifold. More... | |
auto | IsDestroyed (const AabbTreeWorld &world, ContactID id) -> bool |
Gets whether the given identifier is to a contact that's been destroyed. More... | |
Variables | |
constexpr auto | EarthlyGravity = LinearAcceleration2{0_mps2, EarthlyLinearAcceleration} |
Earthly gravity in 2-dimensions. More... | |
constexpr auto | InvalidAABB |
Invalid AABB value. More... | |
template<class T > | |
constexpr bool | IsValidJointTypeV = detail::IsValidJointType<T>::value |
Boolean value for whether the specified type is a valid joint type. More... | |
constexpr auto | Transform_identity |
Identity transformation value. More... | |
Name space for 2-dimensionally related PlayRho names.
using playrho::d2::DynamicTreeRayCastCB = typedef std::function<Real(BodyID body, ShapeID shape, ChildCounter child, const RayCastInput& input)> |
Ray cast callback function.
using playrho::d2::JointIDs = typedef std::vector<JointID> |
using playrho::d2::QueryShapeCallback = typedef std::function<bool(BodyID body, ShapeID shape, ChildCounter child)> |
Query AABB for fixtures callback function type.
using playrho::d2::RayCastOutput = typedef std::optional<RayCastHit> |
Ray cast output.
This is a type alias for an optional RayCastHit
instance.
|
inlinenoexcept |
Advances the body by a given time ratio.
This function:
body | The body to update. |
value | Valid new time factor in [0,1) to advance the sweep to. |
|
inlinenoexcept |
Calls the body sweep's Advance0
function to advance to the given value.
Referenced by Advance(), and playrho::d2::Body::Advance0().
|
noexcept |
Advances the sweep by a factor of the difference between the given time alpha and the sweep's alpha 0.
This advances position 0 (pos0
) of the sweep towards position 1 (pos1
) by a factor of the difference between the given alpha and the alpha 0. This does not change the sweep's position 1.
sweep | The sweep to return an advancement of. |
alpha | Valid new time factor in [0,1) to update the sweep to. |
|
noexcept |
Applies an angular impulse.
body | Body to apply the angular impulse to. |
impulse | Angular impulse to be applied. |
Referenced by playrho::d2::World::ApplyAngularImpulse().
void playrho::d2::ApplyAngularImpulse | ( | World & | world, |
BodyID | id, | ||
AngularMomentum | impulse | ||
) |
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. |
void playrho::d2::ApplyForce | ( | World & | world, |
BodyID | id, | ||
const Force2 & | force, | ||
const Length2 & | point | ||
) |
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. |
|
noexcept |
Applies an impulse at a point.
body | Body to apply the impulse to. |
impulse | the world impulse vector. |
point | the world position of the point of application. |
Referenced by playrho::d2::World::ApplyLinearImpulse().
void playrho::d2::ApplyLinearImpulse | ( | World & | world, |
BodyID | id, | ||
const Momentum2 & | impulse, | ||
const Length2 & | point | ||
) |
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. |
void playrho::d2::Attach | ( | AabbTreeWorld & | world, |
BodyID | id, | ||
ShapeID | shapeID | ||
) |
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. |
Referenced by playrho::d2::World::Attach().
void playrho::d2::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.
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. |
|
inlinenoexcept |
Awakens the body if it's asleep.
Referenced by playrho::d2::World::Awaken().
BodyCounter playrho::d2::Awaken | ( | World & | world | ) |
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. Acceleration playrho::d2::CalcGravitationalAcceleration | ( | const World & | world, |
BodyID | id | ||
) |
Calculates the gravitationally associated acceleration for the given body within its world.
std::out_of_range | If given an invalid body identifier. |
|
noexcept |
Calculates the "search direction" for the given simplex edge list.
simplexEdges | A one or two edge list. |
Referenced by playrho::d2::DistanceProxy::Distance().
|
noexcept |
Caps velocity.
Enforces maximums on the given velocity.
velocity | Velocity to cap. |
h | Time elapsed to get velocity for. |
conf | Movement configuration. This defines caps on linear and angular speeds. |
|
noexcept |
Clears this world.
Referenced by playrho::d2::detail::WorldModel< T >::Clear_().
|
inlinenoexcept |
Clears the given world.
world | The world to clear. |
|
inline |
Clears forces.
Manually clear the force buffer on all bodies.
WrongState | if this function is called while the world is locked. |
Manifold playrho::d2::CollideShapes | ( | const DistanceProxy & | shapeA, |
const Transformation & | xfA, | ||
const DistanceProxy & | shapeB, | ||
const Transformation & | xfB, | ||
const Manifold::Conf & | conf = GetDefaultManifoldConf() |
||
) |
Calculates the relevant collision manifold.
TestOverlap
function. This is not always the case however especially when the separation or overlap distance is closer to zero.
|
noexcept |
Computes the AABB.
Computes the Axis Aligned Bounding Box (AABB) for the given child shape at a given a transform.
proxy | Distance proxy for the child shape. |
xf | World transform of the shape. |
xf
is valid. Referenced by playrho::d2::Shape::ComputeAABB(), playrho::d2::World::ComputeAABB(), and playrho::d2::World::ComputeIntersectingAABB().
|
noexcept |
Computes the AABB.
Computes the Axis Aligned Bounding Box (AABB) for the given child shape at the given transforms.
proxy | Distance proxy for the child shape. |
xfm0 | World transform 0 of the shape. |
xfm1 | World transform 1 of the shape. |
xfm0
and xfm1
are both valid. 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. |
|
noexcept |
Computes the height of the tree from a given node.
tree | Tree to compute the height at the given node for. |
index | ID of node to compute height from. |
index
is less than tree.GetNodeCapacity()
. Referenced by ComputeHeight().
AABB playrho::d2::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.
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.
Referenced by playrho::d2::World::ComputeIntersectingAABB().
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. |
Referenced by playrho::d2::World::ComputeMassData(), and playrho::d2::World::ResetMassData().
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. |
|
noexcept |
Gets the ratio of the sum of the perimeters of nodes to the root perimeter.
|
noexcept |
Gets the sum of the perimeters of nodes.
Referenced by ComputePerimeterRatio().
BodyID playrho::d2::CreateBody | ( | AabbTreeWorld & | world, |
Body | body = Body{} |
||
) |
Creates a rigid body that's a copy of the given one.
GetBodies(const AabbTreeWorld&)
function. world | The world within which to create the body. |
body | A customized body or its default value. |
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 invalid shape identifiers. |
Referenced by playrho::d2::AabbTreeWorld::CreateBody(), playrho::d2::World::CreateBody(), and playrho::d2::detail::WorldModel< T >::CreateBody_().
BodyID playrho::d2::CreateBody | ( | World & | world, |
const Body & | body = Body{} , |
||
bool | resetMassData = true |
||
) |
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 . |
JointID playrho::d2::CreateJoint | ( | AabbTreeWorld & | world, |
Joint | def | ||
) |
Creates a joint to constrain one or more bodies.
GetJoints(const AabbTreeWorld&)
function. Destroy(JointID)
function. WrongState | if this function is called while the world is locked. |
LengthError | if this operation would create more than MaxJoints . |
InvalidArgument | if the given definition is not allowed. |
std::out_of_range | if the given joint references any invalid body id. |
Referenced by playrho::d2::World::CreateJoint(), and playrho::d2::detail::WorldModel< T >::CreateJoint_().
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. |
ShapeID playrho::d2::CreateShape | ( | AabbTreeWorld & | world, |
Shape | def | ||
) |
Creates an identifiable copy of the given shape within this 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 . |
Referenced by playrho::d2::World::Attach(), and playrho::d2::detail::WorldModel< T >::CreateShape_().
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 . |
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.
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". |
void playrho::d2::Destroy | ( | AabbTreeWorld & | world, |
BodyID | id | ||
) |
Destroys the identified body.
Destroys a given body that had previously been created by a call to this world's CreateBody(const Body&)
function.
world | The world within which the identified body is to be destroyed. |
id | Identifier of body to destroy that had been created by this world. |
WrongState | if this function is called while the world is locked. |
std::out_of_range | If given an invalid body identifier. |
GetBodies(const AabbTreeWorld&)
function; none of the body's fixtures will be present in the fixtures-for-proxies collection; IsDestroyed(const AabbTreeWorld& world, BodyID)
for world
and id
returns true. Referenced by playrho::d2::detail::WorldModel< T >::Destroy_().
void playrho::d2::Destroy | ( | AabbTreeWorld & | world, |
JointID | id | ||
) |
Destroys a joint.
Destroys a given joint that had previously been created by a call to this world's CreateJoint(const Joint&)
function.
world | The world within which the identified joint is to be destroyed. |
id | Identifier of joint to destroy that had been created by this world. |
GetJoints(const AabbTreeWorld&)
function; IsDestroyed(const AabbTreeWorld&,JointID)
returns true. WrongState | if this function is called while the world is locked. |
void playrho::d2::Destroy | ( | AabbTreeWorld & | world, |
ShapeID | id | ||
) |
Destroys the identified shape removing any body associations with it first.
world | The world from which the identified shape is to be destroyed. |
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 invalid shape identifier. |
IsDestroyed(const AabbTreeWorld& world, ShapeID)
for world
and id
returns true. 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. bool playrho::d2::Detach | ( | AabbTreeWorld & | world, |
BodyID | id, | ||
ShapeID | shapeID | ||
) |
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. |
Referenced by playrho::d2::World::Detach().
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. |
DistanceOutput playrho::d2::Distance | ( | const DistanceProxy & | proxyA, |
const Transformation & | transformA, | ||
const DistanceProxy & | proxyB, | ||
const Transformation & | transformB, | ||
DistanceConf | conf = DistanceConf{} |
||
) |
Determines the closest points between two shapes using an iterative method.
size(conf.cache.indices)
should be zero. proxyA | Proxy A. |
transformA | Transform of A. |
proxyB | Proxy B. |
transformB | Transform of B. |
conf | Configuration to use including the simplex cache for assisting the determination. |
DefaultMaxDistanceIters
is zero. Referenced by playrho::ToiOutput::GetToiViaSat(), and playrho::d2::DistanceProxy::TestOverlap().
void playrho::d2::EnableLimit | ( | Joint & | object, |
bool | value | ||
) |
Enables the specified joint's limit property if it supports one.
std::invalid_argument | If not supported for the given joint's type. |
Referenced by playrho::d2::World::EnableLimit().
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. |
void playrho::d2::EnableMotor | ( | Joint & | object, |
bool | value | ||
) |
Enables the specified joint's motor property if it supports one.
std::invalid_argument | If not supported for the given joint's type. |
Referenced by playrho::d2::World::EnableMotor().
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. |
Length playrho::d2::Evaluate | ( | const SeparationScenario & | scenario, |
const DistanceProxy & | proxyA, | ||
const Transformation & | xfA, | ||
const DistanceProxy & | proxyB, | ||
const Transformation & | xfB, | ||
IndexPair | indexPair | ||
) |
Evaluates the separation of the identified proxy vertices at the given time factor.
scenario | Separation scenario to evaluate. |
proxyA | Interface to data for convex polygon A. |
xfA | Transformation A. |
proxyB | Interface to data for convex polygon B. |
xfB | Transformation B. |
indexPair | Indexes of the proxy A and proxy B vertexes. |
Referenced by playrho::ToiOutput::GetToiViaSat().
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
.
|
noexcept |
Finds index of node matching given contactble using a linear search.
DynamicTree::InvalidSize
. Finds the index of the lowest right most vertex in the given collection.
std::size_t(-1)
for empty container. Referenced by GetConvexHullAsVector().
LengthIndexPair playrho::d2::FindMinSeparation | ( | const SeparationScenario & | scenario, |
const DistanceProxy & | proxyA, | ||
const Transformation & | xfA, | ||
const DistanceProxy & | proxyB, | ||
const Transformation & | xfB | ||
) |
Finds the minimum separation.
Referenced by playrho::ToiOutput::GetToiViaSat().
|
inlinenoexcept |
Gets the AABB for the given dynamic tree.
Gets the AABB that encloses all other AABB instances that are within the given dynamic tree.
|
constexprnoexcept |
Gets the AABB of the given dynamic tree node.
node
must be a used node. I.e. IsUnused(node)
must be false.
|
inlinenoexcept |
Gets the given body's acceleration.
body | Body whose acceleration should be returned. |
Referenced by playrho::d2::Body::operator==().
Acceleration playrho::d2::GetAcceleration | ( | const World & | world, |
BodyID | id | ||
) |
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. |
Referenced by playrho::d2::World::GetCurrentLengthA(), and playrho::d2::World::GetJointTranslation().
Get the anchor point on body-B in world coordinates.
std::out_of_range | If given an invalid joint identifier. |
Referenced by playrho::d2::World::GetCurrentLengthB(), and playrho::d2::World::GetJointTranslation().
Gets the body's angle.
Referenced by GetAngle(), playrho::d2::World::GetAngle(), playrho::d2::World::GetGearJointConf(), playrho::d2::World::GetMotorJointConf(), playrho::d2::Body::GetPosition(), GetPosition(), playrho::d2::World::GetPrismaticJointConf(), playrho::d2::World::GetRevoluteJointConf(), playrho::d2::World::GetWeldJointConf(), playrho::d2::World::RotateAboutWorldPoint(), and playrho::d2::World::SetMassData().
Gets the angle of the identified body.
std::out_of_range | If given an invalid body identifier. |
Angle playrho::d2::GetAngle | ( | const World & | world, |
const RevoluteJointConf & | conf | ||
) |
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. |
|
inlinenoexcept |
Gets this body's angular acceleration.
Referenced by playrho::d2::World::ApplyForce(), playrho::d2::World::ApplyForceToCenter(), playrho::d2::World::ApplyTorque(), playrho::d2::World::GetAcceleration(), playrho::d2::World::GetAngularAcceleration(), and playrho::d2::Body::GetBodyConf().
AngularAcceleration playrho::d2::GetAngularAcceleration | ( | const World & | world, |
BodyID | id | ||
) |
Gets this body's angular acceleration.
std::out_of_range | If given an invalid body identifier. |
|
inlinenoexcept |
Gets the angular damping of the body.
Referenced by playrho::d2::World::GetAngularDamping(), playrho::d2::Body::GetBodyConf(), and playrho::d2::Body::operator==().
Gets the angular damping of the body.
std::out_of_range | If given an invalid body identifier. |
Gets the lower joint limit.
std::invalid_argument | If not supported for the given joint's type. |
Referenced by playrho::d2::Joint::GetAngularLowerLimit(), and playrho::d2::World::GetAngularLowerLimit().
Get the lower joint limit.
std::out_of_range | If given an invalid joint identifier. |
RotInertia playrho::d2::GetAngularMass | ( | const Joint & | object | ) |
Gets the given joint's angular mass.
std::invalid_argument | If not supported for the given joint's type. |
Referenced by playrho::d2::Joint::GetAngularMass(), and playrho::d2::World::GetAngularMass().
RotInertia playrho::d2::GetAngularMass | ( | const World & | world, |
JointID | id | ||
) |
Gets the computed angular rotational inertia used by the joint.
std::out_of_range | If given an invalid joint identifier. |
AngularMomentum playrho::d2::GetAngularMotorImpulse | ( | const Joint & | object | ) |
Gets the angular motor impulse of the joint if it has this property.
std::invalid_argument | If not supported for the given joint's type. |
Referenced by playrho::d2::Joint::GetAngularMotorImpulse(), playrho::d2::World::GetAngularMotorImpulse(), playrho::d2::Joint::GetMotorTorque(), and playrho::d2::World::GetMotorTorque().
AngularMomentum playrho::d2::GetAngularMotorImpulse | ( | const World & | world, |
JointID | id | ||
) |
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 angular offset property of the specified joint if its type has one.
std::invalid_argument | If not supported for the given joint's type. |
Referenced by playrho::d2::Joint::GetAngularOffset(), and playrho::d2::World::GetAngularOffset().
Gets the target angular offset.
std::out_of_range | If given an invalid joint identifier. |
AngularMomentum playrho::d2::GetAngularReaction | ( | const Joint & | object | ) |
Get the angular reaction on body-B.
AngularMomentum playrho::d2::GetAngularReaction | ( | const World & | world, |
JointID | id | ||
) |
Get the angular reaction on body-B for the identified joint.
std::out_of_range | If given an invalid joint identifier. |
Gets the upper joint limit.
std::invalid_argument | If not supported for the given joint's type. |
Referenced by playrho::d2::Joint::GetAngularUpperLimit(), and playrho::d2::World::GetAngularUpperLimit().
Get the upper joint limit.
std::out_of_range | If given an invalid joint identifier. |
|
inlinenoexcept |
Gets the angular velocity.
body | Body to get the angular velocity for. |
Referenced by playrho::d2::World::GetAngularVelocity(), playrho::d2::Body::GetBodyConf(), playrho::d2::Body::SetVelocity(), and playrho::d2::World::SetVelocity().
|
inline |
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. |
AngularVelocity playrho::d2::GetAngularVelocity | ( | const World & | world, |
const RevoluteJointConf & | conf | ||
) |
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. |
AngularVelocity playrho::d2::GetAngularVelocity | ( | const World & | world, |
const WheelJointConf & | conf | ||
) |
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. |
AngularVelocity playrho::d2::GetAngularVelocity | ( | const World & | world, |
JointID | id | ||
) |
Gets the angular velocity of the identified joint if it has this property.
std::out_of_range | If given an invalid joint identifier. |
ShapeCounter playrho::d2::GetAssociationCount | ( | const World & | world | ) |
Gets the count of body-shape associations in the given world.
world | The world in which to get the shape association count for. |
BodyCounter playrho::d2::GetAwakeCount | ( | const World & | world | ) |
|
inlinenoexcept |
Gets a container of valid world body identifiers for this constant world.
Gets a container of identifiers of bodies currently existing within this world. These are the bodies that had been created from previous calls to the CreateBody(const Body&)
function that haven't yet been destroyed.
Referenced by playrho::d2::World::Awaken(), playrho::d2::World::CalcGravitationalAcceleration(), playrho::d2::World::FindClosestBody(), playrho::d2::World::GetAssociationCount(), playrho::d2::World::GetAwakeCount(), playrho::d2::detail::WorldModel< T >::GetBodies_(), playrho::d2::World::GetBodyCount(), playrho::d2::World::GetUsedShapesCount(), and playrho::d2::World::SetAccelerations().
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. |
|
inlinenoexcept |
Gets the bodies-for-proxies container for this world.
Provides insight on what bodies have been queued for proxy processing during the next call to the world step function.
Referenced by playrho::d2::detail::WorldModel< T >::GetBodiesForProxies_().
const Body & playrho::d2::GetBody | ( | const AabbTreeWorld & | world, |
BodyID | id | ||
) |
Gets the identified body.
std::out_of_range | if given an invalid id. |
Referenced by playrho::d2::World::ApplyAngularImpulse(), playrho::d2::World::ApplyForce(), playrho::d2::World::ApplyLinearImpulse(), playrho::d2::AabbTreeWorld::Attach(), playrho::d2::World::Attach(), playrho::d2::AabbTreeWorld::Detach(), playrho::d2::World::Detach(), playrho::d2::World::GetAcceleration(), playrho::d2::World::GetAnchorA(), playrho::d2::World::GetAnchorB(), playrho::d2::World::GetAngle(), playrho::d2::World::GetAngularAcceleration(), playrho::d2::World::GetAngularDamping(), playrho::d2::World::GetAngularVelocity(), playrho::d2::detail::WorldModel< T >::GetBody_(), playrho::d2::World::GetInvMass(), playrho::d2::World::GetInvRotInertia(), playrho::d2::World::GetJointTranslation(), playrho::d2::World::GetLinearAcceleration(), playrho::d2::World::GetLinearDamping(), playrho::d2::World::GetLocalCenter(), playrho::d2::AabbTreeWorld::GetShapes(), playrho::d2::World::GetTransformation(), playrho::d2::World::GetType(), playrho::d2::World::GetVelocity(), playrho::d2::World::GetWorldCenter(), playrho::d2::World::IsAccelerable(), playrho::d2::World::IsAwake(), IsDestroyed(), playrho::d2::World::IsEnabled(), playrho::d2::World::IsFixedRotation(), playrho::d2::World::IsImpenetrable(), playrho::d2::World::IsMassDataDirty(), playrho::d2::World::IsSleepingAllowed(), playrho::d2::World::IsSpeedable(), playrho::d2::World::SetAcceleration(), playrho::d2::World::SetAngle(), playrho::d2::World::SetAngularDamping(), playrho::d2::World::SetAwake(), playrho::d2::World::SetEnabled(), playrho::d2::World::SetFixedRotation(), playrho::d2::World::SetImpenetrable(), playrho::d2::World::SetLinearDamping(), playrho::d2::World::SetLocation(), playrho::d2::World::SetMassData(), playrho::d2::World::SetSleepingAllowed(), playrho::d2::World::SetTransformation(), playrho::d2::World::SetType(), playrho::d2::World::SetVelocity(), playrho::d2::World::UnsetAwake(), and playrho::d2::World::UnsetImpenetrable().
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. |
|
noexcept |
|
noexcept |
Gets the extent of the currently valid body range.
BodyID
that is in range for body related functions. Referenced by playrho::d2::detail::WorldModel< T >::GetBodyRange_().
|
inlinenoexcept |
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. |
DistanceProxy playrho::d2::GetChild | ( | const Shape & | shape, |
ChildCounter | index | ||
) |
Gets the "child" for the given index.
shape | Shape to get "child" shape of. |
index | Index to a child element of the shape. Value must be less than the number of child primitives of the shape. |
InvalidArgument | if the given index is out of range. |
|
constexprnoexcept |
Gets the "child" count for the given shape configuration.
|
constexprnoexcept |
Gets the "child" count for the given shape configuration.
|
noexcept |
Gets the number of child primitives of the shape.
ChildCounter playrho::d2::GetChildIndexA | ( | const World & | world, |
ContactID | id | ||
) |
Gets the child primitive index A for the identified contact.
std::out_of_range | If given an invalid contact identifier. |
Referenced by playrho::d2::World::ComputeIntersectingAABB(), playrho::d2::World::GetChildIndexA(), and playrho::Contact::GetWorldManifold().
ChildCounter playrho::d2::GetChildIndexB | ( | const World & | world, |
ContactID | id | ||
) |
Gets the child primitive index B for the identified contact.
std::out_of_range | If given an invalid contact identifier. |
Referenced by playrho::d2::World::ComputeIntersectingAABB(), playrho::d2::World::GetChildIndexB(), and playrho::Contact::GetWorldManifold().
|
noexcept |
Gets collide connected.
Referenced by playrho::d2::World::GetCollideConnected(), playrho::d2::detail::JointModel< T >::GetCollideConnected_(), and playrho::d2::JointConf::Set().
Gets collide connected for the specified joint.
std::out_of_range | If given an invalid joint identifier. |
const Contact & playrho::d2::GetContact | ( | const AabbTreeWorld & | world, |
ContactID | id | ||
) |
Gets the identified contact.
std::out_of_range | If given an invalid contact identifier. |
Referenced by playrho::d2::World::GetBodyA(), playrho::d2::World::GetBodyB(), playrho::d2::World::GetChildIndexA(), playrho::d2::World::GetChildIndexB(), playrho::d2::detail::WorldModel< T >::GetContact_(), playrho::d2::World::GetDefaultFriction(), playrho::d2::World::GetDefaultRestitution(), playrho::d2::World::GetFriction(), playrho::d2::World::GetRestitution(), playrho::d2::World::GetShapeA(), playrho::d2::World::GetShapeB(), playrho::d2::World::GetTangentSpeed(), playrho::d2::World::GetToi(), playrho::d2::World::GetToiCount(), playrho::d2::World::GetWorldManifold(), playrho::d2::World::HasValidToi(), playrho::d2::World::IsAwake(), IsDestroyed(), playrho::d2::World::IsEnabled(), playrho::d2::World::IsTouching(), playrho::d2::World::MakeTouchingMap(), playrho::d2::World::NeedsFiltering(), playrho::d2::World::NeedsUpdating(), playrho::d2::World::SameTouching(), playrho::d2::World::SetEnabled(), playrho::d2::World::SetFriction(), playrho::d2::World::SetRestitution(), playrho::d2::World::SetTangentSpeed(), and playrho::d2::World::UnsetEnabled().
Gets the identified contact.
std::out_of_range | If given an out of range contact identifier. |
|
inlinenoexcept |
Gets the count of contacts in the given world.
|
noexcept |
Gets the extent of the currently valid contact range.
ContactID
that is in range for contact related functions. Referenced by playrho::d2::detail::WorldModel< T >::GetContactRange_(), and playrho::d2::World::MakeTouchingMap().
|
inlinenoexcept |
Gets the extent of the currently valid contact range.
ContactID
that is in range for contact related functions.
|
noexcept |
Gets the contact relative velocity.
relA
and relB
are the zero vectors, the resulting value is simply velB.linear - velA.linear
.
|
inline |
Gets a container of valid world contact identifiers.
ContactFunction
to avoid missing contacts. const BodyContactIDs & playrho::d2::GetContacts | ( | const AabbTreeWorld & | world, |
BodyID | id | ||
) |
Gets the contacts associated with the identified body.
std::out_of_range | if given an invalid id. |
Referenced by playrho::d2::World::GetContactCount(), playrho::d2::detail::WorldModel< T >::GetContacts_(), and playrho::d2::World::GetTouchingCount().
|
inline |
Gets the contacts identified within the given world.
GetContact
or GetManifold
.
|
inline |
Gets the container of contacts attached to the identified body.
ContactFunction
. std::out_of_range | If given an out of range body identifier. |
Gets the convex hull for the given collection of vertices as a vector.
Referenced by playrho::d2::ConvexHull::Get(), and playrho::d2::PolygonShapeConf::Set().
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 given joint's damping ratio property if it has one.
std::invalid_argument | If not supported for the given joint's type. |
Referenced by playrho::d2::Joint::GetDampingRatio(), and playrho::d2::World::GetDampingRatio().
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. |
|
noexcept |
Gets a pointer to the underlying data.
Gets the default friction amount for the identified contact.
std::out_of_range | If given an invalid contact identifier. |
Referenced by playrho::d2::World::GetDefaultFriction(), and playrho::d2::World::ResetFriction().
Gets the default restitution amount for the identified contact.
std::out_of_range | If given an invalid contact identifier. |
Referenced by playrho::d2::World::GetDefaultRestitution(), and playrho::d2::World::ResetRestitution().
|
noexcept |
Gets the density of the given shape.
Referenced by playrho::d2::World::ComputeMassData(), playrho::d2::World::GetDensity(), playrho::d2::detail::ShapeModel< T >::GetDensity_(), and playrho::d2::detail::SetDensity().
NonNegative< AreaDensity > playrho::d2::GetDensity | ( | const World & | world, |
ShapeID | id | ||
) |
Gets the density of this shape.
std::out_of_range | If given an invalid identifier. |
DistanceJointConf playrho::d2::GetDistanceJointConf | ( | const Joint & | joint | ) |
Gets the definition data for the given joint.
joint | The joint to get the configuration for. |
std::bad_cast | If the given joint's type is inappropriate for getting this value. |
DistanceJointConf playrho::d2::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.
std::out_of_range | If given an invalid body identifier. |
Gets the filter value for the given shape.
Referenced by playrho::d2::detail::ShapeModel< T >::GetFilter_(), playrho::d2::World::GetFilterData(), playrho::d2::detail::SetFilter(), and playrho::d2::Shape::ShouldCollide().
Gets the filter data for the identified shape.
std::out_of_range | If given an invalid identifier. |
|
inlinenoexcept |
Gets the fixtures-for-proxies for this world.
Provides insight on what fixtures have been queued for proxy processing during the next call to the world step function.
Gets the frequency of the joint if it has this property.
std::invalid_argument | If not supported for the given joint's type. |
Referenced by playrho::d2::Joint::GetFrequency(), and playrho::d2::World::GetFrequency().
Gets the frequency of the identified joint if it has this property.
std::out_of_range | If given an invalid joint identifier. |
|
noexcept |
Gets the coefficient of friction.
Referenced by playrho::d2::Shape::GetDefaultFriction(), playrho::d2::World::GetFriction(), playrho::d2::detail::ShapeModel< T >::GetFriction_(), and playrho::d2::detail::SetFriction().
NonNegativeFF< Real > playrho::d2::GetFriction | ( | const World & | world, |
ContactID | id | ||
) |
Gets the friction used with the identified contact.
std::out_of_range | If given an invalid contact identifier. |
NonNegativeFF< Real > playrho::d2::GetFriction | ( | const World & | world, |
ShapeID | id | ||
) |
Gets the coefficient of friction of the specified shape.
std::out_of_range | If given an invalid identifier. |
FrictionJointConf playrho::d2::GetFrictionJointConf | ( | const Joint & | joint | ) |
Gets the definition data for the given joint.
std::bad_cast | If the given joint's type is inappropriate for getting this value. |
FrictionJointConf playrho::d2::GetFrictionJointConf | ( | const World & | world, |
BodyID | bodyA, | ||
BodyID | bodyB, | ||
const Length2 & | anchor | ||
) |
Gets the confguration for the given parameters.
std::out_of_range | If given an invalid body identifier. |
Gets a vector clockwise (forward-clockwise) perpendicular to the given vector.
This takes a vector of form (x, y) and returns the vector (y, -x).
vector | Vector to return a clockwise perpendicular equivalent for. |
Referenced by CalcSearchDirection(), GetFwdNormalsArray(), GetFwdNormalsVector(), GetManifold(), GetSeparationScenario(), and playrho::d2::VelocityConstraint::GetTangent().
GearJointConf playrho::d2::GetGearJointConf | ( | const Joint & | joint | ) |
Gets the definition data for the given joint.
std::bad_cast | If the given joint's type is inappropriate for getting this value. |
GearJointConf playrho::d2::GetGearJointConf | ( | const World & | world, |
JointID | id1, | ||
JointID | id2, | ||
Real | ratio = Real{1} |
||
) |
Gets the configuration for the given parameters.
std::out_of_range | If given an invalid joint identifier. |
std::invalid_argument | If not supported for the given joint's type. |
Referenced by playrho::d2::World::GetCurrentLengthA(), playrho::d2::Joint::GetGroundAnchorA(), and playrho::d2::World::GetGroundAnchorA().
Get the first ground anchor.
std::out_of_range | If given an invalid joint identifier. |
std::invalid_argument | If not supported for the given joint's type. |
Referenced by playrho::d2::World::GetCurrentLengthB(), playrho::d2::Joint::GetGroundAnchorB(), and playrho::d2::World::GetGroundAnchorB().
Get the second ground anchor.
std::out_of_range | If given an invalid joint identifier. |
|
inlinenoexcept |
Gets the height of the binary tree.
Referenced by playrho::d2::DynamicTree::DestroyLeaf(), and playrho::d2::DynamicTree::ShiftOrigin().
|
inlinenoexcept |
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.
Referenced by playrho::d2::detail::WorldModel< T >::GetInvDeltaTime_(), and playrho::d2::World::Step().
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. |
|
inlinenoexcept |
Gets the inverse total mass of the body.
This is the cached result of dividing 1 by the body's mass. Often floating division is much slower than multiplication. As such, it's likely faster to multiply values by this inverse value than to redivide them all the time by the mass.
Referenced by playrho::d2::World::ApplyForce(), playrho::d2::World::ApplyForceToCenter(), playrho::d2::Body::GetBodyConf(), GetBodyConstraint(), playrho::d2::World::GetInvMass(), playrho::d2::World::GetMass(), playrho::d2::Body::operator==(), and playrho::d2::World::SetForce().
Gets the inverse total mass of the body.
std::out_of_range | If given an invalid body identifier. |
|
inlinenoexcept |
Gets the inverse rotational inertia of the body.
This is the cached result of dividing 1 by the body's rotational inertia. Often floating division is much slower than multiplication. As such, it's likely faster to multiply values by this inverse value than to redivide them all the time by the rotational inertia.
Referenced by playrho::d2::World::ApplyForce(), playrho::d2::World::ApplyTorque(), playrho::d2::Body::GetBodyConf(), GetBodyConstraint(), playrho::d2::World::GetInvRotInertia(), playrho::d2::World::GetRotInertia(), playrho::d2::Body::operator==(), playrho::d2::World::SetForce(), and playrho::d2::World::SetTorque().
InvRotInertia playrho::d2::GetInvRotInertia | ( | const World & | world, |
BodyID | id | ||
) |
Gets the inverse rotational inertia of the body.
std::out_of_range | If given an invalid body identifier. |
const Joint & playrho::d2::GetJoint | ( | const AabbTreeWorld & | world, |
JointID | id | ||
) |
Gets the identified joint.
std::out_of_range | if given an invalid ID. |
Referenced by playrho::d2::World::EnableLimit(), playrho::d2::World::EnableMotor(), playrho::d2::World::GetAnchorA(), playrho::d2::World::GetAnchorB(), playrho::d2::World::GetAngle(), playrho::d2::World::GetAngularLowerLimit(), playrho::d2::World::GetAngularMass(), playrho::d2::World::GetAngularMotorImpulse(), playrho::d2::World::GetAngularOffset(), playrho::d2::World::GetAngularReaction(), playrho::d2::World::GetAngularUpperLimit(), playrho::d2::World::GetAngularVelocity(), playrho::d2::World::GetBodyA(), playrho::d2::World::GetBodyB(), playrho::d2::World::GetCollideConnected(), playrho::d2::World::GetDampingRatio(), playrho::d2::World::GetFrequency(), playrho::d2::World::GetGroundAnchorA(), playrho::d2::World::GetGroundAnchorB(), playrho::d2::detail::WorldModel< T >::GetJoint_(), playrho::d2::World::GetJointTranslation(), playrho::d2::World::GetLength(), playrho::d2::World::GetLimitState(), playrho::d2::World::GetLinearMotorImpulse(), playrho::d2::World::GetLinearOffset(), playrho::d2::World::GetLinearReaction(), playrho::d2::World::GetLocalAnchorA(), playrho::d2::World::GetLocalAnchorB(), playrho::d2::World::GetLocalXAxisA(), playrho::d2::World::GetLocalYAxisA(), playrho::d2::World::GetMaxMotorTorque(), playrho::d2::World::GetMotorSpeed(), playrho::d2::World::GetRatio(), playrho::d2::World::GetReferenceAngle(), playrho::d2::World::GetTarget(), playrho::d2::World::GetType(), IsDestroyed(), playrho::d2::World::IsLimitEnabled(), playrho::d2::World::IsMotorEnabled(), playrho::d2::World::SetAngularLimits(), playrho::d2::World::SetAngularOffset(), playrho::d2::World::SetAwake(), playrho::d2::World::SetFrequency(), playrho::d2::World::SetLinearOffset(), playrho::d2::World::SetMaxMotorTorque(), playrho::d2::World::SetMotorSpeed(), playrho::d2::World::SetTarget(), and playrho::d2::World::ShiftOrigin().
Gets the value of the identified joint.
std::out_of_range | If given an out of range joint identifier. |
|
inline |
|
noexcept |
Gets the extent of the currently valid joint range.
JointID
that is in range for joint related functions. Referenced by playrho::d2::detail::WorldModel< T >::GetJointRange_().
|
inlinenoexcept |
Gets the extent of the currently valid joint range.
JointID
that is in range for joint related functions.
|
inlinenoexcept |
Gets the container of joint IDs of the given world.
Gets a container enumerating the joints currently existing within this world. These are the joints that had been created from previous calls to the CreateJoint(const Joint&)
function that haven't yet been destroyed.
const BodyJointIDs & playrho::d2::GetJoints | ( | const AabbTreeWorld & | world, |
BodyID | id | ||
) |
std::out_of_range | if given an invalid id. |
Referenced by playrho::d2::World::GetJointCount(), and playrho::d2::detail::WorldModel< T >::GetJoints_().
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&)
.
|
inline |
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 property of the specified joint if its type has one.
std::invalid_argument | If not supported for the given joint's type. |
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. |
LimitState playrho::d2::GetLimitState | ( | const Joint & | object | ) |
std::invalid_argument | If not supported for the given joint's type. |
Referenced by playrho::d2::Joint::GetLimitState(), and playrho::d2::World::GetLimitState().
LimitState playrho::d2::GetLimitState | ( | const World & | world, |
JointID | id | ||
) |
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. |
|
inlinenoexcept |
Gets this body's linear acceleration.
Referenced by playrho::d2::World::ApplyForce(), playrho::d2::World::ApplyForceToCenter(), playrho::d2::World::ApplyTorque(), playrho::d2::World::GetAcceleration(), playrho::d2::Body::GetBodyConf(), playrho::d2::World::GetLinearAcceleration(), and playrho::d2::World::SetTorque().
LinearAcceleration2 playrho::d2::GetLinearAcceleration | ( | const World & | world, |
BodyID | id | ||
) |
Gets this body's linear acceleration.
std::out_of_range | If given an invalid body identifier. |
|
inlinenoexcept |
Gets the linear damping of the body.
Referenced by playrho::d2::Body::GetBodyConf(), playrho::d2::World::GetLinearDamping(), and playrho::d2::Body::operator==().
Gets the linear damping of the body.
std::out_of_range | If given an invalid body identifier. |
Gets the lower linear joint limit.
std::invalid_argument | If not supported for the given joint's type. |
Referenced by playrho::d2::Joint::GetLinearLowerLimit().
std::invalid_argument | If not supported for the given joint's type. |
Referenced by playrho::d2::Joint::GetLinearMotorImpulse(), playrho::d2::World::GetLinearMotorImpulse(), and playrho::d2::World::GetMotorForce().
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 linear offset property of the specified joint if its type has one.
std::invalid_argument | If not supported for the given joint's type. |
Referenced by playrho::d2::Joint::GetLinearOffset(), and playrho::d2::World::GetLinearOffset().
Gets the target linear offset, in frame A.
std::out_of_range | If given an invalid joint identifier. |
Get the linear reaction on body-B at the joint anchor.
Gets the linear reaction on body-B at the joint anchor.
std::out_of_range | If given an invalid joint identifier. |
Gets the upper linear joint limit.
std::invalid_argument | If not supported for the given joint's type. |
Referenced by playrho::d2::Joint::GetLinearUpperLimit().
|
inlinenoexcept |
Gets the linear velocity of the center of mass.
body | Body to get the linear velocity for. |
Referenced by playrho::d2::Body::GetBodyConf(), playrho::d2::World::GetCentripetalForce(), playrho::d2::Body::SetVelocity(), and playrho::d2::World::SetVelocity().
|
inline |
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. |
|
noexcept |
Gets the current linear velocity of the given configuration.
std::out_of_range | If given an invalid body identifier in the given joint conifguration. |
|
inlinenoexcept |
Gets the linear velocity from a local point.
body | Body to get the linear velocity for. |
localPoint | point in local coordinates. |
|
inlinenoexcept |
Gets the linear velocity from a world point attached to this body.
body | Body to get the linear velocity for. |
worldPoint | point in world coordinates. |
Referenced by playrho::d2::Body::GetLinearVelocityFromLocalPoint().
Get the anchor point on body-A in local coordinates.
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.
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.
body | Body that the returned point should be relative to. |
worldPoint | point in world coordinates. |
Referenced by playrho::d2::World::GetDistanceJointConf(), playrho::d2::World::GetFrictionJointConf(), playrho::d2::World::GetMotorJointConf(), playrho::d2::World::GetPrismaticJointConf(), playrho::d2::World::GetPulleyJointConf(), playrho::d2::World::GetRevoluteJointConf(), playrho::d2::World::GetWeldJointConf(), and playrho::d2::World::GetWheelJointConf().
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. |
|
inlinenoexcept |
Gets the rotational inertia of the body about the local origin.
Referenced by playrho::d2::World::GetMassData().
|
inline |
Gets the rotational inertia of the body about the local origin.
std::out_of_range | If given an invalid body identifier. |
Gets a locally oriented unit vector given a world oriented unit vector.
body | Body that the returned vector should be relative to. |
uv | Unit vector in world orientation. |
Referenced by playrho::d2::World::GetPrismaticJointConf(), and playrho::d2::World::GetWheelJointConf().
Convenience function for getting the local vector of the identified body.
std::out_of_range | If given an invalid body identifier. |
Gets the given joint's local X axis A if its type supports that.
std::invalid_argument | If not supported for the given joint's type. |
Referenced by playrho::d2::World::GetGearJointConf(), playrho::d2::World::GetJointTranslation(), playrho::d2::World::GetLinearVelocity(), playrho::d2::Joint::GetLocalXAxisA(), and playrho::d2::World::GetLocalXAxisA().
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 given joint's local Y axis A if its type supports that.
std::invalid_argument | If not supported for the given joint's type. |
Referenced by playrho::d2::Joint::GetLocalYAxisA(), and playrho::d2::World::GetLocalYAxisA().
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. |
Gets the body's origin location.
This is the location of the body's origin relative to its world. The location of the body after stepping the world's physics simulations is dependent on a number of factors:
Referenced by playrho::d2::World::CalcGravitationalAcceleration(), playrho::d2::World::FindClosestBody(), playrho::d2::World::GetCentripetalForce(), playrho::d2::Body::GetLocation(), playrho::d2::World::GetMotorJointConf(), playrho::d2::Body::GetPosition(), GetPosition(), and playrho::d2::World::SetMassData().
Convenience function for getting just the location of the identified body.
std::out_of_range | If given an invalid body identifier. |
Manifold playrho::d2::GetManifold | ( | bool | flipped, |
const DistanceProxy & | shape0, | ||
const Transformation & | xf0, | ||
VertexCounter | idx0, | ||
const DistanceProxy & | shape1, | ||
const Transformation & | xf1, | ||
VertexCounter2 | indices1, | ||
const Manifold::Conf & | conf | ||
) |
Gets a face-to-face based manifold.
flipped | Whether to flip the resulting manifold (between face-A and face-B). |
shape0 | Shape 0. This should be shape A for face-A type manifold or shape B for face-B type manifold. Must have a vertex count of more than one. |
xf0 | Transform 0. This should be transform A for face-A type manifold or transform B for face-B type manifold. |
idx0 | Index 0. This should be the index of the vertex and normal of shape0 that had the maximal separation distance from any vertex in shape1. |
shape1 | Shape 1. This should be shape B for face-A type manifold or shape A for face-B type manifold. Must have a vertex count of more than one. |
xf1 | Transform 1. This should be transform B for face-A type manifold or transform A for face-B type manifold. |
indices1 | Index 1. This is the first and possibly second index of the vertex of shape1 that had the maximal separation distance from the edge of shape0 identified by idx0. |
conf | Manifold configuration data. |
< Face offset.
< Face offset.
Manifold playrho::d2::GetManifold | ( | bool | flipped, |
Length | totalRadius, | ||
const DistanceProxy & | shape, | ||
const Transformation & | sxf, | ||
const Length2 & | point, | ||
const Transformation & | xfm | ||
) |
Computes manifolds for face-to-point collision.
GetVertexCount()
must be one or greater. < Center of circle in frame of polygon.
< Center of circle in frame of polygon.
const Manifold & playrho::d2::GetManifold | ( | const AabbTreeWorld & | world, |
ContactID | id | ||
) |
Gets the identified manifold.
std::out_of_range | If given an invalid contact identifier. |
Referenced by playrho::d2::Manifold::CollideShapes(), playrho::d2::detail::WorldModel< T >::GetManifold_(), playrho::d2::World::GetWorldManifold(), and playrho::d2::World::SameTouching().
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.
Referenced by playrho::d2::World::CalcGravitationalAcceleration(), playrho::d2::World::GetCentripetalForce(), playrho::d2::Body::GetForce(), playrho::d2::Body::GetLocalRotInertia(), playrho::d2::World::GetLocalRotInertia(), and playrho::d2::World::GetMassData().
Gets the mass of the body.
std::out_of_range | If given an invalid body identifier. |
MassData playrho::d2::GetMassData | ( | const MultiShapeConf & | arg | ) |
Gets the mass data for the given shape configuration.
Computes the mass properties of this shape using its dimensions and density. The inertia tensor is computed about the local origin.
Gets the mass properties of this shape using its dimensions and density.
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. |
MassData playrho::d2::GetMassData | ( | Length | r, |
NonNegative< AreaDensity > | density, | ||
const Length2 & | location | ||
) |
Computes the mass data for a circular shape.
r | Radius of the circular shape. |
density | Areal density of mass. |
location | Location of the center of the shape. |
MassData playrho::d2::GetMassData | ( | Length | r, |
NonNegative< AreaDensity > | density, | ||
const Length2 & | v0, | ||
const Length2 & | v1 | ||
) |
Computes the mass data for a linear shape.
r | Radius of the vertices of the linear shape. |
density | Areal density of mass. |
v0 | Location of vertex zero. |
v1 | Location of vertex one. |
Use the fixture's areal mass density times the shape's second moment of area to derive I.
Use the fixture's areal mass density times the shape's second moment of area to derive I.
Gets the given joint's max force if its type supports that.
std::invalid_argument | If not supported for the given joint's type. |
|
noexcept |
Gets the maximum imbalance.
This gets the maximum imbalance of nodes in the given tree.
Gets the given joint's max motor force if its type supports that.
std::invalid_argument | If not supported for the given joint's type. |
Referenced by playrho::d2::Joint::GetMaxMotorForce().
Gets the given joint's max motor torque if its type supports that.
std::invalid_argument | If not supported for the given joint's type. |
Referenced by playrho::d2::Joint::GetMaxMotorTorque(), and playrho::d2::World::GetMaxMotorTorque().
Gets the max motor torque.
std::out_of_range | If given an invalid joint identifier. |
SeparationInfo playrho::d2::GetMaxSeparation | ( | const DistanceProxy & | proxy1, |
const DistanceProxy & | proxy2, | ||
Length | stop = MaxFloat * Meter |
||
) |
Gets the max separation information.
proxy1
, index of the vertex from proxy2
(that had the maximum separation distance from each other in the direction of that normal), and the maximal distance.SeparationInfo playrho::d2::GetMaxSeparation | ( | const DistanceProxy & | proxy1, |
const Transformation & | xf1, | ||
const DistanceProxy & | proxy2, | ||
const Transformation & | xf2 | ||
) |
Gets the max separation information.
GetMaxSeparation
function that takes a stopping length - when it's already known that the two convex shapes' AABBs overlap. proxy1
, index of the vertex from proxy2
(that had the maximum separation distance from each other in the direction of that normal), and the maximal distance.SeparationInfo playrho::d2::GetMaxSeparation | ( | const DistanceProxy & | proxy1, |
const Transformation & | xf1, | ||
const DistanceProxy & | proxy2, | ||
const Transformation & | xf2, | ||
Length | stop | ||
) |
Gets the max separation information.
proxy1
, index of the vertex from proxy2
(that had the maximum separation distance from each other in the direction of that normal), and the maximal distance.SeparationInfo playrho::d2::GetMaxSeparation4x4 | ( | const DistanceProxy & | proxy1, |
const Transformation & | xf1, | ||
const DistanceProxy & | proxy2, | ||
const Transformation & | xf2 | ||
) |
Gets the max separation information for the first four vertices of the two given shapes.
This is a version of the get-max-separation functions that is optimized for two quadrilateral (4-sided) polygons.
proxy1
, index of the vertex from proxy2
(that had the maximum separation distance from each other in the direction of that normal), and the maximal distance.Gets the given joint's max torque if its type supports that.
std::invalid_argument | If not supported for the given joint's type. |
Gets the current motor force for the given joint, given the inverse time step.
std::out_of_range | If given an invalid joint identifier. |
MotorJointConf playrho::d2::GetMotorJointConf | ( | const Joint & | joint | ) |
Gets the definition data for the given joint.
std::bad_cast | If the given joint's type is inappropriate for getting this value. |
MotorJointConf playrho::d2::GetMotorJointConf | ( | const World & | world, |
BodyID | bA, | ||
BodyID | bB | ||
) |
Gets the confguration for the given parameters.
std::out_of_range | If given an invalid body identifier. |
AngularVelocity playrho::d2::GetMotorSpeed | ( | const Joint & | object | ) |
Gets the given joint's motor speed if its type supports that.
std::invalid_argument | If not supported for the given joint's type. |
Referenced by playrho::d2::Joint::GetMotorSpeed(), and playrho::d2::World::GetMotorSpeed().
AngularVelocity playrho::d2::GetMotorSpeed | ( | const World & | world, |
JointID | id | ||
) |
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::invalid_argument | If not supported for the given joint's type. |
Gets the current motor torque for the given joint given the inverse time step.
std::out_of_range | If given an invalid joint identifier. |
|
noexcept |
Gets a unique name for the given manifold type.
type | Manifold type to get name for. Must be one of the enumerated values. |
|
constexprnoexcept |
Gets the next index of the given node.
IsUnused(node)
is true.
|
inlinenoexcept |
Gets the normal of the velocity constraint contact in world coordinates.
SetNormal
function. Gets the "normalized" position.
Enforces a wrap-around of one rotation on the angular position.
Referenced by playrho::d2::World::GetGearJointConf().
Gets the perimeter length of the 2-dimensional AABB.
Referenced by ComputePerimeterRatio(), ComputeTotalPerimeter(), and playrho::d2::DynamicTree::RebuildBottomUp().
|
constexprnoexcept |
Gets "w".
Referenced by playrho::d2::Simplex::CalcMetric(), CalcSearchDirection(), playrho::d2::Simplex::Get(), and GetScaledDelta().
|
noexcept |
Computes the before and after like point states given two manifolds.
|
noexcept |
Gets the position between two positions at a given unit interval.
pos0 | Position at unit interval value of 0. |
pos1 | Position at unit interval value of 1. |
beta | Ratio of travel between position 0 and position 1. |
pos0 == pos1
or beta == 0
, position 1 if beta == 1
, or at the given unit interval value between position 0 and position 1. PrismaticJointConf playrho::d2::GetPrismaticJointConf | ( | const Joint & | joint | ) |
Gets the definition data for the given joint.
std::bad_cast | If the given joint's type is inappropriate for getting this value. |
PrismaticJointConf playrho::d2::GetPrismaticJointConf | ( | const World & | world, |
BodyID | bA, | ||
BodyID | bB, | ||
const Length2 & | anchor, | ||
const UnitVec & | axis | ||
) |
Gets the configuration for the given parameters.
std::out_of_range | If given an invalid body identifier. |
const std::vector< DynamicTree::Size > & playrho::d2::GetProxies | ( | const AabbTreeWorld & | world, |
BodyID | id | ||
) |
Gets the proxies for the identified body.
std::out_of_range | If given an invalid identifier. |
PositionSolverManifold playrho::d2::GetPSM | ( | const Manifold & | manifold, |
Manifold::size_type | index, | ||
const Transformation & | xfA, | ||
const Transformation & | xfB | ||
) |
Gets the normal-point-separation data in world coordinates for the given inputs.
PulleyJointConf playrho::d2::GetPulleyJointConf | ( | const Joint & | joint | ) |
Gets the definition data for the given joint.
std::bad_cast | If the given joint's type is inappropriate for getting this value. |
PulleyJointConf playrho::d2::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.
std::out_of_range | If given an invalid body identifier. |
Gets the given joint's ratio property if it has one.
std::invalid_argument | If not supported for the given joint's type. |
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 of the joint if it has one.
std::invalid_argument | If not supported for the given joint's type. |
Referenced by playrho::d2::World::GetAngle(), playrho::d2::World::GetGearJointConf(), playrho::d2::Joint::GetReferenceAngle(), playrho::d2::World::GetReferenceAngle(), playrho::d2::RevoluteJointConf::InitVelocity(), and playrho::d2::RevoluteJointConf::SolvePosition().
Gets the reference-angle property of the identified joint if it has it.
std::out_of_range | If given an invalid joint identifier. |
|
constexpr |
Gets the reflection matrix for the given unit vector that defines the normal of the line through the origin that points should be reflected against.
|
inlinenoexcept |
Gets the polymorphic memory resource allocator statistics of the specified world.
world | The world to get the memory resource allocator statistics for. |
Gets the coefficient of restitution value of the given shape.
Referenced by playrho::d2::Shape::GetDefaultRestitution(), playrho::d2::World::GetRestitution(), playrho::d2::detail::ShapeModel< T >::GetRestitution_(), and playrho::d2::detail::SetRestitution().
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. |
RevoluteJointConf playrho::d2::GetRevoluteJointConf | ( | const Joint & | joint | ) |
Gets the definition data for the given joint.
std::bad_cast | If the given joint's type is inappropriate for getting this value. |
RevoluteJointConf playrho::d2::GetRevoluteJointConf | ( | const World & | world, |
BodyID | bodyA, | ||
BodyID | bodyB, | ||
const Length2 & | anchor | ||
) |
Gets the configuration for the given parameters.
std::out_of_range | If given an invalid body identifier. |
Gets a vector counter-clockwise (reverse-clockwise) perpendicular to the given vector.
This takes a vector of form (x, y) and returns the vector (-y, x).
vector | Vector to return a counter-clockwise perpendicular equivalent for. |
Referenced by CalcSearchDirection(), GetContactRelVelocity(), playrho::d2::World::GetLinearVelocity(), playrho::d2::Body::GetLinearVelocityFromWorldPoint(), GetManifold(), GetMassData(), RayCast(), playrho::d2::World::SetMassData(), playrho::d2::DistanceJointConf::SolveVelocity(), playrho::d2::FrictionJointConf::SolveVelocity(), playrho::d2::MotorJointConf::SolveVelocity(), playrho::d2::PulleyJointConf::SolveVelocity(), playrho::d2::RevoluteJointConf::SolveVelocity(), playrho::d2::RopeJointConf::SolveVelocity(), playrho::d2::TargetJointConf::SolveVelocity(), and playrho::d2::WeldJointConf::SolveVelocity().
RopeJointConf playrho::d2::GetRopeJointConf | ( | const Joint & | joint | ) |
Gets the definition data for the given joint.
std::bad_cast | If the given joint's type is inappropriate for getting this value. |
|
inlinenoexcept |
Gets the rotational inertia of the body.
body | Body to get the rotational inertia for. |
Referenced by playrho::d2::Body::GetLocalRotInertia(), playrho::d2::World::GetLocalRotInertia(), and playrho::d2::Body::GetTorque().
|
inline |
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. |
SeparationScenario playrho::d2::GetSeparationScenario | ( | IndexPair3 | indices, |
const DistanceProxy & | proxyA, | ||
const Transformation & | xfA, | ||
const DistanceProxy & | proxyB, | ||
const Transformation & | xfB | ||
) |
Gets a separation finder for the given inputs.
indices | Collection of 1 to 3 index pairs. A points-type finder will be returned if given 1 index pair. A face-type finder will be returned otherwise. |
proxyA | Proxy A. |
xfA | Transformation A. |
proxyB | Proxy B. |
xfB | Transformation B. |
empty(indices)
is false. proxyA
and proxyB
both have more than zero vertices. Referenced by playrho::ToiOutput::GetToiViaSat().
const Shape & playrho::d2::GetShape | ( | const AabbTreeWorld & | world, |
ShapeID | id | ||
) |
Gets the identified shape.
std::out_of_range | If given an invalid shape identifier. |
Referenced by playrho::d2::World::ComputeAABB(), playrho::d2::World::ComputeIntersectingAABB(), playrho::d2::World::ComputeMassData(), playrho::d2::World::GetDefaultFriction(), playrho::d2::World::GetDefaultRestitution(), playrho::d2::World::GetDensity(), playrho::d2::World::GetFilterData(), playrho::d2::World::GetFriction(), playrho::d2::World::GetMassData(), playrho::d2::World::GetRestitution(), playrho::d2::detail::WorldModel< T >::GetShape_(), playrho::d2::World::GetType(), playrho::Contact::GetWorldManifold(), IsDestroyed(), playrho::d2::World::IsSensor(), playrho::d2::World::RayCast(), playrho::d2::World::Rotate(), playrho::d2::World::Scale(), playrho::d2::World::SetDensity(), playrho::d2::World::SetFilterData(), playrho::d2::World::SetFriction(), playrho::d2::World::SetRestitution(), playrho::d2::World::SetSensor(), playrho::d2::World::TestPoint(), and playrho::d2::World::Translate().
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. |
Referenced by playrho::d2::World::ComputeIntersectingAABB(), playrho::d2::World::GetDefaultFriction(), playrho::d2::World::GetDefaultRestitution(), playrho::d2::World::GetShapeA(), and playrho::Contact::GetWorldManifold().
Gets shape B of the identified contact.
std::out_of_range | If given an invalid contact identifier. |
Referenced by playrho::d2::World::ComputeIntersectingAABB(), playrho::d2::World::GetDefaultFriction(), playrho::d2::World::GetDefaultRestitution(), playrho::d2::World::GetShapeB(), and playrho::Contact::GetWorldManifold().
ShapeCounter playrho::d2::GetShapeCount | ( | const World & | world, |
BodyID | id | ||
) |
Gets the count of shapes associated with the identified body.
std::out_of_range | If given an invalid body identifier. |
|
noexcept |
Gets the extent of the currently valid shape range.
ShapeID
that is in range for shape related functions. Referenced by playrho::d2::detail::WorldModel< T >::GetShapeRange_().
|
inlinenoexcept |
Gets the extent of the currently valid shape range.
ShapeID
that is in range for shape related functions. const std::vector< ShapeID > & playrho::d2::GetShapes | ( | const AabbTreeWorld & | world, |
BodyID | id | ||
) |
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. |
Referenced by playrho::d2::World::ComputeAABB(), playrho::d2::World::ComputeMassData(), playrho::d2::World::Detach(), playrho::d2::World::GetAssociationCount(), playrho::d2::Body::GetBodyConf(), playrho::d2::World::GetShapeCount(), playrho::d2::detail::WorldModel< T >::GetShapes_(), playrho::d2::World::GetUsedShapesCount(), and playrho::d2::Body::operator==().
Gets the identities of the shapes associated with the identified body.
std::out_of_range | If given an out of range body identifier. |
|
noexcept |
Gets the identifier of the contact with the lowest time of impact.
This finds the contact with the lowest (soonest) time of impact that's under one and returns its identifier.
|
inlinenoexcept |
Gets whether or not sub-stepping is enabled.
Referenced by playrho::d2::detail::WorldModel< T >::GetSubStepping_().
|
inlinenoexcept |
Gets whether or not sub-stepping is enabled.
world | The world to return whether sub-stepping is enabled for. |
|
inlinenoexcept |
Gets the supporting vertex index in given direction for given distance proxy.
This finds the vertex that's most significantly in direction of the given vector and returns its index.
proxy | Distance proxy object to find index in if a valid index exists for it. |
dir | Direction vector to find index for. |
InvalidVertex
if d is invalid or the count of vertices is zero, otherwise a value from 0 to one less than count. Referenced by playrho::d2::DistanceProxy::Distance().
Gets the body's sweep.
Referenced by playrho::d2::Body::GetAngle(), playrho::d2::Body::GetBodyConf(), playrho::d2::Body::operator==(), playrho::d2::Body::SetAngle(), and playrho::d2::Body::SetTransformation().
LinearVelocity playrho::d2::GetTangentSpeed | ( | const World & | world, |
ContactID | id | ||
) |
Gets the tangent speed of the identified contact.
std::out_of_range | If given an invalid contact identifier. |
Referenced by playrho::d2::World::GetTangentSpeed().
Gets the given joint's target property if it has one.
std::invalid_argument | If not supported for the given joint's type. |
Referenced by playrho::d2::Joint::GetTarget(), and playrho::d2::World::GetTarget().
Gets the target point.
std::out_of_range | If given an invalid joint identifier. |
TargetJointConf playrho::d2::GetTargetJointConf | ( | const Joint & | joint | ) |
Gets the definition data for the given joint.
std::bad_cast | If the given joint's type is inappropriate for getting this value. |
std::optional< UnitIntervalFF< Real > > playrho::d2::GetToi | ( | const World & | world, |
ContactID | id | ||
) |
Gets the time of impact (TOI) as a fraction or empty value.
std::out_of_range | If given an invalid contact identifier. |
Referenced by playrho::d2::World::GetToi().
TimestepIters playrho::d2::GetToiCount | ( | const World & | world, |
ContactID | id | ||
) |
Gets the Time Of Impact (TOI) count.
std::out_of_range | If given an invalid contact identifier. |
Referenced by playrho::d2::World::GetToiCount().
ToiOutput playrho::d2::GetToiViaSat | ( | const DistanceProxy & | proxyA, |
const Sweep & | sweepA, | ||
const DistanceProxy & | proxyB, | ||
const Sweep & | sweepB, | ||
const ToiConf & | conf = GetDefaultToiConf() |
||
) |
Gets the time of impact for two disjoint convex sets using the Separating Axis Theorem.
Computes the upper bound on time before two shapes penetrate too much. Time is represented as a fraction between [0,timeMax
]. This uses a swept separating axis and may miss some intermediate, non-tunneling collision. If you change the time interval, you should call this function again.
proxyA | Proxy A. The proxy's vertex count must be 1 or more. |
sweepA | Sweep A. Sweep of motion for shape represented by proxy A. |
proxyB | Proxy B. The proxy's vertex count must be 1 or more. |
sweepB | Sweep B. Sweep of motion for shape represented by proxy B. |
conf | Configuration details for on calculation. Like the targeted depth of penetration. |
XXX maybe should return ToiOutput{timeLo, stats, ToiOutput::e_belowMinTarget}?
XXX maybe should return ToiOutput{timeLo, stats, ToiOutput::e_belowMinTarget}?
ContactCounter playrho::d2::GetTouchingCount | ( | const World & | world | ) |
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.
|
inlinenoexcept |
Gets the transform at "time" zero.
GetTransformation(sweep, 0)
, except more efficiently. sweep | Sweep data to get the transform from. |
|
inlinenoexcept |
Gets the transform at "time" one.
GetTransformation(sweep, 1.0)
, except more efficiently. sweep | Sweep data to get the transform from. |
Referenced by playrho::d2::Body::SetPosition1(), and playrho::d2::Body::SetSweep().
|
inlinenoexcept |
Gets the body's transformation.
Referenced by playrho::d2::World::ComputeAABB(), playrho::d2::World::ComputeIntersectingAABB(), playrho::d2::World::GetAnchorA(), playrho::d2::World::GetAnchorB(), playrho::d2::World::GetGearJointConf(), playrho::d2::World::GetJointTranslation(), playrho::d2::World::GetLinearVelocity(), playrho::d2::World::GetLocalPoint(), playrho::d2::World::GetLocalVector(), playrho::d2::World::GetLocation(), playrho::ToiOutput::GetToiViaSat(), GetTransform0(), GetTransform1(), GetTransformation(), playrho::d2::World::GetTransformation(), playrho::Contact::GetWorldManifold(), playrho::d2::World::GetWorldPoint(), playrho::d2::World::GetWorldVector(), playrho::d2::Body::operator==(), playrho::d2::World::RayCast(), playrho::d2::World::RotateAboutWorldPoint(), playrho::d2::Body::SetLocation(), playrho::d2::World::SetMassData(), playrho::GaussSeidel::SolvePositionConstraint(), and playrho::d2::World::TestPoint().
|
inlinenoexcept |
Gets the interpolated transform at a specific time.
sweep | Sweep data to get the transform from. |
beta | Time factor in [0,1], where 0 indicates alpha 0. |
Transformation playrho::d2::GetTransformation | ( | const World & | world, |
BodyID | id | ||
) |
Gets the body's transformation.
std::out_of_range | If given an invalid body identifier. |
|
inline |
Gets access to the broad-phase dynamic tree information.
Gets the type of this body.
Referenced by playrho::d2::Manifold::AddPoint(), playrho::d2::World::Awaken(), playrho::d2::Joint::EnableLimit(), playrho::d2::Joint::EnableMotor(), playrho::d2::Joint::GetAngularLowerLimit(), playrho::d2::Joint::GetAngularMass(), playrho::d2::Joint::GetAngularMotorImpulse(), playrho::d2::Joint::GetAngularOffset(), playrho::d2::Joint::GetAngularReaction(), playrho::d2::Joint::GetAngularUpperLimit(), playrho::d2::Body::GetBodyConf(), playrho::d2::Joint::GetDampingRatio(), playrho::d2::Joint::GetFrequency(), playrho::d2::World::GetGearJointConf(), playrho::d2::Joint::GetGroundAnchorA(), playrho::d2::Joint::GetGroundAnchorB(), playrho::d2::Joint::GetLength(), playrho::d2::Joint::GetLimitState(), playrho::d2::Joint::GetLinearLowerLimit(), playrho::d2::Joint::GetLinearMotorImpulse(), playrho::d2::Joint::GetLinearOffset(), playrho::d2::Joint::GetLinearReaction(), playrho::d2::Joint::GetLinearUpperLimit(), playrho::d2::Joint::GetLocalAnchorA(), playrho::d2::Joint::GetLocalAnchorB(), playrho::d2::Joint::GetLocalXAxisA(), playrho::d2::Joint::GetLocalYAxisA(), playrho::d2::Joint::GetMaxForce(), playrho::d2::Joint::GetMaxMotorForce(), playrho::d2::Joint::GetMaxMotorTorque(), playrho::d2::Joint::GetMaxTorque(), playrho::d2::Joint::GetMotorSpeed(), playrho::d2::Joint::GetRatio(), playrho::d2::Joint::GetReferenceAngle(), playrho::d2::Joint::GetTarget(), playrho::d2::World::GetType(), playrho::d2::Joint::IsLimitEnabled(), playrho::d2::Joint::IsMotorEnabled(), playrho::d2::Joint::SetAngularLimits(), playrho::d2::Joint::SetAngularOffset(), playrho::d2::Joint::SetFrequency(), playrho::d2::Joint::SetLinearLimits(), playrho::d2::Joint::SetLinearOffset(), playrho::d2::Joint::SetMaxMotorForce(), playrho::d2::Joint::SetMaxMotorTorque(), playrho::d2::Joint::SetMotorSpeed(), playrho::d2::Joint::SetTarget(), and playrho::d2::World::SetType().
Gets the type info of the use of the given shape.
GetTypeID<Shape>()
. 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. |
Gets the given body's under-active time.
Referenced by playrho::d2::Body::GetBodyConf(), and playrho::d2::Body::operator==().
|
inlinenoexcept |
Gets the unit vector for the given value.
value | Value to get the unit vector for. |
fallback | Fallback unit vector value to use in case a unit vector can't effectively be calculated from the given value. |
Referenced by playrho::d2::World::CalcGravitationalAcceleration(), GetFwdNormalsArray(), GetFwdNormalsVector(), GetMassData(), GetSeparationScenario(), playrho::d2::PulleyJointConf::InitVelocity(), RayCast(), playrho::d2::FrictionJointConf::SolveVelocity(), playrho::d2::MotorJointConf::SolveVelocity(), and playrho::d2::TargetJointConf::SolveVelocity().
|
noexcept |
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.
Referenced by playrho::d2::World::GetAngularVelocity(), GetBodyConstraint(), playrho::d2::World::GetLinearVelocity(), playrho::d2::World::GetVelocity(), and playrho::d2::Body::operator==().
Gets the velocity of the body after the given time accounting for the body's acceleration and capped by the given configuration.
body | Body to get the velocity for. |
h | Time elapsed to get velocity for. |
Gets the velocity of the identified body.
std::out_of_range | If given an invalid body identifier. |
NonNegative<Length> playrho::d2::GetVertexRadius | ( | const Shape & | shape, |
ChildCounter | idx | ||
) |
Gets the vertex radius of the indexed child of the given shape.
This gets the radius from the vertex that the shape's "skin" should extend outward by. While any edges - line segments between multiple vertices - are straight, corners between them (the vertices) are rounded and treated as rounded. Shapes with larger vertex radiuses compared to edge lengths therefore will be more prone to rolling or having other shapes more prone to roll off of them. Here's an image of a shape configured via a PolygonShapeConf
with it's skin drawn:
shape | Shape to get child's vertex radius for. |
idx | Child index to get vertex radius for. |
InvalidArgument | if the child index is not less than the child count. |
|
inlinenoexcept |
Gets the vertex radius interval allowable for the given world.
Referenced by playrho::d2::detail::WorldModel< T >::GetVertexRadiusInterval_().
|
inlinenoexcept |
Gets the vertex radius interval allowable for the given world.
world | The world whose allowable vertex radius interval is to be returned for. |
WeldJointConf playrho::d2::GetWeldJointConf | ( | const Joint & | joint | ) |
Gets the definition data for the given joint.
std::bad_cast | If the given joint's type is inappropriate for getting this value. |
WeldJointConf playrho::d2::GetWeldJointConf | ( | const World & | world, |
BodyID | bodyA, | ||
BodyID | bodyB, | ||
const Length2 & | anchor = Length2{} |
||
) |
Gets the configuration for the given parameters.
std::out_of_range | If given an invalid body identifier. |
WheelJointConf playrho::d2::GetWheelJointConf | ( | const Joint & | joint | ) |
Gets the definition data for the given joint.
std::bad_cast | If the given joint's type is inappropriate for getting this value. |
WheelJointConf playrho::d2::GetWheelJointConf | ( | const World & | world, |
BodyID | bodyA, | ||
BodyID | bodyB, | ||
const Length2 & | anchor, | ||
const UnitVec & | axis = UnitVec::GetRight() |
||
) |
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. |
|
noexcept |
Gets the world index for the given body.
std::out_of_range | If given an invalid body identifier. |
|
noexcept |
Gets the world index of the given joint.
std::out_of_range | If given an invalid joint identifier. |
WorldManifold playrho::d2::GetWorldManifold | ( | const Manifold & | manifold, |
const Transformation & | xfA, | ||
Length | radiusA, | ||
const Transformation & | xfB, | ||
Length | radiusB | ||
) |
Gets the world manifold for the given data.
manifold | Manifold to use. Uses the manifold's type, local point, local normal, point-count, and the indexed-points' local point data. |
xfA | Transformation A. |
radiusA | Radius of shape A. |
xfB | Transformation B. |
radiusB | Radius of shape B. |
WorldManifold playrho::d2::GetWorldManifold | ( | const World & | world, |
const Contact & | contact, | ||
const Manifold & | manifold | ||
) |
Gets the world manifold for the given data.
GetWorldManifold(const Manifold&, const Transformation&, const Real, const Transformation& xfB, const Real)
function.world | World that the result is to be relative to. |
contact | Contact to return a world manifold for. |
manifold | The manifold to covert to a world manifold. |
WorldManifold playrho::d2::GetWorldManifold | ( | const World & | world, |
ContactID | id | ||
) |
Gets the world manifold for the identified contact.
std::out_of_range | If given an invalid contact identifier. |
Referenced by playrho::Contact::GetWorldManifold(), and playrho::d2::World::GetWorldManifold().
Gets the world coordinates of a point given in coordinates relative to the body's origin.
body | Body that the given point is relative to. |
localPoint | a point measured relative the the body's origin. |
Referenced by playrho::d2::Body::GetLinearVelocityFromLocalPoint(), and playrho::d2::World::RotateAboutLocalPoint().
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. |
Gets the world coordinates of a vector given the local coordinates.
body | Body that the given vector is relative to. |
localVector | a vector fixed in the body. |
Convenience function for getting a world vector of the identified body.
std::out_of_range | If given an invalid body identifier. |
Gets the "Y-axis".
Whether or not the contact has a valid TOI.
std::out_of_range | If given an invalid contact identifier. |
Referenced by playrho::d2::World::HasValidToi().
void playrho::d2::InitVelocity | ( | DistanceJointConf & | object, |
const Span< BodyConstraint > & | bodies, | ||
const StepConf & | step, | ||
const ConstraintSolverConf & | conf | ||
) |
Initializes velocity constraint data based on the given solver data.
SolveVelocity
. object | Configuration object. bodyA and bodyB must index bodies within the given bodies container or be the special body ID value of InvalidBodyID . |
bodies | Container of body constraints. |
step | Configuration for the step. |
conf | Constraint solver configuration. |
std::out_of_range | If the given object's bodyA or bodyB values are not InvalidBodyID and are not indices within range of the given bodies container. |
Referenced by playrho::d2::detail::JointModel< T >::InitVelocity_().
void playrho::d2::InitVelocity | ( | FrictionJointConf & | object, |
const Span< BodyConstraint > & | bodies, | ||
const StepConf & | step, | ||
const ConstraintSolverConf & | conf | ||
) |
Initializes velocity constraint data based on the given solver data.
SolveVelocity
. object | Configuration object. bodyA and bodyB must index bodies within the given bodies container or be the special body ID value of InvalidBodyID . |
bodies | Container of body constraints. |
step | Configuration for the step. |
conf | Constraint solver configuration. |
std::out_of_range | If the given object's bodyA or bodyB values are not InvalidBodyID and are not indices within range of the given bodies container. |
void playrho::d2::InitVelocity | ( | GearJointConf & | object, |
const Span< BodyConstraint > & | bodies, | ||
const StepConf & | step, | ||
const ConstraintSolverConf & | conf | ||
) |
Initializes velocity constraint data based on the given solver data.
SolveVelocity
. object | Configuration object. bodyA and bodyB must index bodies within the given bodies container or be the special body ID value of InvalidBodyID . |
bodies | Container of body constraints. |
step | Configuration for the step. |
conf | Constraint solver configuration. |
std::out_of_range | If the given object's bodyA or bodyB values are not InvalidBodyID and are not indices within range of the given bodies container. |
void playrho::d2::InitVelocity | ( | Joint & | object, |
const Span< BodyConstraint > & | bodies, | ||
const StepConf & | step, | ||
const ConstraintSolverConf & | conf | ||
) |
Initializes velocity constraint data based on the given solver data.
SolveVelocity
. void playrho::d2::InitVelocity | ( | MotorJointConf & | object, |
const Span< BodyConstraint > & | bodies, | ||
const StepConf & | step, | ||
const ConstraintSolverConf & | conf | ||
) |
Initializes velocity constraint data based on the given solver data.
SolveVelocity
. object | Configuration object. bodyA and bodyB must index bodies within the given bodies container or be the special body ID value of InvalidBodyID . |
bodies | Container of body constraints. |
step | Configuration for the step. |
conf | Constraint solver configuration. |
std::out_of_range | If the given object's bodyA or bodyB values are not InvalidBodyID and are not indices within range of the given bodies container. |
void playrho::d2::InitVelocity | ( | PrismaticJointConf & | object, |
const Span< BodyConstraint > & | bodies, | ||
const StepConf & | step, | ||
const ConstraintSolverConf & | conf | ||
) |
Initializes velocity constraint data based on the given solver data.
SolveVelocity
. object | Configuration object. bodyA and bodyB must index bodies within the given bodies container or be the special body ID value of InvalidBodyID . |
bodies | Container of body constraints. |
step | Configuration for the step. |
conf | Constraint solver configuration. |
std::out_of_range | If the given object's bodyA or bodyB values are not InvalidBodyID and are not indices within range of the given bodies container. |
void playrho::d2::InitVelocity | ( | PulleyJointConf & | object, |
const Span< BodyConstraint > & | bodies, | ||
const StepConf & | step, | ||
const ConstraintSolverConf & | conf | ||
) |
Initializes velocity constraint data based on the given solver data.
SolveVelocity
. object | Configuration object. bodyA and bodyB must index bodies within the given bodies container or be the special body ID value of InvalidBodyID . |
bodies | Container of body constraints. |
step | Configuration for the step. |
conf | Constraint solver configuration. |
std::out_of_range | If the given object's bodyA or bodyB values are not InvalidBodyID and are not indices within range of the given bodies container. |
void playrho::d2::InitVelocity | ( | RevoluteJointConf & | object, |
const Span< BodyConstraint > & | bodies, | ||
const StepConf & | step, | ||
const ConstraintSolverConf & | conf | ||
) |
Initializes velocity constraint data based on the given solver data.
SolveVelocity
. object | Configuration object. bodyA and bodyB must index bodies within the given bodies container or be the special body ID value of InvalidBodyID . |
bodies | Container of body constraints. |
step | Configuration for the step. |
conf | Constraint solver configuration. |
std::out_of_range | If the given object's bodyA or bodyB values are not InvalidBodyID and are not indices within range of the given bodies container. |
void playrho::d2::InitVelocity | ( | RopeJointConf & | object, |
const Span< BodyConstraint > & | bodies, | ||
const StepConf & | step, | ||
const ConstraintSolverConf & | conf | ||
) |
Initializes velocity constraint data based on the given solver data.
SolveVelocity
. object | Configuration object. bodyA and bodyB must index bodies within the given bodies container or be the special body ID value of InvalidBodyID . |
bodies | Container of body constraints. |
step | Configuration for the step. |
conf | Constraint solver configuration. |
std::out_of_range | If the given object's bodyA or bodyB values are not InvalidBodyID and are not indices within range of the given bodies container. |
void playrho::d2::InitVelocity | ( | TargetJointConf & | object, |
const Span< BodyConstraint > & | bodies, | ||
const StepConf & | step, | ||
const ConstraintSolverConf & | conf | ||
) |
Initializes velocity constraint data based on the given solver data.
SolveVelocity
. object | Configuration object. bodyB must index a body within the given bodies container or be the special body ID value of InvalidBodyID . |
bodies | Container of body constraints. |
step | Configuration for the step. |
conf | Constraint solver configuration. |
std::out_of_range | If the given object's bodyB value is not InvalidBodyID and does not index within range of the given bodies container. |
void playrho::d2::InitVelocity | ( | WeldJointConf & | object, |
const Span< BodyConstraint > & | bodies, | ||
const StepConf & | step, | ||
const ConstraintSolverConf & | conf | ||
) |
Initializes velocity constraint data based on the given solver data.
SolveVelocity
. object | Configuration object. bodyA and bodyB must index bodies within the given bodies container or be the special body ID value of InvalidBodyID . |
bodies | Container of body constraints. |
step | Configuration for the step. |
conf | Constraint solver configuration. |
std::out_of_range | If the given object's bodyA or bodyB values are not InvalidBodyID and are not indices within range of the given bodies container. |
void playrho::d2::InitVelocity | ( | WheelJointConf & | object, |
const Span< BodyConstraint > & | bodies, | ||
const StepConf & | step, | ||
const ConstraintSolverConf & | conf | ||
) |
Initializes velocity constraint data based on the given solver data.
SolveVelocity
. object | Configuration object. bodyA and bodyB must index bodies within the given bodies container or be the special body ID value of InvalidBodyID . |
bodies | Container of body constraints. |
step | Configuration for the step. |
conf | Constraint solver configuration. |
std::out_of_range | If the given object's bodyA or bodyB values are not InvalidBodyID and are not indices within range of the given bodies container. |
|
constexprnoexcept |
Inverse rotates a vector.
This is the inverse of rotating a vector - it undoes what rotate does. I.e. this effectively subtracts from the angle of the given vector the angle that's expressed by the angle parameter.
vector | Vector to reverse rotate. |
angle | Expresses the angle to reverse rotate the given vector by. |
Referenced by playrho::d2::DistanceProxy::Distance(), playrho::d2::World::GetGearJointConf(), playrho::d2::Body::GetLocalVector(), playrho::d2::World::GetLocalVector(), InverseTransform(), MulT(), and playrho::d2::GearJointConf::SolvePosition().
|
constexprnoexcept |
Inverse transforms the given 2-D vector with the given transformation.
Inverse translate and rotate the given 2-D vector according to the translation and rotation defined by the given transformation.
Transform
(with the same transformation again) will result in the original vector being returned. Transform
. v | 2-D vector to inverse transform (inverse translate and inverse rotate). |
xfm | Transformation (a translation and rotation) to inversely apply to the given vector. |
Referenced by playrho::d2::Body::GetLocalPoint(), playrho::d2::World::GetLocalPoint(), GetManifold(), playrho::d2::DistanceProxy::RayCast(), and playrho::d2::World::TestPoint().
|
inlinenoexcept |
Is "accelerable".
Indicates whether this body is accelerable, i.e. whether it is effected by forces. Only Dynamic bodies are accelerable.
Referenced by playrho::d2::Body::GetBodyConf(), playrho::d2::World::IsAccelerable(), and playrho::d2::World::SetMassData().
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. |
|
inlinenoexcept |
Gets the awake/asleep state of this body.
Referenced by playrho::d2::Body::Awaken(), playrho::d2::World::Awaken(), playrho::d2::World::GetAwakeCount(), playrho::d2::Body::GetBodyConf(), playrho::d2::World::IsAwake(), playrho::d2::Body::operator==(), and playrho::d2::Body::Unawaken().
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. |
|
constexprnoexcept |
Is branch.
Determines whether the given dynamic tree node is a branch node. Branch nodes have 2 indices to child nodes.
Determines whether the given node is a "branch" node.
Referenced by playrho::d2::DynamicTree::FindReference(), and playrho::d2::DynamicTree::GetBranchData().
|
inline |
Gets whether the given identifier is to a body that's been destroyed.
Referenced by IsDestroyed().
|
inline |
Gets whether the given identifier is to a contact that's been destroyed.
|
inline |
Gets whether the given identifier is to a joint that's been destroyed.
|
inline |
Gets whether the given identifier is to a shape that's been destroyed.
|
constexprnoexcept |
Whether or not the given body was destroyed.
Gets whether the given identifier is to a body that's been destroyed.
Gets whether the given identifier is to a contact that's been destroyed.
Gets whether the given identifier is to a joint that's been destroyed.
Gets whether the given identifier is to a shape that's been destroyed.
|
inlinenoexcept |
Gets the enabled/disabled state of the body.
Referenced by playrho::d2::Body::GetBodyConf(), and playrho::d2::World::IsEnabled().
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. |
|
inlinenoexcept |
Does this body have fixed rotation?
Referenced by playrho::d2::Body::GetBodyConf(), playrho::d2::World::IsFixedRotation(), playrho::d2::Body::operator==(), playrho::d2::World::SetFixedRotation(), and playrho::d2::World::SetMassData().
Gets whether the body has fixed rotation.
std::out_of_range | If given an invalid body identifier. |
|
inlinenoexcept |
Is this body treated like a bullet for continuous collision detection?
Referenced by playrho::d2::Body::GetBodyConf(), and playrho::d2::World::IsImpenetrable().
Is the body treated like a bullet for continuous collision detection?
std::out_of_range | If given an invalid body identifier. |
|
constexprnoexcept |
Is leaf.
Whether or not this node is a leaf node.
Determines whether the given dynamic tree node is a leaf node.
true
if this is a leaf node, false
otherwise. Referenced by playrho::d2::DynamicTree::DestroyLeaf(), playrho::d2::DynamicTree::FindIndex(), and playrho::d2::DynamicTree::GetLeafData().
bool playrho::d2::IsLimitEnabled | ( | const Joint & | object | ) |
Gets the specified joint's limit property if it supports one.
std::invalid_argument | If not supported for the given joint's type. |
Referenced by playrho::d2::Joint::IsLimitEnabled(), and playrho::d2::World::IsLimitEnabled().
Gets whether the identified joint's limit is enabled.
std::out_of_range | If given an invalid joint identifier. |
|
inlinenoexcept |
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. |
bool playrho::d2::IsMotorEnabled | ( | const Joint & | object | ) |
Gets the specified joint's motor property value if it supports one.
std::invalid_argument | If not supported for the given joint's type. |
Referenced by playrho::d2::Joint::IsMotorEnabled(), and playrho::d2::World::IsMotorEnabled().
Is the joint motor enabled?
std::out_of_range | If given an invalid joint identifier. |
|
noexcept |
Gets whether or not the given shape is a sensor.
Referenced by playrho::d2::World::IsSensor(), playrho::d2::detail::ShapeModel< T >::IsSensor_(), and playrho::d2::detail::SetSensor().
Is the specified shape a sensor (non-solid)?
std::out_of_range | If given an invalid identifier. |
|
inlinenoexcept |
Gets whether or not this body allowed to sleep.
Referenced by playrho::d2::Body::GetBodyConf(), playrho::d2::World::IsSleepingAllowed(), playrho::d2::Body::operator==(), and playrho::d2::Body::Unawaken().
Gets whether the identified body is allowed to sleep.
std::out_of_range | If given an invalid body identifier. |
|
inlinenoexcept |
Is "speedable".
Is this body able to have a non-zero speed associated with it. Kinematic and Dynamic bodies are speedable. Static bodies are not.
Referenced by playrho::d2::Body::Awaken(), playrho::d2::World::Awaken(), playrho::d2::World::IsSpeedable(), and playrho::d2::World::SetMassData().
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. |
|
inlinenoexcept |
Whether or not "step" is complete.
The "step" is completed when there are no more TOI events for the current time step.
true
unless sub-stepping is enabled and the step function returned without finishing all of its sub-steps. Referenced by playrho::d2::detail::WorldModel< T >::IsStepComplete_().
|
inlinenoexcept |
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. |
Referenced by playrho::d2::World::GetTouchingCount(), and playrho::d2::World::IsTouching().
|
constexprnoexcept |
Is unused.
Whether this node is free (or allocated).
Determines whether the given dynamic tree node is an unused node.
Referenced by playrho::d2::DynamicTree::DestroyLeaf(), playrho::d2::DynamicTree::TreeNode::GetAABB(), playrho::d2::DynamicTree::GetAABB(), playrho::d2::DynamicTree::TreeNode::GetNext(), and playrho::d2::DynamicTree::ShiftOrigin().
|
constexprnoexcept |
Multiplies a given transformation by another given transformation.
v2 = A.q.Rot(B.q.Rot(v1) + B.p) + A.p = (A.q * B.q).Rot(v1) + A.q.Rot(B.p) + A.p
|
constexprnoexcept |
Inverse multiplies a given transformation by another given transformation.
v2 = A.q' * (B.q * v1 + B.p - A.p) = A.q' * B.q * v1 + A.q' * (B.p - A.p)
Referenced by playrho::d2::DistanceProxy::GetMaxSeparation(), and playrho::d2::DistanceProxy::GetMaxSeparation4x4().
Whether or not the contact needs filtering.
std::out_of_range | If given an invalid contact identifier. |
Referenced by playrho::d2::World::NeedsFiltering().
Whether or not the contact needs updating.
std::out_of_range | If given an invalid contact identifier. |
Referenced by playrho::d2::World::NeedsUpdating().
Not-equals operator.
Manifold inequality operator.
Determines whether the two given manifolds are not equal.
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. Equals operator.
Manifold equality operator.
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. void playrho::d2::Query | ( | const DynamicTree & | tree, |
const AABB & | aabb, | ||
const DynamicTreeSizeCB & | callback | ||
) |
void playrho::d2::Query | ( | const DynamicTree & | tree, |
const AABB & | aabb, | ||
QueryShapeCallback | callback | ||
) |
Queries the world for all fixtures that potentially overlap the provided AABB.
tree | Dynamic tree to do the query over. |
aabb | The query box. |
callback | User implemented callback function. |
|
constexpr |
Replaces the old child with the new child.
bd.child1
or bd.child2
is equal to oldChild
. 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. |
Referenced by playrho::d2::World::Attach(), playrho::d2::World::Detach(), playrho::d2::World::SetFixedRotation(), and playrho::d2::World::SetType().
Resets the restitution to the default value.
std::out_of_range | If given an invalid contact identifier. |
|
constexprnoexcept |
Rotates a unit vector by the angle expressed by the second unit vector.
|
constexprnoexcept |
Rotates a vector by a given angle.
This rotates a vector by the angle expressed by the angle parameter.
vector | Vector to forward rotate. |
angle | Expresses the angle to forward rotate the given vector by. |
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. |
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. |
void playrho::d2::RotateAboutLocalPoint | ( | World & | world, |
BodyID | id, | ||
Angle | amount, | ||
const Length2 & | localPoint | ||
) |
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. |
void playrho::d2::RotateAboutWorldPoint | ( | World & | world, |
BodyID | id, | ||
Angle | amount, | ||
const Length2 & | worldPoint | ||
) |
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. |
Referenced by playrho::d2::World::RotateAboutLocalPoint().
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. |
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. |
|
inlinenoexcept |
Sets the given angular acceleration of the given body.
|
inlinenoexcept |
Sets the accelerations on the given body.
body | Body whose acceleration should be set. |
value | Acceleration value to set. |
Referenced by playrho::d2::World::ApplyForce(), playrho::d2::World::ApplyForceToCenter(), playrho::d2::World::ApplyTorque(), playrho::d2::World::SetAcceleration(), playrho::d2::World::SetAccelerations(), playrho::d2::World::SetForce(), and playrho::d2::World::SetTorque().
|
inlinenoexcept |
Sets the linear and rotational accelerations on this body.
body | Body to set the acceleration of. |
linear | Linear acceleration. |
angular | Angular acceleration. |
|
inlinenoexcept |
Sets the given linear acceleration of the given body.
void playrho::d2::SetAcceleration | ( | World & | world, |
BodyID | id, | ||
AngularAcceleration | value | ||
) |
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. |
void playrho::d2::SetAcceleration | ( | World & | world, |
BodyID | id, | ||
const Acceleration & | value | ||
) |
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. |
void playrho::d2::SetAcceleration | ( | World & | world, |
BodyID | id, | ||
const LinearAcceleration2 & | linear, | ||
AngularAcceleration | angular | ||
) |
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. |
void playrho::d2::SetAcceleration | ( | World & | world, |
BodyID | id, | ||
const LinearAcceleration2 & | value | ||
) |
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. |
void playrho::d2::SetAccelerations | ( | World & | world, |
const Acceleration & | acceleration | ||
) |
Sets the accelerations of all the world's bodies to the given value.
WrongState | if this function is called while the world is locked. |
void playrho::d2::SetAccelerations | ( | World & | world, |
const LinearAcceleration2 & | acceleration | ||
) |
Sets the accelerations of all the world's bodies to the given value.
WrongState | if this function is called while the world is locked. |
void SetAccelerations | ( | World & | world, |
F | fn | ||
) |
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. Referenced by playrho::d2::World::ClearForces().
Sets the body's angular orientation.
This instantly adjusts the body to be at the new angular orientation.
body | The body to update. |
value | Valid world angle of the body's local origin. |
Referenced by playrho::d2::World::SetAngle().
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. |
|
inlinenoexcept |
Sets the angular damping of the body.
Referenced by playrho::d2::World::SetAngularDamping().
void playrho::d2::SetAngularDamping | ( | World & | world, |
BodyID | id, | ||
NonNegative< Frequency > | angularDamping | ||
) |
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. |
Sets the joint limits.
std::invalid_argument | If not supported for the given joint's type. |
Referenced by playrho::d2::World::SetAngularLimits().
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 angular offset property of the specified joint if its type has one.
std::invalid_argument | If not supported for the given joint's type. |
Referenced by playrho::d2::World::SetAngularOffset().
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. |
|
inlinenoexcept |
Awakens this body.
Sets this body to awake and resets its under-active time if it's a "speedable" body. This function has no effect otherwise.
IsAwake(const Body&)
function returns true. GetUnderActiveTime
function returns zero. Referenced by playrho::d2::World::Awaken(), and playrho::d2::World::SetAwake().
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. |
|
inlinenoexcept |
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. |
void playrho::d2::SetBody | ( | AabbTreeWorld & | world, |
BodyID | id, | ||
Body | value | ||
) |
Sets the identified body.
WrongState | if this function is called while the world is locked. |
std::out_of_range | if given an invalid id of if the given body references any invalid shape identifiers. |
InvalidArgument | if the specified ID was destroyed. |
Referenced by playrho::d2::World::ApplyAngularImpulse(), playrho::d2::World::ApplyLinearImpulse(), playrho::d2::AabbTreeWorld::Attach(), playrho::d2::World::Attach(), playrho::d2::AabbTreeWorld::Detach(), playrho::d2::World::Detach(), playrho::d2::World::SetAcceleration(), playrho::d2::World::SetAngle(), playrho::d2::World::SetAngularDamping(), playrho::d2::World::SetAwake(), playrho::d2::detail::WorldModel< T >::SetBody_(), playrho::d2::World::SetEnabled(), playrho::d2::World::SetFixedRotation(), playrho::d2::World::SetImpenetrable(), playrho::d2::World::SetLinearDamping(), playrho::d2::World::SetLocation(), playrho::d2::World::SetMassData(), playrho::d2::World::SetSleepingAllowed(), playrho::d2::World::SetTransformation(), playrho::d2::World::SetType(), playrho::d2::World::SetVelocity(), playrho::d2::World::UnsetAwake(), and playrho::d2::World::UnsetImpenetrable().
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
. void playrho::d2::SetContact | ( | AabbTreeWorld & | world, |
ContactID | id, | ||
Contact | value | ||
) |
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. |
std::out_of_range | If given an invalid contact identifier or an invalid identifier in the new contact value. |
InvalidArgument | if the identifier is to a freed contact or if the new state is not allowable. |
Referenced by playrho::d2::detail::WorldModel< T >::SetContact_(), playrho::d2::World::SetEnabled(), playrho::d2::World::SetFriction(), playrho::d2::World::SetRestitution(), playrho::d2::World::SetTangentSpeed(), and playrho::d2::World::UnsetEnabled().
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. |
void playrho::d2::SetDensity | ( | Shape & | shape, |
NonNegative< AreaDensity > | value | ||
) |
Sets the density of the given shape.
Referenced by playrho::d2::World::SetDensity().
void playrho::d2::SetDensity | ( | World & | world, |
ShapeID | id, | ||
NonNegative< AreaDensity > | value | ||
) |
Sets the density of this shape.
std::out_of_range | If given an invalid identifier. |
|
constexprnoexcept |
Sets the destroyed property of the given body.
|
inlinenoexcept |
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. |
|
inlinenoexcept |
Sets the enabled state.
Referenced by playrho::d2::World::SetEnabled().
|
inlinenoexcept |
Sets the enabled state to the given value.
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. |
|
inlinenoexcept |
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. |
Sets the filter value for the given shape.
Referenced by playrho::d2::World::SetFilterData().
Convenience function for setting the contact filtering data.
std::out_of_range | If given an invalid identifier. |
|
inline |
Sets this body to have fixed rotation.
Referenced by playrho::d2::World::SetFixedRotation().
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. |
void playrho::d2::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.
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 joint if it has this property.
std::invalid_argument | If not supported for the given joint's type. |
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. |
void playrho::d2::SetFriction | ( | Shape & | shape, |
NonNegative< Real > | value | ||
) |
Sets the coefficient of friction.
Referenced by playrho::d2::World::ResetFriction(), and playrho::d2::World::SetFriction().
void playrho::d2::SetFriction | ( | World & | world, |
ContactID | id, | ||
NonNegative< Real > | friction | ||
) |
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. |
void playrho::d2::SetFriction | ( | World & | world, |
ShapeID | id, | ||
NonNegative< Real > | value | ||
) |
Convenience function for setting the coefficient of friction of the specified shape.
std::out_of_range | If given an invalid identifier. |
|
inlinenoexcept |
Sets the impenetrable status of this body.
Sets whether or not this body should be treated like a bullet for continuous collision detection.
Referenced by playrho::d2::World::SetImpenetrable().
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. |
void playrho::d2::SetJoint | ( | AabbTreeWorld & | world, |
JointID | id, | ||
Joint | def | ||
) |
Sets the identified joint.
WrongState | if this function is called while the world is locked. |
std::out_of_range | if given an invalid ID or the given joint references any invalid body ID. |
InvalidArgument | if the specified ID was destroyed. |
Referenced by playrho::d2::World::EnableLimit(), playrho::d2::World::EnableMotor(), playrho::d2::World::SetAngularLimits(), playrho::d2::World::SetAngularOffset(), playrho::d2::World::SetFrequency(), playrho::d2::World::SetJoint(), playrho::d2::detail::WorldModel< T >::SetJoint_(), playrho::d2::World::SetLinearOffset(), playrho::d2::World::SetMaxMotorTorque(), playrho::d2::World::SetMotorSpeed(), playrho::d2::World::SetTarget(), and playrho::d2::World::ShiftOrigin().
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. |
|
inlinenoexcept |
Register a destruction listener for joints.
Clear()
for every joint. It's also called on Destroy(BodyID)
for every joint associated with the identified body. Referenced by playrho::d2::detail::WorldModel< T >::SetJointDestructionListener_().
|
inlinenoexcept |
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. |
|
inlinenoexcept |
Sets the linear damping of the body.
Referenced by playrho::d2::World::SetLinearDamping().
void playrho::d2::SetLinearDamping | ( | World & | world, |
BodyID | id, | ||
NonNegative< Frequency > | linearDamping | ||
) |
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 joint limits.
std::invalid_argument | If not supported for the given joint's type. |
Sets the linear offset property of the specified joint if its type has one.
std::invalid_argument | If not supported for the given joint's type. |
Referenced by playrho::d2::World::SetLinearOffset().
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.
body | The body to update. |
value | Valid world location of the body's local origin. |
Referenced by playrho::d2::World::SetLocation().
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. |
void playrho::d2::SetManifold | ( | AabbTreeWorld & | world, |
ContactID | id, | ||
const Manifold & | value | ||
) |
Sets the identified manifold.
std::out_of_range | If given an invalid contact identifier. |
Referenced by playrho::d2::detail::WorldModel< T >::SetManifold_().
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. |
Referenced by playrho::d2::World::ResetMassData().
Sets the given joint's max motor force if its type supports that.
std::invalid_argument | If not supported for the given joint's type. |
Sets the given joint's max motor torque if its type supports that.
std::invalid_argument | If not supported for the given joint's type. |
Referenced by playrho::d2::World::SetMaxMotorTorque().
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. |
void playrho::d2::SetMotorSpeed | ( | Joint & | object, |
AngularVelocity | value | ||
) |
Sets the given joint's motor speed if its type supports that.
std::invalid_argument | If not supported for the given joint's type. |
Referenced by playrho::d2::World::SetMotorSpeed().
void playrho::d2::SetMotorSpeed | ( | World & | world, |
JointID | id, | ||
AngularVelocity | value | ||
) |
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. |
|
inlinenoexcept |
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. |
|
inlinenoexcept |
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 coefficient of restitution value of the given shape.
Referenced by playrho::d2::World::ResetRestitution(), and playrho::d2::World::SetRestitution().
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. |
void playrho::d2::SetSensor | ( | Shape & | shape, |
bool | value | ||
) |
Sets whether or not the given shape is a sensor.
Referenced by playrho::d2::World::SetSensor().
Convenience function for setting whether the shape is a sensor or not.
std::out_of_range | If given an invalid identifier. |
void playrho::d2::SetShape | ( | AabbTreeWorld & | world, |
ShapeID | id, | ||
Shape | def | ||
) |
Sets the value of the identified shape.
WrongState | if this function is called while the world is locked. |
std::out_of_range | If given an invalid identifier. |
InvalidArgument | if the specified ID was destroyed. |
Referenced by playrho::d2::World::Rotate(), playrho::d2::World::Scale(), playrho::d2::World::SetDensity(), playrho::d2::World::SetFilterData(), playrho::d2::World::SetFriction(), playrho::d2::World::SetRestitution(), playrho::d2::World::SetSensor(), playrho::d2::detail::WorldModel< T >::SetShape_(), and playrho::d2::World::Translate().
Sets the identified shape to the new value.
std::out_of_range | If given an out of range shape identifier. |
|
inlinenoexcept |
Registers a destruction listener for shapes.
Clear(AabbTreeWorld&)
for every shape. Referenced by playrho::d2::detail::WorldModel< T >::SetShapeDestructionListener_().
|
inlinenoexcept |
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. |
|
inlinenoexcept |
You can disable sleeping on this body. If you disable sleeping, the body will be woken.
Referenced by playrho::d2::World::SetSleepingAllowed().
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. |
|
inlinenoexcept |
Enables/disables single stepped continuous physics.
GetSubStepping()
function will return the value this function was called with. Referenced by playrho::d2::detail::WorldModel< T >::SetSubStepping_().
|
inlinenoexcept |
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. Sets the sweep value of the given body.
Referenced by playrho::d2::Body::SetAngle(), playrho::d2::World::SetMassData(), and playrho::d2::Body::SetTransformation().
void playrho::d2::SetTangentSpeed | ( | World & | world, |
ContactID | id, | ||
LinearVelocity | value | ||
) |
Sets the desired tangent speed for a conveyor belt behavior.
std::out_of_range | If given an invalid contact identifier. |
Referenced by playrho::d2::World::SetTangentSpeed().
Sets the given joint's target property if it has one.
std::invalid_argument | If not supported for the given joint's type. |
Referenced by playrho::d2::World::SetTarget().
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. |
Referenced by playrho::d2::World::RotateAboutWorldPoint().
|
noexcept |
Sets the body's transformation.
GetTransformation(const Body& body)
will return the value set. GetPosition1(const Body& body)
will return a position equivalent to value given. Referenced by playrho::d2::Body::SetLocation(), playrho::d2::World::SetTransform(), and playrho::d2::World::SetTransformation().
void playrho::d2::SetTransformation | ( | World & | world, |
BodyID | id, | ||
const Transformation & | value | ||
) |
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 this body.
Referenced by playrho::d2::World::SetType().
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. |
|
inlinenoexcept |
Sets the angular velocity.
body | Body to set the angular velocity of. |
value | the new angular velocity. |
|
inlinenoexcept |
Sets the linear velocity of the center of mass.
body | Body to set the linear velocity of. |
value | the new linear velocity of the center of mass. |
Sets the body's velocity (linear and angular velocity).
Referenced by playrho::d2::World::SetVelocity().
void playrho::d2::SetVelocity | ( | World & | world, |
BodyID | id, | ||
AngularVelocity | value | ||
) |
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. |
void playrho::d2::SetVelocity | ( | World & | world, |
BodyID | id, | ||
const LinearVelocity2 & | value | ||
) |
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. |
void playrho::d2::SetVertexRadius | ( | Shape & | shape, |
ChildCounter | idx, | ||
NonNegative< Length > | value | ||
) |
Sets the vertex radius of the indexed child of the given shape.
InvalidArgument | if the vertex radius cannot be set to the specified value. |
void playrho::d2::ShiftOrigin | ( | AabbTreeWorld & | world, |
const Length2 & | newOrigin | ||
) |
Shifts the world origin.
position -= newOrigin
. world | The world whose origin should be shifted. |
newOrigin | the new origin with respect to the old origin |
WrongState | if this function is called while the world is locked. |
Referenced by playrho::d2::World::ShiftOrigin(), playrho::d2::detail::WorldModel< T >::ShiftOrigin_(), and playrho::d2::detail::JointModel< T >::ShiftOrigin_().
Shifts the origin for any points stored in world coordinates.
true
if shift done, false
otherwise. 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. |
Whether contact calculations should be performed between the two instances.
true
if contact calculations should be performed between these two instances; false
otherwise. Referenced by playrho::d2::Shape::ShouldCollide().
|
inlinenoexcept |
Gets the "size" of the given tree.
Referenced by playrho::BlockAllocator::Allocate(), CalcSearchDirection(), playrho::d2::DistanceProxy::Distance(), FindLowestRightMostVertex(), playrho::BlockAllocator::Free(), playrho::d2::ConvexHull::Get(), playrho::d2::World::GetAssociationCount(), playrho::d2::World::GetBodyCount(), playrho::d2::part::StaticRectangle< W, H, V >::GetChild(), playrho::d2::part::DynamicRectangle< W, H, V >::GetChild(), GetChildCount(), playrho::d2::World::GetContactCount(), GetConvexHullAsVector(), playrho::d2::ConvexHull::GetDistanceProxy(), GetFwdNormalsVector(), GetIndexPairs(), playrho::d2::World::GetJointCount(), GetManifold(), GetMassData(), playrho::BlockAllocator::GetMaxBlockSize(), playrho::d2::World::GetShapeCount(), playrho::d2::World::GetUsedShapesCount(), playrho::d2::ChainShapeConf::GetVertexCount(), playrho::d2::PolygonShapeConf::GetVertexCount(), GetWitnessPoints(), playrho::d2::PolygonShapeConf::Set(), playrho::d2::ChainShapeConf::Set(), playrho::d2::VertexSet::size(), and Validate().
bool playrho::d2::SolvePosition | ( | const DistanceJointConf & | object, |
const Span< BodyConstraint > & | bodies, | ||
const ConstraintSolverConf & | conf | ||
) |
Solves the position constraint.
object | Configuration object. bodyA and bodyB must index bodies within the given bodies container or be the special body ID value of InvalidBodyID . |
bodies | Container of body constraints. |
conf | Constraint solver configuration. |
std::out_of_range | If the given object's bodyA or bodyB values are not InvalidBodyID and are not indices within range of the given bodies container. |
true
if the position errors are within tolerance. Referenced by playrho::d2::detail::JointModel< T >::SolvePosition_().
bool playrho::d2::SolvePosition | ( | const FrictionJointConf & | object, |
const Span< BodyConstraint > & | bodies, | ||
const ConstraintSolverConf & | conf | ||
) |
Solves the position constraint.
true
. true
. bool playrho::d2::SolvePosition | ( | const GearJointConf & | object, |
const Span< BodyConstraint > & | bodies, | ||
const ConstraintSolverConf & | conf | ||
) |
Solves the position constraint.
object | Configuration object. bodyA and bodyB must index bodies within the given bodies container or be the special body ID value of InvalidBodyID . |
bodies | Container of body constraints. |
conf | Constraint solver configuration. |
std::out_of_range | If the given object's bodyA or bodyB values are not InvalidBodyID and are not indices within range of the given bodies container. |
true
if the position errors are within tolerance. bool playrho::d2::SolvePosition | ( | const Joint & | object, |
const Span< BodyConstraint > & | bodies, | ||
const ConstraintSolverConf & | conf | ||
) |
Solves the position constraint.
true
if the position errors are within tolerance. bool playrho::d2::SolvePosition | ( | const MotorJointConf & | object, |
const Span< BodyConstraint > & | bodies, | ||
const ConstraintSolverConf & | conf | ||
) |
Solves the position constraint.
true
. true
. bool playrho::d2::SolvePosition | ( | const PrismaticJointConf & | object, |
const Span< BodyConstraint > & | bodies, | ||
const ConstraintSolverConf & | conf | ||
) |
Solves the position constraint.
object | Configuration object. bodyA and bodyB must index bodies within the given bodies container or be the special body ID value of InvalidBodyID . |
bodies | Container of body constraints. |
conf | Constraint solver configuration. |
std::out_of_range | If the given object's bodyA or bodyB values are not InvalidBodyID and are not indices within range of the given bodies container. |
true
if the position errors are within tolerance. bool playrho::d2::SolvePosition | ( | const PulleyJointConf & | object, |
const Span< BodyConstraint > & | bodies, | ||
const ConstraintSolverConf & | conf | ||
) |
Solves the position constraint.
object | Configuration object. bodyA and bodyB must index bodies within the given bodies container or be the special body ID value of InvalidBodyID . |
bodies | Container of body constraints. |
conf | Constraint solver configuration. |
std::out_of_range | If the given object's bodyA or bodyB values are not InvalidBodyID and are not indices within range of the given bodies container. |
true
if the position errors are within tolerance. bool playrho::d2::SolvePosition | ( | const RevoluteJointConf & | object, |
const Span< BodyConstraint > & | bodies, | ||
const ConstraintSolverConf & | conf | ||
) |
Solves the position constraint.
object | Configuration object. bodyA and bodyB must index bodies within the given bodies container or be the special body ID value of InvalidBodyID . |
bodies | Container of body constraints. |
conf | Constraint solver configuration. |
std::out_of_range | If the given object's bodyA or bodyB values are not InvalidBodyID and are not indices within range of the given bodies container. |
true
if the position errors are within tolerance. bool playrho::d2::SolvePosition | ( | const RopeJointConf & | object, |
const Span< BodyConstraint > & | bodies, | ||
const ConstraintSolverConf & | conf | ||
) |
Solves the position constraint.
object | Configuration object. bodyA and bodyB must index bodies within the given bodies container or be the special body ID value of InvalidBodyID . |
bodies | Container of body constraints. |
conf | Constraint solver configuration. |
std::out_of_range | If the given object's bodyA or bodyB values are not InvalidBodyID and are not indices within range of the given bodies container. |
true
if the position errors are within tolerance. bool playrho::d2::SolvePosition | ( | const TargetJointConf & | object, |
const Span< BodyConstraint > & | bodies, | ||
const ConstraintSolverConf & | conf | ||
) |
Solves the position constraint.
true
. true
. bool playrho::d2::SolvePosition | ( | const WeldJointConf & | object, |
const Span< BodyConstraint > & | bodies, | ||
const ConstraintSolverConf & | conf | ||
) |
Solves the position constraint.
object | Configuration object. bodyA and bodyB must index bodies within the given bodies container or be the special body ID value of InvalidBodyID . |
bodies | Container of body constraints. |
conf | Constraint solver configuration. |
std::out_of_range | If the given object's bodyA or bodyB values are not InvalidBodyID and are not indices within range of the given bodies container. |
true
if the position errors are within tolerance. bool playrho::d2::SolvePosition | ( | const WheelJointConf & | object, |
const Span< BodyConstraint > & | bodies, | ||
const ConstraintSolverConf & | conf | ||
) |
Solves the position constraint.
object | Configuration object. bodyA and bodyB must index bodies within the given bodies container or be the special body ID value of InvalidBodyID . |
bodies | Container of body constraints. |
conf | Constraint solver configuration. |
std::out_of_range | If the given object's bodyA or bodyB values are not InvalidBodyID and are not indices within range of the given bodies container. |
true
if the position errors are within tolerance. bool playrho::d2::SolveVelocity | ( | DistanceJointConf & | object, |
const Span< BodyConstraint > & | bodies, | ||
const StepConf & | step | ||
) |
Solves velocity constraint.
InitVelocity
has been called. object | Configuration object. bodyA and bodyB must index bodies within the given bodies container or be the special body ID value of InvalidBodyID . |
bodies | Container of body constraints. |
step | Configuration for the step. |
std::out_of_range | If the given object's bodyA or bodyB values are not InvalidBodyID and are not indices within range of the given bodies container. |
true
if velocity is "solved", false
otherwise. Referenced by playrho::d2::detail::JointModel< T >::SolveVelocity_().
bool playrho::d2::SolveVelocity | ( | FrictionJointConf & | object, |
const Span< BodyConstraint > & | bodies, | ||
const StepConf & | step | ||
) |
Solves velocity constraint.
InitVelocity
has been called. object | Configuration object. bodyA and bodyB must index bodies within the given bodies container or be the special body ID value of InvalidBodyID . |
bodies | Container of body constraints. |
step | Configuration for the step. |
std::out_of_range | If the given object's bodyA or bodyB values are not InvalidBodyID and are not indices within range of the given bodies container. |
true
if velocity is "solved", false
otherwise. bool playrho::d2::SolveVelocity | ( | GearJointConf & | object, |
const Span< BodyConstraint > & | bodies, | ||
const StepConf & | step | ||
) |
Solves velocity constraint.
InitVelocity
has been called. object | Configuration object. bodyA and bodyB must index bodies within the given bodies container or be the special body ID value of InvalidBodyID . |
bodies | Container of body constraints. |
step | Configuration for the step. |
std::out_of_range | If the given object's bodyA or bodyB values are not InvalidBodyID and are not indices within range of the given bodies container. |
true
if velocity is "solved", false
otherwise. bool playrho::d2::SolveVelocity | ( | Joint & | object, |
const Span< BodyConstraint > & | bodies, | ||
const StepConf & | step | ||
) |
Solves velocity constraint.
InitVelocity
has been called. true
if velocity is "solved", false
otherwise. bool playrho::d2::SolveVelocity | ( | MotorJointConf & | object, |
const Span< BodyConstraint > & | bodies, | ||
const StepConf & | step | ||
) |
Solves velocity constraint.
InitVelocity
has been called. object | Configuration object. bodyA and bodyB must index bodies within the given bodies container or be the special body ID value of InvalidBodyID . |
bodies | Container of body constraints. |
step | Configuration for the step. |
std::out_of_range | If the given object's bodyA or bodyB values are not InvalidBodyID and are not indices within range of the given bodies container. |
true
if velocity is "solved", false
otherwise. bool playrho::d2::SolveVelocity | ( | PrismaticJointConf & | object, |
const Span< BodyConstraint > & | bodies, | ||
const StepConf & | step | ||
) |
Solves velocity constraint.
InitVelocity
has been called. object | Configuration object. bodyA and bodyB must index bodies within the given bodies container or be the special body ID value of InvalidBodyID . |
bodies | Container of body constraints. |
step | Configuration for the step. |
std::out_of_range | If the given object's bodyA or bodyB values are not InvalidBodyID and are not indices within range of the given bodies container. |
true
if velocity is "solved", false
otherwise. bool playrho::d2::SolveVelocity | ( | PulleyJointConf & | object, |
const Span< BodyConstraint > & | bodies, | ||
const StepConf & | step | ||
) |
Solves velocity constraint.
InitVelocity
has been called. object | Configuration object. bodyA and bodyB must index bodies within the given bodies container or be the special body ID value of InvalidBodyID . |
bodies | Container of body constraints. |
step | Configuration for the step. |
std::out_of_range | If the given object's bodyA or bodyB values are not InvalidBodyID and are not indices within range of the given bodies container. |
true
if velocity is "solved", false
otherwise. bool playrho::d2::SolveVelocity | ( | RevoluteJointConf & | object, |
const Span< BodyConstraint > & | bodies, | ||
const StepConf & | step | ||
) |
Solves velocity constraint.
InitVelocity
has been called. object | Configuration object. bodyA and bodyB must index bodies within the given bodies container or be the special body ID value of InvalidBodyID . |
bodies | Container of body constraints. |
step | Configuration for the step. |
std::out_of_range | If the given object's bodyA or bodyB values are not InvalidBodyID and are not indices within range of the given bodies container. |
true
if velocity is "solved", false
otherwise. bool playrho::d2::SolveVelocity | ( | RopeJointConf & | object, |
const Span< BodyConstraint > & | bodies, | ||
const StepConf & | step | ||
) |
Solves velocity constraint.
InitVelocity
has been called. object | Configuration object. bodyA and bodyB must index bodies within the given bodies container or be the special body ID value of InvalidBodyID . |
bodies | Container of body constraints. |
step | Configuration for the step. |
std::out_of_range | If the given object's bodyA or bodyB values are not InvalidBodyID and are not indices within range of the given bodies container. |
true
if velocity is "solved", false
otherwise. bool playrho::d2::SolveVelocity | ( | TargetJointConf & | object, |
const Span< BodyConstraint > & | bodies, | ||
const StepConf & | step | ||
) |
Solves velocity constraint.
InitVelocity
has been called. object | Configuration object. bodyB must index a body within the given bodies container or be the special body ID value of InvalidBodyID . |
bodies | Container of body constraints. |
step | Configuration for the step. |
std::out_of_range | If the given object's bodyB value is not InvalidBodyID and does not index within range of the given bodies container. |
true
if velocity is "solved", false
otherwise. bool playrho::d2::SolveVelocity | ( | WeldJointConf & | object, |
const Span< BodyConstraint > & | bodies, | ||
const StepConf & | step | ||
) |
Solves velocity constraint.
InitVelocity
has been called. object | Configuration object. bodyA and bodyB must index bodies within the given bodies container or be the special body ID value of InvalidBodyID . |
bodies | Container of body constraints. |
step | Configuration for the step. |
std::out_of_range | If the given object's bodyA or bodyB values are not InvalidBodyID and are not indices within range of the given bodies container. |
true
if velocity is "solved", false
otherwise. bool playrho::d2::SolveVelocity | ( | WheelJointConf & | object, |
const Span< BodyConstraint > & | bodies, | ||
const StepConf & | step | ||
) |
Solves velocity constraint.
InitVelocity
has been called. object | Configuration object. bodyA and bodyB must index bodies within the given bodies container or be the special body ID value of InvalidBodyID . |
bodies | Container of body constraints. |
step | Configuration for the step. |
std::out_of_range | If the given object's bodyA or bodyB values are not InvalidBodyID and are not indices within range of the given bodies container. |
true
if velocity is "solved", false
otherwise. StepStats playrho::d2::Step | ( | AabbTreeWorld & | world, |
const StepConf & | conf | ||
) |
Steps the 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 | The world that is to be stepped. |
conf | Configuration for the simulation step. |
conf.linearSlop
is significant enough compared to GetVertexRadiusInterval(const AabbTreeWorld& world).GetMax()
. WrongState | if this function is called while the world is locked. |
Referenced by playrho::d2::World::Step(), and playrho::d2::detail::WorldModel< T >::Step_().
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. |
StepStats playrho::d2::Step | ( | World & | world, |
Time | delta, | ||
TimestepIters | velocityIterations = StepConf::DefaultRegVelocityIters , |
||
TimestepIters | positionIterations = StepConf::DefaultRegPositionIters |
||
) |
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. |
|
noexcept |
Swappable
named requirement. Referenced by playrho::d2::DynamicTree::operator=(), and RayCast().
Area playrho::d2::TestOverlap | ( | const DistanceProxy & | proxyA, |
const Transformation & | xfA, | ||
const DistanceProxy & | proxyB, | ||
const Transformation & | xfB, | ||
DistanceConf | conf = DistanceConf{} |
||
) |
Determine if two generic shapes overlap.
CollideShapes
function. This is not always the case however especially when the separation or overlap distance is closer to zero. Referenced by Query(), RayCast(), and playrho::d2::DynamicTree::TestOverlap().
|
constexprnoexcept |
Transforms the given 2-D vector with the given transformation.
Rotate and translate the given 2-D linear position according to the rotation and translation defined by the given transformation.
InverseTransform
(with the same transformation again) will result in the original vector being returned. InverseTransform
. v | 2-D position to transform (to rotate and then translate). |
xfm | Transformation (a translation and rotation) to apply to the given vector. |
Referenced by playrho::d2::DistanceProxy::ComputeAABB(), playrho::d2::World::GetAnchorA(), playrho::d2::World::GetAnchorB(), GetManifold(), playrho::d2::DistanceProxy::GetMaxSeparation(), playrho::d2::DistanceProxy::GetMaxSeparation4x4(), GetSeparationScenario(), playrho::d2::Body::GetWorldPoint(), playrho::d2::World::GetWorldPoint(), playrho::d2::DistanceProxy::RayCast(), playrho::d2::World::SetMassData(), playrho::d2::FrictionJointConf::SolveVelocity(), playrho::d2::MotorJointConf::SolveVelocity(), playrho::d2::TargetJointConf::SolveVelocity(), playrho::d2::WeldJointConf::SolveVelocity(), and playrho::d2::PolygonShapeConf::Transform().
|
inline |
Transforms the given polygon configuration's vertices by the given transformation matrix.
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. |
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. |
|
inline |
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. |
|
inlinenoexcept |
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
code from the LLVM Project.
|
inline |
Casts the specified instance into the template specified type.
std::bad_cast | If the template specified type is not the type of data underlying the given instance. |
|
noexcept |
Converts the given shape 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
code from the LLVM Project.
|
inline |
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. |
|
inlinenoexcept |
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. |
|
inline |
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.
|
inline |
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.
|
inlinenoexcept |
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.
|
inline |
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.
|
inline |
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.
|
inlinenoexcept |
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. |
|
inlinenoexcept |
Puts the body to sleep if it's awake.
|
inlinenoexcept |
Sets this body to asleep if sleeping is allowed.
If this body is allowed to sleep, this: sets the sleep state of the body to asleep, resets this body's under active time, and resets this body's velocity (linear and angular).
IsAwake(const Body&)
function returns false. GetUnderActiveTime
function returns zero. GetVelocity
function returns zero linear and zero angular speed. Referenced by playrho::d2::World::UnsetAwake().
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. |
|
constexprnoexcept |
Unsets the destroyed property of the given body.
|
inlinenoexcept |
Unsets the enabled state.
Referenced by playrho::d2::World::SetEnabled(), and playrho::d2::World::UnsetEnabled().
Unsets the enabled status of the identified contact.
std::out_of_range | If given an invalid contact identifier. |
|
inlinenoexcept |
Unsets the impenetrable status of this body.
Sets whether or not this body should be treated like a bullet for continuous collision detection.
Referenced by playrho::d2::World::SetImpenetrable(), and playrho::d2::World::UnsetImpenetrable().
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. |
Validates the convexity of the given collection of vertices.
true
if the given collection of vertices is indeed convex, false
otherwise.
|
noexcept |
Validates the metrics of the given tree from the given index.
true
if valid, false
otherwise.
|
noexcept |
Validates the structure of the given tree from the given index.
true
if valid, false
otherwise.
|
constexpr |
Earthly gravity in 2-dimensions.
Linear acceleration in 2-dimensions of an earthly object due to Earth's mass.
|
constexpr |
Invalid AABB value.
|
inlineconstexpr |
Boolean value for whether the specified type is a valid joint type.
|
constexpr |
Identity transformation value.