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

Prismatic joint definition
More...

Public Member Functions

 PrismaticJointDef (Body bodyA, Body bodyB, Vec2 localAnchorA, Vec2 localAnchorB, Vec2 localAxisA, float referenceAngle=0.0f, 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 maxMotorForce=0.0f, float motorSpeed=0.0f, bool collideConnected=false, object? userData=null)
 Construct a prismatic joint definition with the supplied values.
 
 PrismaticJointDef ()
 Construct a prismatic 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.
 
ref float ReferenceAngle [get]
 The constrained angle between the bodies: bodyB_angle - bodyA_angle.
 
bool EnableSpring [get, set]
 Enable a linear spring along the prismatic joint axis.
 
ref float Hertz [get]
 The spring stiffness Hertz, cycles per second.
 
ref float DampingRatio [get]
 The spring damping ratio, non-dimensional.
 
bool EnableLimit [get, set]
 Enable/disable the joint 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 motor.
 
ref float MaxMotorForce [get]
 The maximum motor force, typically in newtons.
 
ref float MotorSpeed [get]
 The desired motor speed, typically in meters 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

Prismatic 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

◆ PrismaticJointDef()

Box2D.PrismaticJointDef.PrismaticJointDef ( Body  bodyA,
Body  bodyB,
Vec2  localAnchorA,
Vec2  localAnchorB,
Vec2  localAxisA,
float  referenceAngle = 0::0f,
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  maxMotorForce = 0::0f,
float  motorSpeed = 0::0f,
bool  collideConnected = false,
object?  userData = null 
)
inline

Construct a prismatic joint definition with the supplied values.

Parameters
bodyAThe first attached body
bodyBThe second attached body
localAnchorAThe local anchor point relative to bodyA's origin
localAnchorBThe local anchor point relative to bodyB's origin
localAxisAThe local translation unit axis in bodyA
referenceAngleThe constrained angle between the bodies: bodyB_angle - bodyA_angle
enableSpringEnable a linear spring along the prismatic joint axis
hertzThe spring stiffness Hertz, cycles per second
dampingRatioThe spring damping ratio, non-dimensional
enableLimitEnable/disable the joint limit
lowerTranslationThe lower translation limit
upperTranslationThe upper translation limit
enableMotorEnable/disable the joint motor
maxMotorForceThe maximum motor force, typically in newtons
motorSpeedThe desired motor speed, typically in meters 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: