module Box3D.Collision
( getWorldCount
, getMaxWorldCount
, saveRecordingToFile
, loadRecordingFromFile
, validateReplay
, cloneHull
, cloneAndTransformHull
, makeCubeHull
, makeBoxHull
, makeOffsetBoxHull
, makeTransformedBoxHull
, makeScaledBoxHull
, scaleBox
, getHeight
, dumpHeightData
, loadHeightField
, getCompoundChild
, queryCompound
, getCompoundCapsule
, getCompoundHull
, getCompoundMesh
, getCompoundSphere
, getCompoundMaterials
, convertCompoundToBytes
, convertBytesToCompound
, computeSphereMass
, computeCapsuleMass
, computeHullMass
, computeHullMassInto
, computeSphereAABB
, computeCapsuleAABB
, computeHullAABB
, computeMeshAABB
, computeHeightFieldAABB
, computeCompoundAABB
, isValidRay
, overlapCapsule
, overlapCompound
, overlapHeightField
, overlapHull
, overlapMesh
, overlapSphere
, rayCastSphere
, rayCastHollowSphere
, rayCastCapsule
, rayCastCompound
, rayCastHull
, rayCastMesh
, rayCastHeightField
, shapeCastSphere
, shapeCastCapsule
, shapeCastCompound
, shapeCastCompoundInto
, shapeCastHull
, shapeCastHullInto
, shapeCastMesh
, shapeCastMeshInto
, shapeCastHeightField
, shapeCastHeightFieldInto
, queryMesh
, queryHeightField
, shapeDistance
, shapeCast
, shapeCastInto
, getSweepTransform
, timeOfImpact
, collideSpheres
, collideCapsuleAndSphere
, collideHullAndSphere
, collideCapsules
, collideHullAndCapsule
, collideHulls
, collideCapsuleAndTriangle
, collideHullAndTriangle
, collideSphereAndTriangle
, solvePlanes
, clipVector
)
where
import Foreign
import Foreign.C.Types (CInt(..), CBool(..))
import Foreign.C.String (CString)
import Box3D.MathTypes (AABB, Transform, Vec3)
import Box3D.Tags (BoxHull, ChildShape, CollisionPlane, CompoundCapsule, CompoundData, CompoundHull, CompoundMesh, CompoundQueryFcn, CompoundSphere, DistanceInput, DistanceOutput, HeightFieldData, HeightFieldDef, HullData, LocalManifold, Mesh, MeshData, MeshQueryFcn, PlaneSolverResult, Recording, SATCache, ShapeCastInput, ShapeCastPairInput, ShapeProxy, Simplex, SimplexCache, TOIInput, TOIOutput)
import Box3D.Types (Capsule, CastOutput, MassData, RayCastInput, Sphere, SurfaceMaterial, Sweep)
foreign import ccall unsafe "b3GetWorldCount"
c_b3GetWorldCount :: IO CInt
foreign import ccall unsafe "b3GetMaxWorldCount"
c_b3GetMaxWorldCount :: IO CInt
foreign import ccall unsafe "b3SaveRecordingToFile"
c_b3SaveRecordingToFile :: Ptr Recording -> CString -> IO CBool
foreign import ccall unsafe "b3LoadRecordingFromFile"
c_b3LoadRecordingFromFile :: CString -> IO (Ptr Recording)
foreign import ccall unsafe "b3ValidateReplay"
c_b3ValidateReplay :: Ptr () -> CInt -> CInt -> IO CBool
foreign import ccall unsafe "b3CloneHull"
c_b3CloneHull :: Ptr HullData -> IO (Ptr HullData)
foreign import ccall unsafe "hsg_b3CloneAndTransformHull"
c_b3CloneAndTransformHull :: Ptr HullData -> Ptr Transform -> Ptr Vec3 -> IO (Ptr HullData)
foreign import ccall unsafe "hsg_b3MakeCubeHull"
c_b3MakeCubeHull :: Float -> Ptr BoxHull -> IO ()
foreign import ccall unsafe "hsg_b3MakeBoxHull"
c_b3MakeBoxHull :: Float -> Float -> Float -> Ptr BoxHull -> IO ()
foreign import ccall unsafe "hsg_b3MakeOffsetBoxHull"
c_b3MakeOffsetBoxHull :: Float -> Float -> Float -> Ptr Vec3 -> Ptr BoxHull -> IO ()
foreign import ccall unsafe "hsg_b3MakeTransformedBoxHull"
c_b3MakeTransformedBoxHull :: Float -> Float -> Float -> Ptr Transform -> Ptr BoxHull -> IO ()
foreign import ccall unsafe "hsg_b3MakeScaledBoxHull"
c_b3MakeScaledBoxHull :: Ptr Vec3 -> Ptr Transform -> Ptr Vec3 -> Ptr BoxHull -> IO ()
foreign import ccall unsafe "hsg_b3ScaleBox"
c_b3ScaleBox :: Ptr Vec3 -> Ptr Transform -> Ptr Vec3 -> Float -> IO ()
foreign import ccall unsafe "b3GetHeight"
c_b3GetHeight :: Ptr MeshData -> IO CInt
foreign import ccall unsafe "b3DumpHeightData"
c_b3DumpHeightData :: Ptr HeightFieldDef -> CString -> IO ()
foreign import ccall unsafe "b3LoadHeightField"
c_b3LoadHeightField :: CString -> IO (Ptr HeightFieldData)
foreign import ccall unsafe "hsg_b3GetCompoundChild"
c_b3GetCompoundChild :: Ptr CompoundData -> CInt -> Ptr ChildShape -> IO ()
foreign import ccall safe "hsg_b3QueryCompound"
c_b3QueryCompound :: Ptr CompoundData -> Ptr AABB -> FunPtr CompoundQueryFcn -> Ptr () -> IO ()
foreign import ccall unsafe "hsg_b3GetCompoundCapsule"
c_b3GetCompoundCapsule :: Ptr CompoundData -> CInt -> Ptr CompoundCapsule -> IO ()
foreign import ccall unsafe "hsg_b3GetCompoundHull"
c_b3GetCompoundHull :: Ptr CompoundData -> CInt -> Ptr CompoundHull -> IO ()
foreign import ccall unsafe "hsg_b3GetCompoundMesh"
c_b3GetCompoundMesh :: Ptr CompoundData -> CInt -> Ptr CompoundMesh -> IO ()
foreign import ccall unsafe "hsg_b3GetCompoundSphere"
c_b3GetCompoundSphere :: Ptr CompoundData -> CInt -> Ptr CompoundSphere -> IO ()
foreign import ccall unsafe "b3GetCompoundMaterials"
c_b3GetCompoundMaterials :: Ptr CompoundData -> IO (Ptr SurfaceMaterial)
foreign import ccall unsafe "b3ConvertCompoundToBytes"
c_b3ConvertCompoundToBytes :: Ptr CompoundData -> IO (Ptr Word8)
foreign import ccall unsafe "b3ConvertBytesToCompound"
c_b3ConvertBytesToCompound :: Ptr Word8 -> CInt -> IO (Ptr CompoundData)
foreign import ccall unsafe "hsg_b3ComputeSphereMass"
c_b3ComputeSphereMass :: Ptr Sphere -> Float -> Ptr MassData -> IO ()
foreign import ccall unsafe "hsg_b3ComputeCapsuleMass"
c_b3ComputeCapsuleMass :: Ptr Capsule -> Float -> Ptr MassData -> IO ()
foreign import ccall unsafe "hsg_b3ComputeHullMass"
c_b3ComputeHullMass :: Ptr HullData -> Float -> Ptr MassData -> IO ()
foreign import ccall unsafe "hsg_b3ComputeSphereAABB"
c_b3ComputeSphereAABB :: Ptr Sphere -> Ptr Transform -> Ptr AABB -> IO ()
foreign import ccall unsafe "hsg_b3ComputeCapsuleAABB"
c_b3ComputeCapsuleAABB :: Ptr Capsule -> Ptr Transform -> Ptr AABB -> IO ()
foreign import ccall unsafe "hsg_b3ComputeHullAABB"
c_b3ComputeHullAABB :: Ptr HullData -> Ptr Transform -> Ptr AABB -> IO ()
foreign import ccall unsafe "hsg_b3ComputeMeshAABB"
c_b3ComputeMeshAABB :: Ptr MeshData -> Ptr Transform -> Ptr Vec3 -> Ptr AABB -> IO ()
foreign import ccall unsafe "hsg_b3ComputeHeightFieldAABB"
c_b3ComputeHeightFieldAABB :: Ptr HeightFieldData -> Ptr Transform -> Ptr AABB -> IO ()
foreign import ccall unsafe "hsg_b3ComputeCompoundAABB"
c_b3ComputeCompoundAABB :: Ptr CompoundData -> Ptr Transform -> Ptr AABB -> IO ()
foreign import ccall unsafe "b3IsValidRay"
c_b3IsValidRay :: Ptr RayCastInput -> IO CBool
foreign import ccall unsafe "hsg_b3OverlapCapsule"
c_b3OverlapCapsule :: Ptr Capsule -> Ptr Transform -> Ptr ShapeProxy -> IO CBool
foreign import ccall unsafe "hsg_b3OverlapCompound"
c_b3OverlapCompound :: Ptr CompoundData -> Ptr Transform -> Ptr ShapeProxy -> IO CBool
foreign import ccall unsafe "hsg_b3OverlapHeightField"
c_b3OverlapHeightField :: Ptr HeightFieldData -> Ptr Transform -> Ptr ShapeProxy -> IO CBool
foreign import ccall unsafe "hsg_b3OverlapHull"
c_b3OverlapHull :: Ptr HullData -> Ptr Transform -> Ptr ShapeProxy -> IO CBool
foreign import ccall unsafe "hsg_b3OverlapMesh"
c_b3OverlapMesh :: Ptr Mesh -> Ptr Transform -> Ptr ShapeProxy -> IO CBool
foreign import ccall unsafe "hsg_b3OverlapSphere"
c_b3OverlapSphere :: Ptr Sphere -> Ptr Transform -> Ptr ShapeProxy -> IO CBool
foreign import ccall unsafe "hsg_b3RayCastSphere"
c_b3RayCastSphere :: Ptr Sphere -> Ptr RayCastInput -> Ptr CastOutput -> IO ()
foreign import ccall unsafe "hsg_b3RayCastHollowSphere"
c_b3RayCastHollowSphere :: Ptr Sphere -> Ptr RayCastInput -> Ptr CastOutput -> IO ()
foreign import ccall unsafe "hsg_b3RayCastCapsule"
c_b3RayCastCapsule :: Ptr Capsule -> Ptr RayCastInput -> Ptr CastOutput -> IO ()
foreign import ccall unsafe "hsg_b3RayCastCompound"
c_b3RayCastCompound :: Ptr CompoundData -> Ptr RayCastInput -> Ptr CastOutput -> IO ()
foreign import ccall unsafe "hsg_b3RayCastHull"
c_b3RayCastHull :: Ptr HullData -> Ptr RayCastInput -> Ptr CastOutput -> IO ()
foreign import ccall unsafe "hsg_b3RayCastMesh"
c_b3RayCastMesh :: Ptr Mesh -> Ptr RayCastInput -> Ptr CastOutput -> IO ()
foreign import ccall unsafe "hsg_b3RayCastHeightField"
c_b3RayCastHeightField :: Ptr HeightFieldData -> Ptr RayCastInput -> Ptr CastOutput -> IO ()
foreign import ccall unsafe "hsg_b3ShapeCastSphere"
c_b3ShapeCastSphere :: Ptr Sphere -> Ptr ShapeCastInput -> Ptr CastOutput -> IO ()
foreign import ccall unsafe "hsg_b3ShapeCastCapsule"
c_b3ShapeCastCapsule :: Ptr Capsule -> Ptr ShapeCastInput -> Ptr CastOutput -> IO ()
foreign import ccall unsafe "hsg_b3ShapeCastCompound"
c_b3ShapeCastCompound :: Ptr CompoundData -> Ptr ShapeCastInput -> Ptr CastOutput -> IO ()
foreign import ccall unsafe "hsg_b3ShapeCastHull"
c_b3ShapeCastHull :: Ptr HullData -> Ptr ShapeCastInput -> Ptr CastOutput -> IO ()
foreign import ccall unsafe "hsg_b3ShapeCastMesh"
c_b3ShapeCastMesh :: Ptr Mesh -> Ptr ShapeCastInput -> Ptr CastOutput -> IO ()
foreign import ccall unsafe "hsg_b3ShapeCastHeightField"
c_b3ShapeCastHeightField :: Ptr HeightFieldData -> Ptr ShapeCastInput -> Ptr CastOutput -> IO ()
foreign import ccall safe "hsg_b3QueryMesh"
c_b3QueryMesh :: Ptr Mesh -> Ptr AABB -> FunPtr MeshQueryFcn -> Ptr () -> IO ()
foreign import ccall safe "hsg_b3QueryHeightField"
c_b3QueryHeightField :: Ptr HeightFieldData -> Ptr AABB -> FunPtr MeshQueryFcn -> Ptr () -> IO ()
foreign import ccall unsafe "hsg_b3ShapeDistance"
c_b3ShapeDistance :: Ptr DistanceInput -> Ptr SimplexCache -> Ptr Simplex -> CInt -> Ptr DistanceOutput -> IO ()
foreign import ccall unsafe "hsg_b3ShapeCast"
c_b3ShapeCast :: Ptr ShapeCastPairInput -> Ptr CastOutput -> IO ()
foreign import ccall unsafe "hsg_b3GetSweepTransform"
c_b3GetSweepTransform :: Ptr Sweep -> Float -> Ptr Transform -> IO ()
foreign import ccall unsafe "hsg_b3TimeOfImpact"
c_b3TimeOfImpact :: Ptr TOIInput -> Ptr TOIOutput -> IO ()
foreign import ccall unsafe "hsg_b3CollideSpheres"
c_b3CollideSpheres :: Ptr LocalManifold -> CInt -> Ptr Sphere -> Ptr Sphere -> Ptr Transform -> IO ()
foreign import ccall unsafe "hsg_b3CollideCapsuleAndSphere"
c_b3CollideCapsuleAndSphere :: Ptr LocalManifold -> CInt -> Ptr Capsule -> Ptr Sphere -> Ptr Transform -> IO ()
foreign import ccall unsafe "hsg_b3CollideHullAndSphere"
c_b3CollideHullAndSphere :: Ptr LocalManifold -> CInt -> Ptr HullData -> Ptr Sphere -> Ptr Transform -> Ptr SimplexCache -> IO ()
foreign import ccall unsafe "hsg_b3CollideCapsules"
c_b3CollideCapsules :: Ptr LocalManifold -> CInt -> Ptr Capsule -> Ptr Capsule -> Ptr Transform -> IO ()
foreign import ccall unsafe "hsg_b3CollideHullAndCapsule"
c_b3CollideHullAndCapsule :: Ptr LocalManifold -> CInt -> Ptr HullData -> Ptr Capsule -> Ptr Transform -> Ptr SimplexCache -> IO ()
foreign import ccall unsafe "hsg_b3CollideHulls"
c_b3CollideHulls :: Ptr LocalManifold -> CInt -> Ptr HullData -> Ptr HullData -> Ptr Transform -> Ptr SATCache -> IO ()
foreign import ccall unsafe "b3CollideCapsuleAndTriangle"
c_b3CollideCapsuleAndTriangle :: Ptr LocalManifold -> CInt -> Ptr Capsule -> Ptr Vec3 -> Ptr SimplexCache -> IO ()
foreign import ccall unsafe "hsg_b3CollideHullAndTriangle"
c_b3CollideHullAndTriangle :: Ptr LocalManifold -> CInt -> Ptr HullData -> Ptr Vec3 -> Ptr Vec3 -> Ptr Vec3 -> CInt -> Ptr SATCache -> IO ()
foreign import ccall unsafe "b3CollideSphereAndTriangle"
c_b3CollideSphereAndTriangle :: Ptr LocalManifold -> CInt -> Ptr Sphere -> Ptr Vec3 -> IO ()
foreign import ccall unsafe "hsg_b3SolvePlanes"
c_b3SolvePlanes :: Ptr Vec3 -> Ptr CollisionPlane -> CInt -> Ptr PlaneSolverResult -> IO ()
foreign import ccall unsafe "hsg_b3ClipVector"
c_b3ClipVector :: Ptr Vec3 -> Ptr CollisionPlane -> CInt -> Ptr Vec3 -> IO ()
getWorldCount :: IO Int
getWorldCount :: IO Int
getWorldCount =
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
<$> (IO CInt
c_b3GetWorldCount)
getMaxWorldCount :: IO Int
getMaxWorldCount :: IO Int
getMaxWorldCount =
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
<$> (IO CInt
c_b3GetMaxWorldCount)
saveRecordingToFile
:: Ptr Recording
-> CString
-> IO Bool
saveRecordingToFile :: Ptr Recording -> CString -> IO Bool
saveRecordingToFile Ptr Recording
a0 CString
a1 =
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
<$> (Ptr Recording -> CString -> IO CBool
c_b3SaveRecordingToFile Ptr Recording
a0 CString
a1)
loadRecordingFromFile
:: CString
-> IO (Ptr Recording)
loadRecordingFromFile :: CString -> IO (Ptr Recording)
loadRecordingFromFile CString
a0 =
CString -> IO (Ptr Recording)
c_b3LoadRecordingFromFile CString
a0
validateReplay
:: Ptr ()
-> Int
-> Int
-> IO Bool
validateReplay :: Ptr () -> Int -> Int -> IO Bool
validateReplay Ptr ()
a0 Int
a1 Int
a2 =
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
<$> (Ptr () -> CInt -> CInt -> IO CBool
c_b3ValidateReplay Ptr ()
a0 (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
a1) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
a2))
cloneHull
:: Ptr HullData
-> IO (Ptr HullData)
cloneHull :: Ptr HullData -> IO (Ptr HullData)
cloneHull Ptr HullData
a0 =
Ptr HullData -> IO (Ptr HullData)
c_b3CloneHull Ptr HullData
a0
cloneAndTransformHull
:: Ptr HullData
-> Transform
-> Vec3
-> IO (Ptr HullData)
cloneAndTransformHull :: Ptr HullData -> Transform -> Vec3 -> IO (Ptr HullData)
cloneAndTransformHull Ptr HullData
a0 Transform
a1 Vec3
a2 =
Transform
-> (Ptr Transform -> IO (Ptr HullData)) -> IO (Ptr HullData)
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Transform
a1 ((Ptr Transform -> IO (Ptr HullData)) -> IO (Ptr HullData))
-> (Ptr Transform -> IO (Ptr HullData)) -> IO (Ptr HullData)
forall a b. (a -> b) -> a -> b
$ \Ptr Transform
p1 ->
Vec3 -> (Ptr Vec3 -> IO (Ptr HullData)) -> IO (Ptr HullData)
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Vec3
a2 ((Ptr Vec3 -> IO (Ptr HullData)) -> IO (Ptr HullData))
-> (Ptr Vec3 -> IO (Ptr HullData)) -> IO (Ptr HullData)
forall a b. (a -> b) -> a -> b
$ \Ptr Vec3
p2 ->
Ptr HullData -> Ptr Transform -> Ptr Vec3 -> IO (Ptr HullData)
c_b3CloneAndTransformHull Ptr HullData
a0 Ptr Transform
p1 Ptr Vec3
p2
makeCubeHull
:: Float
-> Ptr BoxHull
-> IO ()
makeCubeHull :: Float -> Ptr BoxHull -> IO ()
makeCubeHull Float
a0 Ptr BoxHull
out =
Float -> Ptr BoxHull -> IO ()
c_b3MakeCubeHull Float
a0 Ptr BoxHull
out
makeBoxHull
:: Float
-> Float
-> Float
-> Ptr BoxHull
-> IO ()
makeBoxHull :: Float -> Float -> Float -> Ptr BoxHull -> IO ()
makeBoxHull Float
a0 Float
a1 Float
a2 Ptr BoxHull
out =
Float -> Float -> Float -> Ptr BoxHull -> IO ()
c_b3MakeBoxHull Float
a0 Float
a1 Float
a2 Ptr BoxHull
out
makeOffsetBoxHull
:: Float
-> Float
-> Float
-> Vec3
-> Ptr BoxHull
-> IO ()
makeOffsetBoxHull :: Float -> Float -> Float -> Vec3 -> Ptr BoxHull -> IO ()
makeOffsetBoxHull Float
a0 Float
a1 Float
a2 Vec3
a3 Ptr BoxHull
out =
Vec3 -> (Ptr Vec3 -> IO ()) -> IO ()
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Vec3
a3 ((Ptr Vec3 -> IO ()) -> IO ()) -> (Ptr Vec3 -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Vec3
p3 ->
Float -> Float -> Float -> Ptr Vec3 -> Ptr BoxHull -> IO ()
c_b3MakeOffsetBoxHull Float
a0 Float
a1 Float
a2 Ptr Vec3
p3 Ptr BoxHull
out
makeTransformedBoxHull
:: Float
-> Float
-> Float
-> Transform
-> Ptr BoxHull
-> IO ()
makeTransformedBoxHull :: Float -> Float -> Float -> Transform -> Ptr BoxHull -> IO ()
makeTransformedBoxHull Float
a0 Float
a1 Float
a2 Transform
a3 Ptr BoxHull
out =
Transform -> (Ptr Transform -> IO ()) -> IO ()
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Transform
a3 ((Ptr Transform -> IO ()) -> IO ())
-> (Ptr Transform -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Transform
p3 ->
Float -> Float -> Float -> Ptr Transform -> Ptr BoxHull -> IO ()
c_b3MakeTransformedBoxHull Float
a0 Float
a1 Float
a2 Ptr Transform
p3 Ptr BoxHull
out
makeScaledBoxHull
:: Vec3
-> Transform
-> Vec3
-> Ptr BoxHull
-> IO ()
makeScaledBoxHull :: Vec3 -> Transform -> Vec3 -> Ptr BoxHull -> IO ()
makeScaledBoxHull Vec3
a0 Transform
a1 Vec3
a2 Ptr BoxHull
out =
Vec3 -> (Ptr Vec3 -> IO ()) -> IO ()
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Vec3
a0 ((Ptr Vec3 -> IO ()) -> IO ()) -> (Ptr Vec3 -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Vec3
p0 ->
Transform -> (Ptr Transform -> IO ()) -> IO ()
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Transform
a1 ((Ptr Transform -> IO ()) -> IO ())
-> (Ptr Transform -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Transform
p1 ->
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 ->
Ptr Vec3 -> Ptr Transform -> Ptr Vec3 -> Ptr BoxHull -> IO ()
c_b3MakeScaledBoxHull Ptr Vec3
p0 Ptr Transform
p1 Ptr Vec3
p2 Ptr BoxHull
out
scaleBox
:: Ptr Vec3
-> Ptr Transform
-> Vec3
-> Float
-> IO ()
scaleBox :: Ptr Vec3 -> Ptr Transform -> Vec3 -> Float -> IO ()
scaleBox Ptr Vec3
a0 Ptr Transform
a1 Vec3
a2 Float
a3 =
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 ->
Ptr Vec3 -> Ptr Transform -> Ptr Vec3 -> Float -> IO ()
c_b3ScaleBox Ptr Vec3
a0 Ptr Transform
a1 Ptr Vec3
p2 Float
a3
getHeight
:: Ptr MeshData
-> IO Int
getHeight :: Ptr MeshData -> IO Int
getHeight Ptr MeshData
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
<$> (Ptr MeshData -> IO CInt
c_b3GetHeight Ptr MeshData
a0)
dumpHeightData
:: Ptr HeightFieldDef
-> CString
-> IO ()
dumpHeightData :: Ptr HeightFieldDef -> CString -> IO ()
dumpHeightData Ptr HeightFieldDef
a0 CString
a1 =
Ptr HeightFieldDef -> CString -> IO ()
c_b3DumpHeightData Ptr HeightFieldDef
a0 CString
a1
loadHeightField
:: CString
-> IO (Ptr HeightFieldData)
loadHeightField :: CString -> IO (Ptr HeightFieldData)
loadHeightField CString
a0 =
CString -> IO (Ptr HeightFieldData)
c_b3LoadHeightField CString
a0
getCompoundChild
:: Ptr CompoundData
-> Int
-> Ptr ChildShape
-> IO ()
getCompoundChild :: Ptr CompoundData -> Int -> Ptr ChildShape -> IO ()
getCompoundChild Ptr CompoundData
a0 Int
a1 Ptr ChildShape
out =
Ptr CompoundData -> CInt -> Ptr ChildShape -> IO ()
c_b3GetCompoundChild Ptr CompoundData
a0 (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
a1) Ptr ChildShape
out
queryCompound
:: Ptr CompoundData
-> AABB
-> FunPtr CompoundQueryFcn
-> Ptr ()
-> IO ()
queryCompound :: Ptr CompoundData
-> AABB -> FunPtr CompoundQueryFcn -> Ptr () -> IO ()
queryCompound Ptr CompoundData
a0 AABB
a1 FunPtr CompoundQueryFcn
a2 Ptr ()
a3 =
AABB -> (Ptr AABB -> IO ()) -> IO ()
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with AABB
a1 ((Ptr AABB -> IO ()) -> IO ()) -> (Ptr AABB -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr AABB
p1 ->
Ptr CompoundData
-> Ptr AABB -> FunPtr CompoundQueryFcn -> Ptr () -> IO ()
c_b3QueryCompound Ptr CompoundData
a0 Ptr AABB
p1 FunPtr CompoundQueryFcn
a2 Ptr ()
a3
getCompoundCapsule
:: Ptr CompoundData
-> Int
-> Ptr CompoundCapsule
-> IO ()
getCompoundCapsule :: Ptr CompoundData -> Int -> Ptr CompoundCapsule -> IO ()
getCompoundCapsule Ptr CompoundData
a0 Int
a1 Ptr CompoundCapsule
out =
Ptr CompoundData -> CInt -> Ptr CompoundCapsule -> IO ()
c_b3GetCompoundCapsule Ptr CompoundData
a0 (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
a1) Ptr CompoundCapsule
out
getCompoundHull
:: Ptr CompoundData
-> Int
-> Ptr CompoundHull
-> IO ()
getCompoundHull :: Ptr CompoundData -> Int -> Ptr CompoundHull -> IO ()
getCompoundHull Ptr CompoundData
a0 Int
a1 Ptr CompoundHull
out =
Ptr CompoundData -> CInt -> Ptr CompoundHull -> IO ()
c_b3GetCompoundHull Ptr CompoundData
a0 (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
a1) Ptr CompoundHull
out
getCompoundMesh
:: Ptr CompoundData
-> Int
-> Ptr CompoundMesh
-> IO ()
getCompoundMesh :: Ptr CompoundData -> Int -> Ptr CompoundMesh -> IO ()
getCompoundMesh Ptr CompoundData
a0 Int
a1 Ptr CompoundMesh
out =
Ptr CompoundData -> CInt -> Ptr CompoundMesh -> IO ()
c_b3GetCompoundMesh Ptr CompoundData
a0 (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
a1) Ptr CompoundMesh
out
getCompoundSphere
:: Ptr CompoundData
-> Int
-> Ptr CompoundSphere
-> IO ()
getCompoundSphere :: Ptr CompoundData -> Int -> Ptr CompoundSphere -> IO ()
getCompoundSphere Ptr CompoundData
a0 Int
a1 Ptr CompoundSphere
out =
Ptr CompoundData -> CInt -> Ptr CompoundSphere -> IO ()
c_b3GetCompoundSphere Ptr CompoundData
a0 (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
a1) Ptr CompoundSphere
out
getCompoundMaterials
:: Ptr CompoundData
-> IO (Ptr SurfaceMaterial)
getCompoundMaterials :: Ptr CompoundData -> IO (Ptr SurfaceMaterial)
getCompoundMaterials Ptr CompoundData
a0 =
Ptr CompoundData -> IO (Ptr SurfaceMaterial)
c_b3GetCompoundMaterials Ptr CompoundData
a0
convertCompoundToBytes
:: Ptr CompoundData
-> IO (Ptr Word8)
convertCompoundToBytes :: Ptr CompoundData -> IO (Ptr Word8)
convertCompoundToBytes Ptr CompoundData
a0 =
Ptr CompoundData -> IO (Ptr Word8)
c_b3ConvertCompoundToBytes Ptr CompoundData
a0
convertBytesToCompound
:: Ptr Word8
-> Int
-> IO (Ptr CompoundData)
convertBytesToCompound :: Ptr Word8 -> Int -> IO (Ptr CompoundData)
convertBytesToCompound Ptr Word8
a0 Int
a1 =
Ptr Word8 -> CInt -> IO (Ptr CompoundData)
c_b3ConvertBytesToCompound Ptr Word8
a0 (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
a1)
computeSphereMass
:: Sphere
-> Float
-> IO MassData
computeSphereMass :: Sphere -> Float -> IO MassData
computeSphereMass Sphere
a0 Float
a1 =
Sphere -> (Ptr Sphere -> IO MassData) -> IO MassData
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Sphere
a0 ((Ptr Sphere -> IO MassData) -> IO MassData)
-> (Ptr Sphere -> IO MassData) -> IO MassData
forall a b. (a -> b) -> a -> b
$ \Ptr Sphere
p0 ->
(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 -> Ptr Sphere -> Float -> Ptr MassData -> IO ()
c_b3ComputeSphereMass Ptr Sphere
p0 Float
a1 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
computeCapsuleMass
:: Capsule
-> Float
-> IO MassData
computeCapsuleMass :: Capsule -> Float -> IO MassData
computeCapsuleMass Capsule
a0 Float
a1 =
Capsule -> (Ptr Capsule -> IO MassData) -> IO MassData
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Capsule
a0 ((Ptr Capsule -> IO MassData) -> IO MassData)
-> (Ptr Capsule -> IO MassData) -> IO MassData
forall a b. (a -> b) -> a -> b
$ \Ptr Capsule
p0 ->
(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 -> Ptr Capsule -> Float -> Ptr MassData -> IO ()
c_b3ComputeCapsuleMass Ptr Capsule
p0 Float
a1 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
computeHullMass
:: Ptr HullData
-> Float
-> IO MassData
computeHullMass :: Ptr HullData -> Float -> IO MassData
computeHullMass Ptr HullData
a0 Float
a1 =
(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 -> Ptr HullData -> Float -> Ptr MassData -> IO ()
c_b3ComputeHullMass Ptr HullData
a0 Float
a1 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
computeHullMassInto
:: Ptr HullData
-> Float
-> Ptr MassData
-> IO ()
computeHullMassInto :: Ptr HullData -> Float -> Ptr MassData -> IO ()
computeHullMassInto Ptr HullData
a0 Float
a1 Ptr MassData
out =
Ptr HullData -> Float -> Ptr MassData -> IO ()
c_b3ComputeHullMass Ptr HullData
a0 Float
a1 Ptr MassData
out
computeSphereAABB
:: Sphere
-> Transform
-> IO AABB
computeSphereAABB :: Sphere -> Transform -> IO AABB
computeSphereAABB Sphere
a0 Transform
a1 =
Sphere -> (Ptr Sphere -> IO AABB) -> IO AABB
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Sphere
a0 ((Ptr Sphere -> IO AABB) -> IO AABB)
-> (Ptr Sphere -> IO AABB) -> IO AABB
forall a b. (a -> b) -> a -> b
$ \Ptr Sphere
p0 ->
Transform -> (Ptr Transform -> IO AABB) -> IO AABB
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Transform
a1 ((Ptr Transform -> IO AABB) -> IO AABB)
-> (Ptr Transform -> IO AABB) -> IO AABB
forall a b. (a -> b) -> a -> b
$ \Ptr Transform
p1 ->
(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 -> Ptr Sphere -> Ptr Transform -> Ptr AABB -> IO ()
c_b3ComputeSphereAABB Ptr Sphere
p0 Ptr Transform
p1 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
computeCapsuleAABB
:: Capsule
-> Transform
-> IO AABB
computeCapsuleAABB :: Capsule -> Transform -> IO AABB
computeCapsuleAABB Capsule
a0 Transform
a1 =
Capsule -> (Ptr Capsule -> IO AABB) -> IO AABB
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Capsule
a0 ((Ptr Capsule -> IO AABB) -> IO AABB)
-> (Ptr Capsule -> IO AABB) -> IO AABB
forall a b. (a -> b) -> a -> b
$ \Ptr Capsule
p0 ->
Transform -> (Ptr Transform -> IO AABB) -> IO AABB
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Transform
a1 ((Ptr Transform -> IO AABB) -> IO AABB)
-> (Ptr Transform -> IO AABB) -> IO AABB
forall a b. (a -> b) -> a -> b
$ \Ptr Transform
p1 ->
(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 -> Ptr Capsule -> Ptr Transform -> Ptr AABB -> IO ()
c_b3ComputeCapsuleAABB Ptr Capsule
p0 Ptr Transform
p1 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
computeHullAABB
:: Ptr HullData
-> Transform
-> IO AABB
computeHullAABB :: Ptr HullData -> Transform -> IO AABB
computeHullAABB Ptr HullData
a0 Transform
a1 =
Transform -> (Ptr Transform -> IO AABB) -> IO AABB
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Transform
a1 ((Ptr Transform -> IO AABB) -> IO AABB)
-> (Ptr Transform -> IO AABB) -> IO AABB
forall a b. (a -> b) -> a -> b
$ \Ptr Transform
p1 ->
(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 -> Ptr HullData -> Ptr Transform -> Ptr AABB -> IO ()
c_b3ComputeHullAABB Ptr HullData
a0 Ptr Transform
p1 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
computeMeshAABB
:: Ptr MeshData
-> Transform
-> Vec3
-> IO AABB
computeMeshAABB :: Ptr MeshData -> Transform -> Vec3 -> IO AABB
computeMeshAABB Ptr MeshData
a0 Transform
a1 Vec3
a2 =
Transform -> (Ptr Transform -> IO AABB) -> IO AABB
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Transform
a1 ((Ptr Transform -> IO AABB) -> IO AABB)
-> (Ptr Transform -> IO AABB) -> IO AABB
forall a b. (a -> b) -> a -> b
$ \Ptr Transform
p1 ->
Vec3 -> (Ptr Vec3 -> IO AABB) -> IO AABB
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Vec3
a2 ((Ptr Vec3 -> IO AABB) -> IO AABB)
-> (Ptr Vec3 -> IO AABB) -> IO AABB
forall a b. (a -> b) -> a -> b
$ \Ptr Vec3
p2 ->
(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 -> Ptr MeshData -> Ptr Transform -> Ptr Vec3 -> Ptr AABB -> IO ()
c_b3ComputeMeshAABB Ptr MeshData
a0 Ptr Transform
p1 Ptr Vec3
p2 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
computeHeightFieldAABB
:: Ptr HeightFieldData
-> Transform
-> IO AABB
computeHeightFieldAABB :: Ptr HeightFieldData -> Transform -> IO AABB
computeHeightFieldAABB Ptr HeightFieldData
a0 Transform
a1 =
Transform -> (Ptr Transform -> IO AABB) -> IO AABB
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Transform
a1 ((Ptr Transform -> IO AABB) -> IO AABB)
-> (Ptr Transform -> IO AABB) -> IO AABB
forall a b. (a -> b) -> a -> b
$ \Ptr Transform
p1 ->
(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 -> Ptr HeightFieldData -> Ptr Transform -> Ptr AABB -> IO ()
c_b3ComputeHeightFieldAABB Ptr HeightFieldData
a0 Ptr Transform
p1 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
computeCompoundAABB
:: Ptr CompoundData
-> Transform
-> IO AABB
computeCompoundAABB :: Ptr CompoundData -> Transform -> IO AABB
computeCompoundAABB Ptr CompoundData
a0 Transform
a1 =
Transform -> (Ptr Transform -> IO AABB) -> IO AABB
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Transform
a1 ((Ptr Transform -> IO AABB) -> IO AABB)
-> (Ptr Transform -> IO AABB) -> IO AABB
forall a b. (a -> b) -> a -> b
$ \Ptr Transform
p1 ->
(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 -> Ptr CompoundData -> Ptr Transform -> Ptr AABB -> IO ()
c_b3ComputeCompoundAABB Ptr CompoundData
a0 Ptr Transform
p1 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
isValidRay
:: RayCastInput
-> IO Bool
isValidRay :: RayCastInput -> IO Bool
isValidRay RayCastInput
a0 =
RayCastInput -> (Ptr RayCastInput -> IO Bool) -> IO Bool
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with RayCastInput
a0 ((Ptr RayCastInput -> IO Bool) -> IO Bool)
-> (Ptr RayCastInput -> IO Bool) -> IO Bool
forall a b. (a -> b) -> a -> b
$ \Ptr RayCastInput
p0 ->
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
<$> (Ptr RayCastInput -> IO CBool
c_b3IsValidRay Ptr RayCastInput
p0)
overlapCapsule
:: Capsule
-> Transform
-> Ptr ShapeProxy
-> IO Bool
overlapCapsule :: Capsule -> Transform -> Ptr ShapeProxy -> IO Bool
overlapCapsule Capsule
a0 Transform
a1 Ptr ShapeProxy
a2 =
Capsule -> (Ptr Capsule -> IO Bool) -> IO Bool
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Capsule
a0 ((Ptr Capsule -> IO Bool) -> IO Bool)
-> (Ptr Capsule -> IO Bool) -> IO Bool
forall a b. (a -> b) -> a -> b
$ \Ptr Capsule
p0 ->
Transform -> (Ptr Transform -> IO Bool) -> IO Bool
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Transform
a1 ((Ptr Transform -> IO Bool) -> IO Bool)
-> (Ptr Transform -> IO Bool) -> IO Bool
forall a b. (a -> b) -> a -> b
$ \Ptr Transform
p1 ->
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
<$> (Ptr Capsule -> Ptr Transform -> Ptr ShapeProxy -> IO CBool
c_b3OverlapCapsule Ptr Capsule
p0 Ptr Transform
p1 Ptr ShapeProxy
a2)
overlapCompound
:: Ptr CompoundData
-> Transform
-> Ptr ShapeProxy
-> IO Bool
overlapCompound :: Ptr CompoundData -> Transform -> Ptr ShapeProxy -> IO Bool
overlapCompound Ptr CompoundData
a0 Transform
a1 Ptr ShapeProxy
a2 =
Transform -> (Ptr Transform -> IO Bool) -> IO Bool
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Transform
a1 ((Ptr Transform -> IO Bool) -> IO Bool)
-> (Ptr Transform -> IO Bool) -> IO Bool
forall a b. (a -> b) -> a -> b
$ \Ptr Transform
p1 ->
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
<$> (Ptr CompoundData -> Ptr Transform -> Ptr ShapeProxy -> IO CBool
c_b3OverlapCompound Ptr CompoundData
a0 Ptr Transform
p1 Ptr ShapeProxy
a2)
overlapHeightField
:: Ptr HeightFieldData
-> Transform
-> Ptr ShapeProxy
-> IO Bool
overlapHeightField :: Ptr HeightFieldData -> Transform -> Ptr ShapeProxy -> IO Bool
overlapHeightField Ptr HeightFieldData
a0 Transform
a1 Ptr ShapeProxy
a2 =
Transform -> (Ptr Transform -> IO Bool) -> IO Bool
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Transform
a1 ((Ptr Transform -> IO Bool) -> IO Bool)
-> (Ptr Transform -> IO Bool) -> IO Bool
forall a b. (a -> b) -> a -> b
$ \Ptr Transform
p1 ->
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
<$> (Ptr HeightFieldData -> Ptr Transform -> Ptr ShapeProxy -> IO CBool
c_b3OverlapHeightField Ptr HeightFieldData
a0 Ptr Transform
p1 Ptr ShapeProxy
a2)
overlapHull
:: Ptr HullData
-> Transform
-> Ptr ShapeProxy
-> IO Bool
overlapHull :: Ptr HullData -> Transform -> Ptr ShapeProxy -> IO Bool
overlapHull Ptr HullData
a0 Transform
a1 Ptr ShapeProxy
a2 =
Transform -> (Ptr Transform -> IO Bool) -> IO Bool
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Transform
a1 ((Ptr Transform -> IO Bool) -> IO Bool)
-> (Ptr Transform -> IO Bool) -> IO Bool
forall a b. (a -> b) -> a -> b
$ \Ptr Transform
p1 ->
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
<$> (Ptr HullData -> Ptr Transform -> Ptr ShapeProxy -> IO CBool
c_b3OverlapHull Ptr HullData
a0 Ptr Transform
p1 Ptr ShapeProxy
a2)
overlapMesh
:: Ptr Mesh
-> Transform
-> Ptr ShapeProxy
-> IO Bool
overlapMesh :: Ptr Mesh -> Transform -> Ptr ShapeProxy -> IO Bool
overlapMesh Ptr Mesh
a0 Transform
a1 Ptr ShapeProxy
a2 =
Transform -> (Ptr Transform -> IO Bool) -> IO Bool
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Transform
a1 ((Ptr Transform -> IO Bool) -> IO Bool)
-> (Ptr Transform -> IO Bool) -> IO Bool
forall a b. (a -> b) -> a -> b
$ \Ptr Transform
p1 ->
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
<$> (Ptr Mesh -> Ptr Transform -> Ptr ShapeProxy -> IO CBool
c_b3OverlapMesh Ptr Mesh
a0 Ptr Transform
p1 Ptr ShapeProxy
a2)
overlapSphere
:: Sphere
-> Transform
-> Ptr ShapeProxy
-> IO Bool
overlapSphere :: Sphere -> Transform -> Ptr ShapeProxy -> IO Bool
overlapSphere Sphere
a0 Transform
a1 Ptr ShapeProxy
a2 =
Sphere -> (Ptr Sphere -> IO Bool) -> IO Bool
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Sphere
a0 ((Ptr Sphere -> IO Bool) -> IO Bool)
-> (Ptr Sphere -> IO Bool) -> IO Bool
forall a b. (a -> b) -> a -> b
$ \Ptr Sphere
p0 ->
Transform -> (Ptr Transform -> IO Bool) -> IO Bool
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Transform
a1 ((Ptr Transform -> IO Bool) -> IO Bool)
-> (Ptr Transform -> IO Bool) -> IO Bool
forall a b. (a -> b) -> a -> b
$ \Ptr Transform
p1 ->
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
<$> (Ptr Sphere -> Ptr Transform -> Ptr ShapeProxy -> IO CBool
c_b3OverlapSphere Ptr Sphere
p0 Ptr Transform
p1 Ptr ShapeProxy
a2)
rayCastSphere
:: Sphere
-> RayCastInput
-> IO CastOutput
rayCastSphere :: Sphere -> RayCastInput -> IO CastOutput
rayCastSphere Sphere
a0 RayCastInput
a1 =
Sphere -> (Ptr Sphere -> IO CastOutput) -> IO CastOutput
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Sphere
a0 ((Ptr Sphere -> IO CastOutput) -> IO CastOutput)
-> (Ptr Sphere -> IO CastOutput) -> IO CastOutput
forall a b. (a -> b) -> a -> b
$ \Ptr Sphere
p0 ->
RayCastInput
-> (Ptr RayCastInput -> IO CastOutput) -> IO CastOutput
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with RayCastInput
a1 ((Ptr RayCastInput -> IO CastOutput) -> IO CastOutput)
-> (Ptr RayCastInput -> IO CastOutput) -> IO CastOutput
forall a b. (a -> b) -> a -> b
$ \Ptr RayCastInput
p1 ->
(Ptr CastOutput -> IO CastOutput) -> IO CastOutput
forall a b. Storable a => (Ptr a -> IO b) -> IO b
alloca ((Ptr CastOutput -> IO CastOutput) -> IO CastOutput)
-> (Ptr CastOutput -> IO CastOutput) -> IO CastOutput
forall a b. (a -> b) -> a -> b
$ \Ptr CastOutput
pOut -> Ptr Sphere -> Ptr RayCastInput -> Ptr CastOutput -> IO ()
c_b3RayCastSphere Ptr Sphere
p0 Ptr RayCastInput
p1 Ptr CastOutput
pOut IO () -> IO CastOutput -> IO CastOutput
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Ptr CastOutput -> IO CastOutput
forall a. Storable a => Ptr a -> IO a
peek Ptr CastOutput
pOut
rayCastHollowSphere
:: Sphere
-> RayCastInput
-> IO CastOutput
rayCastHollowSphere :: Sphere -> RayCastInput -> IO CastOutput
rayCastHollowSphere Sphere
a0 RayCastInput
a1 =
Sphere -> (Ptr Sphere -> IO CastOutput) -> IO CastOutput
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Sphere
a0 ((Ptr Sphere -> IO CastOutput) -> IO CastOutput)
-> (Ptr Sphere -> IO CastOutput) -> IO CastOutput
forall a b. (a -> b) -> a -> b
$ \Ptr Sphere
p0 ->
RayCastInput
-> (Ptr RayCastInput -> IO CastOutput) -> IO CastOutput
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with RayCastInput
a1 ((Ptr RayCastInput -> IO CastOutput) -> IO CastOutput)
-> (Ptr RayCastInput -> IO CastOutput) -> IO CastOutput
forall a b. (a -> b) -> a -> b
$ \Ptr RayCastInput
p1 ->
(Ptr CastOutput -> IO CastOutput) -> IO CastOutput
forall a b. Storable a => (Ptr a -> IO b) -> IO b
alloca ((Ptr CastOutput -> IO CastOutput) -> IO CastOutput)
-> (Ptr CastOutput -> IO CastOutput) -> IO CastOutput
forall a b. (a -> b) -> a -> b
$ \Ptr CastOutput
pOut -> Ptr Sphere -> Ptr RayCastInput -> Ptr CastOutput -> IO ()
c_b3RayCastHollowSphere Ptr Sphere
p0 Ptr RayCastInput
p1 Ptr CastOutput
pOut IO () -> IO CastOutput -> IO CastOutput
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Ptr CastOutput -> IO CastOutput
forall a. Storable a => Ptr a -> IO a
peek Ptr CastOutput
pOut
rayCastCapsule
:: Capsule
-> RayCastInput
-> IO CastOutput
rayCastCapsule :: Capsule -> RayCastInput -> IO CastOutput
rayCastCapsule Capsule
a0 RayCastInput
a1 =
Capsule -> (Ptr Capsule -> IO CastOutput) -> IO CastOutput
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Capsule
a0 ((Ptr Capsule -> IO CastOutput) -> IO CastOutput)
-> (Ptr Capsule -> IO CastOutput) -> IO CastOutput
forall a b. (a -> b) -> a -> b
$ \Ptr Capsule
p0 ->
RayCastInput
-> (Ptr RayCastInput -> IO CastOutput) -> IO CastOutput
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with RayCastInput
a1 ((Ptr RayCastInput -> IO CastOutput) -> IO CastOutput)
-> (Ptr RayCastInput -> IO CastOutput) -> IO CastOutput
forall a b. (a -> b) -> a -> b
$ \Ptr RayCastInput
p1 ->
(Ptr CastOutput -> IO CastOutput) -> IO CastOutput
forall a b. Storable a => (Ptr a -> IO b) -> IO b
alloca ((Ptr CastOutput -> IO CastOutput) -> IO CastOutput)
-> (Ptr CastOutput -> IO CastOutput) -> IO CastOutput
forall a b. (a -> b) -> a -> b
$ \Ptr CastOutput
pOut -> Ptr Capsule -> Ptr RayCastInput -> Ptr CastOutput -> IO ()
c_b3RayCastCapsule Ptr Capsule
p0 Ptr RayCastInput
p1 Ptr CastOutput
pOut IO () -> IO CastOutput -> IO CastOutput
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Ptr CastOutput -> IO CastOutput
forall a. Storable a => Ptr a -> IO a
peek Ptr CastOutput
pOut
rayCastCompound
:: Ptr CompoundData
-> RayCastInput
-> IO CastOutput
rayCastCompound :: Ptr CompoundData -> RayCastInput -> IO CastOutput
rayCastCompound Ptr CompoundData
a0 RayCastInput
a1 =
RayCastInput
-> (Ptr RayCastInput -> IO CastOutput) -> IO CastOutput
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with RayCastInput
a1 ((Ptr RayCastInput -> IO CastOutput) -> IO CastOutput)
-> (Ptr RayCastInput -> IO CastOutput) -> IO CastOutput
forall a b. (a -> b) -> a -> b
$ \Ptr RayCastInput
p1 ->
(Ptr CastOutput -> IO CastOutput) -> IO CastOutput
forall a b. Storable a => (Ptr a -> IO b) -> IO b
alloca ((Ptr CastOutput -> IO CastOutput) -> IO CastOutput)
-> (Ptr CastOutput -> IO CastOutput) -> IO CastOutput
forall a b. (a -> b) -> a -> b
$ \Ptr CastOutput
pOut -> Ptr CompoundData -> Ptr RayCastInput -> Ptr CastOutput -> IO ()
c_b3RayCastCompound Ptr CompoundData
a0 Ptr RayCastInput
p1 Ptr CastOutput
pOut IO () -> IO CastOutput -> IO CastOutput
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Ptr CastOutput -> IO CastOutput
forall a. Storable a => Ptr a -> IO a
peek Ptr CastOutput
pOut
rayCastHull
:: Ptr HullData
-> RayCastInput
-> IO CastOutput
rayCastHull :: Ptr HullData -> RayCastInput -> IO CastOutput
rayCastHull Ptr HullData
a0 RayCastInput
a1 =
RayCastInput
-> (Ptr RayCastInput -> IO CastOutput) -> IO CastOutput
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with RayCastInput
a1 ((Ptr RayCastInput -> IO CastOutput) -> IO CastOutput)
-> (Ptr RayCastInput -> IO CastOutput) -> IO CastOutput
forall a b. (a -> b) -> a -> b
$ \Ptr RayCastInput
p1 ->
(Ptr CastOutput -> IO CastOutput) -> IO CastOutput
forall a b. Storable a => (Ptr a -> IO b) -> IO b
alloca ((Ptr CastOutput -> IO CastOutput) -> IO CastOutput)
-> (Ptr CastOutput -> IO CastOutput) -> IO CastOutput
forall a b. (a -> b) -> a -> b
$ \Ptr CastOutput
pOut -> Ptr HullData -> Ptr RayCastInput -> Ptr CastOutput -> IO ()
c_b3RayCastHull Ptr HullData
a0 Ptr RayCastInput
p1 Ptr CastOutput
pOut IO () -> IO CastOutput -> IO CastOutput
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Ptr CastOutput -> IO CastOutput
forall a. Storable a => Ptr a -> IO a
peek Ptr CastOutput
pOut
rayCastMesh
:: Ptr Mesh
-> RayCastInput
-> IO CastOutput
rayCastMesh :: Ptr Mesh -> RayCastInput -> IO CastOutput
rayCastMesh Ptr Mesh
a0 RayCastInput
a1 =
RayCastInput
-> (Ptr RayCastInput -> IO CastOutput) -> IO CastOutput
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with RayCastInput
a1 ((Ptr RayCastInput -> IO CastOutput) -> IO CastOutput)
-> (Ptr RayCastInput -> IO CastOutput) -> IO CastOutput
forall a b. (a -> b) -> a -> b
$ \Ptr RayCastInput
p1 ->
(Ptr CastOutput -> IO CastOutput) -> IO CastOutput
forall a b. Storable a => (Ptr a -> IO b) -> IO b
alloca ((Ptr CastOutput -> IO CastOutput) -> IO CastOutput)
-> (Ptr CastOutput -> IO CastOutput) -> IO CastOutput
forall a b. (a -> b) -> a -> b
$ \Ptr CastOutput
pOut -> Ptr Mesh -> Ptr RayCastInput -> Ptr CastOutput -> IO ()
c_b3RayCastMesh Ptr Mesh
a0 Ptr RayCastInput
p1 Ptr CastOutput
pOut IO () -> IO CastOutput -> IO CastOutput
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Ptr CastOutput -> IO CastOutput
forall a. Storable a => Ptr a -> IO a
peek Ptr CastOutput
pOut
rayCastHeightField
:: Ptr HeightFieldData
-> RayCastInput
-> IO CastOutput
rayCastHeightField :: Ptr HeightFieldData -> RayCastInput -> IO CastOutput
rayCastHeightField Ptr HeightFieldData
a0 RayCastInput
a1 =
RayCastInput
-> (Ptr RayCastInput -> IO CastOutput) -> IO CastOutput
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with RayCastInput
a1 ((Ptr RayCastInput -> IO CastOutput) -> IO CastOutput)
-> (Ptr RayCastInput -> IO CastOutput) -> IO CastOutput
forall a b. (a -> b) -> a -> b
$ \Ptr RayCastInput
p1 ->
(Ptr CastOutput -> IO CastOutput) -> IO CastOutput
forall a b. Storable a => (Ptr a -> IO b) -> IO b
alloca ((Ptr CastOutput -> IO CastOutput) -> IO CastOutput)
-> (Ptr CastOutput -> IO CastOutput) -> IO CastOutput
forall a b. (a -> b) -> a -> b
$ \Ptr CastOutput
pOut -> Ptr HeightFieldData -> Ptr RayCastInput -> Ptr CastOutput -> IO ()
c_b3RayCastHeightField Ptr HeightFieldData
a0 Ptr RayCastInput
p1 Ptr CastOutput
pOut IO () -> IO CastOutput -> IO CastOutput
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Ptr CastOutput -> IO CastOutput
forall a. Storable a => Ptr a -> IO a
peek Ptr CastOutput
pOut
shapeCastSphere
:: Sphere
-> Ptr ShapeCastInput
-> IO CastOutput
shapeCastSphere :: Sphere -> Ptr ShapeCastInput -> IO CastOutput
shapeCastSphere Sphere
a0 Ptr ShapeCastInput
a1 =
Sphere -> (Ptr Sphere -> IO CastOutput) -> IO CastOutput
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Sphere
a0 ((Ptr Sphere -> IO CastOutput) -> IO CastOutput)
-> (Ptr Sphere -> IO CastOutput) -> IO CastOutput
forall a b. (a -> b) -> a -> b
$ \Ptr Sphere
p0 ->
(Ptr CastOutput -> IO CastOutput) -> IO CastOutput
forall a b. Storable a => (Ptr a -> IO b) -> IO b
alloca ((Ptr CastOutput -> IO CastOutput) -> IO CastOutput)
-> (Ptr CastOutput -> IO CastOutput) -> IO CastOutput
forall a b. (a -> b) -> a -> b
$ \Ptr CastOutput
pOut -> Ptr Sphere -> Ptr ShapeCastInput -> Ptr CastOutput -> IO ()
c_b3ShapeCastSphere Ptr Sphere
p0 Ptr ShapeCastInput
a1 Ptr CastOutput
pOut IO () -> IO CastOutput -> IO CastOutput
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Ptr CastOutput -> IO CastOutput
forall a. Storable a => Ptr a -> IO a
peek Ptr CastOutput
pOut
shapeCastCapsule
:: Capsule
-> Ptr ShapeCastInput
-> IO CastOutput
shapeCastCapsule :: Capsule -> Ptr ShapeCastInput -> IO CastOutput
shapeCastCapsule Capsule
a0 Ptr ShapeCastInput
a1 =
Capsule -> (Ptr Capsule -> IO CastOutput) -> IO CastOutput
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Capsule
a0 ((Ptr Capsule -> IO CastOutput) -> IO CastOutput)
-> (Ptr Capsule -> IO CastOutput) -> IO CastOutput
forall a b. (a -> b) -> a -> b
$ \Ptr Capsule
p0 ->
(Ptr CastOutput -> IO CastOutput) -> IO CastOutput
forall a b. Storable a => (Ptr a -> IO b) -> IO b
alloca ((Ptr CastOutput -> IO CastOutput) -> IO CastOutput)
-> (Ptr CastOutput -> IO CastOutput) -> IO CastOutput
forall a b. (a -> b) -> a -> b
$ \Ptr CastOutput
pOut -> Ptr Capsule -> Ptr ShapeCastInput -> Ptr CastOutput -> IO ()
c_b3ShapeCastCapsule Ptr Capsule
p0 Ptr ShapeCastInput
a1 Ptr CastOutput
pOut IO () -> IO CastOutput -> IO CastOutput
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Ptr CastOutput -> IO CastOutput
forall a. Storable a => Ptr a -> IO a
peek Ptr CastOutput
pOut
shapeCastCompound
:: Ptr CompoundData
-> Ptr ShapeCastInput
-> IO CastOutput
shapeCastCompound :: Ptr CompoundData -> Ptr ShapeCastInput -> IO CastOutput
shapeCastCompound Ptr CompoundData
a0 Ptr ShapeCastInput
a1 =
(Ptr CastOutput -> IO CastOutput) -> IO CastOutput
forall a b. Storable a => (Ptr a -> IO b) -> IO b
alloca ((Ptr CastOutput -> IO CastOutput) -> IO CastOutput)
-> (Ptr CastOutput -> IO CastOutput) -> IO CastOutput
forall a b. (a -> b) -> a -> b
$ \Ptr CastOutput
pOut -> Ptr CompoundData -> Ptr ShapeCastInput -> Ptr CastOutput -> IO ()
c_b3ShapeCastCompound Ptr CompoundData
a0 Ptr ShapeCastInput
a1 Ptr CastOutput
pOut IO () -> IO CastOutput -> IO CastOutput
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Ptr CastOutput -> IO CastOutput
forall a. Storable a => Ptr a -> IO a
peek Ptr CastOutput
pOut
shapeCastCompoundInto
:: Ptr CompoundData
-> Ptr ShapeCastInput
-> Ptr CastOutput
-> IO ()
shapeCastCompoundInto :: Ptr CompoundData -> Ptr ShapeCastInput -> Ptr CastOutput -> IO ()
shapeCastCompoundInto Ptr CompoundData
a0 Ptr ShapeCastInput
a1 Ptr CastOutput
out =
Ptr CompoundData -> Ptr ShapeCastInput -> Ptr CastOutput -> IO ()
c_b3ShapeCastCompound Ptr CompoundData
a0 Ptr ShapeCastInput
a1 Ptr CastOutput
out
shapeCastHull
:: Ptr HullData
-> Ptr ShapeCastInput
-> IO CastOutput
shapeCastHull :: Ptr HullData -> Ptr ShapeCastInput -> IO CastOutput
shapeCastHull Ptr HullData
a0 Ptr ShapeCastInput
a1 =
(Ptr CastOutput -> IO CastOutput) -> IO CastOutput
forall a b. Storable a => (Ptr a -> IO b) -> IO b
alloca ((Ptr CastOutput -> IO CastOutput) -> IO CastOutput)
-> (Ptr CastOutput -> IO CastOutput) -> IO CastOutput
forall a b. (a -> b) -> a -> b
$ \Ptr CastOutput
pOut -> Ptr HullData -> Ptr ShapeCastInput -> Ptr CastOutput -> IO ()
c_b3ShapeCastHull Ptr HullData
a0 Ptr ShapeCastInput
a1 Ptr CastOutput
pOut IO () -> IO CastOutput -> IO CastOutput
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Ptr CastOutput -> IO CastOutput
forall a. Storable a => Ptr a -> IO a
peek Ptr CastOutput
pOut
shapeCastHullInto
:: Ptr HullData
-> Ptr ShapeCastInput
-> Ptr CastOutput
-> IO ()
shapeCastHullInto :: Ptr HullData -> Ptr ShapeCastInput -> Ptr CastOutput -> IO ()
shapeCastHullInto Ptr HullData
a0 Ptr ShapeCastInput
a1 Ptr CastOutput
out =
Ptr HullData -> Ptr ShapeCastInput -> Ptr CastOutput -> IO ()
c_b3ShapeCastHull Ptr HullData
a0 Ptr ShapeCastInput
a1 Ptr CastOutput
out
shapeCastMesh
:: Ptr Mesh
-> Ptr ShapeCastInput
-> IO CastOutput
shapeCastMesh :: Ptr Mesh -> Ptr ShapeCastInput -> IO CastOutput
shapeCastMesh Ptr Mesh
a0 Ptr ShapeCastInput
a1 =
(Ptr CastOutput -> IO CastOutput) -> IO CastOutput
forall a b. Storable a => (Ptr a -> IO b) -> IO b
alloca ((Ptr CastOutput -> IO CastOutput) -> IO CastOutput)
-> (Ptr CastOutput -> IO CastOutput) -> IO CastOutput
forall a b. (a -> b) -> a -> b
$ \Ptr CastOutput
pOut -> Ptr Mesh -> Ptr ShapeCastInput -> Ptr CastOutput -> IO ()
c_b3ShapeCastMesh Ptr Mesh
a0 Ptr ShapeCastInput
a1 Ptr CastOutput
pOut IO () -> IO CastOutput -> IO CastOutput
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Ptr CastOutput -> IO CastOutput
forall a. Storable a => Ptr a -> IO a
peek Ptr CastOutput
pOut
shapeCastMeshInto
:: Ptr Mesh
-> Ptr ShapeCastInput
-> Ptr CastOutput
-> IO ()
shapeCastMeshInto :: Ptr Mesh -> Ptr ShapeCastInput -> Ptr CastOutput -> IO ()
shapeCastMeshInto Ptr Mesh
a0 Ptr ShapeCastInput
a1 Ptr CastOutput
out =
Ptr Mesh -> Ptr ShapeCastInput -> Ptr CastOutput -> IO ()
c_b3ShapeCastMesh Ptr Mesh
a0 Ptr ShapeCastInput
a1 Ptr CastOutput
out
shapeCastHeightField
:: Ptr HeightFieldData
-> Ptr ShapeCastInput
-> IO CastOutput
shapeCastHeightField :: Ptr HeightFieldData -> Ptr ShapeCastInput -> IO CastOutput
shapeCastHeightField Ptr HeightFieldData
a0 Ptr ShapeCastInput
a1 =
(Ptr CastOutput -> IO CastOutput) -> IO CastOutput
forall a b. Storable a => (Ptr a -> IO b) -> IO b
alloca ((Ptr CastOutput -> IO CastOutput) -> IO CastOutput)
-> (Ptr CastOutput -> IO CastOutput) -> IO CastOutput
forall a b. (a -> b) -> a -> b
$ \Ptr CastOutput
pOut -> Ptr HeightFieldData
-> Ptr ShapeCastInput -> Ptr CastOutput -> IO ()
c_b3ShapeCastHeightField Ptr HeightFieldData
a0 Ptr ShapeCastInput
a1 Ptr CastOutput
pOut IO () -> IO CastOutput -> IO CastOutput
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Ptr CastOutput -> IO CastOutput
forall a. Storable a => Ptr a -> IO a
peek Ptr CastOutput
pOut
shapeCastHeightFieldInto
:: Ptr HeightFieldData
-> Ptr ShapeCastInput
-> Ptr CastOutput
-> IO ()
shapeCastHeightFieldInto :: Ptr HeightFieldData
-> Ptr ShapeCastInput -> Ptr CastOutput -> IO ()
shapeCastHeightFieldInto Ptr HeightFieldData
a0 Ptr ShapeCastInput
a1 Ptr CastOutput
out =
Ptr HeightFieldData
-> Ptr ShapeCastInput -> Ptr CastOutput -> IO ()
c_b3ShapeCastHeightField Ptr HeightFieldData
a0 Ptr ShapeCastInput
a1 Ptr CastOutput
out
queryMesh
:: Ptr Mesh
-> AABB
-> FunPtr MeshQueryFcn
-> Ptr ()
-> IO ()
queryMesh :: Ptr Mesh -> AABB -> FunPtr MeshQueryFcn -> Ptr () -> IO ()
queryMesh Ptr Mesh
a0 AABB
a1 FunPtr MeshQueryFcn
a2 Ptr ()
a3 =
AABB -> (Ptr AABB -> IO ()) -> IO ()
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with AABB
a1 ((Ptr AABB -> IO ()) -> IO ()) -> (Ptr AABB -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr AABB
p1 ->
Ptr Mesh -> Ptr AABB -> FunPtr MeshQueryFcn -> Ptr () -> IO ()
c_b3QueryMesh Ptr Mesh
a0 Ptr AABB
p1 FunPtr MeshQueryFcn
a2 Ptr ()
a3
queryHeightField
:: Ptr HeightFieldData
-> AABB
-> FunPtr MeshQueryFcn
-> Ptr ()
-> IO ()
queryHeightField :: Ptr HeightFieldData
-> AABB -> FunPtr MeshQueryFcn -> Ptr () -> IO ()
queryHeightField Ptr HeightFieldData
a0 AABB
a1 FunPtr MeshQueryFcn
a2 Ptr ()
a3 =
AABB -> (Ptr AABB -> IO ()) -> IO ()
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with AABB
a1 ((Ptr AABB -> IO ()) -> IO ()) -> (Ptr AABB -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr AABB
p1 ->
Ptr HeightFieldData
-> Ptr AABB -> FunPtr MeshQueryFcn -> Ptr () -> IO ()
c_b3QueryHeightField Ptr HeightFieldData
a0 Ptr AABB
p1 FunPtr MeshQueryFcn
a2 Ptr ()
a3
shapeDistance
:: Ptr DistanceInput
-> Ptr SimplexCache
-> Ptr Simplex
-> Int
-> Ptr DistanceOutput
-> IO ()
shapeDistance :: Ptr DistanceInput
-> Ptr SimplexCache
-> Ptr Simplex
-> Int
-> Ptr DistanceOutput
-> IO ()
shapeDistance Ptr DistanceInput
a0 Ptr SimplexCache
a1 Ptr Simplex
a2 Int
a3 Ptr DistanceOutput
out =
Ptr DistanceInput
-> Ptr SimplexCache
-> Ptr Simplex
-> CInt
-> Ptr DistanceOutput
-> IO ()
c_b3ShapeDistance Ptr DistanceInput
a0 Ptr SimplexCache
a1 Ptr Simplex
a2 (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
a3) Ptr DistanceOutput
out
shapeCast
:: Ptr ShapeCastPairInput
-> IO CastOutput
shapeCast :: Ptr ShapeCastPairInput -> IO CastOutput
shapeCast Ptr ShapeCastPairInput
a0 =
(Ptr CastOutput -> IO CastOutput) -> IO CastOutput
forall a b. Storable a => (Ptr a -> IO b) -> IO b
alloca ((Ptr CastOutput -> IO CastOutput) -> IO CastOutput)
-> (Ptr CastOutput -> IO CastOutput) -> IO CastOutput
forall a b. (a -> b) -> a -> b
$ \Ptr CastOutput
pOut -> Ptr ShapeCastPairInput -> Ptr CastOutput -> IO ()
c_b3ShapeCast Ptr ShapeCastPairInput
a0 Ptr CastOutput
pOut IO () -> IO CastOutput -> IO CastOutput
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Ptr CastOutput -> IO CastOutput
forall a. Storable a => Ptr a -> IO a
peek Ptr CastOutput
pOut
shapeCastInto
:: Ptr ShapeCastPairInput
-> Ptr CastOutput
-> IO ()
shapeCastInto :: Ptr ShapeCastPairInput -> Ptr CastOutput -> IO ()
shapeCastInto Ptr ShapeCastPairInput
a0 Ptr CastOutput
out =
Ptr ShapeCastPairInput -> Ptr CastOutput -> IO ()
c_b3ShapeCast Ptr ShapeCastPairInput
a0 Ptr CastOutput
out
getSweepTransform
:: Sweep
-> Float
-> IO Transform
getSweepTransform :: Sweep -> Float -> IO Transform
getSweepTransform Sweep
a0 Float
a1 =
Sweep -> (Ptr Sweep -> IO Transform) -> IO Transform
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Sweep
a0 ((Ptr Sweep -> IO Transform) -> IO Transform)
-> (Ptr Sweep -> IO Transform) -> IO Transform
forall a b. (a -> b) -> a -> b
$ \Ptr Sweep
p0 ->
(Ptr Transform -> IO Transform) -> IO Transform
forall a b. Storable a => (Ptr a -> IO b) -> IO b
alloca ((Ptr Transform -> IO Transform) -> IO Transform)
-> (Ptr Transform -> IO Transform) -> IO Transform
forall a b. (a -> b) -> a -> b
$ \Ptr Transform
pOut -> Ptr Sweep -> Float -> Ptr Transform -> IO ()
c_b3GetSweepTransform Ptr Sweep
p0 Float
a1 Ptr Transform
pOut IO () -> IO Transform -> IO Transform
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Ptr Transform -> IO Transform
forall a. Storable a => Ptr a -> IO a
peek Ptr Transform
pOut
timeOfImpact
:: Ptr TOIInput
-> Ptr TOIOutput
-> IO ()
timeOfImpact :: Ptr TOIInput -> Ptr TOIOutput -> IO ()
timeOfImpact Ptr TOIInput
a0 Ptr TOIOutput
out =
Ptr TOIInput -> Ptr TOIOutput -> IO ()
c_b3TimeOfImpact Ptr TOIInput
a0 Ptr TOIOutput
out
collideSpheres
:: Ptr LocalManifold
-> Int
-> Sphere
-> Sphere
-> Transform
-> IO ()
collideSpheres :: Ptr LocalManifold -> Int -> Sphere -> Sphere -> Transform -> IO ()
collideSpheres Ptr LocalManifold
a0 Int
a1 Sphere
a2 Sphere
a3 Transform
a4 =
Sphere -> (Ptr Sphere -> IO ()) -> IO ()
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Sphere
a2 ((Ptr Sphere -> IO ()) -> IO ()) -> (Ptr Sphere -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Sphere
p2 ->
Sphere -> (Ptr Sphere -> IO ()) -> IO ()
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Sphere
a3 ((Ptr Sphere -> IO ()) -> IO ()) -> (Ptr Sphere -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Sphere
p3 ->
Transform -> (Ptr Transform -> IO ()) -> IO ()
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Transform
a4 ((Ptr Transform -> IO ()) -> IO ())
-> (Ptr Transform -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Transform
p4 ->
Ptr LocalManifold
-> CInt -> Ptr Sphere -> Ptr Sphere -> Ptr Transform -> IO ()
c_b3CollideSpheres Ptr LocalManifold
a0 (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
a1) Ptr Sphere
p2 Ptr Sphere
p3 Ptr Transform
p4
collideCapsuleAndSphere
:: Ptr LocalManifold
-> Int
-> Capsule
-> Sphere
-> Transform
-> IO ()
collideCapsuleAndSphere :: Ptr LocalManifold -> Int -> Capsule -> Sphere -> Transform -> IO ()
collideCapsuleAndSphere Ptr LocalManifold
a0 Int
a1 Capsule
a2 Sphere
a3 Transform
a4 =
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 ->
Sphere -> (Ptr Sphere -> IO ()) -> IO ()
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Sphere
a3 ((Ptr Sphere -> IO ()) -> IO ()) -> (Ptr Sphere -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Sphere
p3 ->
Transform -> (Ptr Transform -> IO ()) -> IO ()
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Transform
a4 ((Ptr Transform -> IO ()) -> IO ())
-> (Ptr Transform -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Transform
p4 ->
Ptr LocalManifold
-> CInt -> Ptr Capsule -> Ptr Sphere -> Ptr Transform -> IO ()
c_b3CollideCapsuleAndSphere Ptr LocalManifold
a0 (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
a1) Ptr Capsule
p2 Ptr Sphere
p3 Ptr Transform
p4
collideHullAndSphere
:: Ptr LocalManifold
-> Int
-> Ptr HullData
-> Sphere
-> Transform
-> Ptr SimplexCache
-> IO ()
collideHullAndSphere :: Ptr LocalManifold
-> Int
-> Ptr HullData
-> Sphere
-> Transform
-> Ptr SimplexCache
-> IO ()
collideHullAndSphere Ptr LocalManifold
a0 Int
a1 Ptr HullData
a2 Sphere
a3 Transform
a4 Ptr SimplexCache
a5 =
Sphere -> (Ptr Sphere -> IO ()) -> IO ()
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Sphere
a3 ((Ptr Sphere -> IO ()) -> IO ()) -> (Ptr Sphere -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Sphere
p3 ->
Transform -> (Ptr Transform -> IO ()) -> IO ()
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Transform
a4 ((Ptr Transform -> IO ()) -> IO ())
-> (Ptr Transform -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Transform
p4 ->
Ptr LocalManifold
-> CInt
-> Ptr HullData
-> Ptr Sphere
-> Ptr Transform
-> Ptr SimplexCache
-> IO ()
c_b3CollideHullAndSphere Ptr LocalManifold
a0 (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
a1) Ptr HullData
a2 Ptr Sphere
p3 Ptr Transform
p4 Ptr SimplexCache
a5
collideCapsules
:: Ptr LocalManifold
-> Int
-> Capsule
-> Capsule
-> Transform
-> IO ()
collideCapsules :: Ptr LocalManifold
-> Int -> Capsule -> Capsule -> Transform -> IO ()
collideCapsules Ptr LocalManifold
a0 Int
a1 Capsule
a2 Capsule
a3 Transform
a4 =
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 ->
Capsule -> (Ptr Capsule -> IO ()) -> IO ()
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Capsule
a3 ((Ptr Capsule -> IO ()) -> IO ())
-> (Ptr Capsule -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Capsule
p3 ->
Transform -> (Ptr Transform -> IO ()) -> IO ()
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Transform
a4 ((Ptr Transform -> IO ()) -> IO ())
-> (Ptr Transform -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Transform
p4 ->
Ptr LocalManifold
-> CInt -> Ptr Capsule -> Ptr Capsule -> Ptr Transform -> IO ()
c_b3CollideCapsules Ptr LocalManifold
a0 (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
a1) Ptr Capsule
p2 Ptr Capsule
p3 Ptr Transform
p4
collideHullAndCapsule
:: Ptr LocalManifold
-> Int
-> Ptr HullData
-> Capsule
-> Transform
-> Ptr SimplexCache
-> IO ()
collideHullAndCapsule :: Ptr LocalManifold
-> Int
-> Ptr HullData
-> Capsule
-> Transform
-> Ptr SimplexCache
-> IO ()
collideHullAndCapsule Ptr LocalManifold
a0 Int
a1 Ptr HullData
a2 Capsule
a3 Transform
a4 Ptr SimplexCache
a5 =
Capsule -> (Ptr Capsule -> IO ()) -> IO ()
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Capsule
a3 ((Ptr Capsule -> IO ()) -> IO ())
-> (Ptr Capsule -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Capsule
p3 ->
Transform -> (Ptr Transform -> IO ()) -> IO ()
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Transform
a4 ((Ptr Transform -> IO ()) -> IO ())
-> (Ptr Transform -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Transform
p4 ->
Ptr LocalManifold
-> CInt
-> Ptr HullData
-> Ptr Capsule
-> Ptr Transform
-> Ptr SimplexCache
-> IO ()
c_b3CollideHullAndCapsule Ptr LocalManifold
a0 (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
a1) Ptr HullData
a2 Ptr Capsule
p3 Ptr Transform
p4 Ptr SimplexCache
a5
collideHulls
:: Ptr LocalManifold
-> Int
-> Ptr HullData
-> Ptr HullData
-> Transform
-> Ptr SATCache
-> IO ()
collideHulls :: Ptr LocalManifold
-> Int
-> Ptr HullData
-> Ptr HullData
-> Transform
-> Ptr SATCache
-> IO ()
collideHulls Ptr LocalManifold
a0 Int
a1 Ptr HullData
a2 Ptr HullData
a3 Transform
a4 Ptr SATCache
a5 =
Transform -> (Ptr Transform -> IO ()) -> IO ()
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Transform
a4 ((Ptr Transform -> IO ()) -> IO ())
-> (Ptr Transform -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Transform
p4 ->
Ptr LocalManifold
-> CInt
-> Ptr HullData
-> Ptr HullData
-> Ptr Transform
-> Ptr SATCache
-> IO ()
c_b3CollideHulls Ptr LocalManifold
a0 (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
a1) Ptr HullData
a2 Ptr HullData
a3 Ptr Transform
p4 Ptr SATCache
a5
collideCapsuleAndTriangle
:: Ptr LocalManifold
-> Int
-> Capsule
-> Ptr Vec3
-> Ptr SimplexCache
-> IO ()
collideCapsuleAndTriangle :: Ptr LocalManifold
-> Int -> Capsule -> Ptr Vec3 -> Ptr SimplexCache -> IO ()
collideCapsuleAndTriangle Ptr LocalManifold
a0 Int
a1 Capsule
a2 Ptr Vec3
a3 Ptr SimplexCache
a4 =
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 ->
Ptr LocalManifold
-> CInt -> Ptr Capsule -> Ptr Vec3 -> Ptr SimplexCache -> IO ()
c_b3CollideCapsuleAndTriangle Ptr LocalManifold
a0 (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
a1) Ptr Capsule
p2 Ptr Vec3
a3 Ptr SimplexCache
a4
collideHullAndTriangle
:: Ptr LocalManifold
-> Int
-> Ptr HullData
-> Vec3
-> Vec3
-> Vec3
-> Int
-> Ptr SATCache
-> IO ()
collideHullAndTriangle :: Ptr LocalManifold
-> Int
-> Ptr HullData
-> Vec3
-> Vec3
-> Vec3
-> Int
-> Ptr SATCache
-> IO ()
collideHullAndTriangle Ptr LocalManifold
a0 Int
a1 Ptr HullData
a2 Vec3
a3 Vec3
a4 Vec3
a5 Int
a6 Ptr SATCache
a7 =
Vec3 -> (Ptr Vec3 -> IO ()) -> IO ()
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Vec3
a3 ((Ptr Vec3 -> IO ()) -> IO ()) -> (Ptr Vec3 -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Vec3
p3 ->
Vec3 -> (Ptr Vec3 -> IO ()) -> IO ()
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Vec3
a4 ((Ptr Vec3 -> IO ()) -> IO ()) -> (Ptr Vec3 -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Vec3
p4 ->
Vec3 -> (Ptr Vec3 -> IO ()) -> IO ()
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Vec3
a5 ((Ptr Vec3 -> IO ()) -> IO ()) -> (Ptr Vec3 -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Vec3
p5 ->
Ptr LocalManifold
-> CInt
-> Ptr HullData
-> Ptr Vec3
-> Ptr Vec3
-> Ptr Vec3
-> CInt
-> Ptr SATCache
-> IO ()
c_b3CollideHullAndTriangle Ptr LocalManifold
a0 (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
a1) Ptr HullData
a2 Ptr Vec3
p3 Ptr Vec3
p4 Ptr Vec3
p5 (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
a6) Ptr SATCache
a7
collideSphereAndTriangle
:: Ptr LocalManifold
-> Int
-> Sphere
-> Ptr Vec3
-> IO ()
collideSphereAndTriangle :: Ptr LocalManifold -> Int -> Sphere -> Ptr Vec3 -> IO ()
collideSphereAndTriangle Ptr LocalManifold
a0 Int
a1 Sphere
a2 Ptr Vec3
a3 =
Sphere -> (Ptr Sphere -> IO ()) -> IO ()
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Sphere
a2 ((Ptr Sphere -> IO ()) -> IO ()) -> (Ptr Sphere -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Sphere
p2 ->
Ptr LocalManifold -> CInt -> Ptr Sphere -> Ptr Vec3 -> IO ()
c_b3CollideSphereAndTriangle Ptr LocalManifold
a0 (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
a1) Ptr Sphere
p2 Ptr Vec3
a3
solvePlanes
:: Vec3
-> Ptr CollisionPlane
-> Int
-> Ptr PlaneSolverResult
-> IO ()
solvePlanes :: Vec3 -> Ptr CollisionPlane -> Int -> Ptr PlaneSolverResult -> IO ()
solvePlanes Vec3
a0 Ptr CollisionPlane
a1 Int
a2 Ptr PlaneSolverResult
out =
Vec3 -> (Ptr Vec3 -> IO ()) -> IO ()
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Vec3
a0 ((Ptr Vec3 -> IO ()) -> IO ()) -> (Ptr Vec3 -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Vec3
p0 ->
Ptr Vec3
-> Ptr CollisionPlane -> CInt -> Ptr PlaneSolverResult -> IO ()
c_b3SolvePlanes Ptr Vec3
p0 Ptr CollisionPlane
a1 (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
a2) Ptr PlaneSolverResult
out
clipVector
:: Vec3
-> Ptr CollisionPlane
-> Int
-> IO Vec3
clipVector :: Vec3 -> Ptr CollisionPlane -> Int -> IO Vec3
clipVector Vec3
a0 Ptr CollisionPlane
a1 Int
a2 =
Vec3 -> (Ptr Vec3 -> IO Vec3) -> IO Vec3
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Vec3
a0 ((Ptr Vec3 -> IO Vec3) -> IO Vec3)
-> (Ptr Vec3 -> IO Vec3) -> IO Vec3
forall a b. (a -> b) -> a -> b
$ \Ptr Vec3
p0 ->
(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 -> Ptr Vec3 -> Ptr CollisionPlane -> CInt -> Ptr Vec3 -> IO ()
c_b3ClipVector Ptr Vec3
p0 Ptr CollisionPlane
a1 (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
a2) 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