|
Box2D
3.0.0
A Real-Time-Oriented 2-D Physics Engine
|
#include <DistanceJoint.hpp>
Public Member Functions | |
| DistanceJoint (const DistanceJointDef &data) | |
| Length2D | GetAnchorA () const override |
| Get the anchor point on bodyA in world coordinates. More... | |
| Length2D | GetAnchorB () const override |
| Get the anchor point on bodyB in world coordinates. More... | |
| Force2D | GetReactionForce (Frequency inv_dt) const override |
| Get the reaction force given the inverse time step. Unit is N. More... | |
| Torque | GetReactionTorque (Frequency inv_dt) const override |
| Get the reaction torque given the inverse time step. Unit is N*m. This is always zero for a distance joint. More... | |
| Length2D | GetLocalAnchorA () const noexcept |
| The local anchor point relative to bodyA's origin. More... | |
| Length2D | GetLocalAnchorB () const noexcept |
| The local anchor point relative to bodyB's origin. More... | |
| void | SetLength (Length length) noexcept |
| Set/get the natural length. Manipulating the length can lead to non-physical behavior when the frequency is zero. More... | |
| Length | GetLength () const noexcept |
| void | SetFrequency (Frequency hz) noexcept |
| Set/get frequency in Hz. More... | |
| Frequency | GetFrequency () const noexcept |
| void | SetDampingRatio (RealNum ratio) noexcept |
| Set/get damping ratio. More... | |
| RealNum | GetDampingRatio () const noexcept |
Public Member Functions inherited from box2d::Joint | |
| JointType | GetType () const noexcept |
| Get the type of the concrete joint. More... | |
| Body * | GetBodyA () noexcept |
| Get the first body attached to this joint. More... | |
| Body * | GetBodyB () noexcept |
| Get the second body attached to this joint. More... | |
| const Body * | GetBodyA () const noexcept |
| Get the first body attached to this joint. More... | |
| const Body * | GetBodyB () const noexcept |
| Get the second body attached to this joint. More... | |
| void * | GetUserData () const noexcept |
| Get the user data pointer. More... | |
| void | SetUserData (void *data) noexcept |
| Set the user data pointer. More... | |
| bool | GetCollideConnected () const noexcept |
| Get collide connected. Note: modifying the collide connect flag won't work correctly because the flag is only checked when fixture AABBs begin to overlap. More... | |
| virtual void | ShiftOrigin (const Length2D newOrigin) |
| Shift the origin for any points stored in world coordinates. More... | |
Static Public Member Functions | |
| static bool | IsOkay (const DistanceJointDef &data) noexcept |
Static Public Member Functions inherited from box2d::Joint | |
| static bool | IsOkay (const JointDef &def) noexcept |
Additional Inherited Members | |
Public Types inherited from box2d::Joint | |
| enum | LimitState { e_inactiveLimit, e_atLowerLimit, e_atUpperLimit, e_equalLimits } |
| using | index_t = size_t |
Protected Member Functions inherited from box2d::Joint | |
| Joint (const JointDef &def) | |
| virtual | ~Joint () noexcept |
| void | SetBodyA (Body *value) noexcept |
| void | SetBodyB (Body *value) noexcept |
Distance Joint.
A distance joint constrains two points on two bodies to remain at a fixed distance from each other. You can view this as a massless, rigid rod.
| DistanceJoint::DistanceJoint | ( | const DistanceJointDef & | data | ) |
|
overridevirtual |
Get the anchor point on bodyA in world coordinates.
Implements box2d::Joint.
|
overridevirtual |
Get the anchor point on bodyB in world coordinates.
Implements box2d::Joint.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
The local anchor point relative to bodyA's origin.
|
inlinenoexcept |
The local anchor point relative to bodyB's origin.
Get the reaction force given the inverse time step. Unit is N.
Implements box2d::Joint.
Get the reaction torque given the inverse time step. Unit is N*m. This is always zero for a distance joint.
Implements box2d::Joint.
|
staticnoexcept |
|
inlinenoexcept |
Set/get damping ratio.
|
inlinenoexcept |
Set/get frequency in Hz.
|
inlinenoexcept |
Set/get the natural length. Manipulating the length can lead to non-physical behavior when the frequency is zero.
1.8.14