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

Wheel joint definition. More...

Public Member Functions

 WheelJointDef (Body bodyA, Body bodyB, Vec2 anchorA, Vec2 anchorB, Vec2 axisA, bool enableSpring=false, float hertz=0.0f, float dampingRatio=0.0f, bool enableLimit=false, float lowerTranslation=0.0f, float upperTranslation=0.0f, bool enableMotor=false, float maxMotorTorque=0.0f, float motorSpeed=0.0f, bool collideConnected=false, object? userData=null)
 Construct a wheel joint definition with the supplied values.
 
 WheelJointDef ()
 Construct a wheel joint definition with the default values.
 

Properties

ref Body BodyA [get]
 The first attached body.
 
ref Body BodyB [get]
 The second attached body.
 
ref Vec2 LocalAnchorA [get]
 The local anchor point relative to bodyA's origin.
 
ref Vec2 LocalAnchorB [get]
 The local anchor point relative to bodyB's origin.
 
ref Vec2 LocalAxisA [get]
 The local translation unit axis in bodyA.
 
bool EnableSpring [get, set]
 Enable a linear spring along the local axis.
 
ref float Hertz [get]
 Spring stiffness in Hertz.
 
ref float DampingRatio [get]
 Spring damping ratio, non-dimensional.
 
bool EnableLimit [get, set]
 Enable/disable the joint linear limit.
 
ref float LowerTranslation [get]
 The lower translation limit.
 
ref float UpperTranslation [get]
 The upper translation limit.
 
bool EnableMotor [get, set]
 Enable/disable the joint rotational motor.
 
ref float MaxMotorTorque [get]
 The maximum motor torque, typically in newton-meters.
 
ref float MotorSpeed [get]
 The desired motor speed in radians per second.
 
bool CollideConnected [get, set]
 Set this flag to true if the attached bodies should collide.
 
object? UserData [get, set]
 User data.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ WheelJointDef()

Box2D.WheelJointDef.WheelJointDef ( Body  bodyA,
Body  bodyB,
Vec2  anchorA,
Vec2  anchorB,
Vec2  axisA,
bool  enableSpring = false,
float  hertz = 0::0f,
float  dampingRatio = 0::0f,
bool  enableLimit = false,
float  lowerTranslation = 0::0f,
float  upperTranslation = 0::0f,
bool  enableMotor = false,
float  maxMotorTorque = 0::0f,
float  motorSpeed = 0::0f,
bool  collideConnected = false,
object?  userData = null 
)
inline

Construct a wheel joint definition with the supplied values.

Parameters
bodyAThe first attached body
bodyBThe second attached body
anchorAThe local anchor point relative to bodyA's origin
anchorBThe local anchor point relative to bodyB's origin
axisAThe local translation unit axis in bodyA
enableSpringEnable a linear spring along the local axis
hertzSpring stiffness in Hertz
dampingRatioSpring damping ratio, non-dimensional
enableLimitEnable/disable the joint linear limit
lowerTranslationThe lower translation limit
upperTranslationThe upper translation limit
enableMotorEnable/disable the joint rotational motor
maxMotorTorqueThe maximum motor torque, typically in newton-meters
motorSpeedThe desired motor speed in radians per second
collideConnectedSet this flag to true if the attached bodies should collide
userDataUser data

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