HGamer3D-Bullet-Binding (empty) → 0.2.0
raw patch · 59 files changed
+5172/−0 lines, 59 filesdep +HGamer3D-Datadep +basesetup-changed
Dependencies added: HGamer3D-Data, base
Files
- HGamer3D-Bullet-Binding.cabal +35/−0
- HGamer3D/Bindings/Bullet/ClassActionInterface.hs +74/−0
- HGamer3D/Bindings/Bullet/ClassBroadphaseInterface.hs +113/−0
- HGamer3D/Bindings/Bullet/ClassCapsuleShapeX.hs +77/−0
- HGamer3D/Bindings/Bullet/ClassCapsuleShapeZ.hs +77/−0
- HGamer3D/Bindings/Bullet/ClassCollisionConfiguration.hs +61/−0
- HGamer3D/Bindings/Bullet/ClassCollisionDispatcher.hs +150/−0
- HGamer3D/Bindings/Bullet/ClassCollisionWorld.hs +222/−0
- HGamer3D/Bindings/Bullet/ClassConeShapeX.hs +79/−0
- HGamer3D/Bindings/Bullet/ClassConeShapeZ.hs +79/−0
- HGamer3D/Bindings/Bullet/ClassCylinderShapeX.hs +120/−0
- HGamer3D/Bindings/Bullet/ClassCylinderShapeZ.hs +120/−0
- HGamer3D/Bindings/Bullet/ClassDefaultCollisionConfiguration.hs +87/−0
- HGamer3D/Bindings/Bullet/ClassDispatcher.hs +74/−0
- HGamer3D/Bindings/Bullet/ClassDynamicsWorld.hs +246/−0
- HGamer3D/Bindings/Bullet/ClassHG3DBulletDefaultCreator.hs +110/−0
- HGamer3D/Bindings/Bullet/ClassHG3DBulletMotionStateHandler.hs +118/−0
- HGamer3D/Bindings/Bullet/ClassHG3DRigidBodyCreator.hs +152/−0
- HGamer3D/Bindings/Bullet/ClassMotionState.hs +61/−0
- HGamer3D/Bindings/Bullet/ClassPtr.hs +109/−0
- HGamer3D/Bindings/Bullet/ClassRigidBody.hs +683/−0
- HGamer3D/Bindings/Bullet/ClassSimpleBroadphase.hs +101/−0
- HGamer3D/Bindings/Bullet/ClassSimpleDynamicsWorld.hs +196/−0
- HGamer3D/Bindings/Bullet/StructColour.hs +73/−0
- HGamer3D/Bindings/Bullet/StructHG3DClass.hs +58/−0
- HGamer3D/Bindings/Bullet/StructQuaternion.hs +82/−0
- HGamer3D/Bindings/Bullet/StructVec2.hs +78/−0
- HGamer3D/Bindings/Bullet/StructVec3.hs +78/−0
- HGamer3D/Bindings/Bullet/Utils.hs +136/−0
- LICENSE +13/−0
- Setup.hs +22/−0
- include/BulletDllDefines.h +41/−0
- include/ClassActionInterface.h +39/−0
- include/ClassBroadphaseInterface.h +49/−0
- include/ClassCapsuleShapeX.h +38/−0
- include/ClassCapsuleShapeZ.h +38/−0
- include/ClassCollisionConfiguration.h +35/−0
- include/ClassCollisionDispatcher.h +57/−0
- include/ClassCollisionWorld.h +77/−0
- include/ClassConeShapeX.h +39/−0
- include/ClassConeShapeZ.h +39/−0
- include/ClassCylinderShapeX.h +48/−0
- include/ClassCylinderShapeZ.h +48/−0
- include/ClassDefaultCollisionConfiguration.h +41/−0
- include/ClassDispatcher.h +38/−0
- include/ClassDynamicsWorld.h +83/−0
- include/ClassHG3DBulletDefaultCreator.h +49/−0
- include/ClassHG3DBulletMotionStateHandler.h +51/−0
- include/ClassHG3DRigidBodyCreator.h +53/−0
- include/ClassMotionState.h +35/−0
- include/ClassPtr.h +103/−0
- include/ClassRigidBody.h +185/−0
- include/ClassSimpleBroadphase.h +46/−0
- include/ClassSimpleDynamicsWorld.h +71/−0
- include/StructColour.h +38/−0
- include/StructHG3DClass.h +36/−0
- include/StructQuaternion.h +38/−0
- include/StructVec2.h +36/−0
- include/StructVec3.h +37/−0
+ HGamer3D-Bullet-Binding.cabal view
@@ -0,0 +1,35 @@+Name: HGamer3D-Bullet-Binding +Version: 0.2.0 +Synopsis: Windows Game Engine for the Haskell Programmer - Bullet Bindings +Description: + HGamer3D is a game engine for developing 3D games in the programming + language Haskell. The game engine uses available libraries for 3D graphics, + sound, input device handling, gui programming and other areas and make + those functions available for the Haskell programmer by providing + a Haskell API on top of that. HGamer3D is available on Windows only. + + + +License: OtherLicense +License-file: LICENSE +Author: Peter Althainz +Maintainer: althainz@gmail.com +Build-Type: Simple +Cabal-Version: >=1.4 +Homepage: http://www.hgamer3d.org +Category: Game Engine, Physics +Extra-source-files: Setup.hs, include/BulletDllDefines.h, include/ClassActionInterface.h, include/ClassBroadphaseInterface.h, include/ClassCapsuleShapeX.h, include/ClassCapsuleShapeZ.h, include/ClassCollisionConfiguration.h, include/ClassCollisionDispatcher.h, include/ClassCollisionWorld.h, include/ClassConeShapeX.h, include/ClassConeShapeZ.h, include/ClassCylinderShapeX.h, include/ClassCylinderShapeZ.h, include/ClassDefaultCollisionConfiguration.h, include/ClassDispatcher.h, include/ClassDynamicsWorld.h, include/ClassHG3DBulletDefaultCreator.h, include/ClassHG3DBulletMotionStateHandler.h, include/ClassHG3DRigidBodyCreator.h, include/ClassMotionState.h, include/ClassPtr.h, include/ClassRigidBody.h, include/ClassSimpleBroadphase.h, include/ClassSimpleDynamicsWorld.h, include/StructColour.h, include/StructHG3DClass.h, include/StructQuaternion.h, include/StructVec2.h, include/StructVec3.h + +Library + Build-Depends: base >= 3 && < 5, HGamer3D-Data >= 0.2.0 + + Exposed-modules: HGamer3D.Bindings.Bullet.Utils, HGamer3D.Bindings.Bullet.ClassPtr, HGamer3D.Bindings.Bullet.StructHG3DClass, HGamer3D.Bindings.Bullet.StructColour, HGamer3D.Bindings.Bullet.StructQuaternion, HGamer3D.Bindings.Bullet.StructVec2, HGamer3D.Bindings.Bullet.StructVec3, HGamer3D.Bindings.Bullet.ClassActionInterface, HGamer3D.Bindings.Bullet.ClassBroadphaseInterface, HGamer3D.Bindings.Bullet.ClassCapsuleShapeX, HGamer3D.Bindings.Bullet.ClassCapsuleShapeZ, HGamer3D.Bindings.Bullet.ClassCollisionConfiguration, HGamer3D.Bindings.Bullet.ClassCollisionDispatcher, HGamer3D.Bindings.Bullet.ClassCollisionWorld, HGamer3D.Bindings.Bullet.ClassConeShapeX, HGamer3D.Bindings.Bullet.ClassConeShapeZ, HGamer3D.Bindings.Bullet.ClassCylinderShapeX, HGamer3D.Bindings.Bullet.ClassCylinderShapeZ, HGamer3D.Bindings.Bullet.ClassDefaultCollisionConfiguration, HGamer3D.Bindings.Bullet.ClassDispatcher, HGamer3D.Bindings.Bullet.ClassDynamicsWorld, HGamer3D.Bindings.Bullet.ClassHG3DBulletDefaultCreator, HGamer3D.Bindings.Bullet.ClassHG3DBulletMotionStateHandler, HGamer3D.Bindings.Bullet.ClassHG3DRigidBodyCreator, HGamer3D.Bindings.Bullet.ClassMotionState, HGamer3D.Bindings.Bullet.ClassRigidBody, HGamer3D.Bindings.Bullet.ClassSimpleBroadphase, HGamer3D.Bindings.Bullet.ClassSimpleDynamicsWorld + Other-modules: + + ghc-options: + cc-options: -Wno-attributes + hs-source-dirs: . + Include-dirs: include + Build-tools: + build-depends: + extra-libraries:
+ HGamer3D/Bindings/Bullet/ClassActionInterface.hs view
@@ -0,0 +1,74 @@+-- 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\\ClassActionInterface.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. +-- + + +-- ClassActionInterface.chs + +-- + +module HGamer3D.Bindings.Bullet.ClassActionInterface 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\\ClassActionInterface.chs" #-} +import HGamer3D.Bindings.Bullet.ClassPtr +{-# LINE 41 ".\\HGamer3D\\Bindings\\Bullet\\ClassActionInterface.chs" #-} +import HGamer3D.Bindings.Bullet.StructHG3DClass +{-# LINE 42 ".\\HGamer3D\\Bindings\\Bullet\\ClassActionInterface.chs" #-} + +{- function ~btActionInterface -} +delete :: HG3DClass -> IO () +delete a1 = + withHG3DClass a1 $ \a1' -> + delete'_ a1' >>= \res -> + return () +{-# LINE 47 ".\\HGamer3D\\Bindings\\Bullet\\ClassActionInterface.chs" #-} + +{- function updateAction -} +updateAction :: HG3DClass -> HG3DClass -> Float -> IO () +updateAction a1 a2 a3 = + withHG3DClass a1 $ \a1' -> + withHG3DClass a2 $ \a2' -> + let {a3' = realToFrac a3} in + updateAction'_ a1' a2' a3' >>= \res -> + return () +{-# LINE 53 ".\\HGamer3D\\Bindings\\Bullet\\ClassActionInterface.chs" #-} + + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassActionInterface.chs.h bt_actnintrfc_destruct" + delete'_ :: ((HG3DClassPtr) -> (IO ())) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassActionInterface.chs.h bt_actnintrfc_updateAction" + updateAction'_ :: ((HG3DClassPtr) -> ((HG3DClassPtr) -> (CFloat -> (IO ()))))
+ HGamer3D/Bindings/Bullet/ClassBroadphaseInterface.hs view
@@ -0,0 +1,113 @@+-- 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\\ClassBroadphaseInterface.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. +-- + + +-- ClassBroadphaseInterface.chs + +-- + +module HGamer3D.Bindings.Bullet.ClassBroadphaseInterface 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\\ClassBroadphaseInterface.chs" #-} +import HGamer3D.Bindings.Bullet.ClassPtr +{-# LINE 41 ".\\HGamer3D\\Bindings\\Bullet\\ClassBroadphaseInterface.chs" #-} +import HGamer3D.Bindings.Bullet.StructHG3DClass +{-# LINE 42 ".\\HGamer3D\\Bindings\\Bullet\\ClassBroadphaseInterface.chs" #-} +import HGamer3D.Bindings.Bullet.StructVec3 +{-# LINE 43 ".\\HGamer3D\\Bindings\\Bullet\\ClassBroadphaseInterface.chs" #-} + +{- function ~btBroadphaseInterface -} +delete :: HG3DClass -> IO () +delete a1 = + withHG3DClass a1 $ \a1' -> + delete'_ a1' >>= \res -> + return () +{-# LINE 48 ".\\HGamer3D\\Bindings\\Bullet\\ClassBroadphaseInterface.chs" #-} + +{- function calculateOverlappingPairs -} +calculateOverlappingPairs :: HG3DClass -> HG3DClass -> IO () +calculateOverlappingPairs a1 a2 = + withHG3DClass a1 $ \a1' -> + withHG3DClass a2 $ \a2' -> + calculateOverlappingPairs'_ a1' a2' >>= \res -> + return () +{-# LINE 53 ".\\HGamer3D\\Bindings\\Bullet\\ClassBroadphaseInterface.chs" #-} + +{- function getBroadphaseAabb -} +getBroadphaseAabb :: HG3DClass -> IO (Vec3, Vec3) +getBroadphaseAabb a1 = + withHG3DClass a1 $ \a1' -> + alloca $ \a2' -> + alloca $ \a3' -> + getBroadphaseAabb'_ a1' a2' a3' >>= \res -> + peekVec3 a2'>>= \a2'' -> + peekVec3 a3'>>= \a3'' -> + return (a2'', a3'') +{-# LINE 59 ".\\HGamer3D\\Bindings\\Bullet\\ClassBroadphaseInterface.chs" #-} + +{- function resetPool -} +resetPool :: HG3DClass -> HG3DClass -> IO () +resetPool a1 a2 = + withHG3DClass a1 $ \a1' -> + withHG3DClass a2 $ \a2' -> + resetPool'_ a1' a2' >>= \res -> + return () +{-# LINE 64 ".\\HGamer3D\\Bindings\\Bullet\\ClassBroadphaseInterface.chs" #-} + +{- function printStats -} +printStats :: HG3DClass -> IO () +printStats a1 = + withHG3DClass a1 $ \a1' -> + printStats'_ a1' >>= \res -> + return () +{-# LINE 68 ".\\HGamer3D\\Bindings\\Bullet\\ClassBroadphaseInterface.chs" #-} + + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassBroadphaseInterface.chs.h bt_brdpintf_destruct" + delete'_ :: ((HG3DClassPtr) -> (IO ())) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassBroadphaseInterface.chs.h bt_brdpintf_calculateOverlappingPairs" + calculateOverlappingPairs'_ :: ((HG3DClassPtr) -> ((HG3DClassPtr) -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassBroadphaseInterface.chs.h bt_brdpintf_getBroadphaseAabb" + getBroadphaseAabb'_ :: ((HG3DClassPtr) -> ((Vec3Ptr) -> ((Vec3Ptr) -> (IO ())))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassBroadphaseInterface.chs.h bt_brdpintf_resetPool" + resetPool'_ :: ((HG3DClassPtr) -> ((HG3DClassPtr) -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassBroadphaseInterface.chs.h bt_brdpintf_printStats" + printStats'_ :: ((HG3DClassPtr) -> (IO ()))
+ HGamer3D/Bindings/Bullet/ClassCapsuleShapeX.hs view
@@ -0,0 +1,77 @@+-- 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\\ClassCapsuleShapeX.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. +-- + + +-- ClassCapsuleShapeX.chs + +-- + +module HGamer3D.Bindings.Bullet.ClassCapsuleShapeX 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\\ClassCapsuleShapeX.chs" #-} +import HGamer3D.Bindings.Bullet.ClassPtr +{-# LINE 41 ".\\HGamer3D\\Bindings\\Bullet\\ClassCapsuleShapeX.chs" #-} +import HGamer3D.Bindings.Bullet.StructHG3DClass +{-# LINE 42 ".\\HGamer3D\\Bindings\\Bullet\\ClassCapsuleShapeX.chs" #-} + +{- function btCapsuleShapeX -} +new :: Float -> Float -> IO (HG3DClass) +new a1 a2 = + let {a1' = realToFrac a1} in + let {a2' = realToFrac a2} in + alloca $ \a3' -> + new'_ a1' a2' a3' >>= \res -> + peek a3'>>= \a3'' -> + return (a3'') +{-# LINE 49 ".\\HGamer3D\\Bindings\\Bullet\\ClassCapsuleShapeX.chs" #-} + +{- function getName -} +getName :: HG3DClass -> IO (String) +getName a1 = + withHG3DClass a1 $ \a1' -> + alloc64k $ \a2' -> + getName'_ a1' a2' >>= \res -> + peekCString a2'>>= \a2'' -> + return (a2'') +{-# LINE 54 ".\\HGamer3D\\Bindings\\Bullet\\ClassCapsuleShapeX.chs" #-} + + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassCapsuleShapeX.chs.h bt_cpsshx_construct" + new'_ :: (CFloat -> (CFloat -> ((HG3DClassPtr) -> (IO ())))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassCapsuleShapeX.chs.h bt_cpsshx_getName" + getName'_ :: ((HG3DClassPtr) -> ((Ptr CChar) -> (IO ())))
+ HGamer3D/Bindings/Bullet/ClassCapsuleShapeZ.hs view
@@ -0,0 +1,77 @@+-- 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\\ClassCapsuleShapeZ.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. +-- + + +-- ClassCapsuleShapeZ.chs + +-- + +module HGamer3D.Bindings.Bullet.ClassCapsuleShapeZ 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\\ClassCapsuleShapeZ.chs" #-} +import HGamer3D.Bindings.Bullet.ClassPtr +{-# LINE 41 ".\\HGamer3D\\Bindings\\Bullet\\ClassCapsuleShapeZ.chs" #-} +import HGamer3D.Bindings.Bullet.StructHG3DClass +{-# LINE 42 ".\\HGamer3D\\Bindings\\Bullet\\ClassCapsuleShapeZ.chs" #-} + +{- function btCapsuleShapeZ -} +new :: Float -> Float -> IO (HG3DClass) +new a1 a2 = + let {a1' = realToFrac a1} in + let {a2' = realToFrac a2} in + alloca $ \a3' -> + new'_ a1' a2' a3' >>= \res -> + peek a3'>>= \a3'' -> + return (a3'') +{-# LINE 49 ".\\HGamer3D\\Bindings\\Bullet\\ClassCapsuleShapeZ.chs" #-} + +{- function getName -} +getName :: HG3DClass -> IO (String) +getName a1 = + withHG3DClass a1 $ \a1' -> + alloc64k $ \a2' -> + getName'_ a1' a2' >>= \res -> + peekCString a2'>>= \a2'' -> + return (a2'') +{-# LINE 54 ".\\HGamer3D\\Bindings\\Bullet\\ClassCapsuleShapeZ.chs" #-} + + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassCapsuleShapeZ.chs.h bt_cpsshz_construct" + new'_ :: (CFloat -> (CFloat -> ((HG3DClassPtr) -> (IO ())))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassCapsuleShapeZ.chs.h bt_cpsshz_getName" + getName'_ :: ((HG3DClassPtr) -> ((Ptr CChar) -> (IO ())))
+ HGamer3D/Bindings/Bullet/ClassCollisionConfiguration.hs view
@@ -0,0 +1,61 @@+-- 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\\ClassCollisionConfiguration.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. +-- + + +-- ClassCollisionConfiguration.chs + +-- + +module HGamer3D.Bindings.Bullet.ClassCollisionConfiguration 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\\ClassCollisionConfiguration.chs" #-} +import HGamer3D.Bindings.Bullet.ClassPtr +{-# LINE 41 ".\\HGamer3D\\Bindings\\Bullet\\ClassCollisionConfiguration.chs" #-} +import HGamer3D.Bindings.Bullet.StructHG3DClass +{-# LINE 42 ".\\HGamer3D\\Bindings\\Bullet\\ClassCollisionConfiguration.chs" #-} + +{- function ~btCollisionConfiguration -} +delete :: HG3DClass -> IO () +delete a1 = + withHG3DClass a1 $ \a1' -> + delete'_ a1' >>= \res -> + return () +{-# LINE 47 ".\\HGamer3D\\Bindings\\Bullet\\ClassCollisionConfiguration.chs" #-} + + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassCollisionConfiguration.chs.h bt_cllsncfg_destruct" + delete'_ :: ((HG3DClassPtr) -> (IO ()))
+ HGamer3D/Bindings/Bullet/ClassCollisionDispatcher.hs view
@@ -0,0 +1,150 @@+-- 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\\ClassCollisionDispatcher.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. +-- + + +-- ClassCollisionDispatcher.chs + +-- + +module HGamer3D.Bindings.Bullet.ClassCollisionDispatcher 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\\ClassCollisionDispatcher.chs" #-} +import HGamer3D.Bindings.Bullet.ClassPtr +{-# LINE 41 ".\\HGamer3D\\Bindings\\Bullet\\ClassCollisionDispatcher.chs" #-} +import HGamer3D.Bindings.Bullet.StructHG3DClass +{-# LINE 42 ".\\HGamer3D\\Bindings\\Bullet\\ClassCollisionDispatcher.chs" #-} + +{- function getDispatcherFlags -} +getDispatcherFlags :: HG3DClass -> IO (Int) +getDispatcherFlags a1 = + withHG3DClass a1 $ \a1' -> + alloca $ \a2' -> + getDispatcherFlags'_ a1' a2' >>= \res -> + peekIntConv a2'>>= \a2'' -> + return (a2'') +{-# LINE 48 ".\\HGamer3D\\Bindings\\Bullet\\ClassCollisionDispatcher.chs" #-} + +{- function setDispatcherFlags -} +setDispatcherFlags :: HG3DClass -> Int -> IO () +setDispatcherFlags a1 a2 = + withHG3DClass a1 $ \a1' -> + let {a2' = fromIntegral a2} in + setDispatcherFlags'_ a1' a2' >>= \res -> + return () +{-# LINE 53 ".\\HGamer3D\\Bindings\\Bullet\\ClassCollisionDispatcher.chs" #-} + +{- function getNumManifolds -} +getNumManifolds :: HG3DClass -> IO (Int) +getNumManifolds a1 = + withHG3DClass a1 $ \a1' -> + alloca $ \a2' -> + getNumManifolds'_ a1' a2' >>= \res -> + peekIntConv a2'>>= \a2'' -> + return (a2'') +{-# LINE 58 ".\\HGamer3D\\Bindings\\Bullet\\ClassCollisionDispatcher.chs" #-} + +{- function btCollisionDispatcher -} +new :: HG3DClass -> IO (HG3DClass) +new a1 = + withHG3DClass a1 $ \a1' -> + alloca $ \a2' -> + new'_ a1' a2' >>= \res -> + peek a2'>>= \a2'' -> + return (a2'') +{-# LINE 63 ".\\HGamer3D\\Bindings\\Bullet\\ClassCollisionDispatcher.chs" #-} + +{- function ~btCollisionDispatcher -} +delete :: HG3DClass -> IO () +delete a1 = + withHG3DClass a1 $ \a1' -> + delete'_ a1' >>= \res -> + return () +{-# LINE 67 ".\\HGamer3D\\Bindings\\Bullet\\ClassCollisionDispatcher.chs" #-} + +{- function getCollisionConfiguration -} +getCollisionConfiguration :: HG3DClass -> IO (HG3DClass) +getCollisionConfiguration a1 = + withHG3DClass a1 $ \a1' -> + alloca $ \a2' -> + getCollisionConfiguration'_ a1' a2' >>= \res -> + peek a2'>>= \a2'' -> + return (a2'') +{-# LINE 72 ".\\HGamer3D\\Bindings\\Bullet\\ClassCollisionDispatcher.chs" #-} + +{- function getCollisionConfiguration2 -} +getCollisionConfiguration2 :: HG3DClass -> IO (HG3DClass) +getCollisionConfiguration2 a1 = + withHG3DClass a1 $ \a1' -> + alloca $ \a2' -> + getCollisionConfiguration2'_ a1' a2' >>= \res -> + peek a2'>>= \a2'' -> + return (a2'') +{-# LINE 77 ".\\HGamer3D\\Bindings\\Bullet\\ClassCollisionDispatcher.chs" #-} + +{- function setCollisionConfiguration -} +setCollisionConfiguration :: HG3DClass -> HG3DClass -> IO () +setCollisionConfiguration a1 a2 = + withHG3DClass a1 $ \a1' -> + withHG3DClass a2 $ \a2' -> + setCollisionConfiguration'_ a1' a2' >>= \res -> + return () +{-# LINE 82 ".\\HGamer3D\\Bindings\\Bullet\\ClassCollisionDispatcher.chs" #-} + + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassCollisionDispatcher.chs.h bt_cllsndpstch_getDispatcherFlags" + getDispatcherFlags'_ :: ((HG3DClassPtr) -> ((Ptr CInt) -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassCollisionDispatcher.chs.h bt_cllsndpstch_setDispatcherFlags" + setDispatcherFlags'_ :: ((HG3DClassPtr) -> (CInt -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassCollisionDispatcher.chs.h bt_cllsndpstch_getNumManifolds" + getNumManifolds'_ :: ((HG3DClassPtr) -> ((Ptr CInt) -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassCollisionDispatcher.chs.h bt_cllsndpstch_construct" + new'_ :: ((HG3DClassPtr) -> ((HG3DClassPtr) -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassCollisionDispatcher.chs.h bt_cllsndpstch_destruct" + delete'_ :: ((HG3DClassPtr) -> (IO ())) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassCollisionDispatcher.chs.h bt_cllsndpstch_getCollisionConfiguration" + getCollisionConfiguration'_ :: ((HG3DClassPtr) -> ((HG3DClassPtr) -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassCollisionDispatcher.chs.h bt_cllsndpstch_getCollisionConfiguration2" + getCollisionConfiguration2'_ :: ((HG3DClassPtr) -> ((HG3DClassPtr) -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassCollisionDispatcher.chs.h bt_cllsndpstch_setCollisionConfiguration" + setCollisionConfiguration'_ :: ((HG3DClassPtr) -> ((HG3DClassPtr) -> (IO ())))
+ HGamer3D/Bindings/Bullet/ClassCollisionWorld.hs view
@@ -0,0 +1,222 @@+-- 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 ())))
+ HGamer3D/Bindings/Bullet/ClassConeShapeX.hs view
@@ -0,0 +1,79 @@+-- 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\\ClassConeShapeX.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. +-- + + +-- ClassConeShapeX.chs + +-- + +module HGamer3D.Bindings.Bullet.ClassConeShapeX 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\\ClassConeShapeX.chs" #-} +import HGamer3D.Bindings.Bullet.ClassPtr +{-# LINE 41 ".\\HGamer3D\\Bindings\\Bullet\\ClassConeShapeX.chs" #-} +import HGamer3D.Bindings.Bullet.StructHG3DClass +{-# LINE 42 ".\\HGamer3D\\Bindings\\Bullet\\ClassConeShapeX.chs" #-} +import HGamer3D.Bindings.Bullet.StructVec3 +{-# LINE 43 ".\\HGamer3D\\Bindings\\Bullet\\ClassConeShapeX.chs" #-} + +{- function btConeShapeX -} +new :: Float -> Float -> IO (HG3DClass) +new a1 a2 = + let {a1' = realToFrac a1} in + let {a2' = realToFrac a2} in + alloca $ \a3' -> + new'_ a1' a2' a3' >>= \res -> + peek a3'>>= \a3'' -> + return (a3'') +{-# LINE 50 ".\\HGamer3D\\Bindings\\Bullet\\ClassConeShapeX.chs" #-} + +{- function getAnisotropicRollingFrictionDirection -} +getAnisotropicRollingFrictionDirection :: HG3DClass -> IO (Vec3) +getAnisotropicRollingFrictionDirection a1 = + withHG3DClass a1 $ \a1' -> + alloca $ \a2' -> + getAnisotropicRollingFrictionDirection'_ a1' a2' >>= \res -> + peekVec3 a2'>>= \a2'' -> + return (a2'') +{-# LINE 55 ".\\HGamer3D\\Bindings\\Bullet\\ClassConeShapeX.chs" #-} + + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassConeShapeX.chs.h bt_cnshpx_construct" + new'_ :: (CFloat -> (CFloat -> ((HG3DClassPtr) -> (IO ())))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassConeShapeX.chs.h bt_cnshpx_getAnisotropicRollingFrictionDirection" + getAnisotropicRollingFrictionDirection'_ :: ((HG3DClassPtr) -> ((Vec3Ptr) -> (IO ())))
+ HGamer3D/Bindings/Bullet/ClassConeShapeZ.hs view
@@ -0,0 +1,79 @@+-- 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\\ClassConeShapeZ.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. +-- + + +-- ClassConeShapeZ.chs + +-- + +module HGamer3D.Bindings.Bullet.ClassConeShapeZ 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\\ClassConeShapeZ.chs" #-} +import HGamer3D.Bindings.Bullet.ClassPtr +{-# LINE 41 ".\\HGamer3D\\Bindings\\Bullet\\ClassConeShapeZ.chs" #-} +import HGamer3D.Bindings.Bullet.StructHG3DClass +{-# LINE 42 ".\\HGamer3D\\Bindings\\Bullet\\ClassConeShapeZ.chs" #-} +import HGamer3D.Bindings.Bullet.StructVec3 +{-# LINE 43 ".\\HGamer3D\\Bindings\\Bullet\\ClassConeShapeZ.chs" #-} + +{- function btConeShapeZ -} +new :: Float -> Float -> IO (HG3DClass) +new a1 a2 = + let {a1' = realToFrac a1} in + let {a2' = realToFrac a2} in + alloca $ \a3' -> + new'_ a1' a2' a3' >>= \res -> + peek a3'>>= \a3'' -> + return (a3'') +{-# LINE 50 ".\\HGamer3D\\Bindings\\Bullet\\ClassConeShapeZ.chs" #-} + +{- function getAnisotropicRollingFrictionDirection -} +getAnisotropicRollingFrictionDirection :: HG3DClass -> IO (Vec3) +getAnisotropicRollingFrictionDirection a1 = + withHG3DClass a1 $ \a1' -> + alloca $ \a2' -> + getAnisotropicRollingFrictionDirection'_ a1' a2' >>= \res -> + peekVec3 a2'>>= \a2'' -> + return (a2'') +{-# LINE 55 ".\\HGamer3D\\Bindings\\Bullet\\ClassConeShapeZ.chs" #-} + + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassConeShapeZ.chs.h bt_cnshpz_construct" + new'_ :: (CFloat -> (CFloat -> ((HG3DClassPtr) -> (IO ())))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassConeShapeZ.chs.h bt_cnshpz_getAnisotropicRollingFrictionDirection" + getAnisotropicRollingFrictionDirection'_ :: ((HG3DClassPtr) -> ((Vec3Ptr) -> (IO ())))
+ HGamer3D/Bindings/Bullet/ClassCylinderShapeX.hs view
@@ -0,0 +1,120 @@+-- 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\\ClassCylinderShapeX.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. +-- + + +-- ClassCylinderShapeX.chs + +-- + +module HGamer3D.Bindings.Bullet.ClassCylinderShapeX 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\\ClassCylinderShapeX.chs" #-} +import HGamer3D.Bindings.Bullet.ClassPtr +{-# LINE 41 ".\\HGamer3D\\Bindings\\Bullet\\ClassCylinderShapeX.chs" #-} +import HGamer3D.Bindings.Bullet.StructHG3DClass +{-# LINE 42 ".\\HGamer3D\\Bindings\\Bullet\\ClassCylinderShapeX.chs" #-} +import HGamer3D.Bindings.Bullet.StructVec3 +{-# LINE 43 ".\\HGamer3D\\Bindings\\Bullet\\ClassCylinderShapeX.chs" #-} + +{- function btCylinderShapeX -} +new :: Vec3 -> IO (HG3DClass) +new a1 = + withVec3 a1 $ \a1' -> + alloca $ \a2' -> + new'_ a1' a2' >>= \res -> + peek a2'>>= \a2'' -> + return (a2'') +{-# LINE 49 ".\\HGamer3D\\Bindings\\Bullet\\ClassCylinderShapeX.chs" #-} + +{- function localGetSupportingVertexWithoutMargin -} +localGetSupportingVertexWithoutMargin :: HG3DClass -> Vec3 -> IO (Vec3) +localGetSupportingVertexWithoutMargin a1 a2 = + withHG3DClass a1 $ \a1' -> + withVec3 a2 $ \a2' -> + alloca $ \a3' -> + localGetSupportingVertexWithoutMargin'_ a1' a2' a3' >>= \res -> + peekVec3 a3'>>= \a3'' -> + return (a3'') +{-# LINE 55 ".\\HGamer3D\\Bindings\\Bullet\\ClassCylinderShapeX.chs" #-} + +{- function batchedUnitVectorGetSupportingVertexWithoutMargin -} +batchedUnitVectorGetSupportingVertexWithoutMargin :: HG3DClass -> Vec3 -> Int -> IO (Vec3) +batchedUnitVectorGetSupportingVertexWithoutMargin a1 a2 a4 = + withHG3DClass a1 $ \a1' -> + withVec3 a2 $ \a2' -> + alloca $ \a3' -> + let {a4' = fromIntegral a4} in + batchedUnitVectorGetSupportingVertexWithoutMargin'_ a1' a2' a3' a4' >>= \res -> + peekVec3 a3'>>= \a3'' -> + return (a3'') +{-# LINE 62 ".\\HGamer3D\\Bindings\\Bullet\\ClassCylinderShapeX.chs" #-} + +{- function getName -} +getName :: HG3DClass -> IO (String) +getName a1 = + withHG3DClass a1 $ \a1' -> + alloc64k $ \a2' -> + getName'_ a1' a2' >>= \res -> + peekCString a2'>>= \a2'' -> + return (a2'') +{-# LINE 67 ".\\HGamer3D\\Bindings\\Bullet\\ClassCylinderShapeX.chs" #-} + +{- function getRadius -} +getRadius :: HG3DClass -> IO (Float) +getRadius a1 = + withHG3DClass a1 $ \a1' -> + alloca $ \a2' -> + getRadius'_ a1' a2' >>= \res -> + peekFloatConv a2'>>= \a2'' -> + return (a2'') +{-# LINE 72 ".\\HGamer3D\\Bindings\\Bullet\\ClassCylinderShapeX.chs" #-} + + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassCylinderShapeX.chs.h bt_clndrshpx_construct" + new'_ :: ((Vec3Ptr) -> ((HG3DClassPtr) -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassCylinderShapeX.chs.h bt_clndrshpx_localGetSupportingVertexWithoutMargin" + localGetSupportingVertexWithoutMargin'_ :: ((HG3DClassPtr) -> ((Vec3Ptr) -> ((Vec3Ptr) -> (IO ())))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassCylinderShapeX.chs.h bt_clndrshpx_batchedUnitVectorGetSupportingVertexWithoutMargin" + batchedUnitVectorGetSupportingVertexWithoutMargin'_ :: ((HG3DClassPtr) -> ((Vec3Ptr) -> ((Vec3Ptr) -> (CInt -> (IO ()))))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassCylinderShapeX.chs.h bt_clndrshpx_getName" + getName'_ :: ((HG3DClassPtr) -> ((Ptr CChar) -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassCylinderShapeX.chs.h bt_clndrshpx_getRadius" + getRadius'_ :: ((HG3DClassPtr) -> ((Ptr CFloat) -> (IO ())))
+ HGamer3D/Bindings/Bullet/ClassCylinderShapeZ.hs view
@@ -0,0 +1,120 @@+-- 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\\ClassCylinderShapeZ.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. +-- + + +-- ClassCylinderShapeZ.chs + +-- + +module HGamer3D.Bindings.Bullet.ClassCylinderShapeZ 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\\ClassCylinderShapeZ.chs" #-} +import HGamer3D.Bindings.Bullet.ClassPtr +{-# LINE 41 ".\\HGamer3D\\Bindings\\Bullet\\ClassCylinderShapeZ.chs" #-} +import HGamer3D.Bindings.Bullet.StructHG3DClass +{-# LINE 42 ".\\HGamer3D\\Bindings\\Bullet\\ClassCylinderShapeZ.chs" #-} +import HGamer3D.Bindings.Bullet.StructVec3 +{-# LINE 43 ".\\HGamer3D\\Bindings\\Bullet\\ClassCylinderShapeZ.chs" #-} + +{- function btCylinderShapeZ -} +new :: Vec3 -> IO (HG3DClass) +new a1 = + withVec3 a1 $ \a1' -> + alloca $ \a2' -> + new'_ a1' a2' >>= \res -> + peek a2'>>= \a2'' -> + return (a2'') +{-# LINE 49 ".\\HGamer3D\\Bindings\\Bullet\\ClassCylinderShapeZ.chs" #-} + +{- function localGetSupportingVertexWithoutMargin -} +localGetSupportingVertexWithoutMargin :: HG3DClass -> Vec3 -> IO (Vec3) +localGetSupportingVertexWithoutMargin a1 a2 = + withHG3DClass a1 $ \a1' -> + withVec3 a2 $ \a2' -> + alloca $ \a3' -> + localGetSupportingVertexWithoutMargin'_ a1' a2' a3' >>= \res -> + peekVec3 a3'>>= \a3'' -> + return (a3'') +{-# LINE 55 ".\\HGamer3D\\Bindings\\Bullet\\ClassCylinderShapeZ.chs" #-} + +{- function batchedUnitVectorGetSupportingVertexWithoutMargin -} +batchedUnitVectorGetSupportingVertexWithoutMargin :: HG3DClass -> Vec3 -> Int -> IO (Vec3) +batchedUnitVectorGetSupportingVertexWithoutMargin a1 a2 a4 = + withHG3DClass a1 $ \a1' -> + withVec3 a2 $ \a2' -> + alloca $ \a3' -> + let {a4' = fromIntegral a4} in + batchedUnitVectorGetSupportingVertexWithoutMargin'_ a1' a2' a3' a4' >>= \res -> + peekVec3 a3'>>= \a3'' -> + return (a3'') +{-# LINE 62 ".\\HGamer3D\\Bindings\\Bullet\\ClassCylinderShapeZ.chs" #-} + +{- function getName -} +getName :: HG3DClass -> IO (String) +getName a1 = + withHG3DClass a1 $ \a1' -> + alloc64k $ \a2' -> + getName'_ a1' a2' >>= \res -> + peekCString a2'>>= \a2'' -> + return (a2'') +{-# LINE 67 ".\\HGamer3D\\Bindings\\Bullet\\ClassCylinderShapeZ.chs" #-} + +{- function getRadius -} +getRadius :: HG3DClass -> IO (Float) +getRadius a1 = + withHG3DClass a1 $ \a1' -> + alloca $ \a2' -> + getRadius'_ a1' a2' >>= \res -> + peekFloatConv a2'>>= \a2'' -> + return (a2'') +{-# LINE 72 ".\\HGamer3D\\Bindings\\Bullet\\ClassCylinderShapeZ.chs" #-} + + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassCylinderShapeZ.chs.h bt_clndrshpz_construct" + new'_ :: ((Vec3Ptr) -> ((HG3DClassPtr) -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassCylinderShapeZ.chs.h bt_clndrshpz_localGetSupportingVertexWithoutMargin" + localGetSupportingVertexWithoutMargin'_ :: ((HG3DClassPtr) -> ((Vec3Ptr) -> ((Vec3Ptr) -> (IO ())))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassCylinderShapeZ.chs.h bt_clndrshpz_batchedUnitVectorGetSupportingVertexWithoutMargin" + batchedUnitVectorGetSupportingVertexWithoutMargin'_ :: ((HG3DClassPtr) -> ((Vec3Ptr) -> ((Vec3Ptr) -> (CInt -> (IO ()))))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassCylinderShapeZ.chs.h bt_clndrshpz_getName" + getName'_ :: ((HG3DClassPtr) -> ((Ptr CChar) -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassCylinderShapeZ.chs.h bt_clndrshpz_getRadius" + getRadius'_ :: ((HG3DClassPtr) -> ((Ptr CFloat) -> (IO ())))
+ HGamer3D/Bindings/Bullet/ClassDefaultCollisionConfiguration.hs view
@@ -0,0 +1,87 @@+-- 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\\ClassDefaultCollisionConfiguration.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. +-- + + +-- ClassDefaultCollisionConfiguration.chs + +-- + +module HGamer3D.Bindings.Bullet.ClassDefaultCollisionConfiguration 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\\ClassDefaultCollisionConfiguration.chs" #-} +import HGamer3D.Bindings.Bullet.ClassPtr +{-# LINE 41 ".\\HGamer3D\\Bindings\\Bullet\\ClassDefaultCollisionConfiguration.chs" #-} +import HGamer3D.Bindings.Bullet.StructHG3DClass +{-# LINE 42 ".\\HGamer3D\\Bindings\\Bullet\\ClassDefaultCollisionConfiguration.chs" #-} + +{- function ~btDefaultCollisionConfiguration -} +delete :: HG3DClass -> IO () +delete a1 = + withHG3DClass a1 $ \a1' -> + delete'_ a1' >>= \res -> + return () +{-# LINE 47 ".\\HGamer3D\\Bindings\\Bullet\\ClassDefaultCollisionConfiguration.chs" #-} + +{- function setConvexConvexMultipointIterations -} +setConvexConvexMultipointIterations :: HG3DClass -> Int -> Int -> IO () +setConvexConvexMultipointIterations a1 a2 a3 = + withHG3DClass a1 $ \a1' -> + let {a2' = fromIntegral a2} in + let {a3' = fromIntegral a3} in + setConvexConvexMultipointIterations'_ a1' a2' a3' >>= \res -> + return () +{-# LINE 53 ".\\HGamer3D\\Bindings\\Bullet\\ClassDefaultCollisionConfiguration.chs" #-} + +{- function setPlaneConvexMultipointIterations -} +setPlaneConvexMultipointIterations :: HG3DClass -> Int -> Int -> IO () +setPlaneConvexMultipointIterations a1 a2 a3 = + withHG3DClass a1 $ \a1' -> + let {a2' = fromIntegral a2} in + let {a3' = fromIntegral a3} in + setPlaneConvexMultipointIterations'_ a1' a2' a3' >>= \res -> + return () +{-# LINE 59 ".\\HGamer3D\\Bindings\\Bullet\\ClassDefaultCollisionConfiguration.chs" #-} + + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassDefaultCollisionConfiguration.chs.h bt_dfltcllcnf_destruct" + delete'_ :: ((HG3DClassPtr) -> (IO ())) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassDefaultCollisionConfiguration.chs.h bt_dfltcllcnf_setConvexConvexMultipointIterations" + setConvexConvexMultipointIterations'_ :: ((HG3DClassPtr) -> (CInt -> (CInt -> (IO ())))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassDefaultCollisionConfiguration.chs.h bt_dfltcllcnf_setPlaneConvexMultipointIterations" + setPlaneConvexMultipointIterations'_ :: ((HG3DClassPtr) -> (CInt -> (CInt -> (IO ()))))
+ HGamer3D/Bindings/Bullet/ClassDispatcher.hs view
@@ -0,0 +1,74 @@+-- 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\\ClassDispatcher.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. +-- + + +-- ClassDispatcher.chs + +-- + +module HGamer3D.Bindings.Bullet.ClassDispatcher 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\\ClassDispatcher.chs" #-} +import HGamer3D.Bindings.Bullet.ClassPtr +{-# LINE 41 ".\\HGamer3D\\Bindings\\Bullet\\ClassDispatcher.chs" #-} +import HGamer3D.Bindings.Bullet.StructHG3DClass +{-# LINE 42 ".\\HGamer3D\\Bindings\\Bullet\\ClassDispatcher.chs" #-} + +{- function ~btDispatcher -} +delete :: HG3DClass -> IO () +delete a1 = + withHG3DClass a1 $ \a1' -> + delete'_ a1' >>= \res -> + return () +{-# LINE 47 ".\\HGamer3D\\Bindings\\Bullet\\ClassDispatcher.chs" #-} + +{- function getNumManifolds -} +getNumManifolds :: HG3DClass -> IO (Int) +getNumManifolds a1 = + withHG3DClass a1 $ \a1' -> + alloca $ \a2' -> + getNumManifolds'_ a1' a2' >>= \res -> + peekIntConv a2'>>= \a2'' -> + return (a2'') +{-# LINE 52 ".\\HGamer3D\\Bindings\\Bullet\\ClassDispatcher.chs" #-} + + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassDispatcher.chs.h bt_dsptch_destruct" + delete'_ :: ((HG3DClassPtr) -> (IO ())) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassDispatcher.chs.h bt_dsptch_getNumManifolds" + getNumManifolds'_ :: ((HG3DClassPtr) -> ((Ptr CInt) -> (IO ())))
+ HGamer3D/Bindings/Bullet/ClassDynamicsWorld.hs view
@@ -0,0 +1,246 @@+-- 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\\ClassDynamicsWorld.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. +-- + + +-- ClassDynamicsWorld.chs + +-- + +module HGamer3D.Bindings.Bullet.ClassDynamicsWorld 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\\ClassDynamicsWorld.chs" #-} +import HGamer3D.Bindings.Bullet.ClassPtr +{-# LINE 41 ".\\HGamer3D\\Bindings\\Bullet\\ClassDynamicsWorld.chs" #-} +import HGamer3D.Bindings.Bullet.StructHG3DClass +{-# LINE 42 ".\\HGamer3D\\Bindings\\Bullet\\ClassDynamicsWorld.chs" #-} +import HGamer3D.Bindings.Bullet.StructVec3 +{-# LINE 43 ".\\HGamer3D\\Bindings\\Bullet\\ClassDynamicsWorld.chs" #-} + +{- function ~btDynamicsWorld -} +delete :: HG3DClass -> IO () +delete a1 = + withHG3DClass a1 $ \a1' -> + delete'_ a1' >>= \res -> + return () +{-# LINE 48 ".\\HGamer3D\\Bindings\\Bullet\\ClassDynamicsWorld.chs" #-} + +{- function stepSimulation -} +stepSimulation :: HG3DClass -> Float -> Int -> Float -> IO (Int) +stepSimulation a1 a2 a3 a4 = + withHG3DClass a1 $ \a1' -> + let {a2' = realToFrac a2} in + let {a3' = fromIntegral a3} in + let {a4' = realToFrac a4} in + alloca $ \a5' -> + stepSimulation'_ a1' a2' a3' a4' a5' >>= \res -> + peekIntConv a5'>>= \a5'' -> + return (a5'') +{-# LINE 56 ".\\HGamer3D\\Bindings\\Bullet\\ClassDynamicsWorld.chs" #-} + +{- function debugDrawWorld -} +debugDrawWorld :: HG3DClass -> IO () +debugDrawWorld a1 = + withHG3DClass a1 $ \a1' -> + debugDrawWorld'_ a1' >>= \res -> + return () +{-# LINE 60 ".\\HGamer3D\\Bindings\\Bullet\\ClassDynamicsWorld.chs" #-} + +{- function addAction -} +addAction :: HG3DClass -> HG3DClass -> IO () +addAction a1 a2 = + withHG3DClass a1 $ \a1' -> + withHG3DClass a2 $ \a2' -> + addAction'_ a1' a2' >>= \res -> + return () +{-# LINE 65 ".\\HGamer3D\\Bindings\\Bullet\\ClassDynamicsWorld.chs" #-} + +{- function removeAction -} +removeAction :: HG3DClass -> HG3DClass -> IO () +removeAction a1 a2 = + withHG3DClass a1 $ \a1' -> + withHG3DClass a2 $ \a2' -> + removeAction'_ a1' a2' >>= \res -> + return () +{-# LINE 70 ".\\HGamer3D\\Bindings\\Bullet\\ClassDynamicsWorld.chs" #-} + +{- function setGravity -} +setGravity :: HG3DClass -> Vec3 -> IO () +setGravity a1 a2 = + withHG3DClass a1 $ \a1' -> + withVec3 a2 $ \a2' -> + setGravity'_ a1' a2' >>= \res -> + return () +{-# LINE 75 ".\\HGamer3D\\Bindings\\Bullet\\ClassDynamicsWorld.chs" #-} + +{- function getGravity -} +getGravity :: HG3DClass -> IO (Vec3) +getGravity a1 = + withHG3DClass a1 $ \a1' -> + alloca $ \a2' -> + getGravity'_ a1' a2' >>= \res -> + peekVec3 a2'>>= \a2'' -> + return (a2'') +{-# LINE 80 ".\\HGamer3D\\Bindings\\Bullet\\ClassDynamicsWorld.chs" #-} + +{- function synchronizeMotionStates -} +synchronizeMotionStates :: HG3DClass -> IO () +synchronizeMotionStates a1 = + withHG3DClass a1 $ \a1' -> + synchronizeMotionStates'_ a1' >>= \res -> + return () +{-# LINE 84 ".\\HGamer3D\\Bindings\\Bullet\\ClassDynamicsWorld.chs" #-} + +{- function addRigidBody -} +addRigidBody :: HG3DClass -> HG3DClass -> IO () +addRigidBody a1 a2 = + withHG3DClass a1 $ \a1' -> + withHG3DClass a2 $ \a2' -> + addRigidBody'_ a1' a2' >>= \res -> + return () +{-# LINE 89 ".\\HGamer3D\\Bindings\\Bullet\\ClassDynamicsWorld.chs" #-} + +{- function removeRigidBody -} +removeRigidBody :: HG3DClass -> HG3DClass -> IO () +removeRigidBody a1 a2 = + withHG3DClass a1 $ \a1' -> + withHG3DClass a2 $ \a2' -> + removeRigidBody'_ a1' a2' >>= \res -> + return () +{-# LINE 94 ".\\HGamer3D\\Bindings\\Bullet\\ClassDynamicsWorld.chs" #-} + +{- function getNumConstraints -} +getNumConstraints :: HG3DClass -> IO (Int) +getNumConstraints a1 = + withHG3DClass a1 $ \a1' -> + alloca $ \a2' -> + getNumConstraints'_ a1' a2' >>= \res -> + peekIntConv a2'>>= \a2'' -> + return (a2'') +{-# LINE 99 ".\\HGamer3D\\Bindings\\Bullet\\ClassDynamicsWorld.chs" #-} + +{- function clearForces -} +clearForces :: HG3DClass -> IO () +clearForces a1 = + withHG3DClass a1 $ \a1' -> + clearForces'_ a1' >>= \res -> + return () +{-# LINE 103 ".\\HGamer3D\\Bindings\\Bullet\\ClassDynamicsWorld.chs" #-} + +{- function addVehicle -} +addVehicle :: HG3DClass -> HG3DClass -> IO () +addVehicle a1 a2 = + withHG3DClass a1 $ \a1' -> + withHG3DClass a2 $ \a2' -> + addVehicle'_ a1' a2' >>= \res -> + return () +{-# LINE 108 ".\\HGamer3D\\Bindings\\Bullet\\ClassDynamicsWorld.chs" #-} + +{- function removeVehicle -} +removeVehicle :: HG3DClass -> HG3DClass -> IO () +removeVehicle a1 a2 = + withHG3DClass a1 $ \a1' -> + withHG3DClass a2 $ \a2' -> + removeVehicle'_ a1' a2' >>= \res -> + return () +{-# LINE 113 ".\\HGamer3D\\Bindings\\Bullet\\ClassDynamicsWorld.chs" #-} + +{- function addCharacter -} +addCharacter :: HG3DClass -> HG3DClass -> IO () +addCharacter a1 a2 = + withHG3DClass a1 $ \a1' -> + withHG3DClass a2 $ \a2' -> + addCharacter'_ a1' a2' >>= \res -> + return () +{-# LINE 118 ".\\HGamer3D\\Bindings\\Bullet\\ClassDynamicsWorld.chs" #-} + +{- function removeCharacter -} +removeCharacter :: HG3DClass -> HG3DClass -> IO () +removeCharacter a1 a2 = + withHG3DClass a1 $ \a1' -> + withHG3DClass a2 $ \a2' -> + removeCharacter'_ a1' a2' >>= \res -> + return () +{-# LINE 123 ".\\HGamer3D\\Bindings\\Bullet\\ClassDynamicsWorld.chs" #-} + + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassDynamicsWorld.chs.h bt_dnmcwrld_destruct" + delete'_ :: ((HG3DClassPtr) -> (IO ())) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassDynamicsWorld.chs.h bt_dnmcwrld_stepSimulation" + stepSimulation'_ :: ((HG3DClassPtr) -> (CFloat -> (CInt -> (CFloat -> ((Ptr CInt) -> (IO ())))))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassDynamicsWorld.chs.h bt_dnmcwrld_debugDrawWorld" + debugDrawWorld'_ :: ((HG3DClassPtr) -> (IO ())) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassDynamicsWorld.chs.h bt_dnmcwrld_addAction" + addAction'_ :: ((HG3DClassPtr) -> ((HG3DClassPtr) -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassDynamicsWorld.chs.h bt_dnmcwrld_removeAction" + removeAction'_ :: ((HG3DClassPtr) -> ((HG3DClassPtr) -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassDynamicsWorld.chs.h bt_dnmcwrld_setGravity" + setGravity'_ :: ((HG3DClassPtr) -> ((Vec3Ptr) -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassDynamicsWorld.chs.h bt_dnmcwrld_getGravity" + getGravity'_ :: ((HG3DClassPtr) -> ((Vec3Ptr) -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassDynamicsWorld.chs.h bt_dnmcwrld_synchronizeMotionStates" + synchronizeMotionStates'_ :: ((HG3DClassPtr) -> (IO ())) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassDynamicsWorld.chs.h bt_dnmcwrld_addRigidBody" + addRigidBody'_ :: ((HG3DClassPtr) -> ((HG3DClassPtr) -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassDynamicsWorld.chs.h bt_dnmcwrld_removeRigidBody" + removeRigidBody'_ :: ((HG3DClassPtr) -> ((HG3DClassPtr) -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassDynamicsWorld.chs.h bt_dnmcwrld_getNumConstraints" + getNumConstraints'_ :: ((HG3DClassPtr) -> ((Ptr CInt) -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassDynamicsWorld.chs.h bt_dnmcwrld_clearForces" + clearForces'_ :: ((HG3DClassPtr) -> (IO ())) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassDynamicsWorld.chs.h bt_dnmcwrld_addVehicle" + addVehicle'_ :: ((HG3DClassPtr) -> ((HG3DClassPtr) -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassDynamicsWorld.chs.h bt_dnmcwrld_removeVehicle" + removeVehicle'_ :: ((HG3DClassPtr) -> ((HG3DClassPtr) -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassDynamicsWorld.chs.h bt_dnmcwrld_addCharacter" + addCharacter'_ :: ((HG3DClassPtr) -> ((HG3DClassPtr) -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassDynamicsWorld.chs.h bt_dnmcwrld_removeCharacter" + removeCharacter'_ :: ((HG3DClassPtr) -> ((HG3DClassPtr) -> (IO ())))
+ HGamer3D/Bindings/Bullet/ClassHG3DBulletDefaultCreator.hs view
@@ -0,0 +1,110 @@+-- 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\\ClassHG3DBulletDefaultCreator.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. +-- + + +-- ClassHG3DBulletDefaultCreator.chs + +-- + +module HGamer3D.Bindings.Bullet.ClassHG3DBulletDefaultCreator 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\\ClassHG3DBulletDefaultCreator.chs" #-} +import HGamer3D.Bindings.Bullet.ClassPtr +{-# LINE 41 ".\\HGamer3D\\Bindings\\Bullet\\ClassHG3DBulletDefaultCreator.chs" #-} +import HGamer3D.Bindings.Bullet.StructHG3DClass +{-# LINE 42 ".\\HGamer3D\\Bindings\\Bullet\\ClassHG3DBulletDefaultCreator.chs" #-} + +{- function HG3DBulletDefaultCreator -} +new :: IO (HG3DClass) +new = + alloca $ \a1' -> + new'_ a1' >>= \res -> + peek a1'>>= \a1'' -> + return (a1'') +{-# LINE 47 ".\\HGamer3D\\Bindings\\Bullet\\ClassHG3DBulletDefaultCreator.chs" #-} + +{- function ~HG3DBulletDefaultCreator -} +delete :: HG3DClass -> IO () +delete a1 = + withHG3DClass a1 $ \a1' -> + delete'_ a1' >>= \res -> + return () +{-# LINE 51 ".\\HGamer3D\\Bindings\\Bullet\\ClassHG3DBulletDefaultCreator.chs" #-} + +{- function initializeDefaults -} +initializeDefaults :: HG3DClass -> IO () +initializeDefaults a1 = + withHG3DClass a1 $ \a1' -> + initializeDefaults'_ a1' >>= \res -> + return () +{-# LINE 55 ".\\HGamer3D\\Bindings\\Bullet\\ClassHG3DBulletDefaultCreator.chs" #-} + +{- function getDynamicsWorld -} +getDynamicsWorld :: HG3DClass -> IO (HG3DClass) +getDynamicsWorld a1 = + withHG3DClass a1 $ \a1' -> + alloca $ \a2' -> + getDynamicsWorld'_ a1' a2' >>= \res -> + peek a2'>>= \a2'' -> + return (a2'') +{-# LINE 60 ".\\HGamer3D\\Bindings\\Bullet\\ClassHG3DBulletDefaultCreator.chs" #-} + +{- function getCollisionDispatcher -} +getCollisionDispatcher :: HG3DClass -> IO (HG3DClass) +getCollisionDispatcher a1 = + withHG3DClass a1 $ \a1' -> + alloca $ \a2' -> + getCollisionDispatcher'_ a1' a2' >>= \res -> + peek a2'>>= \a2'' -> + return (a2'') +{-# LINE 65 ".\\HGamer3D\\Bindings\\Bullet\\ClassHG3DBulletDefaultCreator.chs" #-} + + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassHG3DBulletDefaultCreator.chs.h bt_hgdfcr_construct" + new'_ :: ((HG3DClassPtr) -> (IO ())) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassHG3DBulletDefaultCreator.chs.h bt_hgdfcr_destruct" + delete'_ :: ((HG3DClassPtr) -> (IO ())) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassHG3DBulletDefaultCreator.chs.h bt_hgdfcr_initializeDefaults" + initializeDefaults'_ :: ((HG3DClassPtr) -> (IO ())) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassHG3DBulletDefaultCreator.chs.h bt_hgdfcr_getDynamicsWorld" + getDynamicsWorld'_ :: ((HG3DClassPtr) -> ((HG3DClassPtr) -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassHG3DBulletDefaultCreator.chs.h bt_hgdfcr_getCollisionDispatcher" + getCollisionDispatcher'_ :: ((HG3DClassPtr) -> ((HG3DClassPtr) -> (IO ())))
+ HGamer3D/Bindings/Bullet/ClassHG3DBulletMotionStateHandler.hs view
@@ -0,0 +1,118 @@+-- 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\\ClassHG3DBulletMotionStateHandler.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. +-- + + +-- ClassHG3DBulletMotionStateHandler.chs + +-- + +module HGamer3D.Bindings.Bullet.ClassHG3DBulletMotionStateHandler 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\\ClassHG3DBulletMotionStateHandler.chs" #-} +import HGamer3D.Bindings.Bullet.ClassPtr +{-# LINE 41 ".\\HGamer3D\\Bindings\\Bullet\\ClassHG3DBulletMotionStateHandler.chs" #-} +import HGamer3D.Bindings.Bullet.StructHG3DClass +{-# LINE 42 ".\\HGamer3D\\Bindings\\Bullet\\ClassHG3DBulletMotionStateHandler.chs" #-} +import HGamer3D.Bindings.Bullet.StructVec3 +{-# LINE 43 ".\\HGamer3D\\Bindings\\Bullet\\ClassHG3DBulletMotionStateHandler.chs" #-} +import HGamer3D.Bindings.Bullet.StructQuaternion +{-# LINE 44 ".\\HGamer3D\\Bindings\\Bullet\\ClassHG3DBulletMotionStateHandler.chs" #-} + +{- function createDefaultMotionState -} +createDefaultMotionState :: Vec3 -> Quaternion -> IO (HG3DClass) +createDefaultMotionState a1 a2 = + withVec3 a1 $ \a1' -> + withQuaternion a2 $ \a2' -> + alloca $ \a3' -> + createDefaultMotionState'_ a1' a2' a3' >>= \res -> + peek a3'>>= \a3'' -> + return (a3'') +{-# LINE 51 ".\\HGamer3D\\Bindings\\Bullet\\ClassHG3DBulletMotionStateHandler.chs" #-} + +{- function getPosition -} +getPosition :: HG3DClass -> IO (Vec3) +getPosition a1 = + withHG3DClass a1 $ \a1' -> + alloca $ \a2' -> + getPosition'_ a1' a2' >>= \res -> + peekVec3 a2'>>= \a2'' -> + return (a2'') +{-# LINE 56 ".\\HGamer3D\\Bindings\\Bullet\\ClassHG3DBulletMotionStateHandler.chs" #-} + +{- function setPosition -} +setPosition :: HG3DClass -> Vec3 -> IO () +setPosition a1 a2 = + withHG3DClass a1 $ \a1' -> + withVec3 a2 $ \a2' -> + setPosition'_ a1' a2' >>= \res -> + return () +{-# LINE 61 ".\\HGamer3D\\Bindings\\Bullet\\ClassHG3DBulletMotionStateHandler.chs" #-} + +{- function getQuaternion -} +getQuaternion :: HG3DClass -> IO (Quaternion) +getQuaternion a1 = + withHG3DClass a1 $ \a1' -> + alloca $ \a2' -> + getQuaternion'_ a1' a2' >>= \res -> + peekQuaternion a2'>>= \a2'' -> + return (a2'') +{-# LINE 66 ".\\HGamer3D\\Bindings\\Bullet\\ClassHG3DBulletMotionStateHandler.chs" #-} + +{- function setQuaternion -} +setQuaternion :: HG3DClass -> Quaternion -> IO () +setQuaternion a1 a2 = + withHG3DClass a1 $ \a1' -> + withQuaternion a2 $ \a2' -> + setQuaternion'_ a1' a2' >>= \res -> + return () +{-# LINE 71 ".\\HGamer3D\\Bindings\\Bullet\\ClassHG3DBulletMotionStateHandler.chs" #-} + + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassHG3DBulletMotionStateHandler.chs.h bt_hg3dblmsh_createDefaultMotionState" + createDefaultMotionState'_ :: ((Vec3Ptr) -> ((QuaternionPtr) -> ((HG3DClassPtr) -> (IO ())))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassHG3DBulletMotionStateHandler.chs.h bt_hg3dblmsh_getPosition" + getPosition'_ :: ((HG3DClassPtr) -> ((Vec3Ptr) -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassHG3DBulletMotionStateHandler.chs.h bt_hg3dblmsh_setPosition" + setPosition'_ :: ((HG3DClassPtr) -> ((Vec3Ptr) -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassHG3DBulletMotionStateHandler.chs.h bt_hg3dblmsh_getQuaternion" + getQuaternion'_ :: ((HG3DClassPtr) -> ((QuaternionPtr) -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassHG3DBulletMotionStateHandler.chs.h bt_hg3dblmsh_setQuaternion" + setQuaternion'_ :: ((HG3DClassPtr) -> ((QuaternionPtr) -> (IO ())))
+ HGamer3D/Bindings/Bullet/ClassHG3DRigidBodyCreator.hs view
@@ -0,0 +1,152 @@+-- 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\\ClassHG3DRigidBodyCreator.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. +-- + + +-- ClassHG3DRigidBodyCreator.chs + +-- + +module HGamer3D.Bindings.Bullet.ClassHG3DRigidBodyCreator 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\\ClassHG3DRigidBodyCreator.chs" #-} +import HGamer3D.Bindings.Bullet.ClassPtr +{-# LINE 41 ".\\HGamer3D\\Bindings\\Bullet\\ClassHG3DRigidBodyCreator.chs" #-} +import HGamer3D.Bindings.Bullet.StructHG3DClass +{-# LINE 42 ".\\HGamer3D\\Bindings\\Bullet\\ClassHG3DRigidBodyCreator.chs" #-} +import HGamer3D.Bindings.Bullet.StructVec3 +{-# LINE 43 ".\\HGamer3D\\Bindings\\Bullet\\ClassHG3DRigidBodyCreator.chs" #-} +import HGamer3D.Bindings.Bullet.StructQuaternion +{-# LINE 44 ".\\HGamer3D\\Bindings\\Bullet\\ClassHG3DRigidBodyCreator.chs" #-} + +{- function createSphere -} +createSphere :: Float -> Vec3 -> Quaternion -> Float -> IO (HG3DClass) +createSphere a1 a2 a3 a4 = + let {a1' = realToFrac a1} in + withVec3 a2 $ \a2' -> + withQuaternion a3 $ \a3' -> + let {a4' = realToFrac a4} in + alloca $ \a5' -> + createSphere'_ a1' a2' a3' a4' a5' >>= \res -> + peek a5'>>= \a5'' -> + return (a5'') +{-# LINE 53 ".\\HGamer3D\\Bindings\\Bullet\\ClassHG3DRigidBodyCreator.chs" #-} + +{- function createBox -} +createBox :: Float -> Vec3 -> Quaternion -> Vec3 -> IO (HG3DClass) +createBox a1 a2 a3 a4 = + let {a1' = realToFrac a1} in + withVec3 a2 $ \a2' -> + withQuaternion a3 $ \a3' -> + withVec3 a4 $ \a4' -> + alloca $ \a5' -> + createBox'_ a1' a2' a3' a4' a5' >>= \res -> + peek a5'>>= \a5'' -> + return (a5'') +{-# LINE 61 ".\\HGamer3D\\Bindings\\Bullet\\ClassHG3DRigidBodyCreator.chs" #-} + +{- function createCylinder -} +createCylinder :: Float -> Vec3 -> Quaternion -> Vec3 -> IO (HG3DClass) +createCylinder a1 a2 a3 a4 = + let {a1' = realToFrac a1} in + withVec3 a2 $ \a2' -> + withQuaternion a3 $ \a3' -> + withVec3 a4 $ \a4' -> + alloca $ \a5' -> + createCylinder'_ a1' a2' a3' a4' a5' >>= \res -> + peek a5'>>= \a5'' -> + return (a5'') +{-# LINE 69 ".\\HGamer3D\\Bindings\\Bullet\\ClassHG3DRigidBodyCreator.chs" #-} + +{- function createCapsule -} +createCapsule :: Float -> Vec3 -> Quaternion -> Float -> Float -> IO (HG3DClass) +createCapsule a1 a2 a3 a4 a5 = + let {a1' = realToFrac a1} in + withVec3 a2 $ \a2' -> + withQuaternion a3 $ \a3' -> + let {a4' = realToFrac a4} in + let {a5' = realToFrac a5} in + alloca $ \a6' -> + createCapsule'_ a1' a2' a3' a4' a5' a6' >>= \res -> + peek a6'>>= \a6'' -> + return (a6'') +{-# LINE 78 ".\\HGamer3D\\Bindings\\Bullet\\ClassHG3DRigidBodyCreator.chs" #-} + +{- function createCone -} +createCone :: Float -> Vec3 -> Quaternion -> Float -> Float -> IO (HG3DClass) +createCone a1 a2 a3 a4 a5 = + let {a1' = realToFrac a1} in + withVec3 a2 $ \a2' -> + withQuaternion a3 $ \a3' -> + let {a4' = realToFrac a4} in + let {a5' = realToFrac a5} in + alloca $ \a6' -> + createCone'_ a1' a2' a3' a4' a5' a6' >>= \res -> + peek a6'>>= \a6'' -> + return (a6'') +{-# LINE 87 ".\\HGamer3D\\Bindings\\Bullet\\ClassHG3DRigidBodyCreator.chs" #-} + +{- function createStaticPlane -} +createStaticPlane :: Float -> Vec3 -> Quaternion -> Vec3 -> IO (HG3DClass) +createStaticPlane a1 a2 a3 a4 = + let {a1' = realToFrac a1} in + withVec3 a2 $ \a2' -> + withQuaternion a3 $ \a3' -> + withVec3 a4 $ \a4' -> + alloca $ \a5' -> + createStaticPlane'_ a1' a2' a3' a4' a5' >>= \res -> + peek a5'>>= \a5'' -> + return (a5'') +{-# LINE 95 ".\\HGamer3D\\Bindings\\Bullet\\ClassHG3DRigidBodyCreator.chs" #-} + + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassHG3DRigidBodyCreator.chs.h bt_hg3drgbdcrt_createSphere" + createSphere'_ :: (CFloat -> ((Vec3Ptr) -> ((QuaternionPtr) -> (CFloat -> ((HG3DClassPtr) -> (IO ())))))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassHG3DRigidBodyCreator.chs.h bt_hg3drgbdcrt_createBox" + createBox'_ :: (CFloat -> ((Vec3Ptr) -> ((QuaternionPtr) -> ((Vec3Ptr) -> ((HG3DClassPtr) -> (IO ())))))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassHG3DRigidBodyCreator.chs.h bt_hg3drgbdcrt_createCylinder" + createCylinder'_ :: (CFloat -> ((Vec3Ptr) -> ((QuaternionPtr) -> ((Vec3Ptr) -> ((HG3DClassPtr) -> (IO ())))))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassHG3DRigidBodyCreator.chs.h bt_hg3drgbdcrt_createCapsule" + createCapsule'_ :: (CFloat -> ((Vec3Ptr) -> ((QuaternionPtr) -> (CFloat -> (CFloat -> ((HG3DClassPtr) -> (IO ()))))))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassHG3DRigidBodyCreator.chs.h bt_hg3drgbdcrt_createCone" + createCone'_ :: (CFloat -> ((Vec3Ptr) -> ((QuaternionPtr) -> (CFloat -> (CFloat -> ((HG3DClassPtr) -> (IO ()))))))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassHG3DRigidBodyCreator.chs.h bt_hg3drgbdcrt_createStaticPlane" + createStaticPlane'_ :: (CFloat -> ((Vec3Ptr) -> ((QuaternionPtr) -> ((Vec3Ptr) -> ((HG3DClassPtr) -> (IO ()))))))
+ HGamer3D/Bindings/Bullet/ClassMotionState.hs view
@@ -0,0 +1,61 @@+-- 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\\ClassMotionState.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. +-- + + +-- ClassMotionState.chs + +-- + +module HGamer3D.Bindings.Bullet.ClassMotionState 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\\ClassMotionState.chs" #-} +import HGamer3D.Bindings.Bullet.ClassPtr +{-# LINE 41 ".\\HGamer3D\\Bindings\\Bullet\\ClassMotionState.chs" #-} +import HGamer3D.Bindings.Bullet.StructHG3DClass +{-# LINE 42 ".\\HGamer3D\\Bindings\\Bullet\\ClassMotionState.chs" #-} + +{- function ~btMotionState -} +delete :: HG3DClass -> IO () +delete a1 = + withHG3DClass a1 $ \a1' -> + delete'_ a1' >>= \res -> + return () +{-# LINE 47 ".\\HGamer3D\\Bindings\\Bullet\\ClassMotionState.chs" #-} + + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassMotionState.chs.h bt_mtnst_destruct" + delete'_ :: ((HG3DClassPtr) -> (IO ()))
+ HGamer3D/Bindings/Bullet/ClassPtr.hs view
@@ -0,0 +1,109 @@+-- 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\\ClassPtr.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. +-- + + +-- ClassPtr.chs + +-- Class Ptr Utilities + +module HGamer3D.Bindings.Bullet.ClassPtr 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\\ClassPtr.chs" #-} + +{- class ClassHG3DBulletDefaultCreator -} +type ClassHG3DBulletDefaultCreator = Ptr (()) +{-# LINE 44 ".\\HGamer3D\\Bindings\\Bullet\\ClassPtr.chs" #-} +{- class ClassHG3DBulletMotionStateHandler -} +type ClassHG3DBulletMotionStateHandler = Ptr (()) +{-# LINE 46 ".\\HGamer3D\\Bindings\\Bullet\\ClassPtr.chs" #-} +{- class ClassHG3DRigidBodyCreator -} +type ClassHG3DRigidBodyCreator = Ptr (()) +{-# LINE 48 ".\\HGamer3D\\Bindings\\Bullet\\ClassPtr.chs" #-} +{- class ClassActionInterface -} +type ClassActionInterface = Ptr (()) +{-# LINE 50 ".\\HGamer3D\\Bindings\\Bullet\\ClassPtr.chs" #-} +{- class ClassBroadphaseInterface -} +type ClassBroadphaseInterface = Ptr (()) +{-# LINE 52 ".\\HGamer3D\\Bindings\\Bullet\\ClassPtr.chs" #-} +{- class ClassCapsuleShapeX -} +type ClassCapsuleShapeX = Ptr (()) +{-# LINE 54 ".\\HGamer3D\\Bindings\\Bullet\\ClassPtr.chs" #-} +{- class ClassCapsuleShapeZ -} +type ClassCapsuleShapeZ = Ptr (()) +{-# LINE 56 ".\\HGamer3D\\Bindings\\Bullet\\ClassPtr.chs" #-} +{- class ClassCollisionConfiguration -} +type ClassCollisionConfiguration = Ptr (()) +{-# LINE 58 ".\\HGamer3D\\Bindings\\Bullet\\ClassPtr.chs" #-} +{- class ClassCollisionDispatcher -} +type ClassCollisionDispatcher = Ptr (()) +{-# LINE 60 ".\\HGamer3D\\Bindings\\Bullet\\ClassPtr.chs" #-} +{- class ClassCollisionWorld -} +type ClassCollisionWorld = Ptr (()) +{-# LINE 62 ".\\HGamer3D\\Bindings\\Bullet\\ClassPtr.chs" #-} +{- class ClassConeShapeX -} +type ClassConeShapeX = Ptr (()) +{-# LINE 64 ".\\HGamer3D\\Bindings\\Bullet\\ClassPtr.chs" #-} +{- class ClassConeShapeZ -} +type ClassConeShapeZ = Ptr (()) +{-# LINE 66 ".\\HGamer3D\\Bindings\\Bullet\\ClassPtr.chs" #-} +{- class ClassCylinderShapeX -} +type ClassCylinderShapeX = Ptr (()) +{-# LINE 68 ".\\HGamer3D\\Bindings\\Bullet\\ClassPtr.chs" #-} +{- class ClassCylinderShapeZ -} +type ClassCylinderShapeZ = Ptr (()) +{-# LINE 70 ".\\HGamer3D\\Bindings\\Bullet\\ClassPtr.chs" #-} +{- class ClassDefaultCollisionConfiguration -} +type ClassDefaultCollisionConfiguration = Ptr (()) +{-# LINE 72 ".\\HGamer3D\\Bindings\\Bullet\\ClassPtr.chs" #-} +{- class ClassDispatcher -} +type ClassDispatcher = Ptr (()) +{-# LINE 74 ".\\HGamer3D\\Bindings\\Bullet\\ClassPtr.chs" #-} +{- class ClassDynamicsWorld -} +type ClassDynamicsWorld = Ptr (()) +{-# LINE 76 ".\\HGamer3D\\Bindings\\Bullet\\ClassPtr.chs" #-} +{- class ClassMotionState -} +type ClassMotionState = Ptr (()) +{-# LINE 78 ".\\HGamer3D\\Bindings\\Bullet\\ClassPtr.chs" #-} +{- class ClassRigidBody -} +type ClassRigidBody = Ptr (()) +{-# LINE 80 ".\\HGamer3D\\Bindings\\Bullet\\ClassPtr.chs" #-} +{- class ClassSimpleBroadphase -} +type ClassSimpleBroadphase = Ptr (()) +{-# LINE 82 ".\\HGamer3D\\Bindings\\Bullet\\ClassPtr.chs" #-} +{- class ClassSimpleDynamicsWorld -} +type ClassSimpleDynamicsWorld = Ptr (()) +{-# LINE 84 ".\\HGamer3D\\Bindings\\Bullet\\ClassPtr.chs" #-}
+ HGamer3D/Bindings/Bullet/ClassRigidBody.hs view
@@ -0,0 +1,683 @@+-- 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\\ClassRigidBody.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. +-- + + +-- ClassRigidBody.chs + +-- + +module HGamer3D.Bindings.Bullet.ClassRigidBody 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\\ClassRigidBody.chs" #-} +import HGamer3D.Bindings.Bullet.ClassPtr +{-# LINE 41 ".\\HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs" #-} +import HGamer3D.Bindings.Bullet.StructHG3DClass +{-# LINE 42 ".\\HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs" #-} +import HGamer3D.Bindings.Bullet.StructVec3 +{-# LINE 43 ".\\HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs" #-} +import HGamer3D.Bindings.Bullet.StructQuaternion +{-# LINE 44 ".\\HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs" #-} + +{- function ~btRigidBody -} +delete :: HG3DClass -> IO () +delete a1 = + withHG3DClass a1 $ \a1' -> + delete'_ a1' >>= \res -> + return () +{-# LINE 49 ".\\HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs" #-} + +{- function saveKinematicState -} +saveKinematicState :: HG3DClass -> Float -> IO () +saveKinematicState a1 a2 = + withHG3DClass a1 $ \a1' -> + let {a2' = realToFrac a2} in + saveKinematicState'_ a1' a2' >>= \res -> + return () +{-# LINE 54 ".\\HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs" #-} + +{- function applyGravity -} +applyGravity :: HG3DClass -> IO () +applyGravity a1 = + withHG3DClass a1 $ \a1' -> + applyGravity'_ a1' >>= \res -> + return () +{-# LINE 58 ".\\HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs" #-} + +{- function setGravity -} +setGravity :: HG3DClass -> Vec3 -> IO () +setGravity a1 a2 = + withHG3DClass a1 $ \a1' -> + withVec3 a2 $ \a2' -> + setGravity'_ a1' a2' >>= \res -> + return () +{-# LINE 63 ".\\HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs" #-} + +{- function getGravity -} +getGravity :: HG3DClass -> IO (Vec3) +getGravity a1 = + withHG3DClass a1 $ \a1' -> + alloca $ \a2' -> + getGravity'_ a1' a2' >>= \res -> + peekVec3 a2'>>= \a2'' -> + return (a2'') +{-# LINE 68 ".\\HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs" #-} + +{- function setDamping -} +setDamping :: HG3DClass -> Float -> Float -> IO () +setDamping a1 a2 a3 = + withHG3DClass a1 $ \a1' -> + let {a2' = realToFrac a2} in + let {a3' = realToFrac a3} in + setDamping'_ a1' a2' a3' >>= \res -> + return () +{-# LINE 74 ".\\HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs" #-} + +{- function getLinearDamping -} +getLinearDamping :: HG3DClass -> IO (Float) +getLinearDamping a1 = + withHG3DClass a1 $ \a1' -> + alloca $ \a2' -> + getLinearDamping'_ a1' a2' >>= \res -> + peekFloatConv a2'>>= \a2'' -> + return (a2'') +{-# LINE 79 ".\\HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs" #-} + +{- function getAngularDamping -} +getAngularDamping :: HG3DClass -> IO (Float) +getAngularDamping a1 = + withHG3DClass a1 $ \a1' -> + alloca $ \a2' -> + getAngularDamping'_ a1' a2' >>= \res -> + peekFloatConv a2'>>= \a2'' -> + return (a2'') +{-# LINE 84 ".\\HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs" #-} + +{- function getLinearSleepingThreshold -} +getLinearSleepingThreshold :: HG3DClass -> IO (Float) +getLinearSleepingThreshold a1 = + withHG3DClass a1 $ \a1' -> + alloca $ \a2' -> + getLinearSleepingThreshold'_ a1' a2' >>= \res -> + peekFloatConv a2'>>= \a2'' -> + return (a2'') +{-# LINE 89 ".\\HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs" #-} + +{- function getAngularSleepingThreshold -} +getAngularSleepingThreshold :: HG3DClass -> IO (Float) +getAngularSleepingThreshold a1 = + withHG3DClass a1 $ \a1' -> + alloca $ \a2' -> + getAngularSleepingThreshold'_ a1' a2' >>= \res -> + peekFloatConv a2'>>= \a2'' -> + return (a2'') +{-# LINE 94 ".\\HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs" #-} + +{- function applyDamping -} +applyDamping :: HG3DClass -> Float -> IO () +applyDamping a1 a2 = + withHG3DClass a1 $ \a1' -> + let {a2' = realToFrac a2} in + applyDamping'_ a1' a2' >>= \res -> + return () +{-# LINE 99 ".\\HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs" #-} + +{- function setMassProps -} +setMassProps :: HG3DClass -> Float -> Vec3 -> IO () +setMassProps a1 a2 a3 = + withHG3DClass a1 $ \a1' -> + let {a2' = realToFrac a2} in + withVec3 a3 $ \a3' -> + setMassProps'_ a1' a2' a3' >>= \res -> + return () +{-# LINE 105 ".\\HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs" #-} + +{- function getLinearFactor -} +getLinearFactor :: HG3DClass -> IO (Vec3) +getLinearFactor a1 = + withHG3DClass a1 $ \a1' -> + alloca $ \a2' -> + getLinearFactor'_ a1' a2' >>= \res -> + peekVec3 a2'>>= \a2'' -> + return (a2'') +{-# LINE 110 ".\\HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs" #-} + +{- function setLinearFactor -} +setLinearFactor :: HG3DClass -> Vec3 -> IO () +setLinearFactor a1 a2 = + withHG3DClass a1 $ \a1' -> + withVec3 a2 $ \a2' -> + setLinearFactor'_ a1' a2' >>= \res -> + return () +{-# LINE 115 ".\\HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs" #-} + +{- function getInvMass -} +getInvMass :: HG3DClass -> IO (Float) +getInvMass a1 = + withHG3DClass a1 $ \a1' -> + alloca $ \a2' -> + getInvMass'_ a1' a2' >>= \res -> + peekFloatConv a2'>>= \a2'' -> + return (a2'') +{-# LINE 120 ".\\HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs" #-} + +{- function integrateVelocities -} +integrateVelocities :: HG3DClass -> Float -> IO () +integrateVelocities a1 a2 = + withHG3DClass a1 $ \a1' -> + let {a2' = realToFrac a2} in + integrateVelocities'_ a1' a2' >>= \res -> + return () +{-# LINE 125 ".\\HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs" #-} + +{- function applyCentralForce -} +applyCentralForce :: HG3DClass -> Vec3 -> IO () +applyCentralForce a1 a2 = + withHG3DClass a1 $ \a1' -> + withVec3 a2 $ \a2' -> + applyCentralForce'_ a1' a2' >>= \res -> + return () +{-# LINE 130 ".\\HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs" #-} + +{- function getTotalForce -} +getTotalForce :: HG3DClass -> IO (Vec3) +getTotalForce a1 = + withHG3DClass a1 $ \a1' -> + alloca $ \a2' -> + getTotalForce'_ a1' a2' >>= \res -> + peekVec3 a2'>>= \a2'' -> + return (a2'') +{-# LINE 135 ".\\HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs" #-} + +{- function getTotalTorque -} +getTotalTorque :: HG3DClass -> IO (Vec3) +getTotalTorque a1 = + withHG3DClass a1 $ \a1' -> + alloca $ \a2' -> + getTotalTorque'_ a1' a2' >>= \res -> + peekVec3 a2'>>= \a2'' -> + return (a2'') +{-# LINE 140 ".\\HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs" #-} + +{- function getInvInertiaDiagLocal -} +getInvInertiaDiagLocal :: HG3DClass -> IO (Vec3) +getInvInertiaDiagLocal a1 = + withHG3DClass a1 $ \a1' -> + alloca $ \a2' -> + getInvInertiaDiagLocal'_ a1' a2' >>= \res -> + peekVec3 a2'>>= \a2'' -> + return (a2'') +{-# LINE 145 ".\\HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs" #-} + +{- function setInvInertiaDiagLocal -} +setInvInertiaDiagLocal :: HG3DClass -> Vec3 -> IO () +setInvInertiaDiagLocal a1 a2 = + withHG3DClass a1 $ \a1' -> + withVec3 a2 $ \a2' -> + setInvInertiaDiagLocal'_ a1' a2' >>= \res -> + return () +{-# LINE 150 ".\\HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs" #-} + +{- function setSleepingThresholds -} +setSleepingThresholds :: HG3DClass -> Float -> Float -> IO () +setSleepingThresholds a1 a2 a3 = + withHG3DClass a1 $ \a1' -> + let {a2' = realToFrac a2} in + let {a3' = realToFrac a3} in + setSleepingThresholds'_ a1' a2' a3' >>= \res -> + return () +{-# LINE 156 ".\\HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs" #-} + +{- function applyTorque -} +applyTorque :: HG3DClass -> Vec3 -> IO () +applyTorque a1 a2 = + withHG3DClass a1 $ \a1' -> + withVec3 a2 $ \a2' -> + applyTorque'_ a1' a2' >>= \res -> + return () +{-# LINE 161 ".\\HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs" #-} + +{- function applyForce -} +applyForce :: HG3DClass -> Vec3 -> Vec3 -> IO () +applyForce a1 a2 a3 = + withHG3DClass a1 $ \a1' -> + withVec3 a2 $ \a2' -> + withVec3 a3 $ \a3' -> + applyForce'_ a1' a2' a3' >>= \res -> + return () +{-# LINE 167 ".\\HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs" #-} + +{- function applyCentralImpulse -} +applyCentralImpulse :: HG3DClass -> Vec3 -> IO () +applyCentralImpulse a1 a2 = + withHG3DClass a1 $ \a1' -> + withVec3 a2 $ \a2' -> + applyCentralImpulse'_ a1' a2' >>= \res -> + return () +{-# LINE 172 ".\\HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs" #-} + +{- function applyTorqueImpulse -} +applyTorqueImpulse :: HG3DClass -> Vec3 -> IO () +applyTorqueImpulse a1 a2 = + withHG3DClass a1 $ \a1' -> + withVec3 a2 $ \a2' -> + applyTorqueImpulse'_ a1' a2' >>= \res -> + return () +{-# LINE 177 ".\\HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs" #-} + +{- function applyImpulse -} +applyImpulse :: HG3DClass -> Vec3 -> Vec3 -> IO () +applyImpulse a1 a2 a3 = + withHG3DClass a1 $ \a1' -> + withVec3 a2 $ \a2' -> + withVec3 a3 $ \a3' -> + applyImpulse'_ a1' a2' a3' >>= \res -> + return () +{-# LINE 183 ".\\HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs" #-} + +{- function clearForces -} +clearForces :: HG3DClass -> IO () +clearForces a1 = + withHG3DClass a1 $ \a1' -> + clearForces'_ a1' >>= \res -> + return () +{-# LINE 187 ".\\HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs" #-} + +{- function updateInertiaTensor -} +updateInertiaTensor :: HG3DClass -> IO () +updateInertiaTensor a1 = + withHG3DClass a1 $ \a1' -> + updateInertiaTensor'_ a1' >>= \res -> + return () +{-# LINE 191 ".\\HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs" #-} + +{- function getCenterOfMassPosition -} +getCenterOfMassPosition :: HG3DClass -> IO (Vec3) +getCenterOfMassPosition a1 = + withHG3DClass a1 $ \a1' -> + alloca $ \a2' -> + getCenterOfMassPosition'_ a1' a2' >>= \res -> + peekVec3 a2'>>= \a2'' -> + return (a2'') +{-# LINE 196 ".\\HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs" #-} + +{- function getOrientation -} +getOrientation :: HG3DClass -> IO (Quaternion) +getOrientation a1 = + withHG3DClass a1 $ \a1' -> + alloca $ \a2' -> + getOrientation'_ a1' a2' >>= \res -> + peekQuaternion a2'>>= \a2'' -> + return (a2'') +{-# LINE 201 ".\\HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs" #-} + +{- function getLinearVelocity -} +getLinearVelocity :: HG3DClass -> IO (Vec3) +getLinearVelocity a1 = + withHG3DClass a1 $ \a1' -> + alloca $ \a2' -> + getLinearVelocity'_ a1' a2' >>= \res -> + peekVec3 a2'>>= \a2'' -> + return (a2'') +{-# LINE 206 ".\\HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs" #-} + +{- function getAngularVelocity -} +getAngularVelocity :: HG3DClass -> IO (Vec3) +getAngularVelocity a1 = + withHG3DClass a1 $ \a1' -> + alloca $ \a2' -> + getAngularVelocity'_ a1' a2' >>= \res -> + peekVec3 a2'>>= \a2'' -> + return (a2'') +{-# LINE 211 ".\\HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs" #-} + +{- function setLinearVelocity -} +setLinearVelocity :: HG3DClass -> Vec3 -> IO () +setLinearVelocity a1 a2 = + withHG3DClass a1 $ \a1' -> + withVec3 a2 $ \a2' -> + setLinearVelocity'_ a1' a2' >>= \res -> + return () +{-# LINE 216 ".\\HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs" #-} + +{- function setAngularVelocity -} +setAngularVelocity :: HG3DClass -> Vec3 -> IO () +setAngularVelocity a1 a2 = + withHG3DClass a1 $ \a1' -> + withVec3 a2 $ \a2' -> + setAngularVelocity'_ a1' a2' >>= \res -> + return () +{-# LINE 221 ".\\HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs" #-} + +{- function getVelocityInLocalPoint -} +getVelocityInLocalPoint :: HG3DClass -> Vec3 -> IO (Vec3) +getVelocityInLocalPoint a1 a2 = + withHG3DClass a1 $ \a1' -> + withVec3 a2 $ \a2' -> + alloca $ \a3' -> + getVelocityInLocalPoint'_ a1' a2' a3' >>= \res -> + peekVec3 a3'>>= \a3'' -> + return (a3'') +{-# LINE 227 ".\\HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs" #-} + +{- function translate -} +translate :: HG3DClass -> Vec3 -> IO () +translate a1 a2 = + withHG3DClass a1 $ \a1' -> + withVec3 a2 $ \a2' -> + translate'_ a1' a2' >>= \res -> + return () +{-# LINE 232 ".\\HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs" #-} + +{- function getAabb -} +getAabb :: HG3DClass -> IO (Vec3, Vec3) +getAabb a1 = + withHG3DClass a1 $ \a1' -> + alloca $ \a2' -> + alloca $ \a3' -> + getAabb'_ a1' a2' a3' >>= \res -> + peekVec3 a2'>>= \a2'' -> + peekVec3 a3'>>= \a3'' -> + return (a2'', a3'') +{-# LINE 238 ".\\HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs" #-} + +{- function getMotionState -} +getMotionState :: HG3DClass -> IO (HG3DClass) +getMotionState a1 = + withHG3DClass a1 $ \a1' -> + alloca $ \a2' -> + getMotionState'_ a1' a2' >>= \res -> + peek a2'>>= \a2'' -> + return (a2'') +{-# LINE 243 ".\\HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs" #-} + +{- function getMotionState2 -} +getMotionState2 :: HG3DClass -> IO (HG3DClass) +getMotionState2 a1 = + withHG3DClass a1 $ \a1' -> + alloca $ \a2' -> + getMotionState2'_ a1' a2' >>= \res -> + peek a2'>>= \a2'' -> + return (a2'') +{-# LINE 248 ".\\HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs" #-} + +{- function setMotionState -} +setMotionState :: HG3DClass -> HG3DClass -> IO () +setMotionState a1 a2 = + withHG3DClass a1 $ \a1' -> + withHG3DClass a2 $ \a2' -> + setMotionState'_ a1' a2' >>= \res -> + return () +{-# LINE 253 ".\\HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs" #-} + +{- function setAngularFactor -} +setAngularFactor :: HG3DClass -> Vec3 -> IO () +setAngularFactor a1 a2 = + withHG3DClass a1 $ \a1' -> + withVec3 a2 $ \a2' -> + setAngularFactor'_ a1' a2' >>= \res -> + return () +{-# LINE 258 ".\\HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs" #-} + +{- function setAngularFactor2 -} +setAngularFactor2 :: HG3DClass -> Float -> IO () +setAngularFactor2 a1 a2 = + withHG3DClass a1 $ \a1' -> + let {a2' = realToFrac a2} in + setAngularFactor2'_ a1' a2' >>= \res -> + return () +{-# LINE 263 ".\\HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs" #-} + +{- function getAngularFactor -} +getAngularFactor :: HG3DClass -> IO (Vec3) +getAngularFactor a1 = + withHG3DClass a1 $ \a1' -> + alloca $ \a2' -> + getAngularFactor'_ a1' a2' >>= \res -> + peekVec3 a2'>>= \a2'' -> + return (a2'') +{-# LINE 268 ".\\HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs" #-} + +{- function isInWorld -} +isInWorld :: HG3DClass -> IO (Bool) +isInWorld a1 = + withHG3DClass a1 $ \a1' -> + alloca $ \a2' -> + isInWorld'_ a1' a2' >>= \res -> + peekBoolUtil a2'>>= \a2'' -> + return (a2'') +{-# LINE 273 ".\\HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs" #-} + +{- function getNumConstraintRefs -} +getNumConstraintRefs :: HG3DClass -> IO (Int) +getNumConstraintRefs a1 = + withHG3DClass a1 $ \a1' -> + alloca $ \a2' -> + getNumConstraintRefs'_ a1' a2' >>= \res -> + peekIntConv a2'>>= \a2'' -> + return (a2'') +{-# LINE 278 ".\\HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs" #-} + +{- function setFlags -} +setFlags :: HG3DClass -> Int -> IO () +setFlags a1 a2 = + withHG3DClass a1 $ \a1' -> + let {a2' = fromIntegral a2} in + setFlags'_ a1' a2' >>= \res -> + return () +{-# LINE 283 ".\\HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs" #-} + +{- function getFlags -} +getFlags :: HG3DClass -> IO (Int) +getFlags a1 = + withHG3DClass a1 $ \a1' -> + alloca $ \a2' -> + getFlags'_ a1' a2' >>= \res -> + peekIntConv a2'>>= \a2'' -> + return (a2'') +{-# LINE 288 ".\\HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs" #-} + +{- function computeGyroscopicForce -} +computeGyroscopicForce :: HG3DClass -> Float -> IO (Vec3) +computeGyroscopicForce a1 a2 = + withHG3DClass a1 $ \a1' -> + let {a2' = realToFrac a2} in + alloca $ \a3' -> + computeGyroscopicForce'_ a1' a2' a3' >>= \res -> + peekVec3 a3'>>= \a3'' -> + return (a3'') +{-# LINE 294 ".\\HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs" #-} + +{- function calculateSerializeBufferSize -} +calculateSerializeBufferSize :: HG3DClass -> IO (Int) +calculateSerializeBufferSize a1 = + withHG3DClass a1 $ \a1' -> + alloca $ \a2' -> + calculateSerializeBufferSize'_ a1' a2' >>= \res -> + peekIntConv a2'>>= \a2'' -> + return (a2'') +{-# LINE 299 ".\\HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs" #-} + + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs.h bt_rgdbd_destruct" + delete'_ :: ((HG3DClassPtr) -> (IO ())) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs.h bt_rgdbd_saveKinematicState" + saveKinematicState'_ :: ((HG3DClassPtr) -> (CFloat -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs.h bt_rgdbd_applyGravity" + applyGravity'_ :: ((HG3DClassPtr) -> (IO ())) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs.h bt_rgdbd_setGravity" + setGravity'_ :: ((HG3DClassPtr) -> ((Vec3Ptr) -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs.h bt_rgdbd_getGravity" + getGravity'_ :: ((HG3DClassPtr) -> ((Vec3Ptr) -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs.h bt_rgdbd_setDamping" + setDamping'_ :: ((HG3DClassPtr) -> (CFloat -> (CFloat -> (IO ())))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs.h bt_rgdbd_getLinearDamping" + getLinearDamping'_ :: ((HG3DClassPtr) -> ((Ptr CFloat) -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs.h bt_rgdbd_getAngularDamping" + getAngularDamping'_ :: ((HG3DClassPtr) -> ((Ptr CFloat) -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs.h bt_rgdbd_getLinearSleepingThreshold" + getLinearSleepingThreshold'_ :: ((HG3DClassPtr) -> ((Ptr CFloat) -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs.h bt_rgdbd_getAngularSleepingThreshold" + getAngularSleepingThreshold'_ :: ((HG3DClassPtr) -> ((Ptr CFloat) -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs.h bt_rgdbd_applyDamping" + applyDamping'_ :: ((HG3DClassPtr) -> (CFloat -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs.h bt_rgdbd_setMassProps" + setMassProps'_ :: ((HG3DClassPtr) -> (CFloat -> ((Vec3Ptr) -> (IO ())))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs.h bt_rgdbd_getLinearFactor" + getLinearFactor'_ :: ((HG3DClassPtr) -> ((Vec3Ptr) -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs.h bt_rgdbd_setLinearFactor" + setLinearFactor'_ :: ((HG3DClassPtr) -> ((Vec3Ptr) -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs.h bt_rgdbd_getInvMass" + getInvMass'_ :: ((HG3DClassPtr) -> ((Ptr CFloat) -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs.h bt_rgdbd_integrateVelocities" + integrateVelocities'_ :: ((HG3DClassPtr) -> (CFloat -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs.h bt_rgdbd_applyCentralForce" + applyCentralForce'_ :: ((HG3DClassPtr) -> ((Vec3Ptr) -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs.h bt_rgdbd_getTotalForce" + getTotalForce'_ :: ((HG3DClassPtr) -> ((Vec3Ptr) -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs.h bt_rgdbd_getTotalTorque" + getTotalTorque'_ :: ((HG3DClassPtr) -> ((Vec3Ptr) -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs.h bt_rgdbd_getInvInertiaDiagLocal" + getInvInertiaDiagLocal'_ :: ((HG3DClassPtr) -> ((Vec3Ptr) -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs.h bt_rgdbd_setInvInertiaDiagLocal" + setInvInertiaDiagLocal'_ :: ((HG3DClassPtr) -> ((Vec3Ptr) -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs.h bt_rgdbd_setSleepingThresholds" + setSleepingThresholds'_ :: ((HG3DClassPtr) -> (CFloat -> (CFloat -> (IO ())))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs.h bt_rgdbd_applyTorque" + applyTorque'_ :: ((HG3DClassPtr) -> ((Vec3Ptr) -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs.h bt_rgdbd_applyForce" + applyForce'_ :: ((HG3DClassPtr) -> ((Vec3Ptr) -> ((Vec3Ptr) -> (IO ())))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs.h bt_rgdbd_applyCentralImpulse" + applyCentralImpulse'_ :: ((HG3DClassPtr) -> ((Vec3Ptr) -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs.h bt_rgdbd_applyTorqueImpulse" + applyTorqueImpulse'_ :: ((HG3DClassPtr) -> ((Vec3Ptr) -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs.h bt_rgdbd_applyImpulse" + applyImpulse'_ :: ((HG3DClassPtr) -> ((Vec3Ptr) -> ((Vec3Ptr) -> (IO ())))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs.h bt_rgdbd_clearForces" + clearForces'_ :: ((HG3DClassPtr) -> (IO ())) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs.h bt_rgdbd_updateInertiaTensor" + updateInertiaTensor'_ :: ((HG3DClassPtr) -> (IO ())) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs.h bt_rgdbd_getCenterOfMassPosition" + getCenterOfMassPosition'_ :: ((HG3DClassPtr) -> ((Vec3Ptr) -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs.h bt_rgdbd_getOrientation" + getOrientation'_ :: ((HG3DClassPtr) -> ((QuaternionPtr) -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs.h bt_rgdbd_getLinearVelocity" + getLinearVelocity'_ :: ((HG3DClassPtr) -> ((Vec3Ptr) -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs.h bt_rgdbd_getAngularVelocity" + getAngularVelocity'_ :: ((HG3DClassPtr) -> ((Vec3Ptr) -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs.h bt_rgdbd_setLinearVelocity" + setLinearVelocity'_ :: ((HG3DClassPtr) -> ((Vec3Ptr) -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs.h bt_rgdbd_setAngularVelocity" + setAngularVelocity'_ :: ((HG3DClassPtr) -> ((Vec3Ptr) -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs.h bt_rgdbd_getVelocityInLocalPoint" + getVelocityInLocalPoint'_ :: ((HG3DClassPtr) -> ((Vec3Ptr) -> ((Vec3Ptr) -> (IO ())))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs.h bt_rgdbd_translate" + translate'_ :: ((HG3DClassPtr) -> ((Vec3Ptr) -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs.h bt_rgdbd_getAabb" + getAabb'_ :: ((HG3DClassPtr) -> ((Vec3Ptr) -> ((Vec3Ptr) -> (IO ())))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs.h bt_rgdbd_getMotionState" + getMotionState'_ :: ((HG3DClassPtr) -> ((HG3DClassPtr) -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs.h bt_rgdbd_getMotionState2" + getMotionState2'_ :: ((HG3DClassPtr) -> ((HG3DClassPtr) -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs.h bt_rgdbd_setMotionState" + setMotionState'_ :: ((HG3DClassPtr) -> ((HG3DClassPtr) -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs.h bt_rgdbd_setAngularFactor" + setAngularFactor'_ :: ((HG3DClassPtr) -> ((Vec3Ptr) -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs.h bt_rgdbd_setAngularFactor2" + setAngularFactor2'_ :: ((HG3DClassPtr) -> (CFloat -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs.h bt_rgdbd_getAngularFactor" + getAngularFactor'_ :: ((HG3DClassPtr) -> ((Vec3Ptr) -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs.h bt_rgdbd_isInWorld" + isInWorld'_ :: ((HG3DClassPtr) -> ((Ptr CInt) -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs.h bt_rgdbd_getNumConstraintRefs" + getNumConstraintRefs'_ :: ((HG3DClassPtr) -> ((Ptr CInt) -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs.h bt_rgdbd_setFlags" + setFlags'_ :: ((HG3DClassPtr) -> (CInt -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs.h bt_rgdbd_getFlags" + getFlags'_ :: ((HG3DClassPtr) -> ((Ptr CInt) -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs.h bt_rgdbd_computeGyroscopicForce" + computeGyroscopicForce'_ :: ((HG3DClassPtr) -> (CFloat -> ((Vec3Ptr) -> (IO ())))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassRigidBody.chs.h bt_rgdbd_calculateSerializeBufferSize" + calculateSerializeBufferSize'_ :: ((HG3DClassPtr) -> ((Ptr CInt) -> (IO ())))
+ HGamer3D/Bindings/Bullet/ClassSimpleBroadphase.hs view
@@ -0,0 +1,101 @@+-- 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\\ClassSimpleBroadphase.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. +-- + + +-- ClassSimpleBroadphase.chs + +-- + +module HGamer3D.Bindings.Bullet.ClassSimpleBroadphase 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\\ClassSimpleBroadphase.chs" #-} +import HGamer3D.Bindings.Bullet.ClassPtr +{-# LINE 41 ".\\HGamer3D\\Bindings\\Bullet\\ClassSimpleBroadphase.chs" #-} +import HGamer3D.Bindings.Bullet.StructHG3DClass +{-# LINE 42 ".\\HGamer3D\\Bindings\\Bullet\\ClassSimpleBroadphase.chs" #-} +import HGamer3D.Bindings.Bullet.StructVec3 +{-# LINE 43 ".\\HGamer3D\\Bindings\\Bullet\\ClassSimpleBroadphase.chs" #-} + +{- function ~btSimpleBroadphase -} +delete :: HG3DClass -> IO () +delete a1 = + withHG3DClass a1 $ \a1' -> + delete'_ a1' >>= \res -> + return () +{-# LINE 48 ".\\HGamer3D\\Bindings\\Bullet\\ClassSimpleBroadphase.chs" #-} + +{- function calculateOverlappingPairs -} +calculateOverlappingPairs :: HG3DClass -> HG3DClass -> IO () +calculateOverlappingPairs a1 a2 = + withHG3DClass a1 $ \a1' -> + withHG3DClass a2 $ \a2' -> + calculateOverlappingPairs'_ a1' a2' >>= \res -> + return () +{-# LINE 53 ".\\HGamer3D\\Bindings\\Bullet\\ClassSimpleBroadphase.chs" #-} + +{- function getBroadphaseAabb -} +getBroadphaseAabb :: HG3DClass -> IO (Vec3, Vec3) +getBroadphaseAabb a1 = + withHG3DClass a1 $ \a1' -> + alloca $ \a2' -> + alloca $ \a3' -> + getBroadphaseAabb'_ a1' a2' a3' >>= \res -> + peekVec3 a2'>>= \a2'' -> + peekVec3 a3'>>= \a3'' -> + return (a2'', a3'') +{-# LINE 59 ".\\HGamer3D\\Bindings\\Bullet\\ClassSimpleBroadphase.chs" #-} + +{- function printStats -} +printStats :: HG3DClass -> IO () +printStats a1 = + withHG3DClass a1 $ \a1' -> + printStats'_ a1' >>= \res -> + return () +{-# LINE 63 ".\\HGamer3D\\Bindings\\Bullet\\ClassSimpleBroadphase.chs" #-} + + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassSimpleBroadphase.chs.h bt_smplbrdphs_destruct" + delete'_ :: ((HG3DClassPtr) -> (IO ())) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassSimpleBroadphase.chs.h bt_smplbrdphs_calculateOverlappingPairs" + calculateOverlappingPairs'_ :: ((HG3DClassPtr) -> ((HG3DClassPtr) -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassSimpleBroadphase.chs.h bt_smplbrdphs_getBroadphaseAabb" + getBroadphaseAabb'_ :: ((HG3DClassPtr) -> ((Vec3Ptr) -> ((Vec3Ptr) -> (IO ())))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassSimpleBroadphase.chs.h bt_smplbrdphs_printStats" + printStats'_ :: ((HG3DClassPtr) -> (IO ()))
+ HGamer3D/Bindings/Bullet/ClassSimpleDynamicsWorld.hs view
@@ -0,0 +1,196 @@+-- 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\\ClassSimpleDynamicsWorld.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. +-- + + +-- ClassSimpleDynamicsWorld.chs + +-- + +module HGamer3D.Bindings.Bullet.ClassSimpleDynamicsWorld 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\\ClassSimpleDynamicsWorld.chs" #-} +import HGamer3D.Bindings.Bullet.ClassPtr +{-# LINE 41 ".\\HGamer3D\\Bindings\\Bullet\\ClassSimpleDynamicsWorld.chs" #-} +import HGamer3D.Bindings.Bullet.StructHG3DClass +{-# LINE 42 ".\\HGamer3D\\Bindings\\Bullet\\ClassSimpleDynamicsWorld.chs" #-} +import HGamer3D.Bindings.Bullet.StructVec3 +{-# LINE 43 ".\\HGamer3D\\Bindings\\Bullet\\ClassSimpleDynamicsWorld.chs" #-} + +{- function ~btSimpleDynamicsWorld -} +delete :: HG3DClass -> IO () +delete a1 = + withHG3DClass a1 $ \a1' -> + delete'_ a1' >>= \res -> + return () +{-# LINE 48 ".\\HGamer3D\\Bindings\\Bullet\\ClassSimpleDynamicsWorld.chs" #-} + +{- function stepSimulation -} +stepSimulation :: HG3DClass -> Float -> Int -> Float -> IO (Int) +stepSimulation a1 a2 a3 a4 = + withHG3DClass a1 $ \a1' -> + let {a2' = realToFrac a2} in + let {a3' = fromIntegral a3} in + let {a4' = realToFrac a4} in + alloca $ \a5' -> + stepSimulation'_ a1' a2' a3' a4' a5' >>= \res -> + peekIntConv a5'>>= \a5'' -> + return (a5'') +{-# LINE 56 ".\\HGamer3D\\Bindings\\Bullet\\ClassSimpleDynamicsWorld.chs" #-} + +{- function setGravity -} +setGravity :: HG3DClass -> Vec3 -> IO () +setGravity a1 a2 = + withHG3DClass a1 $ \a1' -> + withVec3 a2 $ \a2' -> + setGravity'_ a1' a2' >>= \res -> + return () +{-# LINE 61 ".\\HGamer3D\\Bindings\\Bullet\\ClassSimpleDynamicsWorld.chs" #-} + +{- function getGravity -} +getGravity :: HG3DClass -> IO (Vec3) +getGravity a1 = + withHG3DClass a1 $ \a1' -> + alloca $ \a2' -> + getGravity'_ a1' a2' >>= \res -> + peekVec3 a2'>>= \a2'' -> + return (a2'') +{-# LINE 66 ".\\HGamer3D\\Bindings\\Bullet\\ClassSimpleDynamicsWorld.chs" #-} + +{- function addRigidBody -} +addRigidBody :: HG3DClass -> HG3DClass -> IO () +addRigidBody a1 a2 = + withHG3DClass a1 $ \a1' -> + withHG3DClass a2 $ \a2' -> + addRigidBody'_ a1' a2' >>= \res -> + return () +{-# LINE 71 ".\\HGamer3D\\Bindings\\Bullet\\ClassSimpleDynamicsWorld.chs" #-} + +{- function removeRigidBody -} +removeRigidBody :: HG3DClass -> HG3DClass -> IO () +removeRigidBody a1 a2 = + withHG3DClass a1 $ \a1' -> + withHG3DClass a2 $ \a2' -> + removeRigidBody'_ a1' a2' >>= \res -> + return () +{-# LINE 76 ".\\HGamer3D\\Bindings\\Bullet\\ClassSimpleDynamicsWorld.chs" #-} + +{- function debugDrawWorld -} +debugDrawWorld :: HG3DClass -> IO () +debugDrawWorld a1 = + withHG3DClass a1 $ \a1' -> + debugDrawWorld'_ a1' >>= \res -> + return () +{-# LINE 80 ".\\HGamer3D\\Bindings\\Bullet\\ClassSimpleDynamicsWorld.chs" #-} + +{- function addAction -} +addAction :: HG3DClass -> HG3DClass -> IO () +addAction a1 a2 = + withHG3DClass a1 $ \a1' -> + withHG3DClass a2 $ \a2' -> + addAction'_ a1' a2' >>= \res -> + return () +{-# LINE 85 ".\\HGamer3D\\Bindings\\Bullet\\ClassSimpleDynamicsWorld.chs" #-} + +{- function removeAction -} +removeAction :: HG3DClass -> HG3DClass -> IO () +removeAction a1 a2 = + withHG3DClass a1 $ \a1' -> + withHG3DClass a2 $ \a2' -> + removeAction'_ a1' a2' >>= \res -> + return () +{-# LINE 90 ".\\HGamer3D\\Bindings\\Bullet\\ClassSimpleDynamicsWorld.chs" #-} + +{- function updateAabbs -} +updateAabbs :: HG3DClass -> IO () +updateAabbs a1 = + withHG3DClass a1 $ \a1' -> + updateAabbs'_ a1' >>= \res -> + return () +{-# LINE 94 ".\\HGamer3D\\Bindings\\Bullet\\ClassSimpleDynamicsWorld.chs" #-} + +{- function synchronizeMotionStates -} +synchronizeMotionStates :: HG3DClass -> IO () +synchronizeMotionStates a1 = + withHG3DClass a1 $ \a1' -> + synchronizeMotionStates'_ a1' >>= \res -> + return () +{-# LINE 98 ".\\HGamer3D\\Bindings\\Bullet\\ClassSimpleDynamicsWorld.chs" #-} + +{- function clearForces -} +clearForces :: HG3DClass -> IO () +clearForces a1 = + withHG3DClass a1 $ \a1' -> + clearForces'_ a1' >>= \res -> + return () +{-# LINE 102 ".\\HGamer3D\\Bindings\\Bullet\\ClassSimpleDynamicsWorld.chs" #-} + + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassSimpleDynamicsWorld.chs.h bt_smpldnwrld_destruct" + delete'_ :: ((HG3DClassPtr) -> (IO ())) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassSimpleDynamicsWorld.chs.h bt_smpldnwrld_stepSimulation" + stepSimulation'_ :: ((HG3DClassPtr) -> (CFloat -> (CInt -> (CFloat -> ((Ptr CInt) -> (IO ())))))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassSimpleDynamicsWorld.chs.h bt_smpldnwrld_setGravity" + setGravity'_ :: ((HG3DClassPtr) -> ((Vec3Ptr) -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassSimpleDynamicsWorld.chs.h bt_smpldnwrld_getGravity" + getGravity'_ :: ((HG3DClassPtr) -> ((Vec3Ptr) -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassSimpleDynamicsWorld.chs.h bt_smpldnwrld_addRigidBody" + addRigidBody'_ :: ((HG3DClassPtr) -> ((HG3DClassPtr) -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassSimpleDynamicsWorld.chs.h bt_smpldnwrld_removeRigidBody" + removeRigidBody'_ :: ((HG3DClassPtr) -> ((HG3DClassPtr) -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassSimpleDynamicsWorld.chs.h bt_smpldnwrld_debugDrawWorld" + debugDrawWorld'_ :: ((HG3DClassPtr) -> (IO ())) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassSimpleDynamicsWorld.chs.h bt_smpldnwrld_addAction" + addAction'_ :: ((HG3DClassPtr) -> ((HG3DClassPtr) -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassSimpleDynamicsWorld.chs.h bt_smpldnwrld_removeAction" + removeAction'_ :: ((HG3DClassPtr) -> ((HG3DClassPtr) -> (IO ()))) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassSimpleDynamicsWorld.chs.h bt_smpldnwrld_updateAabbs" + updateAabbs'_ :: ((HG3DClassPtr) -> (IO ())) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassSimpleDynamicsWorld.chs.h bt_smpldnwrld_synchronizeMotionStates" + synchronizeMotionStates'_ :: ((HG3DClassPtr) -> (IO ())) + +foreign import ccall safe "HGamer3D\\Bindings\\Bullet\\ClassSimpleDynamicsWorld.chs.h bt_smpldnwrld_clearForces" + clearForces'_ :: ((HG3DClassPtr) -> (IO ()))
+ HGamer3D/Bindings/Bullet/StructColour.hs view
@@ -0,0 +1,73 @@+-- 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\\StructColour.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. +-- + + +-- StructColour.chs + +-- + +module HGamer3D.Bindings.Bullet.StructColour 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 Data.Bits +import HGamer3D.Data.Colour + +instance Storable Colour where + alignment _ = alignment (undefined :: CDouble) + sizeOf _ = 16 +{-# LINE 48 ".\\HGamer3D\\Bindings\\Bullet\\StructColour.chs" #-} + peek p = do + r <- (\ptr -> do {peekByteOff ptr 0 ::IO CFloat}) p + g <- (\ptr -> do {peekByteOff ptr 4 ::IO CFloat}) p + b <- (\ptr -> do {peekByteOff ptr 8 ::IO CFloat}) p + a <- (\ptr -> do {peekByteOff ptr 12 ::IO CFloat}) p + let cv = Colour (realToFrac r) (realToFrac g) (realToFrac b) (realToFrac a) + return cv + poke p (Colour r g b a) = do + (\ptr val -> do {pokeByteOff ptr 0 (val::CFloat)}) p (realToFrac r) + (\ptr val -> do {pokeByteOff ptr 4 (val::CFloat)}) p (realToFrac g) + (\ptr val -> do {pokeByteOff ptr 8 (val::CFloat)}) p (realToFrac b) + (\ptr val -> do {pokeByteOff ptr 12 (val::CFloat)}) p (realToFrac a) + +type ColourPtr = Ptr (Colour) +{-# LINE 62 ".\\HGamer3D\\Bindings\\Bullet\\StructColour.chs" #-} + +withColour :: Colour -> (ColourPtr -> IO b) -> IO b +withColour = with +peekColour :: ColourPtr -> IO Colour +peekColour = peek +
+ HGamer3D/Bindings/Bullet/StructHG3DClass.hs view
@@ -0,0 +1,58 @@+-- 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\\StructHG3DClass.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. +-- + + +-- StructHG3DClass.chs + +-- + +module HGamer3D.Bindings.Bullet.StructHG3DClass 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 Data.Bits +import HGamer3D.Data.HG3DClass + +type HG3DClassPtr = Ptr (HG3DClass) +{-# LINE 46 ".\\HGamer3D\\Bindings\\Bullet\\StructHG3DClass.chs" #-} + +withHG3DClass :: HG3DClass -> (HG3DClassPtr -> IO b) -> IO b +withHG3DClass = with + +peekHG3DClass :: HG3DClassPtr -> IO HG3DClass +peekHG3DClass = peek + +
+ HGamer3D/Bindings/Bullet/StructQuaternion.hs view
@@ -0,0 +1,82 @@+-- 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\\StructQuaternion.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. +-- + + +-- StructQuaternion.chs + +-- + +module HGamer3D.Bindings.Bullet.StructQuaternion 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 Data.Bits +import HGamer3D.Data.Vector + +newtype Quat = Quat Quaternion + +instance Storable Quat where + alignment _ = alignment (undefined :: CDouble) + sizeOf _ = 16 +{-# LINE 50 ".\\HGamer3D\\Bindings\\Bullet\\StructQuaternion.chs" #-} + peek p = do + fw <- (\ptr -> do {peekByteOff ptr 12 ::IO CFloat}) p + fx <- (\ptr -> do {peekByteOff ptr 0 ::IO CFloat}) p + fy <- (\ptr -> do {peekByteOff ptr 4 ::IO CFloat}) p + fz <- (\ptr -> do {peekByteOff ptr 8 ::IO CFloat}) p + let q = Quat ( Q (Vec4 (realToFrac fw) (realToFrac fx) (realToFrac fy) (realToFrac fz) )) + return q + poke p (Quat (Q ( Vec4 w x y z))) = do + (\ptr val -> do {pokeByteOff ptr 12 (val::CFloat)}) p (realToFrac w) + (\ptr val -> do {pokeByteOff ptr 0 (val::CFloat)}) p (realToFrac x) + (\ptr val -> do {pokeByteOff ptr 4 (val::CFloat)}) p (realToFrac y) + (\ptr val -> do {pokeByteOff ptr 8 (val::CFloat)}) p (realToFrac z) + +type QuatPtr = Ptr (Quat) + +type QuaternionPtr = Ptr (Quaternion) +{-# LINE 66 ".\\HGamer3D\\Bindings\\Bullet\\StructQuaternion.chs" #-} + +withQuaternion :: Quaternion -> (QuaternionPtr -> IO b) -> IO b +withQuaternion q f = with q' f' where + q' = Quat q + f' p = f (castPtr p) +peekQuaternion p = do + (Quat q) <- peek ((castPtr p)::QuatPtr) + return q + + +
+ HGamer3D/Bindings/Bullet/StructVec2.hs view
@@ -0,0 +1,78 @@+-- 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\\StructVec2.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. +-- + + +-- StructVec2.chs + +-- + +module HGamer3D.Bindings.Bullet.StructVec2 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 Data.Bits +import HGamer3D.Data.Vector + +newtype Vector2 = Vector2 Vec2 + +instance Storable Vector2 where + alignment _ = alignment (undefined :: CDouble) + sizeOf _ = 8 +{-# LINE 50 ".\\HGamer3D\\Bindings\\Bullet\\StructVec2.chs" #-} + peek p = do + x <- (\ptr -> do {peekByteOff ptr 0 ::IO CFloat}) p + y <- (\ptr -> do {peekByteOff ptr 4 ::IO CFloat}) p + let v = Vector2 ( Vec2 (realToFrac x) (realToFrac y)) + return v + poke p (Vector2 (Vec2 x y)) = do + (\ptr val -> do {pokeByteOff ptr 0 (val::CFloat)}) p (realToFrac x) + (\ptr val -> do {pokeByteOff ptr 4 (val::CFloat)}) p (realToFrac y) + +type Vector2Ptr = Ptr (Vector2) + +type Vec2Ptr = Ptr (Vec2) +{-# LINE 62 ".\\HGamer3D\\Bindings\\Bullet\\StructVec2.chs" #-} + +withVec2 :: Vec2 -> (Vec2Ptr -> IO b) -> IO b +withVec2 v f = with v' f' where + v' = Vector2 v + f' p = f (castPtr p) +peekVec2 :: Vec2Ptr -> IO Vec2 +peekVec2 p = do + (Vector2 v2) <- peek ((castPtr p)::Vector2Ptr) + return v2 + +
+ HGamer3D/Bindings/Bullet/StructVec3.hs view
@@ -0,0 +1,78 @@+-- 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\\StructVec3.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. +-- + + +-- StructVec3.chs + +-- + +module HGamer3D.Bindings.Bullet.StructVec3 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 Data.Bits +import HGamer3D.Data.Vector + +newtype Vector3 = Vector3 Vec3 + +instance Storable Vector3 where + alignment _ = alignment (undefined :: CDouble) + sizeOf _ = 12 +{-# LINE 50 ".\\HGamer3D\\Bindings\\Bullet\\StructVec3.chs" #-} + peek p = do + x <- (\ptr -> do {peekByteOff ptr 0 ::IO CFloat}) p + y <- (\ptr -> do {peekByteOff ptr 4 ::IO CFloat}) p + z <- (\ptr -> do {peekByteOff ptr 8 ::IO CFloat}) p + let v = Vector3 (Vec3 (realToFrac x) (realToFrac y) (realToFrac z)) + return v + poke p (Vector3 (Vec3 x y z)) = do + (\ptr val -> do {pokeByteOff ptr 0 (val::CFloat)}) p (realToFrac x) + (\ptr val -> do {pokeByteOff ptr 4 (val::CFloat)}) p (realToFrac y) + (\ptr val -> do {pokeByteOff ptr 8 (val::CFloat)}) p (realToFrac z) + +type Vector3Ptr = Ptr (Vector3) + +type Vec3Ptr = Ptr (Vec3) +{-# LINE 64 ".\\HGamer3D\\Bindings\\Bullet\\StructVec3.chs" #-} + +withVec3 :: Vec3 -> (Vec3Ptr -> IO b) -> IO b +withVec3 v f = with v' f' where + v' = Vector3 v + f' p = f (castPtr p) +peekVec3 p = do + (Vector3 v3) <- peek ((castPtr p)::Vector3Ptr) + return v3 +
+ HGamer3D/Bindings/Bullet/Utils.hs view
@@ -0,0 +1,136 @@+-- 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\\Utils.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. +-- + + +-- Utils.hs + +-- Marshalling Utilities + +module HGamer3D.Bindings.Bullet.Utils 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 Control.Monad (liftM) + +-- Strings with explicit length +-- +withCStringLenIntConv :: Num n => String -> ((CString, n) -> IO a) -> IO a +withCStringLenIntConv s f = withCStringLen s $ \(p, n) -> f (p, fromIntegral n) + +peekCStringLenIntConv :: Integral n => (CString, n) -> IO String +peekCStringLenIntConv (s, n) = peekCStringLen (s, fromIntegral n) + +-- Marshalling of numerals +-- + +withIntConv :: (Storable b, Integral a, Integral b) + => a -> (Ptr b -> IO c) -> IO c +withIntConv = with . fromIntegral + +withFloatConv :: (Storable b, RealFloat a, RealFloat b) + => a -> (Ptr b -> IO c) -> IO c +withFloatConv = with . realToFrac + +peekIntConv :: (Storable a, Integral a, Integral b) + => Ptr a -> IO b +peekIntConv = liftM fromIntegral . peek + +peekFloatConv :: (Storable a, RealFloat a, RealFloat b) + => Ptr a -> IO b +peekFloatConv = liftM realToFrac . peek + + +-- String Conversion functions +-- + +withCUString b f = withCWString b (f . castPtr) +peekCUString = peekCWString . castPtr +alloc64k = allocaBytes (1024 * 64) + +-- c2hs replacements of utility functions, to get rid of annoying c2hs +-- deprecated messages + +-- Passing Enums + +cIntFromEnum :: Enum a => a -> CInt +cIntFromEnum = cIntConv . fromEnum + +cIntToEnum :: Enum a => CInt -> a +cIntToEnum = toEnum . cIntConv + + +-- Passing Booleans by reference +-- + +withBoolUtil :: (Integral a, Storable a) => Bool -> (Ptr a -> IO b) -> IO b +withBoolUtil = with . fromBool + +peekBoolUtil :: (Integral a, Storable a) => Ptr a -> IO Bool +peekBoolUtil = liftM toBool . peek + + +-- Passing enums by reference +-- + +withEnumUtil :: (Enum a, Integral b, Storable b) => a -> (Ptr b -> IO c) -> IO c +withEnumUtil = with . cFromEnum + +peekEnumUtil :: (Enum a, Integral b, Storable b) => Ptr b -> IO a +peekEnumUtil = liftM cToEnum . peek + +-- Conversion routines +-- ------------------- + +-- |Integral conversion +-- +cIntConv :: (Integral a, Integral b) => a -> b +cIntConv = fromIntegral + +-- |Floating conversion +-- +cFloatConv :: (RealFloat a, RealFloat b) => a -> b +cFloatConv = realToFrac + +-- |Convert a C enumeration to Haskell. +-- +cToEnum :: (Integral i, Enum e) => i -> e +cToEnum = toEnum . fromIntegral + +-- |Convert a Haskell enumeration to C. +-- +cFromEnum :: (Enum e, Integral i) => e -> i +cFromEnum = fromIntegral . fromEnum +
+ LICENSE view
@@ -0,0 +1,13 @@+(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.
+ Setup.hs view
@@ -0,0 +1,22 @@+-- 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. +-- +-- Setup.hs + +import Distribution.Simple +main = defaultMain
+ include/BulletDllDefines.h view
@@ -0,0 +1,41 @@+// (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. +// + + +// BulletDllDefines.h + +#ifndef _HGamer3DBullet020_DLLDEFINES_H_ +#define _HGamer3DBullet020_DLLDEFINES_H_ + +/* Cmake will define HGamer3DBullet020_EXPORTS on Windows when it +configures to build a shared library. If you are going to use +another build system on windows or create the visual studio +projects by hand you need to define MyLibrary_EXPORTS when +building a DLL on windows. +*/ + +// We are using the Visual Studio Compiler and building Shared libraries + +#if (defined (_WIN32)) && !(defined (__GNUC__)) + #if defined(HGamer3DBullet020_EXPORTS) + #define Bullet_LIB_EXPORT __declspec(dllexport) + #else + #define Bullet_LIB_EXPORT __declspec(dllimport) + #endif /* HGamer3DBullet020_EXPORTS */ +#else /* defined (_WIN32) */ + #define Bullet_LIB_EXPORT +#endif + +#endif /* _HGamer3DBullet020_DLLDEFINES_H_ */
+ include/ClassActionInterface.h view
@@ -0,0 +1,39 @@+// 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. +// + +// ClassActionInterface.h + +// + +#include "wchar.h" +#ifndef _DEFINED_HG3D_ClassActionInterface +#define _DEFINED_HG3D_ClassActionInterface + +#include "ClassPtr.h" +#include "ClassCollisionWorld.h" + + + +// +void bt_actnintrfc_destruct(struct hg3dclass_struct * thisclass_c); + +// +void bt_actnintrfc_updateAction(struct hg3dclass_struct * thisclass_c, struct hg3dclass_struct * collisionWorld_c, float deltaTimeStep_c); + +#endif
+ include/ClassBroadphaseInterface.h view
@@ -0,0 +1,49 @@+// 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. +// + +// ClassBroadphaseInterface.h + +// + +#include "wchar.h" +#ifndef _DEFINED_HG3D_ClassBroadphaseInterface +#define _DEFINED_HG3D_ClassBroadphaseInterface + +#include "ClassPtr.h" +#include "ClassDispatcher.h" +#include "StructVec3.h" + + + +// +void bt_brdpintf_destruct(struct hg3dclass_struct * thisclass_c); + +// calculateOverlappingPairs is optional: incremental algorithms (sweep and prune) might do it during the set aabb +void bt_brdpintf_calculateOverlappingPairs(struct hg3dclass_struct * thisclass_c, struct hg3dclass_struct * dispatcher_c); + +// +void bt_brdpintf_getBroadphaseAabb(struct hg3dclass_struct * thisclass_c, struct vector3_struct * aabbMin_c, struct vector3_struct * aabbMax_c); + +// reset broadphase internal structures, to ensure determinism/reproducability +void bt_brdpintf_resetPool(struct hg3dclass_struct * thisclass_c, struct hg3dclass_struct * dispatcher_c); + +// +void bt_brdpintf_printStats(struct hg3dclass_struct * thisclass_c); + +#endif
+ include/ClassCapsuleShapeX.h view
@@ -0,0 +1,38 @@+// 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. +// + +// ClassCapsuleShapeX.h + +// + +#include "wchar.h" +#ifndef _DEFINED_HG3D_ClassCapsuleShapeX +#define _DEFINED_HG3D_ClassCapsuleShapeX + +#include "ClassPtr.h" + + + +// +void bt_cpsshx_construct(float radius_c, float height_c, struct hg3dclass_struct * result_c); + +// +void bt_cpsshx_getName(struct hg3dclass_struct * thisclass_c, char * result_c); + +#endif
+ include/ClassCapsuleShapeZ.h view
@@ -0,0 +1,38 @@+// 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. +// + +// ClassCapsuleShapeZ.h + +// + +#include "wchar.h" +#ifndef _DEFINED_HG3D_ClassCapsuleShapeZ +#define _DEFINED_HG3D_ClassCapsuleShapeZ + +#include "ClassPtr.h" + + + +// +void bt_cpsshz_construct(float radius_c, float height_c, struct hg3dclass_struct * result_c); + +// +void bt_cpsshz_getName(struct hg3dclass_struct * thisclass_c, char * result_c); + +#endif
+ include/ClassCollisionConfiguration.h view
@@ -0,0 +1,35 @@+// 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. +// + +// ClassCollisionConfiguration.h + +// + +#include "wchar.h" +#ifndef _DEFINED_HG3D_ClassCollisionConfiguration +#define _DEFINED_HG3D_ClassCollisionConfiguration + +#include "ClassPtr.h" + + + +// +void bt_cllsncfg_destruct(struct hg3dclass_struct * thisclass_c); + +#endif
+ include/ClassCollisionDispatcher.h view
@@ -0,0 +1,57 @@+// 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. +// + +// ClassCollisionDispatcher.h + +// + +#include "wchar.h" +#ifndef _DEFINED_HG3D_ClassCollisionDispatcher +#define _DEFINED_HG3D_ClassCollisionDispatcher + +#include "ClassPtr.h" +#include "ClassCollisionConfiguration.h" + + + +// +void bt_cllsndpstch_getDispatcherFlags(struct hg3dclass_struct * thisclass_c, int * result_c); + +// +void bt_cllsndpstch_setDispatcherFlags(struct hg3dclass_struct * thisclass_c, int flags_c); + +// +void bt_cllsndpstch_getNumManifolds(struct hg3dclass_struct * thisclass_c, int * result_c); + +// +void bt_cllsndpstch_construct(struct hg3dclass_struct * collisionConfiguration_c, struct hg3dclass_struct * result_c); + +// +void bt_cllsndpstch_destruct(struct hg3dclass_struct * thisclass_c); + +// +void bt_cllsndpstch_getCollisionConfiguration(struct hg3dclass_struct * thisclass_c, struct hg3dclass_struct * result_c); + +// +void bt_cllsndpstch_getCollisionConfiguration2(struct hg3dclass_struct * thisclass_c, struct hg3dclass_struct * result_c); + +// +void bt_cllsndpstch_setCollisionConfiguration(struct hg3dclass_struct * thisclass_c, struct hg3dclass_struct * config_c); + +#endif
+ include/ClassCollisionWorld.h view
@@ -0,0 +1,77 @@+// 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.h + +// + +#include "wchar.h" +#ifndef _DEFINED_HG3D_ClassCollisionWorld +#define _DEFINED_HG3D_ClassCollisionWorld + +#include "ClassPtr.h" +#include "ClassDispatcher.h" +#include "ClassBroadphaseInterface.h" +#include "ClassCollisionConfiguration.h" + + + +// +void bt_cllsnwrld_construct(struct hg3dclass_struct * dispatcher_c, struct hg3dclass_struct * broadphasePairCache_c, struct hg3dclass_struct * collisionConfiguration_c, struct hg3dclass_struct * result_c); + +// +void bt_cllsnwrld_destruct(struct hg3dclass_struct * thisclass_c); + +// +void bt_cllsnwrld_setBroadphase(struct hg3dclass_struct * thisclass_c, struct hg3dclass_struct * pairCache_c); + +// +void bt_cllsnwrld_getBroadphase(struct hg3dclass_struct * thisclass_c, struct hg3dclass_struct * result_c); + +// +void bt_cllsnwrld_getBroadphase2(struct hg3dclass_struct * thisclass_c, struct hg3dclass_struct * result_c); + +// +void bt_cllsnwrld_getDispatcher(struct hg3dclass_struct * thisclass_c, struct hg3dclass_struct * result_c); + +// +void bt_cllsnwrld_getDispatcher2(struct hg3dclass_struct * thisclass_c, struct hg3dclass_struct * result_c); + +// +void bt_cllsnwrld_updateAabbs(struct hg3dclass_struct * thisclass_c); + +// +void bt_cllsnwrld_computeOverlappingPairs(struct hg3dclass_struct * thisclass_c); + +// +void bt_cllsnwrld_debugDrawWorld(struct hg3dclass_struct * thisclass_c); + +// +void bt_cllsnwrld_getNumCollisionObjects(struct hg3dclass_struct * thisclass_c, int * result_c); + +// +void bt_cllsnwrld_performDiscreteCollisionDetection(struct hg3dclass_struct * thisclass_c); + +// +void bt_cllsnwrld_getForceUpdateAllAabbs(struct hg3dclass_struct * thisclass_c, int * result_c); + +// +void bt_cllsnwrld_setForceUpdateAllAabbs(struct hg3dclass_struct * thisclass_c, int forceUpdateAllAabbs_c); + +#endif
+ include/ClassConeShapeX.h view
@@ -0,0 +1,39 @@+// 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. +// + +// ClassConeShapeX.h + +// + +#include "wchar.h" +#ifndef _DEFINED_HG3D_ClassConeShapeX +#define _DEFINED_HG3D_ClassConeShapeX + +#include "ClassPtr.h" +#include "StructVec3.h" + + + +// +void bt_cnshpx_construct(float radius_c, float height_c, struct hg3dclass_struct * result_c); + +// +void bt_cnshpx_getAnisotropicRollingFrictionDirection(struct hg3dclass_struct * thisclass_c, struct vector3_struct * result_c); + +#endif
+ include/ClassConeShapeZ.h view
@@ -0,0 +1,39 @@+// 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. +// + +// ClassConeShapeZ.h + +// + +#include "wchar.h" +#ifndef _DEFINED_HG3D_ClassConeShapeZ +#define _DEFINED_HG3D_ClassConeShapeZ + +#include "ClassPtr.h" +#include "StructVec3.h" + + + +// +void bt_cnshpz_construct(float radius_c, float height_c, struct hg3dclass_struct * result_c); + +// +void bt_cnshpz_getAnisotropicRollingFrictionDirection(struct hg3dclass_struct * thisclass_c, struct vector3_struct * result_c); + +#endif
+ include/ClassCylinderShapeX.h view
@@ -0,0 +1,48 @@+// 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. +// + +// ClassCylinderShapeX.h + +// + +#include "wchar.h" +#ifndef _DEFINED_HG3D_ClassCylinderShapeX +#define _DEFINED_HG3D_ClassCylinderShapeX + +#include "ClassPtr.h" +#include "StructVec3.h" + + + +// +void bt_clndrshpx_construct(struct vector3_struct * halfExtents_c, struct hg3dclass_struct * result_c); + +// +void bt_clndrshpx_localGetSupportingVertexWithoutMargin(struct hg3dclass_struct * thisclass_c, struct vector3_struct * vec_c, struct vector3_struct * result_c); + +// +void bt_clndrshpx_batchedUnitVectorGetSupportingVertexWithoutMargin(struct hg3dclass_struct * thisclass_c, struct vector3_struct * vectors_c, struct vector3_struct * supportVerticesOut_c, int numVectors_c); + +// +void bt_clndrshpx_getName(struct hg3dclass_struct * thisclass_c, char * result_c); + +// +void bt_clndrshpx_getRadius(struct hg3dclass_struct * thisclass_c, float * result_c); + +#endif
+ include/ClassCylinderShapeZ.h view
@@ -0,0 +1,48 @@+// 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. +// + +// ClassCylinderShapeZ.h + +// + +#include "wchar.h" +#ifndef _DEFINED_HG3D_ClassCylinderShapeZ +#define _DEFINED_HG3D_ClassCylinderShapeZ + +#include "ClassPtr.h" +#include "StructVec3.h" + + + +// +void bt_clndrshpz_construct(struct vector3_struct * halfExtents_c, struct hg3dclass_struct * result_c); + +// +void bt_clndrshpz_localGetSupportingVertexWithoutMargin(struct hg3dclass_struct * thisclass_c, struct vector3_struct * vec_c, struct vector3_struct * result_c); + +// +void bt_clndrshpz_batchedUnitVectorGetSupportingVertexWithoutMargin(struct hg3dclass_struct * thisclass_c, struct vector3_struct * vectors_c, struct vector3_struct * supportVerticesOut_c, int numVectors_c); + +// +void bt_clndrshpz_getName(struct hg3dclass_struct * thisclass_c, char * result_c); + +// +void bt_clndrshpz_getRadius(struct hg3dclass_struct * thisclass_c, float * result_c); + +#endif
+ include/ClassDefaultCollisionConfiguration.h view
@@ -0,0 +1,41 @@+// 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. +// + +// ClassDefaultCollisionConfiguration.h + +// + +#include "wchar.h" +#ifndef _DEFINED_HG3D_ClassDefaultCollisionConfiguration +#define _DEFINED_HG3D_ClassDefaultCollisionConfiguration + +#include "ClassPtr.h" + + + +// +void bt_dfltcllcnf_destruct(struct hg3dclass_struct * thisclass_c); + +// +void bt_dfltcllcnf_setConvexConvexMultipointIterations(struct hg3dclass_struct * thisclass_c, int numPerturbationIterations_c, int minimumPointsPerturbationThreshold_c); + +// +void bt_dfltcllcnf_setPlaneConvexMultipointIterations(struct hg3dclass_struct * thisclass_c, int numPerturbationIterations_c, int minimumPointsPerturbationThreshold_c); + +#endif
+ include/ClassDispatcher.h view
@@ -0,0 +1,38 @@+// 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. +// + +// ClassDispatcher.h + +// + +#include "wchar.h" +#ifndef _DEFINED_HG3D_ClassDispatcher +#define _DEFINED_HG3D_ClassDispatcher + +#include "ClassPtr.h" + + + +// +void bt_dsptch_destruct(struct hg3dclass_struct * thisclass_c); + +// +void bt_dsptch_getNumManifolds(struct hg3dclass_struct * thisclass_c, int * result_c); + +#endif
+ include/ClassDynamicsWorld.h view
@@ -0,0 +1,83 @@+// 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. +// + +// ClassDynamicsWorld.h + +// + +#include "wchar.h" +#ifndef _DEFINED_HG3D_ClassDynamicsWorld +#define _DEFINED_HG3D_ClassDynamicsWorld + +#include "ClassPtr.h" +#include "ClassActionInterface.h" +#include "StructVec3.h" +#include "ClassRigidBody.h" + + + +// +void bt_dnmcwrld_destruct(struct hg3dclass_struct * thisclass_c); + +// +void bt_dnmcwrld_stepSimulation(struct hg3dclass_struct * thisclass_c, float timeStep_c, int maxSubSteps_c, float fixedTimeStep_c, int * result_c); + +// +void bt_dnmcwrld_debugDrawWorld(struct hg3dclass_struct * thisclass_c); + +// +void bt_dnmcwrld_addAction(struct hg3dclass_struct * thisclass_c, struct hg3dclass_struct * action_c); + +// +void bt_dnmcwrld_removeAction(struct hg3dclass_struct * thisclass_c, struct hg3dclass_struct * action_c); + +// +void bt_dnmcwrld_setGravity(struct hg3dclass_struct * thisclass_c, struct vector3_struct * gravity_c); + +// +void bt_dnmcwrld_getGravity(struct hg3dclass_struct * thisclass_c, struct vector3_struct * result_c); + +// +void bt_dnmcwrld_synchronizeMotionStates(struct hg3dclass_struct * thisclass_c); + +// +void bt_dnmcwrld_addRigidBody(struct hg3dclass_struct * thisclass_c, struct hg3dclass_struct * body_c); + +// +void bt_dnmcwrld_removeRigidBody(struct hg3dclass_struct * thisclass_c, struct hg3dclass_struct * body_c); + +// +void bt_dnmcwrld_getNumConstraints(struct hg3dclass_struct * thisclass_c, int * result_c); + +// +void bt_dnmcwrld_clearForces(struct hg3dclass_struct * thisclass_c); + +// obsolete, use addAction instead. +void bt_dnmcwrld_addVehicle(struct hg3dclass_struct * thisclass_c, struct hg3dclass_struct * vehicle_c); + +// obsolete, use removeAction instead +void bt_dnmcwrld_removeVehicle(struct hg3dclass_struct * thisclass_c, struct hg3dclass_struct * vehicle_c); + +// obsolete, use addAction instead. +void bt_dnmcwrld_addCharacter(struct hg3dclass_struct * thisclass_c, struct hg3dclass_struct * character_c); + +// obsolete, use removeAction instead +void bt_dnmcwrld_removeCharacter(struct hg3dclass_struct * thisclass_c, struct hg3dclass_struct * character_c); + +#endif
+ include/ClassHG3DBulletDefaultCreator.h view
@@ -0,0 +1,49 @@+// 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. +// + +// ClassHG3DBulletDefaultCreator.h + +// + +#include "wchar.h" +#ifndef _DEFINED_HG3D_ClassHG3DBulletDefaultCreator +#define _DEFINED_HG3D_ClassHG3DBulletDefaultCreator + +#include "ClassPtr.h" +#include "ClassDynamicsWorld.h" +#include "ClassCollisionDispatcher.h" + + + +// +void bt_hgdfcr_construct(struct hg3dclass_struct * result_c); + +// +void bt_hgdfcr_destruct(struct hg3dclass_struct * thisclass_c); + +// +void bt_hgdfcr_initializeDefaults(struct hg3dclass_struct * thisclass_c); + +// +void bt_hgdfcr_getDynamicsWorld(struct hg3dclass_struct * thisclass_c, struct hg3dclass_struct * result_c); + +// +void bt_hgdfcr_getCollisionDispatcher(struct hg3dclass_struct * thisclass_c, struct hg3dclass_struct * result_c); + +#endif
+ include/ClassHG3DBulletMotionStateHandler.h view
@@ -0,0 +1,51 @@+// 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. +// + +// ClassHG3DBulletMotionStateHandler.h + +// + +#include "wchar.h" +#ifndef _DEFINED_HG3D_ClassHG3DBulletMotionStateHandler +#define _DEFINED_HG3D_ClassHG3DBulletMotionStateHandler + +#include "ClassPtr.h" +#include "ClassMotionState.h" +#include "StructVec3.h" +#include "StructQuaternion.h" +#include "ClassRigidBody.h" + + + +// +void bt_hg3dblmsh_createDefaultMotionState(struct vector3_struct * pos_c, struct quaternion_struct * qt_c, struct hg3dclass_struct * result_c); + +// +void bt_hg3dblmsh_getPosition(struct hg3dclass_struct * rb_c, struct vector3_struct * result_c); + +// +void bt_hg3dblmsh_setPosition(struct hg3dclass_struct * rb_c, struct vector3_struct * pos_c); + +// +void bt_hg3dblmsh_getQuaternion(struct hg3dclass_struct * rb_c, struct quaternion_struct * result_c); + +// +void bt_hg3dblmsh_setQuaternion(struct hg3dclass_struct * rb_c, struct quaternion_struct * rot_c); + +#endif
+ include/ClassHG3DRigidBodyCreator.h view
@@ -0,0 +1,53 @@+// 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. +// + +// ClassHG3DRigidBodyCreator.h + +// + +#include "wchar.h" +#ifndef _DEFINED_HG3D_ClassHG3DRigidBodyCreator +#define _DEFINED_HG3D_ClassHG3DRigidBodyCreator + +#include "ClassPtr.h" +#include "ClassRigidBody.h" +#include "StructVec3.h" +#include "StructQuaternion.h" + + + +// +void bt_hg3drgbdcrt_createSphere(float mass_c, struct vector3_struct * pos_c, struct quaternion_struct * qt_c, float radius_c, struct hg3dclass_struct * result_c); + +// +void bt_hg3drgbdcrt_createBox(float mass_c, struct vector3_struct * pos_c, struct quaternion_struct * qt_c, struct vector3_struct * boxHalfExtents_c, struct hg3dclass_struct * result_c); + +// +void bt_hg3drgbdcrt_createCylinder(float mass_c, struct vector3_struct * pos_c, struct quaternion_struct * qt_c, struct vector3_struct * boxHalfExtents_c, struct hg3dclass_struct * result_c); + +// +void bt_hg3drgbdcrt_createCapsule(float mass_c, struct vector3_struct * pos_c, struct quaternion_struct * qt_c, float radius_c, float height_c, struct hg3dclass_struct * result_c); + +// +void bt_hg3drgbdcrt_createCone(float mass_c, struct vector3_struct * pos_c, struct quaternion_struct * qt_c, float radius_c, float height_c, struct hg3dclass_struct * result_c); + +// +void bt_hg3drgbdcrt_createStaticPlane(float mass_c, struct vector3_struct * pos_c, struct quaternion_struct * qt_c, struct vector3_struct * origin_c, struct hg3dclass_struct * result_c); + +#endif
+ include/ClassMotionState.h view
@@ -0,0 +1,35 @@+// 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. +// + +// ClassMotionState.h + +// + +#include "wchar.h" +#ifndef _DEFINED_HG3D_ClassMotionState +#define _DEFINED_HG3D_ClassMotionState + +#include "ClassPtr.h" + + + +// +void bt_mtnst_destruct(struct hg3dclass_struct * thisclass_c); + +#endif
+ include/ClassPtr.h view
@@ -0,0 +1,103 @@+// 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. +// + +// ClassPtr.h + +// Here are the methods defined, which do the class pointer +// marshalling and the casting of subclasses to higher classes + +#include "wchar.h" + + + +#ifndef CLASSPTR_INCLUDE_H +#define CLASSPTR_INCLUDE_H + +typedef struct hg3dclass_struct { + void *ptr; + void *fptr; +} hg3dclass_struct; + +void *getHG3DClassPtr(hg3dclass_struct inSt, const char* className); + + +typedef void ClassHG3DBulletDefaultCreator; +hg3dclass_struct getHG3DClass_HG3DBulletDefaultCreator(void *ptrIn); + +typedef void ClassHG3DMotionStateHandler; +hg3dclass_struct getHG3DClass_HG3DMotionStateHandler(void *ptrIn); + +typedef void ClassHG3DRigidBodyCreator; +hg3dclass_struct getHG3DClass_HG3DRigidBodyCreator(void *ptrIn); + +typedef void ClassbtActionInterface; +hg3dclass_struct getHG3DClass_btActionInterface(void *ptrIn); + +typedef void ClassbtBroadphaseInterface; +hg3dclass_struct getHG3DClass_btBroadphaseInterface(void *ptrIn); + +typedef void ClassbtCapsuleShapeX; +hg3dclass_struct getHG3DClass_btCapsuleShapeX(void *ptrIn); + +typedef void ClassbtCapsuleShapeZ; +hg3dclass_struct getHG3DClass_btCapsuleShapeZ(void *ptrIn); + +typedef void ClassbtCollisionConfiguration; +hg3dclass_struct getHG3DClass_btCollisionConfiguration(void *ptrIn); + +typedef void ClassbtCollisionDispatcher; +hg3dclass_struct getHG3DClass_btCollisionDispatcher(void *ptrIn); + +typedef void ClassbtCollisionWorld; +hg3dclass_struct getHG3DClass_btCollisionWorld(void *ptrIn); + +typedef void ClassbtConeShapeX; +hg3dclass_struct getHG3DClass_btConeShapeX(void *ptrIn); + +typedef void ClassbtConeShapeZ; +hg3dclass_struct getHG3DClass_btConeShapeZ(void *ptrIn); + +typedef void ClassbtCylinderShapeX; +hg3dclass_struct getHG3DClass_btCylinderShapeX(void *ptrIn); + +typedef void ClassbtCylinderShapeZ; +hg3dclass_struct getHG3DClass_btCylinderShapeZ(void *ptrIn); + +typedef void ClassbtDefaultCollisionConfiguration; +hg3dclass_struct getHG3DClass_btDefaultCollisionConfiguration(void *ptrIn); + +typedef void ClassbtDispatcher; +hg3dclass_struct getHG3DClass_btDispatcher(void *ptrIn); + +typedef void ClassbtDynamicsWorld; +hg3dclass_struct getHG3DClass_btDynamicsWorld(void *ptrIn); + +typedef void ClassbtMotionState; +hg3dclass_struct getHG3DClass_btMotionState(void *ptrIn); + +typedef void ClassbtRigidBody; +hg3dclass_struct getHG3DClass_btRigidBody(void *ptrIn); + +typedef void ClassbtSimpleBroadphase; +hg3dclass_struct getHG3DClass_btSimpleBroadphase(void *ptrIn); + +typedef void ClassbtSimpleDynamicsWorld; +hg3dclass_struct getHG3DClass_btSimpleDynamicsWorld(void *ptrIn); + +#endif
+ include/ClassRigidBody.h view
@@ -0,0 +1,185 @@+// 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. +// + +// ClassRigidBody.h + +// + +#include "wchar.h" +#ifndef _DEFINED_HG3D_ClassRigidBody +#define _DEFINED_HG3D_ClassRigidBody + +#include "ClassPtr.h" +#include "StructVec3.h" +#include "StructQuaternion.h" +#include "ClassMotionState.h" + + + +// +void bt_rgdbd_destruct(struct hg3dclass_struct * thisclass_c); + +// +void bt_rgdbd_saveKinematicState(struct hg3dclass_struct * thisclass_c, float step_c); + +// +void bt_rgdbd_applyGravity(struct hg3dclass_struct * thisclass_c); + +// +void bt_rgdbd_setGravity(struct hg3dclass_struct * thisclass_c, struct vector3_struct * acceleration_c); + +// +void bt_rgdbd_getGravity(struct hg3dclass_struct * thisclass_c, struct vector3_struct * result_c); + +// +void bt_rgdbd_setDamping(struct hg3dclass_struct * thisclass_c, float lin_damping_c, float ang_damping_c); + +// +void bt_rgdbd_getLinearDamping(struct hg3dclass_struct * thisclass_c, float * result_c); + +// +void bt_rgdbd_getAngularDamping(struct hg3dclass_struct * thisclass_c, float * result_c); + +// +void bt_rgdbd_getLinearSleepingThreshold(struct hg3dclass_struct * thisclass_c, float * result_c); + +// +void bt_rgdbd_getAngularSleepingThreshold(struct hg3dclass_struct * thisclass_c, float * result_c); + +// +void bt_rgdbd_applyDamping(struct hg3dclass_struct * thisclass_c, float timeStep_c); + +// +void bt_rgdbd_setMassProps(struct hg3dclass_struct * thisclass_c, float mass_c, struct vector3_struct * inertia_c); + +// +void bt_rgdbd_getLinearFactor(struct hg3dclass_struct * thisclass_c, struct vector3_struct * result_c); + +// +void bt_rgdbd_setLinearFactor(struct hg3dclass_struct * thisclass_c, struct vector3_struct * linearFactor_c); + +// +void bt_rgdbd_getInvMass(struct hg3dclass_struct * thisclass_c, float * result_c); + +// +void bt_rgdbd_integrateVelocities(struct hg3dclass_struct * thisclass_c, float step_c); + +// +void bt_rgdbd_applyCentralForce(struct hg3dclass_struct * thisclass_c, struct vector3_struct * force_c); + +// +void bt_rgdbd_getTotalForce(struct hg3dclass_struct * thisclass_c, struct vector3_struct * result_c); + +// +void bt_rgdbd_getTotalTorque(struct hg3dclass_struct * thisclass_c, struct vector3_struct * result_c); + +// +void bt_rgdbd_getInvInertiaDiagLocal(struct hg3dclass_struct * thisclass_c, struct vector3_struct * result_c); + +// +void bt_rgdbd_setInvInertiaDiagLocal(struct hg3dclass_struct * thisclass_c, struct vector3_struct * diagInvInertia_c); + +// +void bt_rgdbd_setSleepingThresholds(struct hg3dclass_struct * thisclass_c, float linear_c, float angular_c); + +// +void bt_rgdbd_applyTorque(struct hg3dclass_struct * thisclass_c, struct vector3_struct * torque_c); + +// +void bt_rgdbd_applyForce(struct hg3dclass_struct * thisclass_c, struct vector3_struct * force_c, struct vector3_struct * rel_pos_c); + +// +void bt_rgdbd_applyCentralImpulse(struct hg3dclass_struct * thisclass_c, struct vector3_struct * impulse_c); + +// +void bt_rgdbd_applyTorqueImpulse(struct hg3dclass_struct * thisclass_c, struct vector3_struct * torque_c); + +// +void bt_rgdbd_applyImpulse(struct hg3dclass_struct * thisclass_c, struct vector3_struct * impulse_c, struct vector3_struct * rel_pos_c); + +// +void bt_rgdbd_clearForces(struct hg3dclass_struct * thisclass_c); + +// +void bt_rgdbd_updateInertiaTensor(struct hg3dclass_struct * thisclass_c); + +// +void bt_rgdbd_getCenterOfMassPosition(struct hg3dclass_struct * thisclass_c, struct vector3_struct * result_c); + +// +void bt_rgdbd_getOrientation(struct hg3dclass_struct * thisclass_c, struct quaternion_struct * result_c); + +// +void bt_rgdbd_getLinearVelocity(struct hg3dclass_struct * thisclass_c, struct vector3_struct * result_c); + +// +void bt_rgdbd_getAngularVelocity(struct hg3dclass_struct * thisclass_c, struct vector3_struct * result_c); + +// +void bt_rgdbd_setLinearVelocity(struct hg3dclass_struct * thisclass_c, struct vector3_struct * lin_vel_c); + +// +void bt_rgdbd_setAngularVelocity(struct hg3dclass_struct * thisclass_c, struct vector3_struct * ang_vel_c); + +// +void bt_rgdbd_getVelocityInLocalPoint(struct hg3dclass_struct * thisclass_c, struct vector3_struct * rel_pos_c, struct vector3_struct * result_c); + +// +void bt_rgdbd_translate(struct hg3dclass_struct * thisclass_c, struct vector3_struct * v_c); + +// +void bt_rgdbd_getAabb(struct hg3dclass_struct * thisclass_c, struct vector3_struct * aabbMin_c, struct vector3_struct * aabbMax_c); + +// +void bt_rgdbd_getMotionState(struct hg3dclass_struct * thisclass_c, struct hg3dclass_struct * result_c); + +// +void bt_rgdbd_getMotionState2(struct hg3dclass_struct * thisclass_c, struct hg3dclass_struct * result_c); + +// +void bt_rgdbd_setMotionState(struct hg3dclass_struct * thisclass_c, struct hg3dclass_struct * motionState_c); + +// +void bt_rgdbd_setAngularFactor(struct hg3dclass_struct * thisclass_c, struct vector3_struct * angFac_c); + +// +void bt_rgdbd_setAngularFactor2(struct hg3dclass_struct * thisclass_c, float angFac_c); + +// +void bt_rgdbd_getAngularFactor(struct hg3dclass_struct * thisclass_c, struct vector3_struct * result_c); + +// +void bt_rgdbd_isInWorld(struct hg3dclass_struct * thisclass_c, int * result_c); + +// +void bt_rgdbd_getNumConstraintRefs(struct hg3dclass_struct * thisclass_c, int * result_c); + +// +void bt_rgdbd_setFlags(struct hg3dclass_struct * thisclass_c, int flags_c); + +// +void bt_rgdbd_getFlags(struct hg3dclass_struct * thisclass_c, int * result_c); + +// +void bt_rgdbd_computeGyroscopicForce(struct hg3dclass_struct * thisclass_c, float maxGyroscopicForce_c, struct vector3_struct * result_c); + +// +void bt_rgdbd_calculateSerializeBufferSize(struct hg3dclass_struct * thisclass_c, int * result_c); + +#endif
+ include/ClassSimpleBroadphase.h view
@@ -0,0 +1,46 @@+// 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. +// + +// ClassSimpleBroadphase.h + +// + +#include "wchar.h" +#ifndef _DEFINED_HG3D_ClassSimpleBroadphase +#define _DEFINED_HG3D_ClassSimpleBroadphase + +#include "ClassPtr.h" +#include "ClassDispatcher.h" +#include "StructVec3.h" + + + +// +void bt_smplbrdphs_destruct(struct hg3dclass_struct * thisclass_c); + +// calculateOverlappingPairs is optional: incremental algorithms (sweep and prune) might do it during the set aabb +void bt_smplbrdphs_calculateOverlappingPairs(struct hg3dclass_struct * thisclass_c, struct hg3dclass_struct * dispatcher_c); + +// +void bt_smplbrdphs_getBroadphaseAabb(struct hg3dclass_struct * thisclass_c, struct vector3_struct * aabbMin_c, struct vector3_struct * aabbMax_c); + +// +void bt_smplbrdphs_printStats(struct hg3dclass_struct * thisclass_c); + +#endif
+ include/ClassSimpleDynamicsWorld.h view
@@ -0,0 +1,71 @@+// 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. +// + +// ClassSimpleDynamicsWorld.h + +// + +#include "wchar.h" +#ifndef _DEFINED_HG3D_ClassSimpleDynamicsWorld +#define _DEFINED_HG3D_ClassSimpleDynamicsWorld + +#include "ClassPtr.h" +#include "StructVec3.h" +#include "ClassRigidBody.h" +#include "ClassActionInterface.h" + + + +// +void bt_smpldnwrld_destruct(struct hg3dclass_struct * thisclass_c); + +// maxSubSteps/fixedTimeStep for interpolation is currently ignored for btSimpleDynamicsWorld +void bt_smpldnwrld_stepSimulation(struct hg3dclass_struct * thisclass_c, float timeStep_c, int maxSubSteps_c, float fixedTimeStep_c, int * result_c); + +// +void bt_smpldnwrld_setGravity(struct hg3dclass_struct * thisclass_c, struct vector3_struct * gravity_c); + +// +void bt_smpldnwrld_getGravity(struct hg3dclass_struct * thisclass_c, struct vector3_struct * result_c); + +// +void bt_smpldnwrld_addRigidBody(struct hg3dclass_struct * thisclass_c, struct hg3dclass_struct * body_c); + +// +void bt_smpldnwrld_removeRigidBody(struct hg3dclass_struct * thisclass_c, struct hg3dclass_struct * body_c); + +// +void bt_smpldnwrld_debugDrawWorld(struct hg3dclass_struct * thisclass_c); + +// +void bt_smpldnwrld_addAction(struct hg3dclass_struct * thisclass_c, struct hg3dclass_struct * action_c); + +// +void bt_smpldnwrld_removeAction(struct hg3dclass_struct * thisclass_c, struct hg3dclass_struct * action_c); + +// +void bt_smpldnwrld_updateAabbs(struct hg3dclass_struct * thisclass_c); + +// +void bt_smpldnwrld_synchronizeMotionStates(struct hg3dclass_struct * thisclass_c); + +// +void bt_smpldnwrld_clearForces(struct hg3dclass_struct * thisclass_c); + +#endif
+ include/StructColour.h view
@@ -0,0 +1,38 @@+// 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. +// + +// StructColour.h + +// + +#include "wchar.h" + + + +#ifndef _INC_STRUCT_COLOURVALUE +#define _INC_STRUCT_COLOURVALUE + +typedef struct colourvalue_struct { + float r; + float g; + float b; + float a; +} colourvalue_struct; + +#endif
+ include/StructHG3DClass.h view
@@ -0,0 +1,36 @@+// 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. +// + +// StructHG3DClass.h + +// + +#include "wchar.h" + + + +#ifndef _INC_STRUCT_HG3DCLASS +#define _INC_STRUCT_HG3DCLASS + +typedef struct hg3dclass_struct { + void *ptr; + void *fptr; +} hg3dclass_struct; + +#endif
+ include/StructQuaternion.h view
@@ -0,0 +1,38 @@+// 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. +// + +// StructQuaternion.h + +// + +#include "wchar.h" + + + +#ifndef _INC_STRUCT_QUATERNION +#define _INC_STRUCT_QUATERNION + +typedef struct quaternion_struct { + float fx; + float fy; + float fz; + float fw; +} quaternion_struct; + +#endif
+ include/StructVec2.h view
@@ -0,0 +1,36 @@+// 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. +// + +// StructVec2.h + +// + +#include "wchar.h" + + + +#ifndef _INC_STRUCT_VECTOR2 +#define _INC_STRUCT_VECTOR2 + +typedef struct vector2_struct { + float x; + float y; +} vector2_struct; + +#endif
+ include/StructVec3.h view
@@ -0,0 +1,37 @@+// 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. +// + +// StructVec3.h + +// + +#include "wchar.h" + + + +#ifndef _INC_STRUCT_VECTOR3 +#define _INC_STRUCT_VECTOR3 + +typedef struct vector3_struct { + float x; + float y; + float z; +} vector3_struct; + +#endif