Table of Contents

Class b2RevoluteJoint

Namespace
Gym.Box2D
Assembly
Gym.Environments.dll

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

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

float

LimitEnabled

Whether the limit is enabled (pybox2d's limitEnabled).

public bool LimitEnabled { get; set; }

Property Value

bool

LowerLimit

The lower limit (pybox2d's lowerLimit).

public float LowerLimit { get; set; }

Property Value

float

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

float

MotorEnabled

Whether the motor is enabled (pybox2d's motorEnabled); changing it wakes both bodies.

public bool MotorEnabled { get; set; }

Property Value

bool

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

float

Speed

The joint speed: body B's angular velocity minus body A's (pybox2d's speed).

public float Speed { get; }

Property Value

float

UpperLimit

The upper limit (pybox2d's upperLimit).

public float UpperLimit { get; set; }

Property Value

float

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_dt double

The inverse time step.

Returns

float

The torque in N·m.