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

A prismatic joint allows for translation along a single axis with no rotation. More...

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

Public Member Functions

unsafe void SetLimits (float lower, float upper)
 Sets the prismatic joint limits.
 
- Public Member Functions inherited from Box2D.Joint
unsafe void Destroy ()
 Destroys this joint.
 
unsafe void WakeBodies ()
 Wakes the bodies connected to this joint.
 
 unsafe (float hertz, float dampingRatio) ConstraintTuning
 Gets or sets the joint constraint tuning in Hertz and damping ratio. Advanced feature.
 

Properties

unsafe bool SpringEnabled [get, set]
 Gets or sets the prismatic joint spring enabled state.
 
unsafe float SpringHertz [get, set]
 The spring frequency in Hertz on this prismatic joint.
 
unsafe float SpringDampingRatio [get, set]
 The spring damping ratio on this prismatic joint.
 
unsafe float TargetTranslation [get, set]
 The prismatic joint spring target translation.
 
unsafe bool LimitEnabled [get, set]
 The limit enabled state of this prismatic joint.
 
unsafe float LowerLimit [get]
 The lower joint limit of this prismatic joint.
 
unsafe float UpperLimit [get]
 The upper joint limit of this prismatic joint.
 
unsafe bool MotorEnabled [get, set]
 The prismatic joint motor enabled state.
 
unsafe float MotorSpeed [get, set]
 The prismatic joint motor speed.
 
unsafe float MaxMotorForce [get, set]
 The prismatic joint maximum motor force.
 
unsafe float MotorForce [get]
 The prismatic joint current motor force.
 
unsafe float Translation [get]
 The current joint translation.
 
unsafe float Speed [get]
 The current joint translation speed.
 
- Properties inherited from Box2D.Joint
unsafe bool Valid [get]
 Checks if this joint is valid.
 
unsafe JointType Type [get]
 Gets the joint type.
 
unsafe Body BodyA [get]
 Gets body A on this joint.
 
unsafe Body BodyB [get]
 Gets body B on this joint.
 
unsafe World World [get]
 Gets the world that owns this joint.
 
unsafe Vec2 LocalAnchorA [get, set]
 The local anchor on body A.
 
unsafe Vec2 LocalAnchorB [get, set]
 The local anchor on body B.
 
unsafe bool CollideConnected [get, set]
 Set this flag to true if the attached bodies should collide.
 
unsafe? object UserData [get, set]
 The user data object for this joint.
 
unsafe Vec2 ConstraintForce [get]
 Gets the current constraint force for this joint.
 
unsafe float ConstraintTorque [get]
 Gets the current constraint torque for this joint.
 
unsafe float LinearSeparation [get]
 Gets the current linear separation error for this joint.
 
unsafe float AngularSeparation [get]
 Gets the current angular separation error for this joint.
 
unsafe float ReferenceAngle [get, set]
 The reference angle in radians for joints that support it.
 
unsafe Vec2 LocalAxisA [get, set]
 The local axis on body A for joints that support it.
 

Detailed Description

A prismatic joint allows for translation along a single axis with no rotation.

The prismatic joint is useful for things like pistons and moving platforms, where you want a body to translate along an axis and have no rotation. Also called a slider joint.

Member Function Documentation

◆ SetLimits()

unsafe void Box2D.PrismaticJoint.SetLimits ( float  lower,
float  upper 
)

Sets the prismatic joint limits.

Parameters
lowerThe lower prismatic joint limit
upperThe upper prismatic joint limit

Property Documentation

◆ SpringEnabled

unsafe bool Box2D.PrismaticJoint.SpringEnabled
getset

Gets or sets the prismatic joint spring enabled state.

Returns
True if the prismatic joint spring is enabled

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