Box2D
3.0.0
A Real-Time-Oriented 2-D Physics Engine
|
#include <Joint.hpp>
Public Types | |
enum | LimitState { e_inactiveLimit, e_atLowerLimit, e_atUpperLimit, e_equalLimits } |
using | index_t = size_t |
Public Member Functions | |
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... | |
virtual Length2D | GetAnchorA () const =0 |
Get the anchor point on bodyA in world coordinates. More... | |
virtual Length2D | GetAnchorB () const =0 |
Get the anchor point on bodyB in world coordinates. More... | |
virtual Force2D | GetReactionForce (Frequency inv_dt) const =0 |
Get the reaction force on bodyB at the joint anchor in Newtons. More... | |
virtual Torque | GetReactionTorque (Frequency inv_dt) const =0 |
Get the reaction torque on bodyB in N*m. 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 JointDef &def) noexcept |
Protected Member Functions | |
Joint (const JointDef &def) | |
virtual | ~Joint () noexcept |
void | SetBodyA (Body *value) noexcept |
void | SetBodyB (Body *value) noexcept |
Friends | |
class | JointAtty |
Base Joint class.
Joints are used to constraint two bodies together in various fashions. Some joints also feature limits and motors.
using box2d::Joint::index_t = size_t |
|
protected |
|
inlineprotectedvirtualnoexcept |
|
pure virtual |
Get the anchor point on bodyA in world coordinates.
Implemented in box2d::RevoluteJoint, box2d::PrismaticJoint, box2d::PulleyJoint, box2d::MouseJoint, box2d::WheelJoint, box2d::DistanceJoint, box2d::WeldJoint, box2d::RopeJoint, box2d::MotorJoint, box2d::GearJoint, and box2d::FrictionJoint.
|
pure virtual |
Get the anchor point on bodyB in world coordinates.
Implemented in box2d::RevoluteJoint, box2d::PrismaticJoint, box2d::PulleyJoint, box2d::MouseJoint, box2d::WheelJoint, box2d::DistanceJoint, box2d::WeldJoint, box2d::RopeJoint, box2d::MotorJoint, box2d::GearJoint, and box2d::FrictionJoint.
|
inlinenoexcept |
Get the first body attached to this joint.
|
inlinenoexcept |
Get the first body attached to this joint.
|
inlinenoexcept |
Get the second body attached to this joint.
|
inlinenoexcept |
Get the second body attached to this joint.
|
inlinenoexcept |
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.
Get the reaction force on bodyB at the joint anchor in Newtons.
Implemented in box2d::RevoluteJoint, box2d::PrismaticJoint, box2d::MouseJoint, box2d::PulleyJoint, box2d::DistanceJoint, box2d::WheelJoint, box2d::WeldJoint, box2d::RopeJoint, box2d::MotorJoint, box2d::GearJoint, and box2d::FrictionJoint.
Get the reaction torque on bodyB in N*m.
Implemented in box2d::RevoluteJoint, box2d::PrismaticJoint, box2d::MouseJoint, box2d::PulleyJoint, box2d::DistanceJoint, box2d::WheelJoint, box2d::WeldJoint, box2d::RopeJoint, box2d::MotorJoint, box2d::GearJoint, and box2d::FrictionJoint.
|
inlinenoexcept |
Get the type of the concrete joint.
|
inlinenoexcept |
Get the user data pointer.
|
staticnoexcept |
|
inlineprotectednoexcept |
|
inlineprotectednoexcept |
|
inlinenoexcept |
Set the user data pointer.
|
inlinevirtual |
Shift the origin for any points stored in world coordinates.
Reimplemented in box2d::MouseJoint, and box2d::PulleyJoint.
|
friend |