| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Box2D.MotorJoint
Synopsis
- create :: WorldId -> MotorJointDef -> IO JointId
- setLinearVelocity :: JointId -> Vec2 -> IO ()
- getLinearVelocity :: JointId -> IO Vec2
- getLinearVelocityInto :: JointId -> Ptr Vec2 -> IO ()
- setAngularVelocity :: JointId -> Float -> IO ()
- getAngularVelocity :: JointId -> IO Float
- setMaxVelocityForce :: JointId -> Float -> IO ()
- getMaxVelocityForce :: JointId -> IO Float
- setMaxVelocityTorque :: JointId -> Float -> IO ()
- getMaxVelocityTorque :: JointId -> IO Float
- setLinearHertz :: JointId -> Float -> IO ()
- getLinearHertz :: JointId -> IO Float
- setLinearDampingRatio :: JointId -> Float -> IO ()
- getLinearDampingRatio :: JointId -> IO Float
- setAngularHertz :: JointId -> Float -> IO ()
- getAngularHertz :: JointId -> IO Float
- setAngularDampingRatio :: JointId -> Float -> IO ()
- getAngularDampingRatio :: JointId -> IO Float
- setMaxSpringForce :: JointId -> Float -> IO ()
- getMaxSpringForce :: JointId -> IO Float
- setMaxSpringTorque :: JointId -> Float -> IO ()
- getMaxSpringTorque :: JointId -> IO Float
Documentation
create :: WorldId -> MotorJointDef -> IO JointId Source #
Create a motor joint See also b2MotorJointDef for details.
Binds b2CreateMotorJoint.
Set the desired relative linear velocity in meters per second
Binds b2MotorJoint_SetLinearVelocity.
getLinearVelocity :: JointId -> IO Vec2 Source #
Get the desired relative linear velocity in meters per second
Binds b2MotorJoint_GetLinearVelocity.
getLinearVelocityInto Source #
Like getLinearVelocity, but the result is written into a caller-supplied buffer.
Set the desired relative angular velocity in radians per second
Binds b2MotorJoint_SetAngularVelocity.
getAngularVelocity :: JointId -> IO Float Source #
Get the desired relative angular velocity in radians per second
Binds b2MotorJoint_GetAngularVelocity.
Set the motor joint maximum force, usually in newtons
Binds b2MotorJoint_SetMaxVelocityForce.
getMaxVelocityForce :: JointId -> IO Float Source #
Get the motor joint maximum force, usually in newtons
Binds b2MotorJoint_GetMaxVelocityForce.
Set the motor joint maximum torque, usually in newton-meters
Binds b2MotorJoint_SetMaxVelocityTorque.
getMaxVelocityTorque :: JointId -> IO Float Source #
Get the motor joint maximum torque, usually in newton-meters
Binds b2MotorJoint_GetMaxVelocityTorque.
Set the spring linear hertz stiffness
Binds b2MotorJoint_SetLinearHertz.
getLinearHertz :: JointId -> IO Float Source #
Get the spring linear hertz stiffness
Binds b2MotorJoint_GetLinearHertz.
setLinearDampingRatio Source #
Set the spring linear damping ratio. Use 1.0 for critical damping.
Binds b2MotorJoint_SetLinearDampingRatio.
getLinearDampingRatio :: JointId -> IO Float Source #
Get the spring linear damping ratio.
Binds b2MotorJoint_GetLinearDampingRatio.
Set the spring angular hertz stiffness
Binds b2MotorJoint_SetAngularHertz.
getAngularHertz :: JointId -> IO Float Source #
Get the spring angular hertz stiffness
Binds b2MotorJoint_GetAngularHertz.
setAngularDampingRatio Source #
Set the spring angular damping ratio. Use 1.0 for critical damping.
Binds b2MotorJoint_SetAngularDampingRatio.
getAngularDampingRatio :: JointId -> IO Float Source #
Get the spring angular damping ratio.
Binds b2MotorJoint_GetAngularDampingRatio.
Set the maximum spring force in newtons.
Binds b2MotorJoint_SetMaxSpringForce.
getMaxSpringForce :: JointId -> IO Float Source #
Get the maximum spring force in newtons.
Binds b2MotorJoint_GetMaxSpringForce.
Set the maximum spring torque in newtons * meters
Binds b2MotorJoint_SetMaxSpringTorque.