Box2D
Safe HaskellNone
LanguageGHC2021

Box2D.RevoluteJoint

Synopsis

Documentation

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

Create a revolute joint See also b2RevoluteJointDef for details.

Binds b2CreateRevoluteJoint.

enableSpring Source #

Arguments

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

Enable/disable the revolute joint spring

Binds b2RevoluteJoint_EnableSpring.

isSpringEnabled :: JointId -> IO Bool Source #

It the revolute angular spring enabled?

Binds b2RevoluteJoint_IsSpringEnabled.

setSpringHertz Source #

Arguments

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

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 #

Arguments

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

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.

setTargetAngle Source #

Arguments

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

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.

enableLimit Source #

Arguments

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

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.

setLimits Source #

Arguments

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

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.

enableMotor Source #

Arguments

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

Enable/disable a revolute joint motor

Binds b2RevoluteJoint_EnableMotor.

isMotorEnabled :: JointId -> IO Bool Source #

Is the revolute joint motor enabled?

Binds b2RevoluteJoint_IsMotorEnabled.

setMotorSpeed Source #

Arguments

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

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.

setMaxMotorTorque Source #

Arguments

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

Set the revolute joint maximum motor torque, usually in newton-meters

Binds b2RevoluteJoint_SetMaxMotorTorque.

getMaxMotorTorque :: JointId -> IO Float Source #

Get the revolute joint maximum motor torque, usually in newton-meters

Binds b2RevoluteJoint_GetMaxMotorTorque.