module Physics.Bullet.Raw (
module Physics.Bullet.Raw.BulletSoftBody,
module Physics.Bullet.Raw.LinearMath,
module Physics.Bullet.Raw.BulletDynamics,
module Physics.Bullet.Raw.BulletCollision,
module Physics.Bullet.Raw
) where
import Control.Monad
import Foreign.Marshal.Alloc
import Foreign.ForeignPtr
import Foreign.Ptr
import Physics.Bullet.Raw.C2HS
import Physics.Bullet.Raw.Types
import Physics.Bullet.Raw.Class
import Physics.Bullet.Raw.BulletSoftBody
import Physics.Bullet.Raw.LinearMath
import Physics.Bullet.Raw.BulletDynamics
import Physics.Bullet.Raw.BulletCollision
btGLDebugDrawer :: IO (BtGLDebugDrawer)
btGLDebugDrawer =
btGLDebugDrawer'_ >>= \res ->
mkBtGLDebugDrawer res >>= \res' ->
return (res')
btGLDebugDrawer_free :: ( BtGLDebugDrawerClass bc ) => bc -> IO ()
btGLDebugDrawer_free a1 =
withBt a1 $ \a1' ->
btGLDebugDrawer_free'_ a1' >>= \res ->
return ()
btGLDebugDrawer_draw3dText :: ( BtGLDebugDrawerClass bc ) => bc -> Vec3 -> String -> IO (Vec3)
btGLDebugDrawer_draw3dText a1 a2 a3 =
withBt a1 $ \a1' ->
withVec3 a2 $ \a2' ->
withCString a3 $ \a3' ->
btGLDebugDrawer_draw3dText'_ a1' a2' a3' >>= \res ->
peekVec3 a2'>>= \a2'' ->
return (a2'')
btGLDebugDrawer_draw3dText' :: ( BtGLDebugDrawerClass bc ) => bc -> String -> IO (Vec3)
btGLDebugDrawer_draw3dText' a1 a3 =
withBt a1 $ \a1' ->
allocaVec3 $ \a2' ->
withCString a3 $ \a3' ->
btGLDebugDrawer_draw3dText''_ a1' a2' a3' >>= \res ->
peekVec3 a2'>>= \a2'' ->
return (a2'')
btGLDebugDrawer_drawTriangle :: ( BtGLDebugDrawerClass bc ) => bc -> Vec3 -> Vec3 -> Vec3 -> Vec3 -> Float -> IO (Vec3, Vec3, Vec3, Vec3)
btGLDebugDrawer_drawTriangle a1 a2 a3 a4 a5 a6 =
withBt a1 $ \a1' ->
withVec3 a2 $ \a2' ->
withVec3 a3 $ \a3' ->
withVec3 a4 $ \a4' ->
withVec3 a5 $ \a5' ->
let {a6' = realToFrac a6} in
btGLDebugDrawer_drawTriangle'_ a1' a2' a3' a4' a5' a6' >>= \res ->
peekVec3 a2'>>= \a2'' ->
peekVec3 a3'>>= \a3'' ->
peekVec3 a4'>>= \a4'' ->
peekVec3 a5'>>= \a5'' ->
return (a2'', a3'', a4'', a5'')
btGLDebugDrawer_drawTriangle' :: ( BtGLDebugDrawerClass bc ) => bc -> Float -> IO (Vec3, Vec3, Vec3, Vec3)
btGLDebugDrawer_drawTriangle' a1 a6 =
withBt a1 $ \a1' ->
allocaVec3 $ \a2' ->
allocaVec3 $ \a3' ->
allocaVec3 $ \a4' ->
allocaVec3 $ \a5' ->
let {a6' = realToFrac a6} in
btGLDebugDrawer_drawTriangle''_ a1' a2' a3' a4' a5' a6' >>= \res ->
peekVec3 a2'>>= \a2'' ->
peekVec3 a3'>>= \a3'' ->
peekVec3 a4'>>= \a4'' ->
peekVec3 a5'>>= \a5'' ->
return (a2'', a3'', a4'', a5'')
btGLDebugDrawer_drawBox :: ( BtGLDebugDrawerClass bc ) => bc -> Vec3 -> Vec3 -> Vec3 -> Float -> IO (Vec3, Vec3, Vec3)
btGLDebugDrawer_drawBox a1 a2 a3 a4 a5 =
withBt a1 $ \a1' ->
withVec3 a2 $ \a2' ->
withVec3 a3 $ \a3' ->
withVec3 a4 $ \a4' ->
let {a5' = realToFrac a5} in
btGLDebugDrawer_drawBox'_ a1' a2' a3' a4' a5' >>= \res ->
peekVec3 a2'>>= \a2'' ->
peekVec3 a3'>>= \a3'' ->
peekVec3 a4'>>= \a4'' ->
return (a2'', a3'', a4'')
btGLDebugDrawer_drawBox' :: ( BtGLDebugDrawerClass bc ) => bc -> Float -> IO (Vec3, Vec3, Vec3)
btGLDebugDrawer_drawBox' a1 a5 =
withBt a1 $ \a1' ->
allocaVec3 $ \a2' ->
allocaVec3 $ \a3' ->
allocaVec3 $ \a4' ->
let {a5' = realToFrac a5} in
btGLDebugDrawer_drawBox''_ a1' a2' a3' a4' a5' >>= \res ->
peekVec3 a2'>>= \a2'' ->
peekVec3 a3'>>= \a3'' ->
peekVec3 a4'>>= \a4'' ->
return (a2'', a3'', a4'')
btGLDebugDrawer_drawContactPoint :: ( BtGLDebugDrawerClass bc ) => bc -> Vec3 -> Vec3 -> Float -> Int -> Vec3 -> IO (Vec3, Vec3, Vec3)
btGLDebugDrawer_drawContactPoint a1 a2 a3 a4 a5 a6 =
withBt a1 $ \a1' ->
withVec3 a2 $ \a2' ->
withVec3 a3 $ \a3' ->
let {a4' = realToFrac a4} in
let {a5' = fromIntegral a5} in
withVec3 a6 $ \a6' ->
btGLDebugDrawer_drawContactPoint'_ a1' a2' a3' a4' a5' a6' >>= \res ->
peekVec3 a2'>>= \a2'' ->
peekVec3 a3'>>= \a3'' ->
peekVec3 a6'>>= \a6'' ->
return (a2'', a3'', a6'')
btGLDebugDrawer_drawContactPoint' :: ( BtGLDebugDrawerClass bc ) => bc -> Float -> Int -> IO (Vec3, Vec3, Vec3)
btGLDebugDrawer_drawContactPoint' a1 a4 a5 =
withBt a1 $ \a1' ->
allocaVec3 $ \a2' ->
allocaVec3 $ \a3' ->
let {a4' = realToFrac a4} in
let {a5' = fromIntegral a5} in
allocaVec3 $ \a6' ->
btGLDebugDrawer_drawContactPoint''_ a1' a2' a3' a4' a5' a6' >>= \res ->
peekVec3 a2'>>= \a2'' ->
peekVec3 a3'>>= \a3'' ->
peekVec3 a6'>>= \a6'' ->
return (a2'', a3'', a6'')
btGLDebugDrawer_drawLine :: ( BtGLDebugDrawerClass bc ) => bc -> Vec3 -> Vec3 -> Vec3 -> Vec3 -> IO (Vec3, Vec3, Vec3, Vec3)
btGLDebugDrawer_drawLine a1 a2 a3 a4 a5 =
withBt a1 $ \a1' ->
withVec3 a2 $ \a2' ->
withVec3 a3 $ \a3' ->
withVec3 a4 $ \a4' ->
withVec3 a5 $ \a5' ->
btGLDebugDrawer_drawLine'_ a1' a2' a3' a4' a5' >>= \res ->
peekVec3 a2'>>= \a2'' ->
peekVec3 a3'>>= \a3'' ->
peekVec3 a4'>>= \a4'' ->
peekVec3 a5'>>= \a5'' ->
return (a2'', a3'', a4'', a5'')
btGLDebugDrawer_drawLine' :: ( BtGLDebugDrawerClass bc ) => bc -> IO (Vec3, Vec3, Vec3, Vec3)
btGLDebugDrawer_drawLine' a1 =
withBt a1 $ \a1' ->
allocaVec3 $ \a2' ->
allocaVec3 $ \a3' ->
allocaVec3 $ \a4' ->
allocaVec3 $ \a5' ->
btGLDebugDrawer_drawLine''_ a1' a2' a3' a4' a5' >>= \res ->
peekVec3 a2'>>= \a2'' ->
peekVec3 a3'>>= \a3'' ->
peekVec3 a4'>>= \a4'' ->
peekVec3 a5'>>= \a5'' ->
return (a2'', a3'', a4'', a5'')
btGLDebugDrawer_drawLine0 :: ( BtGLDebugDrawerClass bc ) => bc -> Vec3 -> Vec3 -> Vec3 -> Vec3 -> IO (Vec3, Vec3, Vec3, Vec3)
btGLDebugDrawer_drawLine0 a1 a2 a3 a4 a5 =
withBt a1 $ \a1' ->
withVec3 a2 $ \a2' ->
withVec3 a3 $ \a3' ->
withVec3 a4 $ \a4' ->
withVec3 a5 $ \a5' ->
btGLDebugDrawer_drawLine0'_ a1' a2' a3' a4' a5' >>= \res ->
peekVec3 a2'>>= \a2'' ->
peekVec3 a3'>>= \a3'' ->
peekVec3 a4'>>= \a4'' ->
peekVec3 a5'>>= \a5'' ->
return (a2'', a3'', a4'', a5'')
btGLDebugDrawer_drawLine0' :: ( BtGLDebugDrawerClass bc ) => bc -> IO (Vec3, Vec3, Vec3, Vec3)
btGLDebugDrawer_drawLine0' a1 =
withBt a1 $ \a1' ->
allocaVec3 $ \a2' ->
allocaVec3 $ \a3' ->
allocaVec3 $ \a4' ->
allocaVec3 $ \a5' ->
btGLDebugDrawer_drawLine0''_ a1' a2' a3' a4' a5' >>= \res ->
peekVec3 a2'>>= \a2'' ->
peekVec3 a3'>>= \a3'' ->
peekVec3 a4'>>= \a4'' ->
peekVec3 a5'>>= \a5'' ->
return (a2'', a3'', a4'', a5'')
btGLDebugDrawer_drawLine1 :: ( BtGLDebugDrawerClass bc ) => bc -> Vec3 -> Vec3 -> Vec3 -> IO (Vec3, Vec3, Vec3)
btGLDebugDrawer_drawLine1 a1 a2 a3 a4 =
withBt a1 $ \a1' ->
withVec3 a2 $ \a2' ->
withVec3 a3 $ \a3' ->
withVec3 a4 $ \a4' ->
btGLDebugDrawer_drawLine1'_ a1' a2' a3' a4' >>= \res ->
peekVec3 a2'>>= \a2'' ->
peekVec3 a3'>>= \a3'' ->
peekVec3 a4'>>= \a4'' ->
return (a2'', a3'', a4'')
btGLDebugDrawer_drawLine1' :: ( BtGLDebugDrawerClass bc ) => bc -> IO (Vec3, Vec3, Vec3)
btGLDebugDrawer_drawLine1' a1 =
withBt a1 $ \a1' ->
allocaVec3 $ \a2' ->
allocaVec3 $ \a3' ->
allocaVec3 $ \a4' ->
btGLDebugDrawer_drawLine1''_ a1' a2' a3' a4' >>= \res ->
peekVec3 a2'>>= \a2'' ->
peekVec3 a3'>>= \a3'' ->
peekVec3 a4'>>= \a4'' ->
return (a2'', a3'', a4'')
btGLDebugDrawer_reportErrorWarning :: ( BtGLDebugDrawerClass bc ) => bc -> String -> IO ()
btGLDebugDrawer_reportErrorWarning a1 a2 =
withBt a1 $ \a1' ->
withCString a2 $ \a2' ->
btGLDebugDrawer_reportErrorWarning'_ a1' a2' >>= \res ->
return ()
btGLDebugDrawer_getDebugMode :: ( BtGLDebugDrawerClass bc ) => bc -> IO (Int)
btGLDebugDrawer_getDebugMode a1 =
withBt a1 $ \a1' ->
btGLDebugDrawer_getDebugMode'_ a1' >>= \res ->
let {res' = fromIntegral res} in
return (res')
btGLDebugDrawer_setDebugMode :: ( BtGLDebugDrawerClass bc ) => bc -> Int -> IO ()
btGLDebugDrawer_setDebugMode a1 a2 =
withBt a1 $ \a1' ->
let {a2' = fromIntegral a2} in
btGLDebugDrawer_setDebugMode'_ a1' a2' >>= \res ->
return ()
btGLDebugDrawer_drawSphere :: ( BtGLDebugDrawerClass bc ) => bc -> Vec3 -> Float -> Vec3 -> IO (Vec3, Vec3)
btGLDebugDrawer_drawSphere a1 a2 a3 a4 =
withBt a1 $ \a1' ->
withVec3 a2 $ \a2' ->
let {a3' = realToFrac a3} in
withVec3 a4 $ \a4' ->
btGLDebugDrawer_drawSphere'_ a1' a2' a3' a4' >>= \res ->
peekVec3 a2'>>= \a2'' ->
peekVec3 a4'>>= \a4'' ->
return (a2'', a4'')
btGLDebugDrawer_drawSphere' :: ( BtGLDebugDrawerClass bc ) => bc -> Float -> IO (Vec3, Vec3)
btGLDebugDrawer_drawSphere' a1 a3 =
withBt a1 $ \a1' ->
allocaVec3 $ \a2' ->
let {a3' = realToFrac a3} in
allocaVec3 $ \a4' ->
btGLDebugDrawer_drawSphere''_ a1' a2' a3' a4' >>= \res ->
peekVec3 a2'>>= \a2'' ->
peekVec3 a4'>>= \a4'' ->
return (a2'', a4'')
foreign import ccall safe "Physics/Bullet/Raw.chs.h btGLDebugDrawer_new"
btGLDebugDrawer'_ :: (IO (Ptr ()))
foreign import ccall safe "Physics/Bullet/Raw.chs.h btGLDebugDrawer_free"
btGLDebugDrawer_free'_ :: ((Ptr ()) -> (IO ()))
foreign import ccall safe "Physics/Bullet/Raw.chs.h btGLDebugDrawer_draw3dText"
btGLDebugDrawer_draw3dText'_ :: ((Ptr ()) -> ((Ptr CFloat) -> ((Ptr CChar) -> (IO ()))))
foreign import ccall safe "Physics/Bullet/Raw.chs.h btGLDebugDrawer_draw3dText"
btGLDebugDrawer_draw3dText''_ :: ((Ptr ()) -> ((Ptr CFloat) -> ((Ptr CChar) -> (IO ()))))
foreign import ccall safe "Physics/Bullet/Raw.chs.h btGLDebugDrawer_drawTriangle"
btGLDebugDrawer_drawTriangle'_ :: ((Ptr ()) -> ((Ptr CFloat) -> ((Ptr CFloat) -> ((Ptr CFloat) -> ((Ptr CFloat) -> (CFloat -> (IO ())))))))
foreign import ccall safe "Physics/Bullet/Raw.chs.h btGLDebugDrawer_drawTriangle"
btGLDebugDrawer_drawTriangle''_ :: ((Ptr ()) -> ((Ptr CFloat) -> ((Ptr CFloat) -> ((Ptr CFloat) -> ((Ptr CFloat) -> (CFloat -> (IO ())))))))
foreign import ccall safe "Physics/Bullet/Raw.chs.h btGLDebugDrawer_drawBox"
btGLDebugDrawer_drawBox'_ :: ((Ptr ()) -> ((Ptr CFloat) -> ((Ptr CFloat) -> ((Ptr CFloat) -> (CFloat -> (IO ()))))))
foreign import ccall safe "Physics/Bullet/Raw.chs.h btGLDebugDrawer_drawBox"
btGLDebugDrawer_drawBox''_ :: ((Ptr ()) -> ((Ptr CFloat) -> ((Ptr CFloat) -> ((Ptr CFloat) -> (CFloat -> (IO ()))))))
foreign import ccall safe "Physics/Bullet/Raw.chs.h btGLDebugDrawer_drawContactPoint"
btGLDebugDrawer_drawContactPoint'_ :: ((Ptr ()) -> ((Ptr CFloat) -> ((Ptr CFloat) -> (CFloat -> (CInt -> ((Ptr CFloat) -> (IO ())))))))
foreign import ccall safe "Physics/Bullet/Raw.chs.h btGLDebugDrawer_drawContactPoint"
btGLDebugDrawer_drawContactPoint''_ :: ((Ptr ()) -> ((Ptr CFloat) -> ((Ptr CFloat) -> (CFloat -> (CInt -> ((Ptr CFloat) -> (IO ())))))))
foreign import ccall safe "Physics/Bullet/Raw.chs.h btGLDebugDrawer_drawLine0"
btGLDebugDrawer_drawLine'_ :: ((Ptr ()) -> ((Ptr CFloat) -> ((Ptr CFloat) -> ((Ptr CFloat) -> ((Ptr CFloat) -> (IO ()))))))
foreign import ccall safe "Physics/Bullet/Raw.chs.h btGLDebugDrawer_drawLine0"
btGLDebugDrawer_drawLine''_ :: ((Ptr ()) -> ((Ptr CFloat) -> ((Ptr CFloat) -> ((Ptr CFloat) -> ((Ptr CFloat) -> (IO ()))))))
foreign import ccall safe "Physics/Bullet/Raw.chs.h btGLDebugDrawer_drawLine0"
btGLDebugDrawer_drawLine0'_ :: ((Ptr ()) -> ((Ptr CFloat) -> ((Ptr CFloat) -> ((Ptr CFloat) -> ((Ptr CFloat) -> (IO ()))))))
foreign import ccall safe "Physics/Bullet/Raw.chs.h btGLDebugDrawer_drawLine0"
btGLDebugDrawer_drawLine0''_ :: ((Ptr ()) -> ((Ptr CFloat) -> ((Ptr CFloat) -> ((Ptr CFloat) -> ((Ptr CFloat) -> (IO ()))))))
foreign import ccall safe "Physics/Bullet/Raw.chs.h btGLDebugDrawer_drawLine1"
btGLDebugDrawer_drawLine1'_ :: ((Ptr ()) -> ((Ptr CFloat) -> ((Ptr CFloat) -> ((Ptr CFloat) -> (IO ())))))
foreign import ccall safe "Physics/Bullet/Raw.chs.h btGLDebugDrawer_drawLine1"
btGLDebugDrawer_drawLine1''_ :: ((Ptr ()) -> ((Ptr CFloat) -> ((Ptr CFloat) -> ((Ptr CFloat) -> (IO ())))))
foreign import ccall safe "Physics/Bullet/Raw.chs.h btGLDebugDrawer_reportErrorWarning"
btGLDebugDrawer_reportErrorWarning'_ :: ((Ptr ()) -> ((Ptr CChar) -> (IO ())))
foreign import ccall safe "Physics/Bullet/Raw.chs.h btGLDebugDrawer_getDebugMode"
btGLDebugDrawer_getDebugMode'_ :: ((Ptr ()) -> (IO CInt))
foreign import ccall safe "Physics/Bullet/Raw.chs.h btGLDebugDrawer_setDebugMode"
btGLDebugDrawer_setDebugMode'_ :: ((Ptr ()) -> (CInt -> (IO ())))
foreign import ccall safe "Physics/Bullet/Raw.chs.h btGLDebugDrawer_drawSphere"
btGLDebugDrawer_drawSphere'_ :: ((Ptr ()) -> ((Ptr CFloat) -> (CFloat -> ((Ptr CFloat) -> (IO ())))))
foreign import ccall safe "Physics/Bullet/Raw.chs.h btGLDebugDrawer_drawSphere"
btGLDebugDrawer_drawSphere''_ :: ((Ptr ()) -> ((Ptr CFloat) -> (CFloat -> ((Ptr CFloat) -> (IO ())))))