HughPH.Box2D
Organised dotnet bindings for Box2D 3.1.0
Loading...
Searching...
No Matches
Public Member Functions | Properties | List of all members
Box2D.WheelJoint Class Referencesealed

The wheel joint can be used to simulate wheels on vehicles. More...

Inheritance diagram for Box2D.WheelJoint:
Inheritance graph
[legend]
Collaboration diagram for Box2D.WheelJoint:
Collaboration graph
[legend]

Public Member Functions

void EnableSpring (bool enableSpring)
 Enable/disable the wheel joint spring.
 
void SetLimits (float lower, float upper)
 Set the wheel joint limits.
 
- Public Member Functions inherited from Box2D.Joint
void Destroy ()
 Destroys this joint.
 
void WakeBodies ()
 Wakes the bodies connected to this joint.
 

Properties

bool SpringEnabled [get, set]
 Gets or sets wheel joint spring enabled state.
 
float SpringHertz [get, set]
 Set the wheel joint spring frequency in hertz.
 
float SpringDampingRatio [get, set]
 The wheel joint damping ratio, non-dimensional.
 
bool LimitEnabled [get, set]
 The wheel joint limit enabled flag.
 
float LowerLimit [get]
 The lower wheel joint limit.
 
float UpperLimit [get]
 The upper wheel joint limit.
 
bool MotorEnabled [get, set]
 The wheel joint motor enabled flag.
 
float MotorSpeed [get, set]
 The wheel joint motor speed in radians per second.
 
float MaxMotorTorque [get, set]
 The wheel joint maximum motor torque, usually in newton-meters.
 
float MotorTorque [get]
 The current wheel joint motor torque, usually in newton-meters.
 
- Properties inherited from Box2D.Joint
bool Valid [get]
 Checks if this joint is valid.
 
JointType Type [get]
 Gets the joint type.
 
Body BodyA [get]
 Gets body A on this joint.
 
Body BodyB [get]
 Gets body B on this joint.
 
World World [get]
 Gets the world that owns this joint.
 
Vec2 LocalAnchorA [get]
 Gets the local anchor on body A.
 
Vec2 LocalAnchorB [get]
 Gets the local anchor on body B.
 
bool CollideConnected [get, set]
 Set this flag to true if the attached bodies should collide.
 
object? UserData [get, set]
 The user data object for this joint.
 
Vec2 ConstraintForce [get]
 Gets the current constraint force for this joint.
 
float ConstraintTorque [get]
 Gets the current constraint torque for this joint.
 

Detailed Description

The wheel joint can be used to simulate wheels on vehicles.

The wheel joint restricts body B to move along a local axis in body A. Body B is free to rotate. Supports a linear spring, linear limits, and a rotational motor.

Member Function Documentation

◆ EnableSpring()

void Box2D.WheelJoint.EnableSpring ( bool  enableSpring)

Enable/disable the wheel joint spring.

Parameters
enableSpringTrue to enable the spring, false to disable the spring

◆ SetLimits()

void Box2D.WheelJoint.SetLimits ( float  lower,
float  upper 
)

Set the wheel joint limits.

Parameters
lowerThe lower limit
upperThe upper limit

Property Documentation

◆ SpringEnabled

bool Box2D.WheelJoint.SpringEnabled
getset

Gets or sets wheel joint spring enabled state.

Returns
True if the spring is enabled

The documentation for this class was generated from the following file: