-- 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\\ClassBillboardChain.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. -- -- ClassBillboardChain.chs -- module HGamer3D.Bindings.Ogre.ClassBillboardChain where import C2HS import Foreign import Foreign.Ptr import Foreign.C import Monad (liftM, liftM2) import HGamer3D.Data.HG3DClass import HGamer3D.Data.Vector import HGamer3D.Data.Colour import HGamer3D.Data.Angle import HGamer3D.Bindings.Ogre.Utils {-# LINE 42 ".\\HGamer3D\\Bindings\\Ogre\\ClassBillboardChain.chs" #-} import HGamer3D.Bindings.Ogre.ClassPtr {-# LINE 43 ".\\HGamer3D\\Bindings\\Ogre\\ClassBillboardChain.chs" #-} import HGamer3D.Bindings.Ogre.StructHG3DClass {-# LINE 44 ".\\HGamer3D\\Bindings\\Ogre\\ClassBillboardChain.chs" #-} import HGamer3D.Bindings.Ogre.EnumBillboardChainTexCoordDirection {-# LINE 45 ".\\HGamer3D\\Bindings\\Ogre\\ClassBillboardChain.chs" #-} import HGamer3D.Bindings.Ogre.StructSharedPtr {-# LINE 46 ".\\HGamer3D\\Bindings\\Ogre\\ClassBillboardChain.chs" #-} -- | destructor delete :: HG3DClass -- ^ classpointer - pointer of Class instance which is going to be deleted. -> IO () -- ^ delete a1 = withHG3DClass a1 $ \a1' -> delete'_ a1' >>= \res -> return () {-# LINE 51 ".\\HGamer3D\\Bindings\\Ogre\\ClassBillboardChain.chs" #-} -- | Set the maximum number of chain elements per chain setMaxChainElements :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> Int -- ^ maxElements -> IO () -- ^ setMaxChainElements a1 a2 = withHG3DClass a1 $ \a1' -> let {a2' = fromIntegral a2} in setMaxChainElements'_ a1' a2' >>= \res -> return () {-# LINE 56 ".\\HGamer3D\\Bindings\\Ogre\\ClassBillboardChain.chs" #-} -- | Get the maximum number of chain elements per chain getMaxChainElements :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO (Int) -- ^ getMaxChainElements a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> getMaxChainElements'_ a1' a2' >>= \res -> peekIntConv a2'>>= \a2'' -> return (a2'') {-# LINE 61 ".\\HGamer3D\\Bindings\\Ogre\\ClassBillboardChain.chs" #-} -- | Set the number of chain segments (this class can render multiple chains at once using the same material). setNumberOfChains :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> Int -- ^ numChains -> IO () -- ^ setNumberOfChains a1 a2 = withHG3DClass a1 $ \a1' -> let {a2' = fromIntegral a2} in setNumberOfChains'_ a1' a2' >>= \res -> return () {-# LINE 66 ".\\HGamer3D\\Bindings\\Ogre\\ClassBillboardChain.chs" #-} -- | Get the number of chain segments (this class can render multiple chains at once using the same material). getNumberOfChains :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO (Int) -- ^ getNumberOfChains a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> getNumberOfChains'_ a1' a2' >>= \res -> peekIntConv a2'>>= \a2'' -> return (a2'') {-# LINE 71 ".\\HGamer3D\\Bindings\\Ogre\\ClassBillboardChain.chs" #-} -- | Sets whether texture coordinate information should be included in the final buffers generated. You must use either texture coordinates or vertex colour since the vertices have no normals and without one of these there is no source of colour for the vertices. setUseTextureCoords :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> Bool -- ^ use -> IO () -- ^ setUseTextureCoords a1 a2 = withHG3DClass a1 $ \a1' -> let {a2' = fromBool a2} in setUseTextureCoords'_ a1' a2' >>= \res -> return () {-# LINE 76 ".\\HGamer3D\\Bindings\\Ogre\\ClassBillboardChain.chs" #-} -- | Gets whether texture coordinate information should be included in the final buffers generated. getUseTextureCoords :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO (Bool) -- ^ getUseTextureCoords a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> getUseTextureCoords'_ a1' a2' >>= \res -> peekBoolUtil a2'>>= \a2'' -> return (a2'') {-# LINE 81 ".\\HGamer3D\\Bindings\\Ogre\\ClassBillboardChain.chs" #-} -- | Sets the direction in which texture coords specified on each element are deemed to run along the length of the chain. setTextureCoordDirection :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> EnumBillboardChainTexCoordDirection -- ^ dir - The direction, default is TCD_U. -> IO () -- ^ setTextureCoordDirection a1 a2 = withHG3DClass a1 $ \a1' -> let {a2' = cIntFromEnum a2} in setTextureCoordDirection'_ a1' a2' >>= \res -> return () {-# LINE 86 ".\\HGamer3D\\Bindings\\Ogre\\ClassBillboardChain.chs" #-} -- | Gets the direction in which texture coords specified on each element are deemed to run. getTextureCoordDirection :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO (EnumBillboardChainTexCoordDirection) -- ^ getTextureCoordDirection a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> getTextureCoordDirection'_ a1' a2' >>= \res -> peekEnumUtil a2'>>= \a2'' -> return (a2'') {-# LINE 91 ".\\HGamer3D\\Bindings\\Ogre\\ClassBillboardChain.chs" #-} -- | Set the range of the texture coordinates generated across the width of the chain elements. setOtherTextureCoordRange :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> Float -- ^ start - Start coordinate, default 0.0 -> Float -- ^ end - End coordinate, default 1.0 -> IO () -- ^ setOtherTextureCoordRange a1 a2 a3 = withHG3DClass a1 $ \a1' -> let {a2' = realToFrac a2} in let {a3' = realToFrac a3} in setOtherTextureCoordRange'_ a1' a2' a3' >>= \res -> return () {-# LINE 97 ".\\HGamer3D\\Bindings\\Ogre\\ClassBillboardChain.chs" #-} -- | Sets whether vertex colour information should be included in the final buffers generated. You must use either texture coordinates or vertex colour since the vertices have no normals and without one of these there is no source of colour for the vertices. setUseVertexColours :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> Bool -- ^ use -> IO () -- ^ setUseVertexColours a1 a2 = withHG3DClass a1 $ \a1' -> let {a2' = fromBool a2} in setUseVertexColours'_ a1' a2' >>= \res -> return () {-# LINE 102 ".\\HGamer3D\\Bindings\\Ogre\\ClassBillboardChain.chs" #-} -- | Gets whether vertex colour information should be included in the final buffers generated. getUseVertexColours :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO (Bool) -- ^ getUseVertexColours a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> getUseVertexColours'_ a1' a2' >>= \res -> peekBoolUtil a2'>>= \a2'' -> return (a2'') {-# LINE 107 ".\\HGamer3D\\Bindings\\Ogre\\ClassBillboardChain.chs" #-} -- | Sets whether or not the buffers created for this object are suitable for dynamic alteration. setDynamic :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> Bool -- ^ dyn -> IO () -- ^ setDynamic a1 a2 = withHG3DClass a1 $ \a1' -> let {a2' = fromBool a2} in setDynamic'_ a1' a2' >>= \res -> return () {-# LINE 112 ".\\HGamer3D\\Bindings\\Ogre\\ClassBillboardChain.chs" #-} -- | Gets whether or not the buffers created for this object are suitable for dynamic alteration. getDynamic :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO (Bool) -- ^ getDynamic a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> getDynamic'_ a1' a2' >>= \res -> peekBoolUtil a2'>>= \a2'' -> return (a2'') {-# LINE 117 ".\\HGamer3D\\Bindings\\Ogre\\ClassBillboardChain.chs" #-} -- | Remove an element from the 'tail' of a chain. removeChainElement :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> Int -- ^ chainIndex - The index of the chain -> IO () -- ^ removeChainElement a1 a2 = withHG3DClass a1 $ \a1' -> let {a2' = fromIntegral a2} in removeChainElement'_ a1' a2' >>= \res -> return () {-# LINE 122 ".\\HGamer3D\\Bindings\\Ogre\\ClassBillboardChain.chs" #-} -- | Returns the number of chain elements. getNumChainElements :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> Int -- ^ chainIndex -> IO (Int) -- ^ getNumChainElements a1 a2 = withHG3DClass a1 $ \a1' -> let {a2' = fromIntegral a2} in alloca $ \a3' -> getNumChainElements'_ a1' a2' a3' >>= \res -> peekIntConv a3'>>= \a3'' -> return (a3'') {-# LINE 128 ".\\HGamer3D\\Bindings\\Ogre\\ClassBillboardChain.chs" #-} -- | Remove all elements of a given chain (but leave the chain intact). clearChain :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> Int -- ^ chainIndex -> IO () -- ^ clearChain a1 a2 = withHG3DClass a1 $ \a1' -> let {a2' = fromIntegral a2} in clearChain'_ a1' a2' >>= \res -> return () {-# LINE 133 ".\\HGamer3D\\Bindings\\Ogre\\ClassBillboardChain.chs" #-} -- | Remove all elements from all chains (but leave the chains themselves intact). clearAllChains :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO () -- ^ clearAllChains a1 = withHG3DClass a1 $ \a1' -> clearAllChains'_ a1' >>= \res -> return () {-# LINE 137 ".\\HGamer3D\\Bindings\\Ogre\\ClassBillboardChain.chs" #-} -- | Get 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 142 ".\\HGamer3D\\Bindings\\Ogre\\ClassBillboardChain.chs" #-} -- | Set the material name to use for rendering. 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 148 ".\\HGamer3D\\Bindings\\Ogre\\ClassBillboardChain.chs" #-} -- | 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 -- ^ cam -> IO (Float) -- ^ getSquaredViewDepth a1 a2 = withHG3DClass a1 $ \a1' -> withHG3DClass a2 $ \a2' -> alloca $ \a3' -> getSquaredViewDepth'_ a1' a2' a3' >>= \res -> peekFloatConv a3'>>= \a3'' -> return (a3'') {-# LINE 154 ".\\HGamer3D\\Bindings\\Ogre\\ClassBillboardChain.chs" #-} -- | Retrieves the radius of the origin-centered bounding sphere for this object. getBoundingRadius :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO (Float) -- ^ getBoundingRadius a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> getBoundingRadius'_ a1' a2' >>= \res -> peekFloatConv a2'>>= \a2'' -> return (a2'') {-# LINE 159 ".\\HGamer3D\\Bindings\\Ogre\\ClassBillboardChain.chs" #-} -- | 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 164 ".\\HGamer3D\\Bindings\\Ogre\\ClassBillboardChain.chs" #-} -- | Returns the type name of this object. getMovableType :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO (String) -- ^ getMovableType a1 = withHG3DClass a1 $ \a1' -> alloc64k $ \a2' -> getMovableType'_ a1' a2' >>= \res -> peekCString a2'>>= \a2'' -> return (a2'') {-# LINE 169 ".\\HGamer3D\\Bindings\\Ogre\\ClassBillboardChain.chs" #-} foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassBillboardChain.chs.h ogre_bbdc_destruct" delete'_ :: ((HG3DClassPtr) -> (IO ())) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassBillboardChain.chs.h ogre_bbdc_setMaxChainElements" setMaxChainElements'_ :: ((HG3DClassPtr) -> (CInt -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassBillboardChain.chs.h ogre_bbdc_getMaxChainElements" getMaxChainElements'_ :: ((HG3DClassPtr) -> ((Ptr CInt) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassBillboardChain.chs.h ogre_bbdc_setNumberOfChains" setNumberOfChains'_ :: ((HG3DClassPtr) -> (CInt -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassBillboardChain.chs.h ogre_bbdc_getNumberOfChains" getNumberOfChains'_ :: ((HG3DClassPtr) -> ((Ptr CInt) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassBillboardChain.chs.h ogre_bbdc_setUseTextureCoords" setUseTextureCoords'_ :: ((HG3DClassPtr) -> (CInt -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassBillboardChain.chs.h ogre_bbdc_getUseTextureCoords" getUseTextureCoords'_ :: ((HG3DClassPtr) -> ((Ptr CInt) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassBillboardChain.chs.h ogre_bbdc_setTextureCoordDirection" setTextureCoordDirection'_ :: ((HG3DClassPtr) -> (CInt -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassBillboardChain.chs.h ogre_bbdc_getTextureCoordDirection" getTextureCoordDirection'_ :: ((HG3DClassPtr) -> ((Ptr CInt) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassBillboardChain.chs.h ogre_bbdc_setOtherTextureCoordRange" setOtherTextureCoordRange'_ :: ((HG3DClassPtr) -> (CFloat -> (CFloat -> (IO ())))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassBillboardChain.chs.h ogre_bbdc_setUseVertexColours" setUseVertexColours'_ :: ((HG3DClassPtr) -> (CInt -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassBillboardChain.chs.h ogre_bbdc_getUseVertexColours" getUseVertexColours'_ :: ((HG3DClassPtr) -> ((Ptr CInt) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassBillboardChain.chs.h ogre_bbdc_setDynamic" setDynamic'_ :: ((HG3DClassPtr) -> (CInt -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassBillboardChain.chs.h ogre_bbdc_getDynamic" getDynamic'_ :: ((HG3DClassPtr) -> ((Ptr CInt) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassBillboardChain.chs.h ogre_bbdc_removeChainElement" removeChainElement'_ :: ((HG3DClassPtr) -> (CInt -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassBillboardChain.chs.h ogre_bbdc_getNumChainElements" getNumChainElements'_ :: ((HG3DClassPtr) -> (CInt -> ((Ptr CInt) -> (IO ())))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassBillboardChain.chs.h ogre_bbdc_clearChain" clearChain'_ :: ((HG3DClassPtr) -> (CInt -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassBillboardChain.chs.h ogre_bbdc_clearAllChains" clearAllChains'_ :: ((HG3DClassPtr) -> (IO ())) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassBillboardChain.chs.h ogre_bbdc_getMaterialName" getMaterialName'_ :: ((HG3DClassPtr) -> ((Ptr CChar) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassBillboardChain.chs.h ogre_bbdc_setMaterialName" setMaterialName'_ :: ((HG3DClassPtr) -> ((Ptr CChar) -> ((Ptr CChar) -> (IO ())))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassBillboardChain.chs.h ogre_bbdc_getSquaredViewDepth" getSquaredViewDepth'_ :: ((HG3DClassPtr) -> ((HG3DClassPtr) -> ((Ptr CFloat) -> (IO ())))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassBillboardChain.chs.h ogre_bbdc_getBoundingRadius" getBoundingRadius'_ :: ((HG3DClassPtr) -> ((Ptr CFloat) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassBillboardChain.chs.h ogre_bbdc_getMaterial" getMaterial'_ :: ((HG3DClassPtr) -> ((SharedPtrPtr) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassBillboardChain.chs.h ogre_bbdc_getMovableType" getMovableType'_ :: ((HG3DClassPtr) -> ((Ptr CChar) -> (IO ())))