module Box3D.World
( create
, destroy
, isValid
, step
, draw
, getBounds
, getBoundsInto
, getBodyEvents
, getBodyEventsInto
, getSensorEvents
, getSensorEventsInto
, getContactEvents
, getContactEventsInto
, getJointEvents
, getJointEventsInto
, overlapAABB
, overlapShape
, castRay
, castRayClosest
, castShape
, castMover
, collideMover
, enableSleeping
, isSleepingEnabled
, enableContinuous
, isContinuousEnabled
, setRestitutionThreshold
, getRestitutionThreshold
, setHitEventThreshold
, getHitEventThreshold
, setCustomFilterCallback
, setPreSolveCallback
, setGravity
, getGravity
, getGravityInto
, explode
, setContactTuning
, setContactRecycleDistance
, getContactRecycleDistance
, setMaximumLinearSpeed
, getMaximumLinearSpeed
, enableWarmStarting
, isWarmStartingEnabled
, getAwakeBodyCount
, getProfile
, getCounters
, getMaxCapacity
, getMaxCapacityInto
, setUserData
, getUserData
, setFrictionCallback
, setRestitutionCallback
, setWorkerCount
, getWorkerCount
, dumpMemoryStats
, dumpShapeBounds
, rebuildStaticTree
, enableSpeculative
, dumpAwake
, dump
, startRecording
, stopRecording
)
where
import Foreign
import Foreign.C.Types (CBool(..), CInt(..))
import Data.Coerce (coerce)
import Box3D.Id (WorldId(..))
import Box3D.MathTypes (AABB, Pos, Vec3)
import Box3D.Tags (CastResultFcn, Counters, CustomFilterFcn, DebugDraw, FrictionCallback, MoverFilterFcn, OverlapResultFcn, PlaneResultFcn, PreSolveFcn, Profile, Recording, RestitutionCallback, ShapeProxy)
import Box3D.Types (BodyEvents, BodyType(..), Capacity, Capsule, ContactEvents, ExplosionDef, JointEvents, QueryFilter, RayResult, SensorEvents, TreeStats, WorldDef)
foreign import ccall unsafe "b3CreateWorld"
c_b3CreateWorld :: Ptr WorldDef -> IO WorldId
foreign import ccall unsafe "b3DestroyWorld"
c_b3DestroyWorld :: WorldId -> IO ()
foreign import ccall unsafe "b3World_IsValid"
c_b3World_IsValid :: WorldId -> IO CBool
foreign import ccall safe "b3World_Step"
c_b3World_Step :: WorldId -> Float -> CInt -> IO ()
foreign import ccall unsafe "b3World_Draw"
c_b3World_Draw :: WorldId -> Ptr DebugDraw -> Word64 -> IO ()
foreign import ccall unsafe "hsg_b3World_GetBounds"
c_b3World_GetBounds :: WorldId -> Ptr AABB -> IO ()
foreign import ccall unsafe "hsg_b3World_GetBodyEvents"
c_b3World_GetBodyEvents :: WorldId -> Ptr BodyEvents -> IO ()
foreign import ccall unsafe "hsg_b3World_GetSensorEvents"
c_b3World_GetSensorEvents :: WorldId -> Ptr SensorEvents -> IO ()
foreign import ccall unsafe "hsg_b3World_GetContactEvents"
c_b3World_GetContactEvents :: WorldId -> Ptr ContactEvents -> IO ()
foreign import ccall unsafe "hsg_b3World_GetJointEvents"
c_b3World_GetJointEvents :: WorldId -> Ptr JointEvents -> IO ()
foreign import ccall safe "hsg_b3World_OverlapAABB"
c_b3World_OverlapAABB :: WorldId -> Ptr AABB -> Ptr QueryFilter -> FunPtr OverlapResultFcn -> Ptr () -> Ptr TreeStats -> IO ()
foreign import ccall safe "hsg_b3World_OverlapShape"
c_b3World_OverlapShape :: WorldId -> Ptr Pos -> Ptr ShapeProxy -> Ptr QueryFilter -> FunPtr OverlapResultFcn -> Ptr () -> Ptr TreeStats -> IO ()
foreign import ccall safe "hsg_b3World_CastRay"
c_b3World_CastRay :: WorldId -> Ptr Pos -> Ptr Vec3 -> Ptr QueryFilter -> FunPtr CastResultFcn -> Ptr () -> Ptr TreeStats -> IO ()
foreign import ccall unsafe "hsg_b3World_CastRayClosest"
c_b3World_CastRayClosest :: WorldId -> Ptr Pos -> Ptr Vec3 -> Ptr QueryFilter -> Ptr RayResult -> IO ()
foreign import ccall safe "hsg_b3World_CastShape"
c_b3World_CastShape :: WorldId -> Ptr Pos -> Ptr ShapeProxy -> Ptr Vec3 -> Ptr QueryFilter -> FunPtr CastResultFcn -> Ptr () -> Ptr TreeStats -> IO ()
foreign import ccall safe "hsg_b3World_CastMover"
c_b3World_CastMover :: WorldId -> Ptr Pos -> Ptr Capsule -> Ptr Vec3 -> Ptr QueryFilter -> FunPtr MoverFilterFcn -> Ptr () -> IO Float
foreign import ccall safe "hsg_b3World_CollideMover"
c_b3World_CollideMover :: WorldId -> Ptr Pos -> Ptr Capsule -> Ptr QueryFilter -> FunPtr PlaneResultFcn -> Ptr () -> IO ()
foreign import ccall unsafe "b3World_EnableSleeping"
c_b3World_EnableSleeping :: WorldId -> CBool -> IO ()
foreign import ccall unsafe "b3World_IsSleepingEnabled"
c_b3World_IsSleepingEnabled :: WorldId -> IO CBool
foreign import ccall unsafe "b3World_EnableContinuous"
c_b3World_EnableContinuous :: WorldId -> CBool -> IO ()
foreign import ccall unsafe "b3World_IsContinuousEnabled"
c_b3World_IsContinuousEnabled :: WorldId -> IO CBool
foreign import ccall unsafe "b3World_SetRestitutionThreshold"
c_b3World_SetRestitutionThreshold :: WorldId -> Float -> IO ()
foreign import ccall unsafe "b3World_GetRestitutionThreshold"
c_b3World_GetRestitutionThreshold :: WorldId -> IO Float
foreign import ccall unsafe "b3World_SetHitEventThreshold"
c_b3World_SetHitEventThreshold :: WorldId -> Float -> IO ()
foreign import ccall unsafe "b3World_GetHitEventThreshold"
c_b3World_GetHitEventThreshold :: WorldId -> IO Float
foreign import ccall safe "b3World_SetCustomFilterCallback"
c_b3World_SetCustomFilterCallback :: WorldId -> FunPtr CustomFilterFcn -> Ptr () -> IO ()
foreign import ccall safe "b3World_SetPreSolveCallback"
c_b3World_SetPreSolveCallback :: WorldId -> FunPtr PreSolveFcn -> Ptr () -> IO ()
foreign import ccall unsafe "hsg_b3World_SetGravity"
c_b3World_SetGravity :: WorldId -> Ptr Vec3 -> IO ()
foreign import ccall unsafe "hsg_b3World_GetGravity"
c_b3World_GetGravity :: WorldId -> Ptr Vec3 -> IO ()
foreign import ccall unsafe "b3World_Explode"
c_b3World_Explode :: WorldId -> Ptr ExplosionDef -> IO ()
foreign import ccall unsafe "b3World_SetContactTuning"
c_b3World_SetContactTuning :: WorldId -> Float -> Float -> Float -> IO ()
foreign import ccall unsafe "b3World_SetContactRecycleDistance"
c_b3World_SetContactRecycleDistance :: WorldId -> Float -> IO ()
foreign import ccall unsafe "b3World_GetContactRecycleDistance"
c_b3World_GetContactRecycleDistance :: WorldId -> IO Float
foreign import ccall unsafe "b3World_SetMaximumLinearSpeed"
c_b3World_SetMaximumLinearSpeed :: WorldId -> Float -> IO ()
foreign import ccall unsafe "b3World_GetMaximumLinearSpeed"
c_b3World_GetMaximumLinearSpeed :: WorldId -> IO Float
foreign import ccall unsafe "b3World_EnableWarmStarting"
c_b3World_EnableWarmStarting :: WorldId -> CBool -> IO ()
foreign import ccall unsafe "b3World_IsWarmStartingEnabled"
c_b3World_IsWarmStartingEnabled :: WorldId -> IO CBool
foreign import ccall unsafe "b3World_GetAwakeBodyCount"
c_b3World_GetAwakeBodyCount :: WorldId -> IO CInt
foreign import ccall unsafe "hsg_b3World_GetProfile"
c_b3World_GetProfile :: WorldId -> Ptr Profile -> IO ()
foreign import ccall unsafe "hsg_b3World_GetCounters"
c_b3World_GetCounters :: WorldId -> Ptr Counters -> IO ()
foreign import ccall unsafe "hsg_b3World_GetMaxCapacity"
c_b3World_GetMaxCapacity :: WorldId -> Ptr Capacity -> IO ()
foreign import ccall unsafe "b3World_SetUserData"
c_b3World_SetUserData :: WorldId -> Ptr () -> IO ()
foreign import ccall unsafe "b3World_GetUserData"
c_b3World_GetUserData :: WorldId -> IO (Ptr ())
foreign import ccall safe "b3World_SetFrictionCallback"
c_b3World_SetFrictionCallback :: WorldId -> FunPtr FrictionCallback -> IO ()
foreign import ccall safe "b3World_SetRestitutionCallback"
c_b3World_SetRestitutionCallback :: WorldId -> FunPtr RestitutionCallback -> IO ()
foreign import ccall unsafe "b3World_SetWorkerCount"
c_b3World_SetWorkerCount :: WorldId -> CInt -> IO ()
foreign import ccall unsafe "b3World_GetWorkerCount"
c_b3World_GetWorkerCount :: WorldId -> IO CInt
foreign import ccall unsafe "b3World_DumpMemoryStats"
c_b3World_DumpMemoryStats :: WorldId -> IO ()
foreign import ccall unsafe "b3World_DumpShapeBounds"
c_b3World_DumpShapeBounds :: WorldId -> CInt -> IO ()
foreign import ccall unsafe "b3World_RebuildStaticTree"
c_b3World_RebuildStaticTree :: WorldId -> IO ()
foreign import ccall unsafe "b3World_EnableSpeculative"
c_b3World_EnableSpeculative :: WorldId -> CBool -> IO ()
foreign import ccall unsafe "b3World_DumpAwake"
c_b3World_DumpAwake :: WorldId -> IO ()
foreign import ccall unsafe "b3World_Dump"
c_b3World_Dump :: WorldId -> IO ()
foreign import ccall unsafe "b3World_StartRecording"
c_b3World_StartRecording :: WorldId -> Ptr Recording -> IO ()
foreign import ccall unsafe "b3World_StopRecording"
c_b3World_StopRecording :: WorldId -> IO ()
create
:: WorldDef
-> IO WorldId
create :: WorldDef -> IO WorldId
create WorldDef
a0 =
WorldDef -> (Ptr WorldDef -> IO WorldId) -> IO WorldId
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with WorldDef
a0 ((Ptr WorldDef -> IO WorldId) -> IO WorldId)
-> (Ptr WorldDef -> IO WorldId) -> IO WorldId
forall a b. (a -> b) -> a -> b
$ \Ptr WorldDef
p0 ->
Ptr WorldDef -> IO WorldId
c_b3CreateWorld Ptr WorldDef
p0
destroy
:: WorldId
-> IO ()
destroy :: WorldId -> IO ()
destroy WorldId
a0 =
WorldId -> IO ()
c_b3DestroyWorld WorldId
a0
isValid
:: WorldId
-> IO Bool
isValid :: WorldId -> IO Bool
isValid WorldId
a0 =
CBool -> Bool
forall a. (Eq a, Num a) => a -> Bool
toBool (CBool -> Bool) -> IO CBool -> IO Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (WorldId -> IO CBool
c_b3World_IsValid WorldId
a0)
step
:: WorldId
-> Float
-> Int
-> IO ()
step :: WorldId -> Float -> Int -> IO ()
step WorldId
a0 Float
a1 Int
a2 =
WorldId -> Float -> CInt -> IO ()
c_b3World_Step WorldId
a0 Float
a1 (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
a2)
draw
:: WorldId
-> Ptr DebugDraw
-> Word64
-> IO ()
draw :: WorldId -> Ptr DebugDraw -> Word64 -> IO ()
draw WorldId
a0 Ptr DebugDraw
a1 Word64
a2 =
WorldId -> Ptr DebugDraw -> Word64 -> IO ()
c_b3World_Draw WorldId
a0 Ptr DebugDraw
a1 Word64
a2
getBounds
:: WorldId
-> IO AABB
getBounds :: WorldId -> IO AABB
getBounds WorldId
a0 =
(Ptr AABB -> IO AABB) -> IO AABB
forall a b. Storable a => (Ptr a -> IO b) -> IO b
alloca ((Ptr AABB -> IO AABB) -> IO AABB)
-> (Ptr AABB -> IO AABB) -> IO AABB
forall a b. (a -> b) -> a -> b
$ \Ptr AABB
pOut -> WorldId -> Ptr AABB -> IO ()
c_b3World_GetBounds WorldId
a0 Ptr AABB
pOut IO () -> IO AABB -> IO AABB
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Ptr AABB -> IO AABB
forall a. Storable a => Ptr a -> IO a
peek Ptr AABB
pOut
getBoundsInto
:: WorldId
-> Ptr AABB
-> IO ()
getBoundsInto :: WorldId -> Ptr AABB -> IO ()
getBoundsInto WorldId
a0 Ptr AABB
out =
WorldId -> Ptr AABB -> IO ()
c_b3World_GetBounds WorldId
a0 Ptr AABB
out
getBodyEvents
:: WorldId
-> IO BodyEvents
getBodyEvents :: WorldId -> IO BodyEvents
getBodyEvents WorldId
a0 =
(Ptr BodyEvents -> IO BodyEvents) -> IO BodyEvents
forall a b. Storable a => (Ptr a -> IO b) -> IO b
alloca ((Ptr BodyEvents -> IO BodyEvents) -> IO BodyEvents)
-> (Ptr BodyEvents -> IO BodyEvents) -> IO BodyEvents
forall a b. (a -> b) -> a -> b
$ \Ptr BodyEvents
pOut -> WorldId -> Ptr BodyEvents -> IO ()
c_b3World_GetBodyEvents WorldId
a0 Ptr BodyEvents
pOut IO () -> IO BodyEvents -> IO BodyEvents
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Ptr BodyEvents -> IO BodyEvents
forall a. Storable a => Ptr a -> IO a
peek Ptr BodyEvents
pOut
getBodyEventsInto
:: WorldId
-> Ptr BodyEvents
-> IO ()
getBodyEventsInto :: WorldId -> Ptr BodyEvents -> IO ()
getBodyEventsInto WorldId
a0 Ptr BodyEvents
out =
WorldId -> Ptr BodyEvents -> IO ()
c_b3World_GetBodyEvents WorldId
a0 Ptr BodyEvents
out
getSensorEvents
:: WorldId
-> IO SensorEvents
getSensorEvents :: WorldId -> IO SensorEvents
getSensorEvents WorldId
a0 =
(Ptr SensorEvents -> IO SensorEvents) -> IO SensorEvents
forall a b. Storable a => (Ptr a -> IO b) -> IO b
alloca ((Ptr SensorEvents -> IO SensorEvents) -> IO SensorEvents)
-> (Ptr SensorEvents -> IO SensorEvents) -> IO SensorEvents
forall a b. (a -> b) -> a -> b
$ \Ptr SensorEvents
pOut -> WorldId -> Ptr SensorEvents -> IO ()
c_b3World_GetSensorEvents WorldId
a0 Ptr SensorEvents
pOut IO () -> IO SensorEvents -> IO SensorEvents
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Ptr SensorEvents -> IO SensorEvents
forall a. Storable a => Ptr a -> IO a
peek Ptr SensorEvents
pOut
getSensorEventsInto
:: WorldId
-> Ptr SensorEvents
-> IO ()
getSensorEventsInto :: WorldId -> Ptr SensorEvents -> IO ()
getSensorEventsInto WorldId
a0 Ptr SensorEvents
out =
WorldId -> Ptr SensorEvents -> IO ()
c_b3World_GetSensorEvents WorldId
a0 Ptr SensorEvents
out
getContactEvents
:: WorldId
-> IO ContactEvents
getContactEvents :: WorldId -> IO ContactEvents
getContactEvents WorldId
a0 =
(Ptr ContactEvents -> IO ContactEvents) -> IO ContactEvents
forall a b. Storable a => (Ptr a -> IO b) -> IO b
alloca ((Ptr ContactEvents -> IO ContactEvents) -> IO ContactEvents)
-> (Ptr ContactEvents -> IO ContactEvents) -> IO ContactEvents
forall a b. (a -> b) -> a -> b
$ \Ptr ContactEvents
pOut -> WorldId -> Ptr ContactEvents -> IO ()
c_b3World_GetContactEvents WorldId
a0 Ptr ContactEvents
pOut IO () -> IO ContactEvents -> IO ContactEvents
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Ptr ContactEvents -> IO ContactEvents
forall a. Storable a => Ptr a -> IO a
peek Ptr ContactEvents
pOut
getContactEventsInto
:: WorldId
-> Ptr ContactEvents
-> IO ()
getContactEventsInto :: WorldId -> Ptr ContactEvents -> IO ()
getContactEventsInto WorldId
a0 Ptr ContactEvents
out =
WorldId -> Ptr ContactEvents -> IO ()
c_b3World_GetContactEvents WorldId
a0 Ptr ContactEvents
out
getJointEvents
:: WorldId
-> IO JointEvents
getJointEvents :: WorldId -> IO JointEvents
getJointEvents WorldId
a0 =
(Ptr JointEvents -> IO JointEvents) -> IO JointEvents
forall a b. Storable a => (Ptr a -> IO b) -> IO b
alloca ((Ptr JointEvents -> IO JointEvents) -> IO JointEvents)
-> (Ptr JointEvents -> IO JointEvents) -> IO JointEvents
forall a b. (a -> b) -> a -> b
$ \Ptr JointEvents
pOut -> WorldId -> Ptr JointEvents -> IO ()
c_b3World_GetJointEvents WorldId
a0 Ptr JointEvents
pOut IO () -> IO JointEvents -> IO JointEvents
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Ptr JointEvents -> IO JointEvents
forall a. Storable a => Ptr a -> IO a
peek Ptr JointEvents
pOut
getJointEventsInto
:: WorldId
-> Ptr JointEvents
-> IO ()
getJointEventsInto :: WorldId -> Ptr JointEvents -> IO ()
getJointEventsInto WorldId
a0 Ptr JointEvents
out =
WorldId -> Ptr JointEvents -> IO ()
c_b3World_GetJointEvents WorldId
a0 Ptr JointEvents
out
overlapAABB
:: WorldId
-> AABB
-> QueryFilter
-> FunPtr OverlapResultFcn
-> Ptr ()
-> IO TreeStats
overlapAABB :: WorldId
-> AABB
-> QueryFilter
-> FunPtr OverlapResultFcn
-> Ptr ()
-> IO TreeStats
overlapAABB WorldId
a0 AABB
a1 QueryFilter
a2 FunPtr OverlapResultFcn
a3 Ptr ()
a4 =
AABB -> (Ptr AABB -> IO TreeStats) -> IO TreeStats
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with AABB
a1 ((Ptr AABB -> IO TreeStats) -> IO TreeStats)
-> (Ptr AABB -> IO TreeStats) -> IO TreeStats
forall a b. (a -> b) -> a -> b
$ \Ptr AABB
p1 ->
QueryFilter -> (Ptr QueryFilter -> IO TreeStats) -> IO TreeStats
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with QueryFilter
a2 ((Ptr QueryFilter -> IO TreeStats) -> IO TreeStats)
-> (Ptr QueryFilter -> IO TreeStats) -> IO TreeStats
forall a b. (a -> b) -> a -> b
$ \Ptr QueryFilter
p2 ->
(Ptr TreeStats -> IO TreeStats) -> IO TreeStats
forall a b. Storable a => (Ptr a -> IO b) -> IO b
alloca ((Ptr TreeStats -> IO TreeStats) -> IO TreeStats)
-> (Ptr TreeStats -> IO TreeStats) -> IO TreeStats
forall a b. (a -> b) -> a -> b
$ \Ptr TreeStats
pOut -> WorldId
-> Ptr AABB
-> Ptr QueryFilter
-> FunPtr OverlapResultFcn
-> Ptr ()
-> Ptr TreeStats
-> IO ()
c_b3World_OverlapAABB WorldId
a0 Ptr AABB
p1 Ptr QueryFilter
p2 FunPtr OverlapResultFcn
a3 Ptr ()
a4 Ptr TreeStats
pOut IO () -> IO TreeStats -> IO TreeStats
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Ptr TreeStats -> IO TreeStats
forall a. Storable a => Ptr a -> IO a
peek Ptr TreeStats
pOut
overlapShape
:: WorldId
-> Pos
-> Ptr ShapeProxy
-> QueryFilter
-> FunPtr OverlapResultFcn
-> Ptr ()
-> IO TreeStats
overlapShape :: WorldId
-> Vec3
-> Ptr ShapeProxy
-> QueryFilter
-> FunPtr OverlapResultFcn
-> Ptr ()
-> IO TreeStats
overlapShape WorldId
a0 Vec3
a1 Ptr ShapeProxy
a2 QueryFilter
a3 FunPtr OverlapResultFcn
a4 Ptr ()
a5 =
Vec3 -> (Ptr Vec3 -> IO TreeStats) -> IO TreeStats
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Vec3
a1 ((Ptr Vec3 -> IO TreeStats) -> IO TreeStats)
-> (Ptr Vec3 -> IO TreeStats) -> IO TreeStats
forall a b. (a -> b) -> a -> b
$ \Ptr Vec3
p1 ->
QueryFilter -> (Ptr QueryFilter -> IO TreeStats) -> IO TreeStats
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with QueryFilter
a3 ((Ptr QueryFilter -> IO TreeStats) -> IO TreeStats)
-> (Ptr QueryFilter -> IO TreeStats) -> IO TreeStats
forall a b. (a -> b) -> a -> b
$ \Ptr QueryFilter
p3 ->
(Ptr TreeStats -> IO TreeStats) -> IO TreeStats
forall a b. Storable a => (Ptr a -> IO b) -> IO b
alloca ((Ptr TreeStats -> IO TreeStats) -> IO TreeStats)
-> (Ptr TreeStats -> IO TreeStats) -> IO TreeStats
forall a b. (a -> b) -> a -> b
$ \Ptr TreeStats
pOut -> WorldId
-> Ptr Vec3
-> Ptr ShapeProxy
-> Ptr QueryFilter
-> FunPtr OverlapResultFcn
-> Ptr ()
-> Ptr TreeStats
-> IO ()
c_b3World_OverlapShape WorldId
a0 Ptr Vec3
p1 Ptr ShapeProxy
a2 Ptr QueryFilter
p3 FunPtr OverlapResultFcn
a4 Ptr ()
a5 Ptr TreeStats
pOut IO () -> IO TreeStats -> IO TreeStats
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Ptr TreeStats -> IO TreeStats
forall a. Storable a => Ptr a -> IO a
peek Ptr TreeStats
pOut
castRay
:: WorldId
-> Pos
-> Vec3
-> QueryFilter
-> FunPtr CastResultFcn
-> Ptr ()
-> IO TreeStats
castRay :: WorldId
-> Vec3
-> Vec3
-> QueryFilter
-> FunPtr CastResultFcn
-> Ptr ()
-> IO TreeStats
castRay WorldId
a0 Vec3
a1 Vec3
a2 QueryFilter
a3 FunPtr CastResultFcn
a4 Ptr ()
a5 =
Vec3 -> (Ptr Vec3 -> IO TreeStats) -> IO TreeStats
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Vec3
a1 ((Ptr Vec3 -> IO TreeStats) -> IO TreeStats)
-> (Ptr Vec3 -> IO TreeStats) -> IO TreeStats
forall a b. (a -> b) -> a -> b
$ \Ptr Vec3
p1 ->
Vec3 -> (Ptr Vec3 -> IO TreeStats) -> IO TreeStats
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Vec3
a2 ((Ptr Vec3 -> IO TreeStats) -> IO TreeStats)
-> (Ptr Vec3 -> IO TreeStats) -> IO TreeStats
forall a b. (a -> b) -> a -> b
$ \Ptr Vec3
p2 ->
QueryFilter -> (Ptr QueryFilter -> IO TreeStats) -> IO TreeStats
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with QueryFilter
a3 ((Ptr QueryFilter -> IO TreeStats) -> IO TreeStats)
-> (Ptr QueryFilter -> IO TreeStats) -> IO TreeStats
forall a b. (a -> b) -> a -> b
$ \Ptr QueryFilter
p3 ->
(Ptr TreeStats -> IO TreeStats) -> IO TreeStats
forall a b. Storable a => (Ptr a -> IO b) -> IO b
alloca ((Ptr TreeStats -> IO TreeStats) -> IO TreeStats)
-> (Ptr TreeStats -> IO TreeStats) -> IO TreeStats
forall a b. (a -> b) -> a -> b
$ \Ptr TreeStats
pOut -> WorldId
-> Ptr Vec3
-> Ptr Vec3
-> Ptr QueryFilter
-> FunPtr CastResultFcn
-> Ptr ()
-> Ptr TreeStats
-> IO ()
c_b3World_CastRay WorldId
a0 Ptr Vec3
p1 Ptr Vec3
p2 Ptr QueryFilter
p3 FunPtr CastResultFcn
a4 Ptr ()
a5 Ptr TreeStats
pOut IO () -> IO TreeStats -> IO TreeStats
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Ptr TreeStats -> IO TreeStats
forall a. Storable a => Ptr a -> IO a
peek Ptr TreeStats
pOut
castRayClosest
:: WorldId
-> Pos
-> Vec3
-> QueryFilter
-> IO RayResult
castRayClosest :: WorldId -> Vec3 -> Vec3 -> QueryFilter -> IO RayResult
castRayClosest WorldId
a0 Vec3
a1 Vec3
a2 QueryFilter
a3 =
Vec3 -> (Ptr Vec3 -> IO RayResult) -> IO RayResult
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Vec3
a1 ((Ptr Vec3 -> IO RayResult) -> IO RayResult)
-> (Ptr Vec3 -> IO RayResult) -> IO RayResult
forall a b. (a -> b) -> a -> b
$ \Ptr Vec3
p1 ->
Vec3 -> (Ptr Vec3 -> IO RayResult) -> IO RayResult
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Vec3
a2 ((Ptr Vec3 -> IO RayResult) -> IO RayResult)
-> (Ptr Vec3 -> IO RayResult) -> IO RayResult
forall a b. (a -> b) -> a -> b
$ \Ptr Vec3
p2 ->
QueryFilter -> (Ptr QueryFilter -> IO RayResult) -> IO RayResult
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with QueryFilter
a3 ((Ptr QueryFilter -> IO RayResult) -> IO RayResult)
-> (Ptr QueryFilter -> IO RayResult) -> IO RayResult
forall a b. (a -> b) -> a -> b
$ \Ptr QueryFilter
p3 ->
(Ptr RayResult -> IO RayResult) -> IO RayResult
forall a b. Storable a => (Ptr a -> IO b) -> IO b
alloca ((Ptr RayResult -> IO RayResult) -> IO RayResult)
-> (Ptr RayResult -> IO RayResult) -> IO RayResult
forall a b. (a -> b) -> a -> b
$ \Ptr RayResult
pOut -> WorldId
-> Ptr Vec3
-> Ptr Vec3
-> Ptr QueryFilter
-> Ptr RayResult
-> IO ()
c_b3World_CastRayClosest WorldId
a0 Ptr Vec3
p1 Ptr Vec3
p2 Ptr QueryFilter
p3 Ptr RayResult
pOut IO () -> IO RayResult -> IO RayResult
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Ptr RayResult -> IO RayResult
forall a. Storable a => Ptr a -> IO a
peek Ptr RayResult
pOut
castShape
:: WorldId
-> Pos
-> Ptr ShapeProxy
-> Vec3
-> QueryFilter
-> FunPtr CastResultFcn
-> Ptr ()
-> IO TreeStats
castShape :: WorldId
-> Vec3
-> Ptr ShapeProxy
-> Vec3
-> QueryFilter
-> FunPtr CastResultFcn
-> Ptr ()
-> IO TreeStats
castShape WorldId
a0 Vec3
a1 Ptr ShapeProxy
a2 Vec3
a3 QueryFilter
a4 FunPtr CastResultFcn
a5 Ptr ()
a6 =
Vec3 -> (Ptr Vec3 -> IO TreeStats) -> IO TreeStats
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Vec3
a1 ((Ptr Vec3 -> IO TreeStats) -> IO TreeStats)
-> (Ptr Vec3 -> IO TreeStats) -> IO TreeStats
forall a b. (a -> b) -> a -> b
$ \Ptr Vec3
p1 ->
Vec3 -> (Ptr Vec3 -> IO TreeStats) -> IO TreeStats
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Vec3
a3 ((Ptr Vec3 -> IO TreeStats) -> IO TreeStats)
-> (Ptr Vec3 -> IO TreeStats) -> IO TreeStats
forall a b. (a -> b) -> a -> b
$ \Ptr Vec3
p3 ->
QueryFilter -> (Ptr QueryFilter -> IO TreeStats) -> IO TreeStats
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with QueryFilter
a4 ((Ptr QueryFilter -> IO TreeStats) -> IO TreeStats)
-> (Ptr QueryFilter -> IO TreeStats) -> IO TreeStats
forall a b. (a -> b) -> a -> b
$ \Ptr QueryFilter
p4 ->
(Ptr TreeStats -> IO TreeStats) -> IO TreeStats
forall a b. Storable a => (Ptr a -> IO b) -> IO b
alloca ((Ptr TreeStats -> IO TreeStats) -> IO TreeStats)
-> (Ptr TreeStats -> IO TreeStats) -> IO TreeStats
forall a b. (a -> b) -> a -> b
$ \Ptr TreeStats
pOut -> WorldId
-> Ptr Vec3
-> Ptr ShapeProxy
-> Ptr Vec3
-> Ptr QueryFilter
-> FunPtr CastResultFcn
-> Ptr ()
-> Ptr TreeStats
-> IO ()
c_b3World_CastShape WorldId
a0 Ptr Vec3
p1 Ptr ShapeProxy
a2 Ptr Vec3
p3 Ptr QueryFilter
p4 FunPtr CastResultFcn
a5 Ptr ()
a6 Ptr TreeStats
pOut IO () -> IO TreeStats -> IO TreeStats
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Ptr TreeStats -> IO TreeStats
forall a. Storable a => Ptr a -> IO a
peek Ptr TreeStats
pOut
castMover
:: WorldId
-> Pos
-> Capsule
-> Vec3
-> QueryFilter
-> FunPtr MoverFilterFcn
-> Ptr ()
-> IO Float
castMover :: WorldId
-> Vec3
-> Capsule
-> Vec3
-> QueryFilter
-> FunPtr MoverFilterFcn
-> Ptr ()
-> IO Float
castMover WorldId
a0 Vec3
a1 Capsule
a2 Vec3
a3 QueryFilter
a4 FunPtr MoverFilterFcn
a5 Ptr ()
a6 =
Vec3 -> (Ptr Vec3 -> IO Float) -> IO Float
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Vec3
a1 ((Ptr Vec3 -> IO Float) -> IO Float)
-> (Ptr Vec3 -> IO Float) -> IO Float
forall a b. (a -> b) -> a -> b
$ \Ptr Vec3
p1 ->
Capsule -> (Ptr Capsule -> IO Float) -> IO Float
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Capsule
a2 ((Ptr Capsule -> IO Float) -> IO Float)
-> (Ptr Capsule -> IO Float) -> IO Float
forall a b. (a -> b) -> a -> b
$ \Ptr Capsule
p2 ->
Vec3 -> (Ptr Vec3 -> IO Float) -> IO Float
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Vec3
a3 ((Ptr Vec3 -> IO Float) -> IO Float)
-> (Ptr Vec3 -> IO Float) -> IO Float
forall a b. (a -> b) -> a -> b
$ \Ptr Vec3
p3 ->
QueryFilter -> (Ptr QueryFilter -> IO Float) -> IO Float
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with QueryFilter
a4 ((Ptr QueryFilter -> IO Float) -> IO Float)
-> (Ptr QueryFilter -> IO Float) -> IO Float
forall a b. (a -> b) -> a -> b
$ \Ptr QueryFilter
p4 ->
WorldId
-> Ptr Vec3
-> Ptr Capsule
-> Ptr Vec3
-> Ptr QueryFilter
-> FunPtr MoverFilterFcn
-> Ptr ()
-> IO Float
c_b3World_CastMover WorldId
a0 Ptr Vec3
p1 Ptr Capsule
p2 Ptr Vec3
p3 Ptr QueryFilter
p4 FunPtr MoverFilterFcn
a5 Ptr ()
a6
collideMover
:: WorldId
-> Pos
-> Capsule
-> QueryFilter
-> FunPtr PlaneResultFcn
-> Ptr ()
-> IO ()
collideMover :: WorldId
-> Vec3
-> Capsule
-> QueryFilter
-> FunPtr PlaneResultFcn
-> Ptr ()
-> IO ()
collideMover WorldId
a0 Vec3
a1 Capsule
a2 QueryFilter
a3 FunPtr PlaneResultFcn
a4 Ptr ()
a5 =
Vec3 -> (Ptr Vec3 -> IO ()) -> IO ()
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Vec3
a1 ((Ptr Vec3 -> IO ()) -> IO ()) -> (Ptr Vec3 -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Vec3
p1 ->
Capsule -> (Ptr Capsule -> IO ()) -> IO ()
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Capsule
a2 ((Ptr Capsule -> IO ()) -> IO ())
-> (Ptr Capsule -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Capsule
p2 ->
QueryFilter -> (Ptr QueryFilter -> IO ()) -> IO ()
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with QueryFilter
a3 ((Ptr QueryFilter -> IO ()) -> IO ())
-> (Ptr QueryFilter -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr QueryFilter
p3 ->
WorldId
-> Ptr Vec3
-> Ptr Capsule
-> Ptr QueryFilter
-> FunPtr PlaneResultFcn
-> Ptr ()
-> IO ()
c_b3World_CollideMover WorldId
a0 Ptr Vec3
p1 Ptr Capsule
p2 Ptr QueryFilter
p3 FunPtr PlaneResultFcn
a4 Ptr ()
a5
enableSleeping
:: WorldId
-> Bool
-> IO ()
enableSleeping :: WorldId -> Bool -> IO ()
enableSleeping WorldId
a0 Bool
a1 =
WorldId -> CBool -> IO ()
c_b3World_EnableSleeping WorldId
a0 (Bool -> CBool
forall a. Num a => Bool -> a
fromBool Bool
a1)
isSleepingEnabled
:: WorldId
-> IO Bool
isSleepingEnabled :: WorldId -> IO Bool
isSleepingEnabled WorldId
a0 =
CBool -> Bool
forall a. (Eq a, Num a) => a -> Bool
toBool (CBool -> Bool) -> IO CBool -> IO Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (WorldId -> IO CBool
c_b3World_IsSleepingEnabled WorldId
a0)
enableContinuous
:: WorldId
-> Bool
-> IO ()
enableContinuous :: WorldId -> Bool -> IO ()
enableContinuous WorldId
a0 Bool
a1 =
WorldId -> CBool -> IO ()
c_b3World_EnableContinuous WorldId
a0 (Bool -> CBool
forall a. Num a => Bool -> a
fromBool Bool
a1)
isContinuousEnabled
:: WorldId
-> IO Bool
isContinuousEnabled :: WorldId -> IO Bool
isContinuousEnabled WorldId
a0 =
CBool -> Bool
forall a. (Eq a, Num a) => a -> Bool
toBool (CBool -> Bool) -> IO CBool -> IO Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (WorldId -> IO CBool
c_b3World_IsContinuousEnabled WorldId
a0)
setRestitutionThreshold
:: WorldId
-> Float
-> IO ()
setRestitutionThreshold :: WorldId -> Float -> IO ()
setRestitutionThreshold WorldId
a0 Float
a1 =
WorldId -> Float -> IO ()
c_b3World_SetRestitutionThreshold WorldId
a0 Float
a1
getRestitutionThreshold
:: WorldId
-> IO Float
getRestitutionThreshold :: WorldId -> IO Float
getRestitutionThreshold WorldId
a0 =
WorldId -> IO Float
c_b3World_GetRestitutionThreshold WorldId
a0
setHitEventThreshold
:: WorldId
-> Float
-> IO ()
setHitEventThreshold :: WorldId -> Float -> IO ()
setHitEventThreshold WorldId
a0 Float
a1 =
WorldId -> Float -> IO ()
c_b3World_SetHitEventThreshold WorldId
a0 Float
a1
getHitEventThreshold
:: WorldId
-> IO Float
getHitEventThreshold :: WorldId -> IO Float
getHitEventThreshold WorldId
a0 =
WorldId -> IO Float
c_b3World_GetHitEventThreshold WorldId
a0
setCustomFilterCallback
:: WorldId
-> FunPtr CustomFilterFcn
-> Ptr ()
-> IO ()
setCustomFilterCallback :: WorldId -> FunPtr CustomFilterFcn -> Ptr () -> IO ()
setCustomFilterCallback WorldId
a0 FunPtr CustomFilterFcn
a1 Ptr ()
a2 =
WorldId -> FunPtr CustomFilterFcn -> Ptr () -> IO ()
c_b3World_SetCustomFilterCallback WorldId
a0 FunPtr CustomFilterFcn
a1 Ptr ()
a2
setPreSolveCallback
:: WorldId
-> FunPtr PreSolveFcn
-> Ptr ()
-> IO ()
setPreSolveCallback :: WorldId -> FunPtr PreSolveFcn -> Ptr () -> IO ()
setPreSolveCallback WorldId
a0 FunPtr PreSolveFcn
a1 Ptr ()
a2 =
WorldId -> FunPtr PreSolveFcn -> Ptr () -> IO ()
c_b3World_SetPreSolveCallback WorldId
a0 FunPtr PreSolveFcn
a1 Ptr ()
a2
setGravity
:: WorldId
-> Vec3
-> IO ()
setGravity :: WorldId -> Vec3 -> IO ()
setGravity WorldId
a0 Vec3
a1 =
Vec3 -> (Ptr Vec3 -> IO ()) -> IO ()
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Vec3
a1 ((Ptr Vec3 -> IO ()) -> IO ()) -> (Ptr Vec3 -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Vec3
p1 ->
WorldId -> Ptr Vec3 -> IO ()
c_b3World_SetGravity WorldId
a0 Ptr Vec3
p1
getGravity
:: WorldId
-> IO Vec3
getGravity :: WorldId -> IO Vec3
getGravity WorldId
a0 =
(Ptr Vec3 -> IO Vec3) -> IO Vec3
forall a b. Storable a => (Ptr a -> IO b) -> IO b
alloca ((Ptr Vec3 -> IO Vec3) -> IO Vec3)
-> (Ptr Vec3 -> IO Vec3) -> IO Vec3
forall a b. (a -> b) -> a -> b
$ \Ptr Vec3
pOut -> WorldId -> Ptr Vec3 -> IO ()
c_b3World_GetGravity WorldId
a0 Ptr Vec3
pOut IO () -> IO Vec3 -> IO Vec3
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Ptr Vec3 -> IO Vec3
forall a. Storable a => Ptr a -> IO a
peek Ptr Vec3
pOut
getGravityInto
:: WorldId
-> Ptr Vec3
-> IO ()
getGravityInto :: WorldId -> Ptr Vec3 -> IO ()
getGravityInto WorldId
a0 Ptr Vec3
out =
WorldId -> Ptr Vec3 -> IO ()
c_b3World_GetGravity WorldId
a0 Ptr Vec3
out
explode
:: WorldId
-> ExplosionDef
-> IO ()
explode :: WorldId -> ExplosionDef -> IO ()
explode WorldId
a0 ExplosionDef
a1 =
ExplosionDef -> (Ptr ExplosionDef -> IO ()) -> IO ()
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with ExplosionDef
a1 ((Ptr ExplosionDef -> IO ()) -> IO ())
-> (Ptr ExplosionDef -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr ExplosionDef
p1 ->
WorldId -> Ptr ExplosionDef -> IO ()
c_b3World_Explode WorldId
a0 Ptr ExplosionDef
p1
setContactTuning
:: WorldId
-> Float
-> Float
-> Float
-> IO ()
setContactTuning :: WorldId -> Float -> Float -> Float -> IO ()
setContactTuning WorldId
a0 Float
a1 Float
a2 Float
a3 =
WorldId -> Float -> Float -> Float -> IO ()
c_b3World_SetContactTuning WorldId
a0 Float
a1 Float
a2 Float
a3
setContactRecycleDistance
:: WorldId
-> Float
-> IO ()
setContactRecycleDistance :: WorldId -> Float -> IO ()
setContactRecycleDistance WorldId
a0 Float
a1 =
WorldId -> Float -> IO ()
c_b3World_SetContactRecycleDistance WorldId
a0 Float
a1
getContactRecycleDistance
:: WorldId
-> IO Float
getContactRecycleDistance :: WorldId -> IO Float
getContactRecycleDistance WorldId
a0 =
WorldId -> IO Float
c_b3World_GetContactRecycleDistance WorldId
a0
setMaximumLinearSpeed
:: WorldId
-> Float
-> IO ()
setMaximumLinearSpeed :: WorldId -> Float -> IO ()
setMaximumLinearSpeed WorldId
a0 Float
a1 =
WorldId -> Float -> IO ()
c_b3World_SetMaximumLinearSpeed WorldId
a0 Float
a1
getMaximumLinearSpeed
:: WorldId
-> IO Float
getMaximumLinearSpeed :: WorldId -> IO Float
getMaximumLinearSpeed WorldId
a0 =
WorldId -> IO Float
c_b3World_GetMaximumLinearSpeed WorldId
a0
enableWarmStarting
:: WorldId
-> Bool
-> IO ()
enableWarmStarting :: WorldId -> Bool -> IO ()
enableWarmStarting WorldId
a0 Bool
a1 =
WorldId -> CBool -> IO ()
c_b3World_EnableWarmStarting WorldId
a0 (Bool -> CBool
forall a. Num a => Bool -> a
fromBool Bool
a1)
isWarmStartingEnabled
:: WorldId
-> IO Bool
isWarmStartingEnabled :: WorldId -> IO Bool
isWarmStartingEnabled WorldId
a0 =
CBool -> Bool
forall a. (Eq a, Num a) => a -> Bool
toBool (CBool -> Bool) -> IO CBool -> IO Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (WorldId -> IO CBool
c_b3World_IsWarmStartingEnabled WorldId
a0)
getAwakeBodyCount
:: WorldId
-> IO Int
getAwakeBodyCount :: WorldId -> IO Int
getAwakeBodyCount WorldId
a0 =
CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral (CInt -> Int) -> IO CInt -> IO Int
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (WorldId -> IO CInt
c_b3World_GetAwakeBodyCount WorldId
a0)
getProfile
:: WorldId
-> Ptr Profile
-> IO ()
getProfile :: WorldId -> Ptr Profile -> IO ()
getProfile WorldId
a0 Ptr Profile
out =
WorldId -> Ptr Profile -> IO ()
c_b3World_GetProfile WorldId
a0 Ptr Profile
out
getCounters
:: WorldId
-> Ptr Counters
-> IO ()
getCounters :: WorldId -> Ptr Counters -> IO ()
getCounters WorldId
a0 Ptr Counters
out =
WorldId -> Ptr Counters -> IO ()
c_b3World_GetCounters WorldId
a0 Ptr Counters
out
getMaxCapacity
:: WorldId
-> IO Capacity
getMaxCapacity :: WorldId -> IO Capacity
getMaxCapacity WorldId
a0 =
(Ptr Capacity -> IO Capacity) -> IO Capacity
forall a b. Storable a => (Ptr a -> IO b) -> IO b
alloca ((Ptr Capacity -> IO Capacity) -> IO Capacity)
-> (Ptr Capacity -> IO Capacity) -> IO Capacity
forall a b. (a -> b) -> a -> b
$ \Ptr Capacity
pOut -> WorldId -> Ptr Capacity -> IO ()
c_b3World_GetMaxCapacity WorldId
a0 Ptr Capacity
pOut IO () -> IO Capacity -> IO Capacity
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Ptr Capacity -> IO Capacity
forall a. Storable a => Ptr a -> IO a
peek Ptr Capacity
pOut
getMaxCapacityInto
:: WorldId
-> Ptr Capacity
-> IO ()
getMaxCapacityInto :: WorldId -> Ptr Capacity -> IO ()
getMaxCapacityInto WorldId
a0 Ptr Capacity
out =
WorldId -> Ptr Capacity -> IO ()
c_b3World_GetMaxCapacity WorldId
a0 Ptr Capacity
out
setUserData
:: WorldId
-> Ptr ()
-> IO ()
setUserData :: WorldId -> Ptr () -> IO ()
setUserData WorldId
a0 Ptr ()
a1 =
WorldId -> Ptr () -> IO ()
c_b3World_SetUserData WorldId
a0 Ptr ()
a1
getUserData
:: WorldId
-> IO (Ptr ())
getUserData :: WorldId -> IO (Ptr ())
getUserData WorldId
a0 =
WorldId -> IO (Ptr ())
c_b3World_GetUserData WorldId
a0
setFrictionCallback
:: WorldId
-> FunPtr FrictionCallback
-> IO ()
setFrictionCallback :: WorldId -> FunPtr FrictionCallback -> IO ()
setFrictionCallback WorldId
a0 FunPtr FrictionCallback
a1 =
WorldId -> FunPtr FrictionCallback -> IO ()
c_b3World_SetFrictionCallback WorldId
a0 FunPtr FrictionCallback
a1
setRestitutionCallback
:: WorldId
-> FunPtr RestitutionCallback
-> IO ()
setRestitutionCallback :: WorldId -> FunPtr RestitutionCallback -> IO ()
setRestitutionCallback WorldId
a0 FunPtr RestitutionCallback
a1 =
WorldId -> FunPtr RestitutionCallback -> IO ()
c_b3World_SetRestitutionCallback WorldId
a0 FunPtr RestitutionCallback
a1
setWorkerCount
:: WorldId
-> Int
-> IO ()
setWorkerCount :: WorldId -> Int -> IO ()
setWorkerCount WorldId
a0 Int
a1 =
WorldId -> CInt -> IO ()
c_b3World_SetWorkerCount WorldId
a0 (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
a1)
getWorkerCount
:: WorldId
-> IO Int
getWorkerCount :: WorldId -> IO Int
getWorkerCount WorldId
a0 =
CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral (CInt -> Int) -> IO CInt -> IO Int
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (WorldId -> IO CInt
c_b3World_GetWorkerCount WorldId
a0)
dumpMemoryStats
:: WorldId
-> IO ()
dumpMemoryStats :: WorldId -> IO ()
dumpMemoryStats WorldId
a0 =
WorldId -> IO ()
c_b3World_DumpMemoryStats WorldId
a0
dumpShapeBounds
:: WorldId
-> BodyType
-> IO ()
dumpShapeBounds :: WorldId -> BodyType -> IO ()
dumpShapeBounds WorldId
a0 BodyType
a1 =
WorldId -> CInt -> IO ()
c_b3World_DumpShapeBounds WorldId
a0 (BodyType -> CInt
forall a b. Coercible a b => a -> b
coerce BodyType
a1)
rebuildStaticTree
:: WorldId
-> IO ()
rebuildStaticTree :: WorldId -> IO ()
rebuildStaticTree WorldId
a0 =
WorldId -> IO ()
c_b3World_RebuildStaticTree WorldId
a0
enableSpeculative
:: WorldId
-> Bool
-> IO ()
enableSpeculative :: WorldId -> Bool -> IO ()
enableSpeculative WorldId
a0 Bool
a1 =
WorldId -> CBool -> IO ()
c_b3World_EnableSpeculative WorldId
a0 (Bool -> CBool
forall a. Num a => Bool -> a
fromBool Bool
a1)
dumpAwake
:: WorldId
-> IO ()
dumpAwake :: WorldId -> IO ()
dumpAwake WorldId
a0 =
WorldId -> IO ()
c_b3World_DumpAwake WorldId
a0
dump
:: WorldId
-> IO ()
dump :: WorldId -> IO ()
dump WorldId
a0 =
WorldId -> IO ()
c_b3World_Dump WorldId
a0
startRecording
:: WorldId
-> Ptr Recording
-> IO ()
startRecording :: WorldId -> Ptr Recording -> IO ()
startRecording WorldId
a0 Ptr Recording
a1 =
WorldId -> Ptr Recording -> IO ()
c_b3World_StartRecording WorldId
a0 Ptr Recording
a1
stopRecording
:: WorldId
-> IO ()
stopRecording :: WorldId -> IO ()
stopRecording WorldId
a0 =
WorldId -> IO ()
c_b3World_StopRecording WorldId
a0