C# Class Box2DX.Dynamics.MouseJoint

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.
Inheritance: Joint
Show file Open project: danielpcox/Crisis-at-Swiss-Station Class Usage Examples

Public Properties

Property Type Description
_C Box2DX.Common.Vec2
_beta float
_dampingRatio float
_frequencyHz float
_gamma float
_impulse Box2DX.Common.Vec2
_localAnchor Box2DX.Common.Vec2
_mass Box2DX.Common.Mat22
_maxForce float
_target Box2DX.Common.Vec2

Public Methods

Method Description
GetReactionForce ( float inv_dt ) : Vec2
GetReactionTorque ( float inv_dt ) : float
MouseJoint ( MouseJointDef def ) : System
SetTarget ( Vec2 target ) : void

Use this to update the target point.

Private Methods

Method Description
InitVelocityConstraints ( TimeStep step ) : void
SolvePositionConstraints ( float baumgarte ) : bool
SolveVelocityConstraints ( TimeStep step ) : void

Method Details

GetReactionForce() public method

public GetReactionForce ( float inv_dt ) : Vec2
inv_dt float
return Box2DX.Common.Vec2

GetReactionTorque() public method

public GetReactionTorque ( float inv_dt ) : float
inv_dt float
return float

MouseJoint() public method

public MouseJoint ( MouseJointDef def ) : System
def MouseJointDef
return System

SetTarget() public method

Use this to update the target point.
public SetTarget ( Vec2 target ) : void
target Box2DX.Common.Vec2
return void

Property Details

_C public property

public Vec2,Box2DX.Common _C
return Box2DX.Common.Vec2

_beta public property

public float _beta
return float

_dampingRatio public property

public float _dampingRatio
return float

_frequencyHz public property

public float _frequencyHz
return float

_gamma public property

public float _gamma
return float

_impulse public property

public Vec2,Box2DX.Common _impulse
return Box2DX.Common.Vec2

_localAnchor public property

public Vec2,Box2DX.Common _localAnchor
return Box2DX.Common.Vec2

_mass public property

public Mat22,Box2DX.Common _mass
return Box2DX.Common.Mat22

_maxForce public property

public float _maxForce
return float

_target public property

public Vec2,Box2DX.Common _target
return Box2DX.Common.Vec2