-- GENERATED by C->Haskell Compiler, version 0.16.3 Crystal Seed, 24 Jan 2009 (Haskell)
-- Edit the ORIGNAL .chs file instead!


{-# LINE 1 ".\\HGamer3D\\Bindings\\Bullet\\ClassCollisionWorld.chs" #-}{-# LANGUAGE ForeignFunctionInterface #-}
{-# LANGUAGE TypeSynonymInstances #-}

-- This source file is part of HGamer3D
-- (A project to enable 3D game development in Haskell)
-- For the latest info, see http://www.althainz.de/HGamer3D.html
-- 

-- (c) 2011, 2012 Peter Althainz
-- 
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
-- 
--     http://www.apache.org/licenses/LICENSE-2.0
-- 
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-- 


-- ClassCollisionWorld.chs

-- 

module HGamer3D.Bindings.Bullet.ClassCollisionWorld where

import Foreign
import Foreign.Ptr
import Foreign.C

import HGamer3D.Data.HG3DClass
import HGamer3D.Data.Vector
import HGamer3D.Data.Colour
import HGamer3D.Data.Angle

import HGamer3D.Bindings.Bullet.Utils
{-# LINE 40 ".\\HGamer3D\\Bindings\\Bullet\\ClassCollisionWorld.chs" #-}
import HGamer3D.Bindings.Bullet.ClassPtr
{-# LINE 41 ".\\HGamer3D\\Bindings\\Bullet\\ClassCollisionWorld.chs" #-}
import HGamer3D.Bindings.Bullet.StructHG3DClass
{-# LINE 42 ".\\HGamer3D\\Bindings\\Bullet\\ClassCollisionWorld.chs" #-}

{- function btCollisionWorld -}
new :: HG3DClass -> HG3DClass -> HG3DClass -> IO (HG3DClass)
new a1 a2 a3 =
  withHG3DClass a1 $ \a1' -> 
  withHG3DClass a2 $ \a2' -> 
  withHG3DClass a3 $ \a3' -> 
  alloca $ \a4' -> 
  new'_ a1' a2' a3' a4' >>= \res ->
  peek  a4'>>= \a4'' -> 
  return (a4'')
{-# LINE 50 ".\\HGamer3D\\Bindings\\Bullet\\ClassCollisionWorld.chs" #-}

{- function ~btCollisionWorld -}
delete :: HG3DClass -> IO ()
delete a1 =
  withHG3DClass a1 $ \a1' -> 
  delete'_ a1' >>= \res ->
  return ()
{-# LINE 54 ".\\HGamer3D\\Bindings\\Bullet\\ClassCollisionWorld.chs" #-}

{- function setBroadphase -}
setBroadphase :: HG3DClass -> HG3DClass -> IO ()
setBroadphase a1 a2 =
  withHG3DClass a1 $ \a1' -> 
  withHG3DClass a2 $ \a2' -> 
  setBroadphase'_ a1' a2' >>= \res ->
  return ()
{-# LINE 59 ".\\HGamer3D\\Bindings\\Bullet\\ClassCollisionWorld.chs" #-}

{- function getBroadphase -}
getBroadphase :: HG3DClass -> IO (HG3DClass)
getBroadphase a1 =
  withHG3DClass a1 $ \a1' -> 
  alloca $ \a2' -> 
  getBroadphase'_ a1' a2' >>= \res ->
  peek  a2'>>= \a2'' -> 
  return (a2'')
{-# LINE 64 ".\\HGamer3D\\Bindings\\Bullet\\ClassCollisionWorld.chs" #-}

{- function getBroadphase2 -}
getBroadphase2 :: HG3DClass -> IO (HG3DClass)
getBroadphase2 a1 =
  withHG3DClass a1 $ \a1' -> 
  alloca $ \a2' -> 
  getBroadphase2'_ a1' a2' >>= \res ->
  peek  a2'>>= \a2'' -> 
  return (a2'')
{-# LINE 69 ".\\HGamer3D\\Bindings\\Bullet\\ClassCollisionWorld.chs" #-}

{- function getDispatcher -}
getDispatcher :: HG3DClass -> IO (HG3DClass)
getDispatcher a1 =
  withHG3DClass a1 $ \a1' -> 
  alloca $ \a2' -> 
  getDispatcher'_ a1' a2' >>= \res ->
  peek  a2'>>= \a2'' -> 
  return (a2'')
{-# LINE 74 ".\\HGamer3D\\Bindings\\Bullet\\ClassCollisionWorld.chs" #-}

{- function getDispatcher2 -}
getDispatcher2 :: HG3DClass -> IO (HG3DClass)
getDispatcher2 a1 =
  withHG3DClass a1 $ \a1' -> 
  alloca $ \a2' -> 
  getDispatcher2'_ a1' a2' >>= \res ->
  peek  a2'>>= \a2'' -> 
  return (a2'')
{-# LINE 79 ".\\HGamer3D\\Bindings\\Bullet\\ClassCollisionWorld.chs" #-}

{- function updateAabbs -}
updateAabbs :: HG3DClass -> IO ()
updateAabbs a1 =
  withHG3DClass a1 $ \a1' -> 
  updateAabbs'_ a1' >>= \res ->
  return ()
{-# LINE 83 ".\\HGamer3D\\Bindings\\Bullet\\ClassCollisionWorld.chs" #-}

{- function computeOverlappingPairs -}
computeOverlappingPairs :: HG3DClass -> IO ()
computeOverlappingPairs a1 =
  withHG3DClass a1 $ \a1' -> 
  computeOverlappingPairs'_ a1' >>= \res ->
  return ()
{-# LINE 87 ".\\HGamer3D\\Bindings\\Bullet\\ClassCollisionWorld.chs" #-}

{- function debugDrawWorld -}
debugDrawWorld :: HG3DClass -> IO ()
debugDrawWorld a1 =
  withHG3DClass a1 $ \a1' -> 
  debugDrawWorld'_ a1' >>= \res ->
  return ()
{-# LINE 91 ".\\HGamer3D\\Bindings\\Bullet\\ClassCollisionWorld.chs" #-}

{- function getNumCollisionObjects -}
getNumCollisionObjects :: HG3DClass -> IO (Int)
getNumCollisionObjects a1 =
  withHG3DClass a1 $ \a1' -> 
  alloca $ \a2' -> 
  getNumCollisionObjects'_ a1' a2' >>= \res ->
  peekIntConv  a2'>>= \a2'' -> 
  return (a2'')
{-# LINE 96 ".\\HGamer3D\\Bindings\\Bullet\\ClassCollisionWorld.chs" #-}

{- function performDiscreteCollisionDetection -}
performDiscreteCollisionDetection :: HG3DClass -> IO ()
performDiscreteCollisionDetection a1 =
  withHG3DClass a1 $ \a1' -> 
  performDiscreteCollisionDetection'_ a1' >>= \res ->
  return ()
{-# LINE 100 ".\\HGamer3D\\Bindings\\Bullet\\ClassCollisionWorld.chs" #-}

{- function getForceUpdateAllAabbs -}
getForceUpdateAllAabbs :: HG3DClass -> IO (Bool)
getForceUpdateAllAabbs a1 =
  withHG3DClass a1 $ \a1' -> 
  alloca $ \a2' -> 
  getForceUpdateAllAabbs'_ a1' a2' >>= \res ->
  peekBoolUtil  a2'>>= \a2'' -> 
  return (a2'')
{-# LINE 105 ".\\HGamer3D\\Bindings\\Bullet\\ClassCollisionWorld.chs" #-}

{- function setForceUpdateAllAabbs -}
setForceUpdateAllAabbs :: HG3DClass -> Bool -> IO ()
setForceUpdateAllAabbs a1 a2 =
  withHG3DClass a1 $ \a1' -> 
  let {a2' = fromBool a2} in 
  setForceUpdateAllAabbs'_ a1' a2' >>= \res ->
  return ()
{-# LINE 110 ".\\HGamer3D\\Bindings\\Bullet\\ClassCollisionWorld.chs" #-}


foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassCollisionWorld.chs.h bt_cllsnwrld_construct"
  new'_ :: ((HG3DClassPtr) -> ((HG3DClassPtr) -> ((HG3DClassPtr) -> ((HG3DClassPtr) -> (IO ())))))

foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassCollisionWorld.chs.h bt_cllsnwrld_destruct"
  delete'_ :: ((HG3DClassPtr) -> (IO ()))

foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassCollisionWorld.chs.h bt_cllsnwrld_setBroadphase"
  setBroadphase'_ :: ((HG3DClassPtr) -> ((HG3DClassPtr) -> (IO ())))

foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassCollisionWorld.chs.h bt_cllsnwrld_getBroadphase"
  getBroadphase'_ :: ((HG3DClassPtr) -> ((HG3DClassPtr) -> (IO ())))

foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassCollisionWorld.chs.h bt_cllsnwrld_getBroadphase2"
  getBroadphase2'_ :: ((HG3DClassPtr) -> ((HG3DClassPtr) -> (IO ())))

foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassCollisionWorld.chs.h bt_cllsnwrld_getDispatcher"
  getDispatcher'_ :: ((HG3DClassPtr) -> ((HG3DClassPtr) -> (IO ())))

foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassCollisionWorld.chs.h bt_cllsnwrld_getDispatcher2"
  getDispatcher2'_ :: ((HG3DClassPtr) -> ((HG3DClassPtr) -> (IO ())))

foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassCollisionWorld.chs.h bt_cllsnwrld_updateAabbs"
  updateAabbs'_ :: ((HG3DClassPtr) -> (IO ()))

foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassCollisionWorld.chs.h bt_cllsnwrld_computeOverlappingPairs"
  computeOverlappingPairs'_ :: ((HG3DClassPtr) -> (IO ()))

foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassCollisionWorld.chs.h bt_cllsnwrld_debugDrawWorld"
  debugDrawWorld'_ :: ((HG3DClassPtr) -> (IO ()))

foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassCollisionWorld.chs.h bt_cllsnwrld_getNumCollisionObjects"
  getNumCollisionObjects'_ :: ((HG3DClassPtr) -> ((Ptr CInt) -> (IO ())))

foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassCollisionWorld.chs.h bt_cllsnwrld_performDiscreteCollisionDetection"
  performDiscreteCollisionDetection'_ :: ((HG3DClassPtr) -> (IO ()))

foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassCollisionWorld.chs.h bt_cllsnwrld_getForceUpdateAllAabbs"
  getForceUpdateAllAabbs'_ :: ((HG3DClassPtr) -> ((Ptr CInt) -> (IO ())))

foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassCollisionWorld.chs.h bt_cllsnwrld_setForceUpdateAllAabbs"
  setForceUpdateAllAabbs'_ :: ((HG3DClassPtr) -> (CInt -> (IO ())))