Box2D
Safe HaskellNone
LanguageGHC2021

Box2D.PrismaticJoint

Synopsis

Documentation

create :: WorldId -> PrismaticJointDef -> IO JointId Source #

Create a prismatic (slider) joint. See also b2PrismaticJointDef for details.

Binds b2CreatePrismaticJoint.

enableSpring Source #

Arguments

:: JointId 
-> Bool
enableSpring
-> IO () 

Enable/disable the joint spring.

Binds b2PrismaticJoint_EnableSpring.

isSpringEnabled :: JointId -> IO Bool Source #

Is the prismatic joint spring enabled or not?

Binds b2PrismaticJoint_IsSpringEnabled.

setSpringHertz Source #

Arguments

:: JointId 
-> Float
hertz
-> IO () 

Set the prismatic joint stiffness in Hertz. This should usually be less than a quarter of the simulation rate. For example, if the simulation runs at 60Hz then the joint stiffness should be 15Hz or less.

Binds b2PrismaticJoint_SetSpringHertz.

getSpringHertz :: JointId -> IO Float Source #

Get the prismatic joint stiffness in Hertz

Binds b2PrismaticJoint_GetSpringHertz.

setSpringDampingRatio Source #

Arguments

:: JointId 
-> Float
dampingRatio
-> IO () 

Set the prismatic joint damping ratio (non-dimensional)

Binds b2PrismaticJoint_SetSpringDampingRatio.

getSpringDampingRatio :: JointId -> IO Float Source #

Get the prismatic spring damping ratio (non-dimensional)

Binds b2PrismaticJoint_GetSpringDampingRatio.

setTargetTranslation Source #

Arguments

:: JointId 
-> Float
translation
-> IO () 

Set the prismatic joint spring target angle, usually in meters

Binds b2PrismaticJoint_SetTargetTranslation.

getTargetTranslation :: JointId -> IO Float Source #

Get the prismatic joint spring target translation, usually in meters

Binds b2PrismaticJoint_GetTargetTranslation.

enableLimit Source #

Arguments

:: JointId 
-> Bool
enableLimit
-> IO () 

Enable/disable a prismatic joint limit

Binds b2PrismaticJoint_EnableLimit.

isLimitEnabled :: JointId -> IO Bool Source #

Is the prismatic joint limit enabled?

Binds b2PrismaticJoint_IsLimitEnabled.

getLowerLimit :: JointId -> IO Float Source #

Get the prismatic joint lower limit

Binds b2PrismaticJoint_GetLowerLimit.

getUpperLimit :: JointId -> IO Float Source #

Get the prismatic joint upper limit

Binds b2PrismaticJoint_GetUpperLimit.

setLimits Source #

Arguments

:: JointId 
-> Float
lower
-> Float
upper
-> IO () 

Set the prismatic joint limits

Binds b2PrismaticJoint_SetLimits.

enableMotor Source #

Arguments

:: JointId 
-> Bool
enableMotor
-> IO () 

Enable/disable a prismatic joint motor

Binds b2PrismaticJoint_EnableMotor.

isMotorEnabled :: JointId -> IO Bool Source #

Is the prismatic joint motor enabled?

Binds b2PrismaticJoint_IsMotorEnabled.

setMotorSpeed Source #

Arguments

:: JointId 
-> Float
motorSpeed
-> IO () 

Set the prismatic joint motor speed, usually in meters per second

Binds b2PrismaticJoint_SetMotorSpeed.

getMotorSpeed :: JointId -> IO Float Source #

Get the prismatic joint motor speed, usually in meters per second

Binds b2PrismaticJoint_GetMotorSpeed.

setMaxMotorForce Source #

Arguments

:: JointId 
-> Float
force
-> IO () 

Set the prismatic joint maximum motor force, usually in newtons

Binds b2PrismaticJoint_SetMaxMotorForce.

getMaxMotorForce :: JointId -> IO Float Source #

Get the prismatic joint maximum motor force, usually in newtons

Binds b2PrismaticJoint_GetMaxMotorForce.

getMotorForce :: JointId -> IO Float Source #

Get the prismatic joint current motor force, usually in newtons

Binds b2PrismaticJoint_GetMotorForce.

getTranslation :: JointId -> IO Float Source #

Get the current joint translation, usually in meters.

Binds b2PrismaticJoint_GetTranslation.

getSpeed :: JointId -> IO Float Source #

Get the current joint translation speed, usually in meters per second.

Binds b2PrismaticJoint_GetSpeed.