-- 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\\Ogre\\ClassBone.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.
-- 


-- ClassBone.chs

-- 

module HGamer3D.Bindings.Ogre.ClassBone 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.Ogre.Utils
{-# LINE 40 ".\\HGamer3D\\Bindings\\Ogre\\ClassBone.chs" #-}
import HGamer3D.Bindings.Ogre.ClassPtr
{-# LINE 41 ".\\HGamer3D\\Bindings\\Ogre\\ClassBone.chs" #-}
import HGamer3D.Bindings.Ogre.StructHG3DClass
{-# LINE 42 ".\\HGamer3D\\Bindings\\Ogre\\ClassBone.chs" #-}
import HGamer3D.Bindings.Ogre.StructVec3
{-# LINE 43 ".\\HGamer3D\\Bindings\\Ogre\\ClassBone.chs" #-}
import HGamer3D.Bindings.Ogre.StructQuaternion
{-# LINE 44 ".\\HGamer3D\\Bindings\\Ogre\\ClassBone.chs" #-}

{- function ~Bone -}
delete :: HG3DClass -> IO ()
delete a1 =
  withHG3DClass a1 $ \a1' -> 
  delete'_ a1' >>= \res ->
  return ()
{-# LINE 49 ".\\HGamer3D\\Bindings\\Ogre\\ClassBone.chs" #-}

{- function createChild -}
createChild :: HG3DClass -> Int -> Vec3 -> Quaternion -> IO (HG3DClass)
createChild a1 a2 a3 a4 =
  withHG3DClass a1 $ \a1' -> 
  let {a2' = fromIntegral a2} in 
  withVec3 a3 $ \a3' -> 
  withQuaternion a4 $ \a4' -> 
  alloca $ \a5' -> 
  createChild'_ a1' a2' a3' a4' a5' >>= \res ->
  peek  a5'>>= \a5'' -> 
  return (a5'')
{-# LINE 57 ".\\HGamer3D\\Bindings\\Ogre\\ClassBone.chs" #-}

{- function getHandle -}
getHandle :: HG3DClass -> IO (Int)
getHandle a1 =
  withHG3DClass a1 $ \a1' -> 
  alloca $ \a2' -> 
  getHandle'_ a1' a2' >>= \res ->
  peekIntConv  a2'>>= \a2'' -> 
  return (a2'')
{-# LINE 62 ".\\HGamer3D\\Bindings\\Ogre\\ClassBone.chs" #-}

{- function setBindingPose -}
setBindingPose :: HG3DClass -> IO ()
setBindingPose a1 =
  withHG3DClass a1 $ \a1' -> 
  setBindingPose'_ a1' >>= \res ->
  return ()
{-# LINE 66 ".\\HGamer3D\\Bindings\\Ogre\\ClassBone.chs" #-}

{- function reset -}
reset :: HG3DClass -> IO ()
reset a1 =
  withHG3DClass a1 $ \a1' -> 
  reset'_ a1' >>= \res ->
  return ()
{-# LINE 70 ".\\HGamer3D\\Bindings\\Ogre\\ClassBone.chs" #-}

{- function setManuallyControlled -}
setManuallyControlled :: HG3DClass -> Bool -> IO ()
setManuallyControlled a1 a2 =
  withHG3DClass a1 $ \a1' -> 
  let {a2' = fromBool a2} in 
  setManuallyControlled'_ a1' a2' >>= \res ->
  return ()
{-# LINE 75 ".\\HGamer3D\\Bindings\\Ogre\\ClassBone.chs" #-}

{- function isManuallyControlled -}
isManuallyControlled :: HG3DClass -> IO (Bool)
isManuallyControlled a1 =
  withHG3DClass a1 $ \a1' -> 
  alloca $ \a2' -> 
  isManuallyControlled'_ a1' a2' >>= \res ->
  peekBoolUtil  a2'>>= \a2'' -> 
  return (a2'')
{-# LINE 80 ".\\HGamer3D\\Bindings\\Ogre\\ClassBone.chs" #-}

{- function needUpdate -}
needUpdate :: HG3DClass -> Bool -> IO ()
needUpdate a1 a2 =
  withHG3DClass a1 $ \a1' -> 
  let {a2' = fromBool a2} in 
  needUpdate'_ a1' a2' >>= \res ->
  return ()
{-# LINE 85 ".\\HGamer3D\\Bindings\\Ogre\\ClassBone.chs" #-}


foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassBone.chs.h ogre_bn_destruct"
  delete'_ :: ((HG3DClassPtr) -> (IO ()))

foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassBone.chs.h ogre_bn_createChild"
  createChild'_ :: ((HG3DClassPtr) -> (CUShort -> ((Vec3Ptr) -> ((QuaternionPtr) -> ((HG3DClassPtr) -> (IO ()))))))

foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassBone.chs.h ogre_bn_getHandle"
  getHandle'_ :: ((HG3DClassPtr) -> ((Ptr CUShort) -> (IO ())))

foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassBone.chs.h ogre_bn_setBindingPose"
  setBindingPose'_ :: ((HG3DClassPtr) -> (IO ()))

foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassBone.chs.h ogre_bn_reset"
  reset'_ :: ((HG3DClassPtr) -> (IO ()))

foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassBone.chs.h ogre_bn_setManuallyControlled"
  setManuallyControlled'_ :: ((HG3DClassPtr) -> (CInt -> (IO ())))

foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassBone.chs.h ogre_bn_isManuallyControlled"
  isManuallyControlled'_ :: ((HG3DClassPtr) -> ((Ptr CInt) -> (IO ())))

foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassBone.chs.h ogre_bn_needUpdate"
  needUpdate'_ :: ((HG3DClassPtr) -> (CInt -> (IO ())))