Box2D
3.0.0
A Real-Time-Oriented 2-D Physics Engine
|
Mouse joint definition. This requires a world target point, tuning parameters, and the time step. More...
#include <MouseJoint.hpp>
Public Member Functions | |
constexpr | MouseJointDef () noexcept |
![]() | |
JointDef ()=delete | |
Deleted default constructor for abstract base class. More... | |
constexpr | JointDef (JointType t) noexcept |
constexpr | JointDef (JointType t, Body *bA, Body *bB, bool cc=false, void *u=nullptr) noexcept |
Public Attributes | |
Length2D | target = Vec2_zero * Meter |
The initial world target point. This is assumed to coincide with the body anchor initially. More... | |
Force | maxForce = Force{0} |
Max force. More... | |
Frequency | frequencyHz = RealNum{5} * Hertz |
Frequency. More... | |
RealNum | dampingRatio = 0.7f |
The damping ratio. 0 = no damping, 1 = critical damping. More... | |
![]() | |
const JointType | type |
The joint type is set automatically for concrete joint types. More... | |
Body * | bodyA = nullptr |
The first attached body. More... | |
Body * | bodyB = nullptr |
The second attached body. More... | |
bool | collideConnected = false |
Set this flag to true if the attached bodies should collide. More... | |
void * | userData = nullptr |
Use this to attach application specific data to your joints. More... | |
Mouse joint definition. This requires a world target point, tuning parameters, and the time step.
|
inlinenoexcept |
RealNum box2d::MouseJointDef::dampingRatio = 0.7f |
The damping ratio. 0 = no damping, 1 = critical damping.
Frequency.
The has to do with the response speed.
Max force.
The maximum constraint force that can be exerted to move the candidate body. Usually you will express as some multiple of the weight (multiplier * mass * gravity).
The initial world target point. This is assumed to coincide with the body anchor initially.