Box2D
3.0.0
A Real-Time-Oriented 2-D Physics Engine
|
#include <MouseJoint.hpp>
Public Member Functions | |
MouseJoint (const MouseJointDef &def) | |
Length2D | GetAnchorA () const override |
Implements Joint. More... | |
Length2D | GetAnchorB () const override |
Implements Joint. More... | |
Force2D | GetReactionForce (Frequency inv_dt) const override |
Implements Joint. More... | |
Torque | GetReactionTorque (Frequency inv_dt) const override |
Implements Joint. More... | |
Length2D | GetLocalAnchorB () const noexcept |
void | SetTarget (const Length2D target) noexcept |
Use this to update the target point. More... | |
Length2D | GetTarget () const noexcept |
void | SetMaxForce (Force force) noexcept |
Set/get the maximum force in Newtons. More... | |
Force | GetMaxForce () const noexcept |
void | SetFrequency (Frequency hz) noexcept |
Set/get the frequency in Hertz. More... | |
Frequency | GetFrequency () const noexcept |
void | SetDampingRatio (RealNum ratio) noexcept |
Set/get the damping ratio (dimensionless). More... | |
RealNum | GetDampingRatio () const noexcept |
void | ShiftOrigin (const Length2D newOrigin) override |
Implement Joint::ShiftOrigin. More... | |
![]() | |
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... | |
Static Public Member Functions | |
static bool | IsOkay (const MouseJointDef &def) noexcept |
![]() | |
static bool | IsOkay (const JointDef &def) noexcept |
Additional Inherited Members | |
![]() | |
enum | LimitState { e_inactiveLimit, e_atLowerLimit, e_atUpperLimit, e_equalLimits } |
using | index_t = size_t |
![]() | |
Joint (const JointDef &def) | |
virtual | ~Joint () noexcept |
void | SetBodyA (Body *value) noexcept |
void | SetBodyB (Body *value) noexcept |
Mouse Joint.
A mouse joint is used to make a point on a body track a specified world point. This a soft constraint with a maximum force. This allows the constraint to stretch and without applying huge forces.
MouseJoint::MouseJoint | ( | const MouseJointDef & | def | ) |
|
inlineoverridevirtual |
Implements Joint.
Implements box2d::Joint.
|
overridevirtual |
Implements Joint.
Implements box2d::Joint.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Implements Joint.
Implements box2d::Joint.
Implements Joint.
Implements box2d::Joint.
|
inlinenoexcept |
|
staticnoexcept |
|
inlinenoexcept |
Set/get the damping ratio (dimensionless).
|
inlinenoexcept |
Set/get the frequency in Hertz.
|
inlinenoexcept |
Set/get the maximum force in Newtons.
|
noexcept |
Use this to update the target point.
|
overridevirtual |
Implement Joint::ShiftOrigin.
Reimplemented from box2d::Joint.