Box2D
3.0.0
A Real-Time-Oriented 2-D Physics Engine
|
A weld joint essentially glues two bodies together. A weld joint may distort somewhat because the island constraint solver is approximate. More...
#include <WeldJoint.hpp>
Public Member Functions | |
WeldJoint (const WeldJointDef &def) | |
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 on bodyB at the joint anchor in Newtons. More... | |
Torque | GetReactionTorque (Frequency inv_dt) const override |
Get the reaction torque on bodyB in N*m. More... | |
Length2D | GetLocalAnchorA () const |
The local anchor point relative to bodyA's origin. More... | |
Length2D | GetLocalAnchorB () const |
The local anchor point relative to bodyB's origin. More... | |
Angle | GetReferenceAngle () const |
Get the reference angle. More... | |
void | SetFrequency (Frequency hz) |
Set/get frequency in Hz. More... | |
Frequency | GetFrequency () const |
void | SetDampingRatio (RealNum ratio) |
Set/get damping ratio. More... | |
RealNum | GetDampingRatio () const |
![]() | |
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... | |
Additional Inherited Members | |
![]() | |
enum | LimitState { e_inactiveLimit, e_atLowerLimit, e_atUpperLimit, e_equalLimits } |
using | index_t = size_t |
![]() | |
static bool | IsOkay (const JointDef &def) noexcept |
![]() | |
Joint (const JointDef &def) | |
virtual | ~Joint () noexcept |
void | SetBodyA (Body *value) noexcept |
void | SetBodyB (Body *value) noexcept |
A weld joint essentially glues two bodies together. A weld joint may distort somewhat because the island constraint solver is approximate.
WeldJoint::WeldJoint | ( | const WeldJointDef & | def | ) |
|
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.
|
inline |
|
inline |
|
inline |
The local anchor point relative to bodyA's origin.
|
inline |
The local anchor point relative to bodyB's origin.
Get the reaction force on bodyB at the joint anchor in Newtons.
Implements box2d::Joint.
Get the reaction torque on bodyB in N*m.
Implements box2d::Joint.
|
inline |
Get the reference angle.
|
inline |
Set/get damping ratio.
|
inline |
Set/get frequency in Hz.