| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Box2D.RevoluteJoint
Synopsis
- create :: WorldId -> RevoluteJointDef -> IO JointId
- enableSpring :: JointId -> Bool -> IO ()
- isSpringEnabled :: JointId -> IO Bool
- setSpringHertz :: JointId -> Float -> IO ()
- getSpringHertz :: JointId -> IO Float
- setSpringDampingRatio :: JointId -> Float -> IO ()
- getSpringDampingRatio :: JointId -> IO Float
- setTargetAngle :: JointId -> Float -> IO ()
- getTargetAngle :: JointId -> IO Float
- getAngle :: JointId -> IO Float
- enableLimit :: JointId -> Bool -> IO ()
- isLimitEnabled :: JointId -> IO Bool
- getLowerLimit :: JointId -> IO Float
- getUpperLimit :: JointId -> IO Float
- setLimits :: JointId -> Float -> Float -> IO ()
- enableMotor :: JointId -> Bool -> IO ()
- isMotorEnabled :: JointId -> IO Bool
- setMotorSpeed :: JointId -> Float -> IO ()
- getMotorSpeed :: JointId -> IO Float
- getMotorTorque :: JointId -> IO Float
- setMaxMotorTorque :: JointId -> Float -> IO ()
- getMaxMotorTorque :: JointId -> IO Float
Documentation
create :: WorldId -> RevoluteJointDef -> IO JointId Source #
Create a revolute joint See also b2RevoluteJointDef for details.
Binds b2CreateRevoluteJoint.
Enable/disable the revolute joint spring
Binds b2RevoluteJoint_EnableSpring.
isSpringEnabled :: JointId -> IO Bool Source #
It the revolute angular spring enabled?
Binds b2RevoluteJoint_IsSpringEnabled.
Set the revolute joint spring stiffness in Hertz
Binds b2RevoluteJoint_SetSpringHertz.
getSpringHertz :: JointId -> IO Float Source #
Get the revolute joint spring stiffness in Hertz
Binds b2RevoluteJoint_GetSpringHertz.
setSpringDampingRatio Source #
Set the revolute joint spring damping ratio, non-dimensional
Binds b2RevoluteJoint_SetSpringDampingRatio.
getSpringDampingRatio :: JointId -> IO Float Source #
Get the revolute joint spring damping ratio, non-dimensional
Binds b2RevoluteJoint_GetSpringDampingRatio.
Set the revolute joint spring target angle, radians
Binds b2RevoluteJoint_SetTargetAngle.
getTargetAngle :: JointId -> IO Float Source #
Get the revolute joint spring target angle, radians
Binds b2RevoluteJoint_GetTargetAngle.
getAngle :: JointId -> IO Float Source #
Get the revolute joint current angle in radians relative to the reference angle See also b2RevoluteJointDef::referenceAngle.
Binds b2RevoluteJoint_GetAngle.
Enable/disable the revolute joint limit
Binds b2RevoluteJoint_EnableLimit.
isLimitEnabled :: JointId -> IO Bool Source #
Is the revolute joint limit enabled?
Binds b2RevoluteJoint_IsLimitEnabled.
getLowerLimit :: JointId -> IO Float Source #
Get the revolute joint lower limit in radians
Binds b2RevoluteJoint_GetLowerLimit.
getUpperLimit :: JointId -> IO Float Source #
Get the revolute joint upper limit in radians
Binds b2RevoluteJoint_GetUpperLimit.
Set the revolute joint limits in radians. It is expected that lower <= upper and that -0.99 * B2_PI <= lower && upper <= -0.99 * B2_PI.
Binds b2RevoluteJoint_SetLimits.
Enable/disable a revolute joint motor
Binds b2RevoluteJoint_EnableMotor.
isMotorEnabled :: JointId -> IO Bool Source #
Is the revolute joint motor enabled?
Binds b2RevoluteJoint_IsMotorEnabled.
Set the revolute joint motor speed in radians per second
Binds b2RevoluteJoint_SetMotorSpeed.
getMotorSpeed :: JointId -> IO Float Source #
Get the revolute joint motor speed in radians per second
Binds b2RevoluteJoint_GetMotorSpeed.
getMotorTorque :: JointId -> IO Float Source #
Get the revolute joint current motor torque, usually in newton-meters
Binds b2RevoluteJoint_GetMotorTorque.
Set the revolute joint maximum motor torque, usually in newton-meters
Binds b2RevoluteJoint_SetMaxMotorTorque.