HughPH.Box2D
Organised dotnet bindings for Box2D 3.1.0
All Classes Namespaces Functions Variables Enumerations Enumerator Properties Pages
Public Member Functions | Properties | List of all members
Box2D.MouseJointDef Class Referencesealed

A mouse joint is used to make a point on a body track a specified world point.
More...

Public Member Functions

 MouseJointDef (Body bodyA, Body bodyB, Vec2 target, float hertz=0.0f, float dampingRatio=0.0f, float maxForce=0.0f, bool collideConnected=false, object? userData=null)
 Construct a mouse joint definition with the supplied values.
 
 MouseJointDef ()
 Construct a mouse joint definition with the default values.
 

Properties

ref Body BodyA [get]
 The first attached body. This is assumed to be static.
 
ref Body BodyB [get]
 The second attached body.
 
ref Vec2 Target [get]
 The initial target point in world space.
 
ref float Hertz [get]
 Stiffness in hertz.
 
ref float DampingRatio [get]
 Damping ratio, non-dimensional.
 
ref float MaxForce [get]
 Maximum force, typically in newtons.
 
bool CollideConnected [get, set]
 Set this flag to true if the attached bodies should collide.
 
object? UserData [get, set]
 User data.
 

Detailed Description

A mouse joint is used to make a point on a body track a specified world point.

This a soft constraint and allows the constraint to stretch without applying huge forces. This also applies rotation constraint heuristic to improve control.

Constructor & Destructor Documentation

◆ MouseJointDef()

Box2D.MouseJointDef.MouseJointDef ( Body  bodyA,
Body  bodyB,
Vec2  target,
float  hertz = 0::0f,
float  dampingRatio = 0::0f,
float  maxForce = 0::0f,
bool  collideConnected = false,
object?  userData = null 
)
inline

Construct a mouse joint definition with the supplied values.

Parameters
bodyAThe first attached body
bodyBThe second attached body
targetThe target point in world space
hertzStiffness in hertz
dampingRatioDamping ratio, non-dimensional
maxForceMaximum force, typically in newtons
collideConnectedSet this flag to true if the attached bodies should collide
userDataUser data

The documentation for this class was generated from the following file: