Prismatic joint definition
More...
|
| 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 (Body bodyA, Body bodyB, Vec2 localAnchorA, Vec2 localAnchorB, Vec2 localAxisA, float referenceAngle=0.0f, float targetTranslation=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.
|
|
|
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.
|
|
ref float | TargetTranslation [get] |
| The target translation for the joint in meters. The spring-damper will drive to this translation.
|
|
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.
|
|
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.
◆ PrismaticJointDef() [1/2]
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
-
bodyA | The first attached body |
bodyB | The second attached body |
localAnchorA | The local anchor point relative to bodyA's origin |
localAnchorB | The local anchor point relative to bodyB's origin |
localAxisA | The local translation unit axis in bodyA |
referenceAngle | The constrained angle between the bodies: bodyB_angle - bodyA_angle |
enableSpring | Enable a linear spring along the prismatic joint axis |
hertz | The spring stiffness Hertz, cycles per second |
dampingRatio | The spring damping ratio, non-dimensional |
enableLimit | Enable/disable the joint limit |
lowerTranslation | The lower translation limit |
upperTranslation | The upper translation limit |
enableMotor | Enable/disable the joint motor |
maxMotorForce | The maximum motor force, typically in newtons |
motorSpeed | The desired motor speed, typically in meters per second |
collideConnected | Set this flag to true if the attached bodies should collide |
userData | User data |
◆ PrismaticJointDef() [2/2]
Box2D.PrismaticJointDef.PrismaticJointDef |
( |
Body |
bodyA, |
|
|
Body |
bodyB, |
|
|
Vec2 |
localAnchorA, |
|
|
Vec2 |
localAnchorB, |
|
|
Vec2 |
localAxisA, |
|
|
float |
referenceAngle = 0::0f , |
|
|
float |
targetTranslation = 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
-
bodyA | The first attached body |
bodyB | The second attached body |
localAnchorA | The local anchor point relative to bodyA's origin |
localAnchorB | The local anchor point relative to bodyB's origin |
localAxisA | The local translation unit axis in bodyA |
referenceAngle | The constrained angle between the bodies: bodyB_angle - bodyA_angle |
targetTranslation | The target translation along the prismatic joint axis |
enableSpring | Enable a linear spring along the prismatic joint axis |
hertz | The spring stiffness Hertz, cycles per second |
dampingRatio | The spring damping ratio, non-dimensional |
enableLimit | Enable/disable the joint limit |
lowerTranslation | The lower translation limit |
upperTranslation | The upper translation limit |
enableMotor | Enable/disable the joint motor |
maxMotorForce | The maximum motor force, typically in newtons |
motorSpeed | The desired motor speed, typically in meters per second |
collideConnected | Set this flag to true if the attached bodies should collide |
userData | User data |
The documentation for this class was generated from the following file:
- src/Box2DBindings/Defs/PrismaticJointDef.cs