-- 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\\ClassManualObjectSection.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. -- -- ClassManualObjectSection.chs -- module HGamer3D.Bindings.Ogre.ClassManualObjectSection 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\\ClassManualObjectSection.chs" #-} import HGamer3D.Bindings.Ogre.ClassPtr {-# LINE 41 ".\\HGamer3D\\Bindings\\Ogre\\ClassManualObjectSection.chs" #-} import HGamer3D.Bindings.Ogre.StructHG3DClass {-# LINE 42 ".\\HGamer3D\\Bindings\\Ogre\\ClassManualObjectSection.chs" #-} import HGamer3D.Bindings.Ogre.EnumRenderOperationOperationType {-# LINE 43 ".\\HGamer3D\\Bindings\\Ogre\\ClassManualObjectSection.chs" #-} import HGamer3D.Bindings.Ogre.StructSharedPtr {-# LINE 44 ".\\HGamer3D\\Bindings\\Ogre\\ClassManualObjectSection.chs" #-} -- | new :: HG3DClass -- ^ parent -> String -- ^ materialName -> EnumRenderOperationOperationType -- ^ opType -> String -- ^ groupName -> IO (HG3DClass) -- ^ new a1 a2 a3 a4 = withHG3DClass a1 $ \a1' -> withCString a2 $ \a2' -> let {a3' = cIntFromEnum a3} in withCString a4 $ \a4' -> alloca $ \a5' -> new'_ a1' a2' a3' a4' a5' >>= \res -> peek a5'>>= \a5'' -> return (a5'') {-# LINE 53 ".\\HGamer3D\\Bindings\\Ogre\\ClassManualObjectSection.chs" #-} -- | delete :: HG3DClass -- ^ classpointer - pointer of Class instance which is going to be deleted. -> IO () -- ^ delete a1 = withHG3DClass a1 $ \a1' -> delete'_ a1' >>= \res -> return () {-# LINE 57 ".\\HGamer3D\\Bindings\\Ogre\\ClassManualObjectSection.chs" #-} -- | Retrieve the material name in use. getMaterialName :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO (String) -- ^ getMaterialName a1 = withHG3DClass a1 $ \a1' -> alloc64k $ \a2' -> getMaterialName'_ a1' a2' >>= \res -> peekCString a2'>>= \a2'' -> return (a2'') {-# LINE 62 ".\\HGamer3D\\Bindings\\Ogre\\ClassManualObjectSection.chs" #-} -- | Retrieve the material group in use. getMaterialGroup :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO (String) -- ^ getMaterialGroup a1 = withHG3DClass a1 $ \a1' -> alloc64k $ \a2' -> getMaterialGroup'_ a1' a2' >>= \res -> peekCString a2'>>= \a2'' -> return (a2'') {-# LINE 67 ".\\HGamer3D\\Bindings\\Ogre\\ClassManualObjectSection.chs" #-} -- | update the material name in use setMaterialName :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> String -- ^ name -> String -- ^ groupName -> IO () -- ^ setMaterialName a1 a2 a3 = withHG3DClass a1 $ \a1' -> withCString a2 $ \a2' -> withCString a3 $ \a3' -> setMaterialName'_ a1' a2' a3' >>= \res -> return () {-# LINE 73 ".\\HGamer3D\\Bindings\\Ogre\\ClassManualObjectSection.chs" #-} -- | Set whether we need 32-bit indices. set32BitIndices :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> Bool -- ^ n32 -> IO () -- ^ set32BitIndices a1 a2 = withHG3DClass a1 $ \a1' -> let {a2' = fromBool a2} in set32BitIndices'_ a1' a2' >>= \res -> return () {-# LINE 78 ".\\HGamer3D\\Bindings\\Ogre\\ClassManualObjectSection.chs" #-} -- | Get whether we need 32-bit indices. get32BitIndices :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO (Bool) -- ^ get32BitIndices a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> get32BitIndices'_ a1' a2' >>= \res -> peekBoolUtil a2'>>= \a2'' -> return (a2'') {-# LINE 83 ".\\HGamer3D\\Bindings\\Ogre\\ClassManualObjectSection.chs" #-} -- | . - Details: Retrieves a weak reference to the material this renderable object uses. Note that the Renderable getMaterial :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO (SharedPtr) -- ^ getMaterial a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> getMaterial'_ a1' a2' >>= \res -> peekSharedPtr a2'>>= \a2'' -> return (a2'') {-# LINE 88 ".\\HGamer3D\\Bindings\\Ogre\\ClassManualObjectSection.chs" #-} -- | . - Details: Returns the camera-relative squared depth of this renderable. Used to sort transparent objects. Squared depth is used rather than actual depth to avoid having to perform a square root on the result. getSquaredViewDepth :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> HG3DClass -- ^ -> IO (Float) -- ^ getSquaredViewDepth a1 a2 = withHG3DClass a1 $ \a1' -> withHG3DClass a2 $ \a2' -> alloca $ \a3' -> getSquaredViewDepth'_ a1' a2' a3' >>= \res -> peekFloatConv a3'>>= \a3'' -> return (a3'') {-# LINE 94 ".\\HGamer3D\\Bindings\\Ogre\\ClassManualObjectSection.chs" #-} foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassManualObjectSection.chs.h ogre_mnos_construct" new'_ :: ((HG3DClassPtr) -> ((Ptr CChar) -> (CInt -> ((Ptr CChar) -> ((HG3DClassPtr) -> (IO ())))))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassManualObjectSection.chs.h ogre_mnos_destruct" delete'_ :: ((HG3DClassPtr) -> (IO ())) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassManualObjectSection.chs.h ogre_mnos_getMaterialName" getMaterialName'_ :: ((HG3DClassPtr) -> ((Ptr CChar) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassManualObjectSection.chs.h ogre_mnos_getMaterialGroup" getMaterialGroup'_ :: ((HG3DClassPtr) -> ((Ptr CChar) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassManualObjectSection.chs.h ogre_mnos_setMaterialName" setMaterialName'_ :: ((HG3DClassPtr) -> ((Ptr CChar) -> ((Ptr CChar) -> (IO ())))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassManualObjectSection.chs.h ogre_mnos_set32BitIndices" set32BitIndices'_ :: ((HG3DClassPtr) -> (CInt -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassManualObjectSection.chs.h ogre_mnos_get32BitIndices" get32BitIndices'_ :: ((HG3DClassPtr) -> ((Ptr CInt) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassManualObjectSection.chs.h ogre_mnos_getMaterial" getMaterial'_ :: ((HG3DClassPtr) -> ((SharedPtrPtr) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassManualObjectSection.chs.h ogre_mnos_getSquaredViewDepth" getSquaredViewDepth'_ :: ((HG3DClassPtr) -> ((HG3DClassPtr) -> ((Ptr CFloat) -> (IO ()))))