Box3D
Safe HaskellNone
LanguageGHC2021

Box3D.DistanceJoint

Synopsis

Documentation

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

Create a distance joint See also b3DistanceJointDef for details.

Binds b3CreateDistanceJoint.

setLength Source #

Arguments

:: JointId

jointId: The id for a distance joint

-> Float

length: The new distance joint length

-> IO () 

Set the rest length of a distance joint

Binds b3DistanceJoint_SetLength.

getLength :: JointId -> IO Float Source #

Get the rest length of a distance joint

Binds b3DistanceJoint_GetLength.

enableSpring Source #

Arguments

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

Enable/disable the distance joint spring. When disabled the distance joint is rigid.

Binds b3DistanceJoint_EnableSpring.

isSpringEnabled :: JointId -> IO Bool Source #

Is the distance joint spring enabled?

Binds b3DistanceJoint_IsSpringEnabled.

setSpringForceRange Source #

Arguments

:: JointId 
-> Float
lowerForce
-> Float
upperForce
-> IO () 

Set the force range for the spring.

Binds b3DistanceJoint_SetSpringForceRange.

getSpringForceRange Source #

Arguments

:: JointId 
-> Ptr Float
lowerForce
-> Ptr Float
upperForce
-> IO () 

Get the force range for the spring.

Binds b3DistanceJoint_GetSpringForceRange.

setSpringHertz Source #

Arguments

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

Set the spring stiffness in Hertz

Binds b3DistanceJoint_SetSpringHertz.

setSpringDampingRatio Source #

Arguments

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

Set the spring damping ratio, non-dimensional

Binds b3DistanceJoint_SetSpringDampingRatio.

getSpringHertz :: JointId -> IO Float Source #

Get the spring Hertz

Binds b3DistanceJoint_GetSpringHertz.

getSpringDampingRatio :: JointId -> IO Float Source #

Get the spring damping ratio

Binds b3DistanceJoint_GetSpringDampingRatio.

enableLimit Source #

Arguments

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

Enable joint limit. The limit only works if the joint spring is enabled. Otherwise the joint is rigid and the limit has no effect.

Binds b3DistanceJoint_EnableLimit.

isLimitEnabled :: JointId -> IO Bool Source #

Is the distance joint limit enabled?

Binds b3DistanceJoint_IsLimitEnabled.

setLengthRange Source #

Arguments

:: JointId 
-> Float
minLength
-> Float
maxLength
-> IO () 

Set the minimum and maximum length parameters of a distance joint

Binds b3DistanceJoint_SetLengthRange.

getMinLength :: JointId -> IO Float Source #

Get the distance joint minimum length

Binds b3DistanceJoint_GetMinLength.

getMaxLength :: JointId -> IO Float Source #

Get the distance joint maximum length

Binds b3DistanceJoint_GetMaxLength.

getCurrentLength :: JointId -> IO Float Source #

Get the current length of a distance joint

Binds b3DistanceJoint_GetCurrentLength.

enableMotor Source #

Arguments

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

Enable/disable the distance joint motor

Binds b3DistanceJoint_EnableMotor.

isMotorEnabled :: JointId -> IO Bool Source #

Is the distance joint motor enabled?

Binds b3DistanceJoint_IsMotorEnabled.

setMotorSpeed Source #

Arguments

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

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

Binds b3DistanceJoint_SetMotorSpeed.

getMotorSpeed :: JointId -> IO Float Source #

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

Binds b3DistanceJoint_GetMotorSpeed.

setMaxMotorForce Source #

Arguments

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

Set the distance joint maximum motor force, usually in newtons

Binds b3DistanceJoint_SetMaxMotorForce.

getMaxMotorForce :: JointId -> IO Float Source #

Get the distance joint maximum motor force, usually in newtons

Binds b3DistanceJoint_GetMaxMotorForce.

getMotorForce :: JointId -> IO Float Source #

Get the distance joint current motor force, usually in newtons

Binds b3DistanceJoint_GetMotorForce.