Package org.jbox2d.dynamics.joints
Class WheelJointDef
- java.lang.Object
-
- org.jbox2d.dynamics.joints.JointDef
-
- org.jbox2d.dynamics.joints.WheelJointDef
-
public class WheelJointDef extends JointDef
Wheel joint definition. This requires defining a line of motion using an axis and an anchor point. The definition uses local anchor points and a local axis so that the initial configuration can violate the constraint slightly. The joint translation is zero when the local anchor points coincide in world space. Using local anchors and a local axis helps when saving and loading a game.
-
-
Field Summary
Fields Modifier and Type Field Description floatdampingRatioSuspension damping ratio, one indicates critical dampingbooleanenableMotorEnable/disable the joint motor.floatfrequencyHzSuspension frequency, zero indicates no suspensionVec2localAnchorAThe local anchor point relative to body1's origin.Vec2localAnchorBThe local anchor point relative to body2's origin.Vec2localAxisAThe local translation axis in body1.floatmaxMotorTorqueThe maximum motor torque, usually in N-m.floatmotorSpeedThe desired motor speed in radians per second.
-
Constructor Summary
Constructors Constructor Description WheelJointDef()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinitialize(Body b1, Body b2, Vec2 anchor, Vec2 axis)
-
-
-
Field Detail
-
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.
-
localAxisA
public final Vec2 localAxisA
The local translation axis in body1.
-
enableMotor
public boolean enableMotor
Enable/disable the joint motor.
-
maxMotorTorque
public float maxMotorTorque
The maximum motor torque, usually in N-m.
-
motorSpeed
public float motorSpeed
The desired motor speed in radians per second.
-
frequencyHz
public float frequencyHz
Suspension frequency, zero indicates no suspension
-
dampingRatio
public float dampingRatio
Suspension damping ratio, one indicates critical damping
-
-