Class b2RevoluteJoint
A revolute joint: a point-to-point constraint at the anchor, with an optional angle limit and an optional motor that drives the relative angular velocity up to a maximum torque. BipedalWalker's and LunarLander's legs are revolute joints.
public sealed class b2RevoluteJoint : b2Joint
- Inheritance
-
b2RevoluteJoint
- Inherited Members
- Extension Methods
Remarks
Reference: Box2D/Dynamics/Joints/b2RevoluteJoint.cpp.
Properties
Angle
The joint angle: body B's angle minus body A's minus the reference angle (pybox2d's angle).
public float Angle { get; }
Property Value
LimitEnabled
Whether the limit is enabled (pybox2d's limitEnabled).
public bool LimitEnabled { get; set; }
Property Value
LowerLimit
The lower limit (pybox2d's lowerLimit).
public float LowerLimit { get; set; }
Property Value
Exceptions
- AssertionError
Thrown by the setter above the upper limit.
MaxMotorTorque
The motor's maximum torque (pybox2d's write-only maxMotorTorque; readable here); setting it wakes both
bodies.
public float MaxMotorTorque { get; set; }
Property Value
MotorEnabled
Whether the motor is enabled (pybox2d's motorEnabled); changing it wakes both bodies.
public bool MotorEnabled { get; set; }
Property Value
MotorSpeed
The motor's target speed (pybox2d's motorSpeed); setting it wakes both bodies, as BipedalWalker's every step does.
public float MotorSpeed { get; set; }
Property Value
Speed
The joint speed: body B's angular velocity minus body A's (pybox2d's speed).
public float Speed { get; }
Property Value
UpperLimit
The upper limit (pybox2d's upperLimit).
public float UpperLimit { get; set; }
Property Value
Exceptions
- AssertionError
Thrown by the setter below the lower limit.
Methods
GetMotorTorque(double)
The motor torque over a step of inverse length inv_dt.
public float GetMotorTorque(double inv_dt)
Parameters
inv_dtdoubleThe inverse time step.
Returns
- float
The torque in N·m.