module Box3D.Shape
( createSphere
, createCapsule
, createHull
, createTransformedHull
, createMesh
, createHeightField
, createCompound
, destroy
, isValid
, getType
, getBody
, getWorld
, isSensor
, setUserData
, getUserData
, setDensity
, getDensity
, setFriction
, getFriction
, setRestitution
, getRestitution
, setSurfaceMaterial
, getSurfaceMaterial
, getSurfaceMaterialInto
, getMeshMaterialCount
, setMeshMaterial
, getMeshSurfaceMaterial
, getMeshSurfaceMaterialInto
, getFilter
, getFilterInto
, setFilter
, enableSensorEvents
, areSensorEventsEnabled
, enableContactEvents
, areContactEventsEnabled
, enablePreSolveEvents
, arePreSolveEventsEnabled
, enableHitEvents
, areHitEventsEnabled
, rayCast
, getSphere
, getSphereInto
, getCapsule
, getCapsuleInto
, getHull
, getMesh
, getHeightField
, setSphere
, setCapsule
, setHull
, setMesh
, getContactCapacity
, getContactData
, getSensorCapacity
, getSensorData
, getAABB
, getAABBInto
, computeMassData
, computeMassDataInto
, getClosestPoint
, applyWind
)
where
import Foreign
import Foreign.C.Types (CBool(..), CInt(..))
import Data.Coerce (coerce)
import Box3D.Id (BodyId(..), ShapeId(..), WorldId(..))
import Box3D.MathTypes (AABB, Pos, Transform, Vec3)
import Box3D.Tags (CompoundData, ContactData, HeightFieldData, HullData, Mesh, MeshData)
import Box3D.Types (Capsule, Filter, MassData, ShapeDef, ShapeType(..), Sphere, SurfaceMaterial, WorldCastOutput)
foreign import ccall unsafe "b3CreateSphereShape"
c_b3CreateSphereShape :: BodyId -> Ptr ShapeDef -> Ptr Sphere -> IO ShapeId
foreign import ccall unsafe "b3CreateCapsuleShape"
c_b3CreateCapsuleShape :: BodyId -> Ptr ShapeDef -> Ptr Capsule -> IO ShapeId
foreign import ccall unsafe "b3CreateHullShape"
c_b3CreateHullShape :: BodyId -> Ptr ShapeDef -> Ptr HullData -> IO ShapeId
foreign import ccall unsafe "hsg_b3CreateTransformedHullShape"
c_b3CreateTransformedHullShape :: BodyId -> Ptr ShapeDef -> Ptr HullData -> Ptr Transform -> Ptr Vec3 -> IO ShapeId
foreign import ccall unsafe "hsg_b3CreateMeshShape"
c_b3CreateMeshShape :: BodyId -> Ptr ShapeDef -> Ptr MeshData -> Ptr Vec3 -> IO ShapeId
foreign import ccall unsafe "b3CreateHeightFieldShape"
c_b3CreateHeightFieldShape :: BodyId -> Ptr ShapeDef -> Ptr HeightFieldData -> IO ShapeId
foreign import ccall unsafe "b3CreateCompoundShape"
c_b3CreateCompoundShape :: BodyId -> Ptr ShapeDef -> Ptr CompoundData -> IO ShapeId
foreign import ccall unsafe "b3DestroyShape"
c_b3DestroyShape :: ShapeId -> CBool -> IO ()
foreign import ccall unsafe "b3Shape_IsValid"
c_b3Shape_IsValid :: ShapeId -> IO CBool
foreign import ccall unsafe "b3Shape_GetType"
c_b3Shape_GetType :: ShapeId -> IO CInt
foreign import ccall unsafe "b3Shape_GetBody"
c_b3Shape_GetBody :: ShapeId -> IO BodyId
foreign import ccall unsafe "b3Shape_GetWorld"
c_b3Shape_GetWorld :: ShapeId -> IO WorldId
foreign import ccall unsafe "b3Shape_IsSensor"
c_b3Shape_IsSensor :: ShapeId -> IO CBool
foreign import ccall unsafe "b3Shape_SetUserData"
c_b3Shape_SetUserData :: ShapeId -> Ptr () -> IO ()
foreign import ccall unsafe "b3Shape_GetUserData"
c_b3Shape_GetUserData :: ShapeId -> IO (Ptr ())
foreign import ccall unsafe "b3Shape_SetDensity"
c_b3Shape_SetDensity :: ShapeId -> Float -> CBool -> IO ()
foreign import ccall unsafe "b3Shape_GetDensity"
c_b3Shape_GetDensity :: ShapeId -> IO Float
foreign import ccall unsafe "b3Shape_SetFriction"
c_b3Shape_SetFriction :: ShapeId -> Float -> IO ()
foreign import ccall unsafe "b3Shape_GetFriction"
c_b3Shape_GetFriction :: ShapeId -> IO Float
foreign import ccall unsafe "b3Shape_SetRestitution"
c_b3Shape_SetRestitution :: ShapeId -> Float -> IO ()
foreign import ccall unsafe "b3Shape_GetRestitution"
c_b3Shape_GetRestitution :: ShapeId -> IO Float
foreign import ccall unsafe "hsg_b3Shape_SetSurfaceMaterial"
c_b3Shape_SetSurfaceMaterial :: ShapeId -> Ptr SurfaceMaterial -> IO ()
foreign import ccall unsafe "hsg_b3Shape_GetSurfaceMaterial"
c_b3Shape_GetSurfaceMaterial :: ShapeId -> Ptr SurfaceMaterial -> IO ()
foreign import ccall unsafe "b3Shape_GetMeshMaterialCount"
c_b3Shape_GetMeshMaterialCount :: ShapeId -> IO CInt
foreign import ccall unsafe "hsg_b3Shape_SetMeshMaterial"
c_b3Shape_SetMeshMaterial :: ShapeId -> Ptr SurfaceMaterial -> CInt -> IO ()
foreign import ccall unsafe "hsg_b3Shape_GetMeshSurfaceMaterial"
c_b3Shape_GetMeshSurfaceMaterial :: ShapeId -> CInt -> Ptr SurfaceMaterial -> IO ()
foreign import ccall unsafe "hsg_b3Shape_GetFilter"
c_b3Shape_GetFilter :: ShapeId -> Ptr Filter -> IO ()
foreign import ccall unsafe "hsg_b3Shape_SetFilter"
c_b3Shape_SetFilter :: ShapeId -> Ptr Filter -> CBool -> IO ()
foreign import ccall unsafe "b3Shape_EnableSensorEvents"
c_b3Shape_EnableSensorEvents :: ShapeId -> CBool -> IO ()
foreign import ccall unsafe "b3Shape_AreSensorEventsEnabled"
c_b3Shape_AreSensorEventsEnabled :: ShapeId -> IO CBool
foreign import ccall unsafe "b3Shape_EnableContactEvents"
c_b3Shape_EnableContactEvents :: ShapeId -> CBool -> IO ()
foreign import ccall unsafe "b3Shape_AreContactEventsEnabled"
c_b3Shape_AreContactEventsEnabled :: ShapeId -> IO CBool
foreign import ccall unsafe "b3Shape_EnablePreSolveEvents"
c_b3Shape_EnablePreSolveEvents :: ShapeId -> CBool -> IO ()
foreign import ccall unsafe "b3Shape_ArePreSolveEventsEnabled"
c_b3Shape_ArePreSolveEventsEnabled :: ShapeId -> IO CBool
foreign import ccall unsafe "b3Shape_EnableHitEvents"
c_b3Shape_EnableHitEvents :: ShapeId -> CBool -> IO ()
foreign import ccall unsafe "b3Shape_AreHitEventsEnabled"
c_b3Shape_AreHitEventsEnabled :: ShapeId -> IO CBool
foreign import ccall unsafe "hsg_b3Shape_RayCast"
c_b3Shape_RayCast :: ShapeId -> Ptr Pos -> Ptr Vec3 -> Ptr WorldCastOutput -> IO ()
foreign import ccall unsafe "hsg_b3Shape_GetSphere"
c_b3Shape_GetSphere :: ShapeId -> Ptr Sphere -> IO ()
foreign import ccall unsafe "hsg_b3Shape_GetCapsule"
c_b3Shape_GetCapsule :: ShapeId -> Ptr Capsule -> IO ()
foreign import ccall unsafe "b3Shape_GetHull"
c_b3Shape_GetHull :: ShapeId -> IO (Ptr HullData)
foreign import ccall unsafe "hsg_b3Shape_GetMesh"
c_b3Shape_GetMesh :: ShapeId -> Ptr Mesh -> IO ()
foreign import ccall unsafe "b3Shape_GetHeightField"
c_b3Shape_GetHeightField :: ShapeId -> IO (Ptr HeightFieldData)
foreign import ccall unsafe "b3Shape_SetSphere"
c_b3Shape_SetSphere :: ShapeId -> Ptr Sphere -> IO ()
foreign import ccall unsafe "b3Shape_SetCapsule"
c_b3Shape_SetCapsule :: ShapeId -> Ptr Capsule -> IO ()
foreign import ccall unsafe "b3Shape_SetHull"
c_b3Shape_SetHull :: ShapeId -> Ptr HullData -> IO ()
foreign import ccall unsafe "hsg_b3Shape_SetMesh"
c_b3Shape_SetMesh :: ShapeId -> Ptr MeshData -> Ptr Vec3 -> IO ()
foreign import ccall unsafe "b3Shape_GetContactCapacity"
c_b3Shape_GetContactCapacity :: ShapeId -> IO CInt
foreign import ccall unsafe "b3Shape_GetContactData"
c_b3Shape_GetContactData :: ShapeId -> Ptr ContactData -> CInt -> IO CInt
foreign import ccall unsafe "b3Shape_GetSensorCapacity"
c_b3Shape_GetSensorCapacity :: ShapeId -> IO CInt
foreign import ccall unsafe "b3Shape_GetSensorData"
c_b3Shape_GetSensorData :: ShapeId -> Ptr ShapeId -> CInt -> IO CInt
foreign import ccall unsafe "hsg_b3Shape_GetAABB"
c_b3Shape_GetAABB :: ShapeId -> Ptr AABB -> IO ()
foreign import ccall unsafe "hsg_b3Shape_ComputeMassData"
c_b3Shape_ComputeMassData :: ShapeId -> Ptr MassData -> IO ()
foreign import ccall unsafe "hsg_b3Shape_GetClosestPoint"
c_b3Shape_GetClosestPoint :: ShapeId -> Ptr Vec3 -> Ptr Vec3 -> IO ()
foreign import ccall unsafe "hsg_b3Shape_ApplyWind"
c_b3Shape_ApplyWind :: ShapeId -> Ptr Vec3 -> Float -> Float -> Float -> CBool -> IO ()
createSphere
:: BodyId
-> ShapeDef
-> Sphere
-> IO ShapeId
createSphere :: BodyId -> ShapeDef -> Sphere -> IO ShapeId
createSphere BodyId
a0 ShapeDef
a1 Sphere
a2 =
ShapeDef -> (Ptr ShapeDef -> IO ShapeId) -> IO ShapeId
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with ShapeDef
a1 ((Ptr ShapeDef -> IO ShapeId) -> IO ShapeId)
-> (Ptr ShapeDef -> IO ShapeId) -> IO ShapeId
forall a b. (a -> b) -> a -> b
$ \Ptr ShapeDef
p1 ->
Sphere -> (Ptr Sphere -> IO ShapeId) -> IO ShapeId
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Sphere
a2 ((Ptr Sphere -> IO ShapeId) -> IO ShapeId)
-> (Ptr Sphere -> IO ShapeId) -> IO ShapeId
forall a b. (a -> b) -> a -> b
$ \Ptr Sphere
p2 ->
BodyId -> Ptr ShapeDef -> Ptr Sphere -> IO ShapeId
c_b3CreateSphereShape BodyId
a0 Ptr ShapeDef
p1 Ptr Sphere
p2
createCapsule
:: BodyId
-> ShapeDef
-> Capsule
-> IO ShapeId
createCapsule :: BodyId -> ShapeDef -> Capsule -> IO ShapeId
createCapsule BodyId
a0 ShapeDef
a1 Capsule
a2 =
ShapeDef -> (Ptr ShapeDef -> IO ShapeId) -> IO ShapeId
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with ShapeDef
a1 ((Ptr ShapeDef -> IO ShapeId) -> IO ShapeId)
-> (Ptr ShapeDef -> IO ShapeId) -> IO ShapeId
forall a b. (a -> b) -> a -> b
$ \Ptr ShapeDef
p1 ->
Capsule -> (Ptr Capsule -> IO ShapeId) -> IO ShapeId
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Capsule
a2 ((Ptr Capsule -> IO ShapeId) -> IO ShapeId)
-> (Ptr Capsule -> IO ShapeId) -> IO ShapeId
forall a b. (a -> b) -> a -> b
$ \Ptr Capsule
p2 ->
BodyId -> Ptr ShapeDef -> Ptr Capsule -> IO ShapeId
c_b3CreateCapsuleShape BodyId
a0 Ptr ShapeDef
p1 Ptr Capsule
p2
createHull
:: BodyId
-> ShapeDef
-> Ptr HullData
-> IO ShapeId
createHull :: BodyId -> ShapeDef -> Ptr HullData -> IO ShapeId
createHull BodyId
a0 ShapeDef
a1 Ptr HullData
a2 =
ShapeDef -> (Ptr ShapeDef -> IO ShapeId) -> IO ShapeId
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with ShapeDef
a1 ((Ptr ShapeDef -> IO ShapeId) -> IO ShapeId)
-> (Ptr ShapeDef -> IO ShapeId) -> IO ShapeId
forall a b. (a -> b) -> a -> b
$ \Ptr ShapeDef
p1 ->
BodyId -> Ptr ShapeDef -> Ptr HullData -> IO ShapeId
c_b3CreateHullShape BodyId
a0 Ptr ShapeDef
p1 Ptr HullData
a2
createTransformedHull
:: BodyId
-> ShapeDef
-> Ptr HullData
-> Transform
-> Vec3
-> IO ShapeId
createTransformedHull :: BodyId
-> ShapeDef -> Ptr HullData -> Transform -> Vec3 -> IO ShapeId
createTransformedHull BodyId
a0 ShapeDef
a1 Ptr HullData
a2 Transform
a3 Vec3
a4 =
ShapeDef -> (Ptr ShapeDef -> IO ShapeId) -> IO ShapeId
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with ShapeDef
a1 ((Ptr ShapeDef -> IO ShapeId) -> IO ShapeId)
-> (Ptr ShapeDef -> IO ShapeId) -> IO ShapeId
forall a b. (a -> b) -> a -> b
$ \Ptr ShapeDef
p1 ->
Transform -> (Ptr Transform -> IO ShapeId) -> IO ShapeId
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Transform
a3 ((Ptr Transform -> IO ShapeId) -> IO ShapeId)
-> (Ptr Transform -> IO ShapeId) -> IO ShapeId
forall a b. (a -> b) -> a -> b
$ \Ptr Transform
p3 ->
Vec3 -> (Ptr Vec3 -> IO ShapeId) -> IO ShapeId
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Vec3
a4 ((Ptr Vec3 -> IO ShapeId) -> IO ShapeId)
-> (Ptr Vec3 -> IO ShapeId) -> IO ShapeId
forall a b. (a -> b) -> a -> b
$ \Ptr Vec3
p4 ->
BodyId
-> Ptr ShapeDef
-> Ptr HullData
-> Ptr Transform
-> Ptr Vec3
-> IO ShapeId
c_b3CreateTransformedHullShape BodyId
a0 Ptr ShapeDef
p1 Ptr HullData
a2 Ptr Transform
p3 Ptr Vec3
p4
createMesh
:: BodyId
-> ShapeDef
-> Ptr MeshData
-> Vec3
-> IO ShapeId
createMesh :: BodyId -> ShapeDef -> Ptr MeshData -> Vec3 -> IO ShapeId
createMesh BodyId
a0 ShapeDef
a1 Ptr MeshData
a2 Vec3
a3 =
ShapeDef -> (Ptr ShapeDef -> IO ShapeId) -> IO ShapeId
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with ShapeDef
a1 ((Ptr ShapeDef -> IO ShapeId) -> IO ShapeId)
-> (Ptr ShapeDef -> IO ShapeId) -> IO ShapeId
forall a b. (a -> b) -> a -> b
$ \Ptr ShapeDef
p1 ->
Vec3 -> (Ptr Vec3 -> IO ShapeId) -> IO ShapeId
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Vec3
a3 ((Ptr Vec3 -> IO ShapeId) -> IO ShapeId)
-> (Ptr Vec3 -> IO ShapeId) -> IO ShapeId
forall a b. (a -> b) -> a -> b
$ \Ptr Vec3
p3 ->
BodyId -> Ptr ShapeDef -> Ptr MeshData -> Ptr Vec3 -> IO ShapeId
c_b3CreateMeshShape BodyId
a0 Ptr ShapeDef
p1 Ptr MeshData
a2 Ptr Vec3
p3
createHeightField
:: BodyId
-> ShapeDef
-> Ptr HeightFieldData
-> IO ShapeId
createHeightField :: BodyId -> ShapeDef -> Ptr HeightFieldData -> IO ShapeId
createHeightField BodyId
a0 ShapeDef
a1 Ptr HeightFieldData
a2 =
ShapeDef -> (Ptr ShapeDef -> IO ShapeId) -> IO ShapeId
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with ShapeDef
a1 ((Ptr ShapeDef -> IO ShapeId) -> IO ShapeId)
-> (Ptr ShapeDef -> IO ShapeId) -> IO ShapeId
forall a b. (a -> b) -> a -> b
$ \Ptr ShapeDef
p1 ->
BodyId -> Ptr ShapeDef -> Ptr HeightFieldData -> IO ShapeId
c_b3CreateHeightFieldShape BodyId
a0 Ptr ShapeDef
p1 Ptr HeightFieldData
a2
createCompound
:: BodyId
-> Ptr ShapeDef
-> Ptr CompoundData
-> IO ShapeId
createCompound :: BodyId -> Ptr ShapeDef -> Ptr CompoundData -> IO ShapeId
createCompound BodyId
a0 Ptr ShapeDef
a1 Ptr CompoundData
a2 =
BodyId -> Ptr ShapeDef -> Ptr CompoundData -> IO ShapeId
c_b3CreateCompoundShape BodyId
a0 Ptr ShapeDef
a1 Ptr CompoundData
a2
destroy
:: ShapeId
-> Bool
-> IO ()
destroy :: ShapeId -> Bool -> IO ()
destroy ShapeId
a0 Bool
a1 =
ShapeId -> CBool -> IO ()
c_b3DestroyShape ShapeId
a0 (Bool -> CBool
forall a. Num a => Bool -> a
fromBool Bool
a1)
isValid
:: ShapeId
-> IO Bool
isValid :: ShapeId -> IO Bool
isValid ShapeId
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
<$> (ShapeId -> IO CBool
c_b3Shape_IsValid ShapeId
a0)
getType
:: ShapeId
-> IO ShapeType
getType :: ShapeId -> IO ShapeType
getType ShapeId
a0 =
CInt -> ShapeType
forall a b. Coercible a b => a -> b
coerce (CInt -> ShapeType) -> IO CInt -> IO ShapeType
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ShapeId -> IO CInt
c_b3Shape_GetType ShapeId
a0)
getBody
:: ShapeId
-> IO BodyId
getBody :: ShapeId -> IO BodyId
getBody ShapeId
a0 =
ShapeId -> IO BodyId
c_b3Shape_GetBody ShapeId
a0
getWorld
:: ShapeId
-> IO WorldId
getWorld :: ShapeId -> IO WorldId
getWorld ShapeId
a0 =
ShapeId -> IO WorldId
c_b3Shape_GetWorld ShapeId
a0
isSensor
:: ShapeId
-> IO Bool
isSensor :: ShapeId -> IO Bool
isSensor ShapeId
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
<$> (ShapeId -> IO CBool
c_b3Shape_IsSensor ShapeId
a0)
setUserData
:: ShapeId
-> Ptr ()
-> IO ()
setUserData :: ShapeId -> Ptr () -> IO ()
setUserData ShapeId
a0 Ptr ()
a1 =
ShapeId -> Ptr () -> IO ()
c_b3Shape_SetUserData ShapeId
a0 Ptr ()
a1
getUserData
:: ShapeId
-> IO (Ptr ())
getUserData :: ShapeId -> IO (Ptr ())
getUserData ShapeId
a0 =
ShapeId -> IO (Ptr ())
c_b3Shape_GetUserData ShapeId
a0
setDensity
:: ShapeId
-> Float
-> Bool
-> IO ()
setDensity :: ShapeId -> Float -> Bool -> IO ()
setDensity ShapeId
a0 Float
a1 Bool
a2 =
ShapeId -> Float -> CBool -> IO ()
c_b3Shape_SetDensity ShapeId
a0 Float
a1 (Bool -> CBool
forall a. Num a => Bool -> a
fromBool Bool
a2)
getDensity
:: ShapeId
-> IO Float
getDensity :: ShapeId -> IO Float
getDensity ShapeId
a0 =
ShapeId -> IO Float
c_b3Shape_GetDensity ShapeId
a0
setFriction
:: ShapeId
-> Float
-> IO ()
setFriction :: ShapeId -> Float -> IO ()
setFriction ShapeId
a0 Float
a1 =
ShapeId -> Float -> IO ()
c_b3Shape_SetFriction ShapeId
a0 Float
a1
getFriction
:: ShapeId
-> IO Float
getFriction :: ShapeId -> IO Float
getFriction ShapeId
a0 =
ShapeId -> IO Float
c_b3Shape_GetFriction ShapeId
a0
setRestitution
:: ShapeId
-> Float
-> IO ()
setRestitution :: ShapeId -> Float -> IO ()
setRestitution ShapeId
a0 Float
a1 =
ShapeId -> Float -> IO ()
c_b3Shape_SetRestitution ShapeId
a0 Float
a1
getRestitution
:: ShapeId
-> IO Float
getRestitution :: ShapeId -> IO Float
getRestitution ShapeId
a0 =
ShapeId -> IO Float
c_b3Shape_GetRestitution ShapeId
a0
setSurfaceMaterial
:: ShapeId
-> SurfaceMaterial
-> IO ()
setSurfaceMaterial :: ShapeId -> SurfaceMaterial -> IO ()
setSurfaceMaterial ShapeId
a0 SurfaceMaterial
a1 =
SurfaceMaterial -> (Ptr SurfaceMaterial -> IO ()) -> IO ()
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with SurfaceMaterial
a1 ((Ptr SurfaceMaterial -> IO ()) -> IO ())
-> (Ptr SurfaceMaterial -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr SurfaceMaterial
p1 ->
ShapeId -> Ptr SurfaceMaterial -> IO ()
c_b3Shape_SetSurfaceMaterial ShapeId
a0 Ptr SurfaceMaterial
p1
getSurfaceMaterial
:: ShapeId
-> IO SurfaceMaterial
getSurfaceMaterial :: ShapeId -> IO SurfaceMaterial
getSurfaceMaterial ShapeId
a0 =
(Ptr SurfaceMaterial -> IO SurfaceMaterial) -> IO SurfaceMaterial
forall a b. Storable a => (Ptr a -> IO b) -> IO b
alloca ((Ptr SurfaceMaterial -> IO SurfaceMaterial) -> IO SurfaceMaterial)
-> (Ptr SurfaceMaterial -> IO SurfaceMaterial)
-> IO SurfaceMaterial
forall a b. (a -> b) -> a -> b
$ \Ptr SurfaceMaterial
pOut -> ShapeId -> Ptr SurfaceMaterial -> IO ()
c_b3Shape_GetSurfaceMaterial ShapeId
a0 Ptr SurfaceMaterial
pOut IO () -> IO SurfaceMaterial -> IO SurfaceMaterial
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Ptr SurfaceMaterial -> IO SurfaceMaterial
forall a. Storable a => Ptr a -> IO a
peek Ptr SurfaceMaterial
pOut
getSurfaceMaterialInto
:: ShapeId
-> Ptr SurfaceMaterial
-> IO ()
getSurfaceMaterialInto :: ShapeId -> Ptr SurfaceMaterial -> IO ()
getSurfaceMaterialInto ShapeId
a0 Ptr SurfaceMaterial
out =
ShapeId -> Ptr SurfaceMaterial -> IO ()
c_b3Shape_GetSurfaceMaterial ShapeId
a0 Ptr SurfaceMaterial
out
getMeshMaterialCount
:: ShapeId
-> IO Int
getMeshMaterialCount :: ShapeId -> IO Int
getMeshMaterialCount ShapeId
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
<$> (ShapeId -> IO CInt
c_b3Shape_GetMeshMaterialCount ShapeId
a0)
setMeshMaterial
:: ShapeId
-> SurfaceMaterial
-> Int
-> IO ()
setMeshMaterial :: ShapeId -> SurfaceMaterial -> Int -> IO ()
setMeshMaterial ShapeId
a0 SurfaceMaterial
a1 Int
a2 =
SurfaceMaterial -> (Ptr SurfaceMaterial -> IO ()) -> IO ()
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with SurfaceMaterial
a1 ((Ptr SurfaceMaterial -> IO ()) -> IO ())
-> (Ptr SurfaceMaterial -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr SurfaceMaterial
p1 ->
ShapeId -> Ptr SurfaceMaterial -> CInt -> IO ()
c_b3Shape_SetMeshMaterial ShapeId
a0 Ptr SurfaceMaterial
p1 (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
a2)
getMeshSurfaceMaterial
:: ShapeId
-> Int
-> IO SurfaceMaterial
getMeshSurfaceMaterial :: ShapeId -> Int -> IO SurfaceMaterial
getMeshSurfaceMaterial ShapeId
a0 Int
a1 =
(Ptr SurfaceMaterial -> IO SurfaceMaterial) -> IO SurfaceMaterial
forall a b. Storable a => (Ptr a -> IO b) -> IO b
alloca ((Ptr SurfaceMaterial -> IO SurfaceMaterial) -> IO SurfaceMaterial)
-> (Ptr SurfaceMaterial -> IO SurfaceMaterial)
-> IO SurfaceMaterial
forall a b. (a -> b) -> a -> b
$ \Ptr SurfaceMaterial
pOut -> ShapeId -> CInt -> Ptr SurfaceMaterial -> IO ()
c_b3Shape_GetMeshSurfaceMaterial ShapeId
a0 (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
a1) Ptr SurfaceMaterial
pOut IO () -> IO SurfaceMaterial -> IO SurfaceMaterial
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Ptr SurfaceMaterial -> IO SurfaceMaterial
forall a. Storable a => Ptr a -> IO a
peek Ptr SurfaceMaterial
pOut
getMeshSurfaceMaterialInto
:: ShapeId
-> Int
-> Ptr SurfaceMaterial
-> IO ()
getMeshSurfaceMaterialInto :: ShapeId -> Int -> Ptr SurfaceMaterial -> IO ()
getMeshSurfaceMaterialInto ShapeId
a0 Int
a1 Ptr SurfaceMaterial
out =
ShapeId -> CInt -> Ptr SurfaceMaterial -> IO ()
c_b3Shape_GetMeshSurfaceMaterial ShapeId
a0 (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
a1) Ptr SurfaceMaterial
out
getFilter
:: ShapeId
-> IO Filter
getFilter :: ShapeId -> IO Filter
getFilter ShapeId
a0 =
(Ptr Filter -> IO Filter) -> IO Filter
forall a b. Storable a => (Ptr a -> IO b) -> IO b
alloca ((Ptr Filter -> IO Filter) -> IO Filter)
-> (Ptr Filter -> IO Filter) -> IO Filter
forall a b. (a -> b) -> a -> b
$ \Ptr Filter
pOut -> ShapeId -> Ptr Filter -> IO ()
c_b3Shape_GetFilter ShapeId
a0 Ptr Filter
pOut IO () -> IO Filter -> IO Filter
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Ptr Filter -> IO Filter
forall a. Storable a => Ptr a -> IO a
peek Ptr Filter
pOut
getFilterInto
:: ShapeId
-> Ptr Filter
-> IO ()
getFilterInto :: ShapeId -> Ptr Filter -> IO ()
getFilterInto ShapeId
a0 Ptr Filter
out =
ShapeId -> Ptr Filter -> IO ()
c_b3Shape_GetFilter ShapeId
a0 Ptr Filter
out
setFilter
:: ShapeId
-> Filter
-> Bool
-> IO ()
setFilter :: ShapeId -> Filter -> Bool -> IO ()
setFilter ShapeId
a0 Filter
a1 Bool
a2 =
Filter -> (Ptr Filter -> IO ()) -> IO ()
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Filter
a1 ((Ptr Filter -> IO ()) -> IO ()) -> (Ptr Filter -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Filter
p1 ->
ShapeId -> Ptr Filter -> CBool -> IO ()
c_b3Shape_SetFilter ShapeId
a0 Ptr Filter
p1 (Bool -> CBool
forall a. Num a => Bool -> a
fromBool Bool
a2)
enableSensorEvents
:: ShapeId
-> Bool
-> IO ()
enableSensorEvents :: ShapeId -> Bool -> IO ()
enableSensorEvents ShapeId
a0 Bool
a1 =
ShapeId -> CBool -> IO ()
c_b3Shape_EnableSensorEvents ShapeId
a0 (Bool -> CBool
forall a. Num a => Bool -> a
fromBool Bool
a1)
areSensorEventsEnabled
:: ShapeId
-> IO Bool
areSensorEventsEnabled :: ShapeId -> IO Bool
areSensorEventsEnabled ShapeId
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
<$> (ShapeId -> IO CBool
c_b3Shape_AreSensorEventsEnabled ShapeId
a0)
enableContactEvents
:: ShapeId
-> Bool
-> IO ()
enableContactEvents :: ShapeId -> Bool -> IO ()
enableContactEvents ShapeId
a0 Bool
a1 =
ShapeId -> CBool -> IO ()
c_b3Shape_EnableContactEvents ShapeId
a0 (Bool -> CBool
forall a. Num a => Bool -> a
fromBool Bool
a1)
areContactEventsEnabled
:: ShapeId
-> IO Bool
areContactEventsEnabled :: ShapeId -> IO Bool
areContactEventsEnabled ShapeId
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
<$> (ShapeId -> IO CBool
c_b3Shape_AreContactEventsEnabled ShapeId
a0)
enablePreSolveEvents
:: ShapeId
-> Bool
-> IO ()
enablePreSolveEvents :: ShapeId -> Bool -> IO ()
enablePreSolveEvents ShapeId
a0 Bool
a1 =
ShapeId -> CBool -> IO ()
c_b3Shape_EnablePreSolveEvents ShapeId
a0 (Bool -> CBool
forall a. Num a => Bool -> a
fromBool Bool
a1)
arePreSolveEventsEnabled
:: ShapeId
-> IO Bool
arePreSolveEventsEnabled :: ShapeId -> IO Bool
arePreSolveEventsEnabled ShapeId
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
<$> (ShapeId -> IO CBool
c_b3Shape_ArePreSolveEventsEnabled ShapeId
a0)
enableHitEvents
:: ShapeId
-> Bool
-> IO ()
enableHitEvents :: ShapeId -> Bool -> IO ()
enableHitEvents ShapeId
a0 Bool
a1 =
ShapeId -> CBool -> IO ()
c_b3Shape_EnableHitEvents ShapeId
a0 (Bool -> CBool
forall a. Num a => Bool -> a
fromBool Bool
a1)
areHitEventsEnabled
:: ShapeId
-> IO Bool
areHitEventsEnabled :: ShapeId -> IO Bool
areHitEventsEnabled ShapeId
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
<$> (ShapeId -> IO CBool
c_b3Shape_AreHitEventsEnabled ShapeId
a0)
rayCast
:: ShapeId
-> Pos
-> Vec3
-> IO WorldCastOutput
rayCast :: ShapeId -> Vec3 -> Vec3 -> IO WorldCastOutput
rayCast ShapeId
a0 Vec3
a1 Vec3
a2 =
Vec3 -> (Ptr Vec3 -> IO WorldCastOutput) -> IO WorldCastOutput
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Vec3
a1 ((Ptr Vec3 -> IO WorldCastOutput) -> IO WorldCastOutput)
-> (Ptr Vec3 -> IO WorldCastOutput) -> IO WorldCastOutput
forall a b. (a -> b) -> a -> b
$ \Ptr Vec3
p1 ->
Vec3 -> (Ptr Vec3 -> IO WorldCastOutput) -> IO WorldCastOutput
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Vec3
a2 ((Ptr Vec3 -> IO WorldCastOutput) -> IO WorldCastOutput)
-> (Ptr Vec3 -> IO WorldCastOutput) -> IO WorldCastOutput
forall a b. (a -> b) -> a -> b
$ \Ptr Vec3
p2 ->
(Ptr WorldCastOutput -> IO WorldCastOutput) -> IO WorldCastOutput
forall a b. Storable a => (Ptr a -> IO b) -> IO b
alloca ((Ptr WorldCastOutput -> IO WorldCastOutput) -> IO WorldCastOutput)
-> (Ptr WorldCastOutput -> IO WorldCastOutput)
-> IO WorldCastOutput
forall a b. (a -> b) -> a -> b
$ \Ptr WorldCastOutput
pOut -> ShapeId -> Ptr Vec3 -> Ptr Vec3 -> Ptr WorldCastOutput -> IO ()
c_b3Shape_RayCast ShapeId
a0 Ptr Vec3
p1 Ptr Vec3
p2 Ptr WorldCastOutput
pOut IO () -> IO WorldCastOutput -> IO WorldCastOutput
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Ptr WorldCastOutput -> IO WorldCastOutput
forall a. Storable a => Ptr a -> IO a
peek Ptr WorldCastOutput
pOut
getSphere
:: ShapeId
-> IO Sphere
getSphere :: ShapeId -> IO Sphere
getSphere ShapeId
a0 =
(Ptr Sphere -> IO Sphere) -> IO Sphere
forall a b. Storable a => (Ptr a -> IO b) -> IO b
alloca ((Ptr Sphere -> IO Sphere) -> IO Sphere)
-> (Ptr Sphere -> IO Sphere) -> IO Sphere
forall a b. (a -> b) -> a -> b
$ \Ptr Sphere
pOut -> ShapeId -> Ptr Sphere -> IO ()
c_b3Shape_GetSphere ShapeId
a0 Ptr Sphere
pOut IO () -> IO Sphere -> IO Sphere
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Ptr Sphere -> IO Sphere
forall a. Storable a => Ptr a -> IO a
peek Ptr Sphere
pOut
getSphereInto
:: ShapeId
-> Ptr Sphere
-> IO ()
getSphereInto :: ShapeId -> Ptr Sphere -> IO ()
getSphereInto ShapeId
a0 Ptr Sphere
out =
ShapeId -> Ptr Sphere -> IO ()
c_b3Shape_GetSphere ShapeId
a0 Ptr Sphere
out
getCapsule
:: ShapeId
-> IO Capsule
getCapsule :: ShapeId -> IO Capsule
getCapsule ShapeId
a0 =
(Ptr Capsule -> IO Capsule) -> IO Capsule
forall a b. Storable a => (Ptr a -> IO b) -> IO b
alloca ((Ptr Capsule -> IO Capsule) -> IO Capsule)
-> (Ptr Capsule -> IO Capsule) -> IO Capsule
forall a b. (a -> b) -> a -> b
$ \Ptr Capsule
pOut -> ShapeId -> Ptr Capsule -> IO ()
c_b3Shape_GetCapsule ShapeId
a0 Ptr Capsule
pOut IO () -> IO Capsule -> IO Capsule
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Ptr Capsule -> IO Capsule
forall a. Storable a => Ptr a -> IO a
peek Ptr Capsule
pOut
getCapsuleInto
:: ShapeId
-> Ptr Capsule
-> IO ()
getCapsuleInto :: ShapeId -> Ptr Capsule -> IO ()
getCapsuleInto ShapeId
a0 Ptr Capsule
out =
ShapeId -> Ptr Capsule -> IO ()
c_b3Shape_GetCapsule ShapeId
a0 Ptr Capsule
out
getHull
:: ShapeId
-> IO (Ptr HullData)
getHull :: ShapeId -> IO (Ptr HullData)
getHull ShapeId
a0 =
ShapeId -> IO (Ptr HullData)
c_b3Shape_GetHull ShapeId
a0
getMesh
:: ShapeId
-> Ptr Mesh
-> IO ()
getMesh :: ShapeId -> Ptr Mesh -> IO ()
getMesh ShapeId
a0 Ptr Mesh
out =
ShapeId -> Ptr Mesh -> IO ()
c_b3Shape_GetMesh ShapeId
a0 Ptr Mesh
out
getHeightField
:: ShapeId
-> IO (Ptr HeightFieldData)
getHeightField :: ShapeId -> IO (Ptr HeightFieldData)
getHeightField ShapeId
a0 =
ShapeId -> IO (Ptr HeightFieldData)
c_b3Shape_GetHeightField ShapeId
a0
setSphere
:: ShapeId
-> Sphere
-> IO ()
setSphere :: ShapeId -> Sphere -> IO ()
setSphere ShapeId
a0 Sphere
a1 =
Sphere -> (Ptr Sphere -> IO ()) -> IO ()
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Sphere
a1 ((Ptr Sphere -> IO ()) -> IO ()) -> (Ptr Sphere -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Sphere
p1 ->
ShapeId -> Ptr Sphere -> IO ()
c_b3Shape_SetSphere ShapeId
a0 Ptr Sphere
p1
setCapsule
:: ShapeId
-> Capsule
-> IO ()
setCapsule :: ShapeId -> Capsule -> IO ()
setCapsule ShapeId
a0 Capsule
a1 =
Capsule -> (Ptr Capsule -> IO ()) -> IO ()
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Capsule
a1 ((Ptr Capsule -> IO ()) -> IO ())
-> (Ptr Capsule -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Capsule
p1 ->
ShapeId -> Ptr Capsule -> IO ()
c_b3Shape_SetCapsule ShapeId
a0 Ptr Capsule
p1
setHull
:: ShapeId
-> Ptr HullData
-> IO ()
setHull :: ShapeId -> Ptr HullData -> IO ()
setHull ShapeId
a0 Ptr HullData
a1 =
ShapeId -> Ptr HullData -> IO ()
c_b3Shape_SetHull ShapeId
a0 Ptr HullData
a1
setMesh
:: ShapeId
-> Ptr MeshData
-> Vec3
-> IO ()
setMesh :: ShapeId -> Ptr MeshData -> Vec3 -> IO ()
setMesh ShapeId
a0 Ptr MeshData
a1 Vec3
a2 =
Vec3 -> (Ptr Vec3 -> IO ()) -> IO ()
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Vec3
a2 ((Ptr Vec3 -> IO ()) -> IO ()) -> (Ptr Vec3 -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Vec3
p2 ->
ShapeId -> Ptr MeshData -> Ptr Vec3 -> IO ()
c_b3Shape_SetMesh ShapeId
a0 Ptr MeshData
a1 Ptr Vec3
p2
getContactCapacity
:: ShapeId
-> IO Int
getContactCapacity :: ShapeId -> IO Int
getContactCapacity ShapeId
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
<$> (ShapeId -> IO CInt
c_b3Shape_GetContactCapacity ShapeId
a0)
getContactData
:: ShapeId
-> Ptr ContactData
-> Int
-> IO Int
getContactData :: ShapeId -> Ptr ContactData -> Int -> IO Int
getContactData ShapeId
a0 Ptr ContactData
a1 Int
a2 =
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
<$> (ShapeId -> Ptr ContactData -> CInt -> IO CInt
c_b3Shape_GetContactData ShapeId
a0 Ptr ContactData
a1 (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
a2))
getSensorCapacity
:: ShapeId
-> IO Int
getSensorCapacity :: ShapeId -> IO Int
getSensorCapacity ShapeId
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
<$> (ShapeId -> IO CInt
c_b3Shape_GetSensorCapacity ShapeId
a0)
getSensorData
:: ShapeId
-> Ptr ShapeId
-> Int
-> IO Int
getSensorData :: ShapeId -> Ptr ShapeId -> Int -> IO Int
getSensorData ShapeId
a0 Ptr ShapeId
a1 Int
a2 =
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
<$> (ShapeId -> Ptr ShapeId -> CInt -> IO CInt
c_b3Shape_GetSensorData ShapeId
a0 Ptr ShapeId
a1 (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
a2))
getAABB
:: ShapeId
-> IO AABB
getAABB :: ShapeId -> IO AABB
getAABB ShapeId
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 -> ShapeId -> Ptr AABB -> IO ()
c_b3Shape_GetAABB ShapeId
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
getAABBInto
:: ShapeId
-> Ptr AABB
-> IO ()
getAABBInto :: ShapeId -> Ptr AABB -> IO ()
getAABBInto ShapeId
a0 Ptr AABB
out =
ShapeId -> Ptr AABB -> IO ()
c_b3Shape_GetAABB ShapeId
a0 Ptr AABB
out
computeMassData
:: ShapeId
-> IO MassData
computeMassData :: ShapeId -> IO MassData
computeMassData ShapeId
a0 =
(Ptr MassData -> IO MassData) -> IO MassData
forall a b. Storable a => (Ptr a -> IO b) -> IO b
alloca ((Ptr MassData -> IO MassData) -> IO MassData)
-> (Ptr MassData -> IO MassData) -> IO MassData
forall a b. (a -> b) -> a -> b
$ \Ptr MassData
pOut -> ShapeId -> Ptr MassData -> IO ()
c_b3Shape_ComputeMassData ShapeId
a0 Ptr MassData
pOut IO () -> IO MassData -> IO MassData
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Ptr MassData -> IO MassData
forall a. Storable a => Ptr a -> IO a
peek Ptr MassData
pOut
computeMassDataInto
:: ShapeId
-> Ptr MassData
-> IO ()
computeMassDataInto :: ShapeId -> Ptr MassData -> IO ()
computeMassDataInto ShapeId
a0 Ptr MassData
out =
ShapeId -> Ptr MassData -> IO ()
c_b3Shape_ComputeMassData ShapeId
a0 Ptr MassData
out
getClosestPoint
:: ShapeId
-> Vec3
-> IO Vec3
getClosestPoint :: ShapeId -> Vec3 -> IO Vec3
getClosestPoint ShapeId
a0 Vec3
a1 =
Vec3 -> (Ptr Vec3 -> IO Vec3) -> IO Vec3
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Vec3
a1 ((Ptr Vec3 -> IO Vec3) -> IO Vec3)
-> (Ptr Vec3 -> IO Vec3) -> IO Vec3
forall a b. (a -> b) -> a -> b
$ \Ptr Vec3
p1 ->
(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 -> ShapeId -> Ptr Vec3 -> Ptr Vec3 -> IO ()
c_b3Shape_GetClosestPoint ShapeId
a0 Ptr Vec3
p1 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
applyWind
:: ShapeId
-> Vec3
-> Float
-> Float
-> Float
-> Bool
-> IO ()
applyWind :: ShapeId -> Vec3 -> Float -> Float -> Float -> Bool -> IO ()
applyWind ShapeId
a0 Vec3
a1 Float
a2 Float
a3 Float
a4 Bool
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 ->
ShapeId -> Ptr Vec3 -> Float -> Float -> Float -> CBool -> IO ()
c_b3Shape_ApplyWind ShapeId
a0 Ptr Vec3
p1 Float
a2 Float
a3 Float
a4 (Bool -> CBool
forall a. Num a => Bool -> a
fromBool Bool
a5)