Box3D
Safe HaskellNone
LanguageGHC2021

Box3D.Joint

Synopsis

Documentation

destroy Source #

Arguments

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

Destroy a joint

Binds b3DestroyJoint.

isValid :: JointId -> IO Bool Source #

Joint identifier validation. Provides validation for up to 64K allocations.

Binds b3Joint_IsValid.

getType :: JointId -> IO JointType Source #

Get the joint type

Binds b3Joint_GetType.

getBodyA :: JointId -> IO BodyId Source #

Get body A id on a joint

Binds b3Joint_GetBodyA.

getBodyB :: JointId -> IO BodyId Source #

Get body B id on a joint

Binds b3Joint_GetBodyB.

getWorld :: JointId -> IO WorldId Source #

Get the world that owns this joint

Binds b3Joint_GetWorld.

setLocalFrameA Source #

Arguments

:: JointId 
-> Transform
localFrame
-> IO () 

Set the local frame on bodyA

Binds b3Joint_SetLocalFrameA.

getLocalFrameA :: JointId -> IO Transform Source #

Get the local frame on bodyA

Binds b3Joint_GetLocalFrameA.

getLocalFrameAInto Source #

Arguments

:: JointId 
-> Ptr Transform

Result buffer.

-> IO () 

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

setLocalFrameB Source #

Arguments

:: JointId 
-> Transform
localFrame
-> IO () 

Set the local frame on bodyB

Binds b3Joint_SetLocalFrameB.

getLocalFrameB :: JointId -> IO Transform Source #

Get the local frame on bodyB

Binds b3Joint_GetLocalFrameB.

getLocalFrameBInto Source #

Arguments

:: JointId 
-> Ptr Transform

Result buffer.

-> IO () 

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

setCollideConnected Source #

Arguments

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

Toggle collision between connected bodies

Binds b3Joint_SetCollideConnected.

getCollideConnected :: JointId -> IO Bool Source #

Is collision allowed between connected bodies?

Binds b3Joint_GetCollideConnected.

setUserData Source #

Arguments

:: JointId 
-> Ptr ()
userData
-> IO () 

Set the user data on a joint

Binds b3Joint_SetUserData.

getUserData :: JointId -> IO (Ptr ()) Source #

Get the user data on a joint

Binds b3Joint_GetUserData.

wakeBodies :: JointId -> IO () Source #

Wake the bodies connect to this joint

Binds b3Joint_WakeBodies.

getConstraintForce :: JointId -> IO Vec3 Source #

Get the current constraint force for this joint

Binds b3Joint_GetConstraintForce.

getConstraintForceInto Source #

Arguments

:: JointId 
-> Ptr Vec3

Result buffer.

-> IO () 

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

getConstraintTorque :: JointId -> IO Vec3 Source #

Get the current constraint torque for this joint

Binds b3Joint_GetConstraintTorque.

getConstraintTorqueInto Source #

Arguments

:: JointId 
-> Ptr Vec3

Result buffer.

-> IO () 

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

getLinearSeparation :: JointId -> IO Float Source #

Get the current linear separation error for this joint. Does not consider admissible movement. Usually in meters.

Binds b3Joint_GetLinearSeparation.

getAngularSeparation :: JointId -> IO Float Source #

Get the current angular separation error for this joint. Does not consider admissible movement. Usually in radians.

Binds b3Joint_GetAngularSeparation.

setConstraintTuning Source #

Arguments

:: JointId

jointId: the joint

-> Float

hertz: the stiffness in Hertz (cycles per second)

-> Float

dampingRatio: the non-dimensional damping ratio (one for critical damping)

-> IO () 

Set the joint constraint tuning. Advanced feature.

Binds b3Joint_SetConstraintTuning.

getConstraintTuning Source #

Arguments

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

Get the joint constraint tuning. Advanced feature.

Binds b3Joint_GetConstraintTuning.

setForceThreshold Source #

Arguments

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

Set the force threshold for joint events (Newtons)

Binds b3Joint_SetForceThreshold.

getForceThreshold :: JointId -> IO Float Source #

Get the force threshold for joint events (Newtons)

Binds b3Joint_GetForceThreshold.

setTorqueThreshold Source #

Arguments

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

Set the torque threshold for joint events (N-m)

Binds b3Joint_SetTorqueThreshold.

getTorqueThreshold :: JointId -> IO Float Source #

Get the torque threshold for joint events (N-m)

Binds b3Joint_GetTorqueThreshold.