Box2D
Safe HaskellNone
LanguageGHC2021

Box2D.MotorJoint

Synopsis

Documentation

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

Create a motor joint See also b2MotorJointDef for details.

Binds b2CreateMotorJoint.

setLinearVelocity Source #

Arguments

:: JointId 
-> Vec2
velocity
-> IO () 

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 #

Arguments

:: JointId 
-> Ptr Vec2

Result buffer.

-> IO () 

Like getLinearVelocity, but the result is written into a caller-supplied buffer.

setAngularVelocity Source #

Arguments

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

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.

setMaxVelocityForce Source #

Arguments

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

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.

setMaxVelocityTorque Source #

Arguments

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

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.

setLinearHertz Source #

Arguments

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

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 #

Arguments

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

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.

setAngularHertz Source #

Arguments

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

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 #

Arguments

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

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.

setMaxSpringForce Source #

Arguments

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

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.

setMaxSpringTorque Source #

Arguments

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

Set the maximum spring torque in newtons * meters

Binds b2MotorJoint_SetMaxSpringTorque.

getMaxSpringTorque :: JointId -> IO Float Source #

Get the maximum spring torque in newtons * meters

Binds b2MotorJoint_GetMaxSpringTorque.