| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Box3D.DistanceJoint
Synopsis
- create :: WorldId -> DistanceJointDef -> IO JointId
- setLength :: JointId -> Float -> IO ()
- getLength :: JointId -> IO Float
- enableSpring :: JointId -> Bool -> IO ()
- isSpringEnabled :: JointId -> IO Bool
- setSpringForceRange :: JointId -> Float -> Float -> IO ()
- getSpringForceRange :: JointId -> Ptr Float -> Ptr Float -> IO ()
- setSpringHertz :: JointId -> Float -> IO ()
- setSpringDampingRatio :: JointId -> Float -> IO ()
- getSpringHertz :: JointId -> IO Float
- getSpringDampingRatio :: JointId -> IO Float
- enableLimit :: JointId -> Bool -> IO ()
- isLimitEnabled :: JointId -> IO Bool
- setLengthRange :: JointId -> Float -> Float -> IO ()
- getMinLength :: JointId -> IO Float
- getMaxLength :: JointId -> IO Float
- getCurrentLength :: JointId -> IO Float
- enableMotor :: JointId -> Bool -> IO ()
- isMotorEnabled :: JointId -> IO Bool
- setMotorSpeed :: JointId -> Float -> IO ()
- getMotorSpeed :: JointId -> IO Float
- setMaxMotorForce :: JointId -> Float -> IO ()
- getMaxMotorForce :: JointId -> IO Float
- getMotorForce :: JointId -> IO Float
Documentation
create :: WorldId -> DistanceJointDef -> IO JointId Source #
Create a distance joint See also b3DistanceJointDef for details.
Binds b3CreateDistanceJoint.
Arguments
| :: JointId |
|
| -> Float |
|
| -> 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.
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.
Set the force range for the spring.
Binds b3DistanceJoint_SetSpringForceRange.
Get the force range for the spring.
Binds b3DistanceJoint_GetSpringForceRange.
Set the spring stiffness in Hertz
Binds b3DistanceJoint_SetSpringHertz.
setSpringDampingRatio Source #
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.
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.
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.
Enable/disable the distance joint motor
Binds b3DistanceJoint_EnableMotor.
isMotorEnabled :: JointId -> IO Bool Source #
Is the distance joint motor enabled?
Binds b3DistanceJoint_IsMotorEnabled.
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.
Set the distance joint maximum motor force, usually in newtons
Binds b3DistanceJoint_SetMaxMotorForce.