public class WeldJointDef

  1. Object
  2. JointDef
  3. WeldJointDef

Fields

public final Vec2 localAnchorAThe local anchor point relative to body1’s origin.
public final Vec2 localAnchorBThe local anchor point relative to body2’s origin.
public float referenceAngleThe body2 angle minus body1 angle in the reference state (radians).
public float frequencyHzThe mass-spring-damper frequency in Hertz.
public float dampingRatioThe damping ratio.

Constructors

public WeldJointDef()

Methods

public void initialize(Body bA, Body bB, Vec2 anchor)Initialize the bodies, anchors, and reference angle using a world anchor point.

Inherited fields

Inherited methods

Field details

localAnchorA

public final Vec2 localAnchorA
The local anchor point relative to body1’s origin.

localAnchorB

public final Vec2 localAnchorB
The local anchor point relative to body2’s origin.

referenceAngle

public float referenceAngle
The body2 angle minus body1 angle in the reference state (radians).

frequencyHz

public float frequencyHz
The mass-spring-damper frequency in Hertz. Rotation only. Disable softness with a value of 0.

dampingRatio

public float dampingRatio
The damping ratio. 0 = no damping, 1 = critical damping.

Constructor details

WeldJointDef

public WeldJointDef()

Method details

initialize

public void initialize(Body bA, Body bB, Vec2 anchor)
Initialize the bodies, anchors, and reference angle using a world anchor point.