-- 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 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\\ClassBillboardChain.chs" #-} import HGamer3D.Bindings.Ogre.ClassPtr {-# LINE 41 ".\\HGamer3D\\Bindings\\Ogre\\ClassBillboardChain.chs" #-} import HGamer3D.Bindings.Ogre.StructHG3DClass {-# LINE 42 ".\\HGamer3D\\Bindings\\Ogre\\ClassBillboardChain.chs" #-} import HGamer3D.Bindings.Ogre.EnumBillboardChainTexCoordDirection {-# LINE 43 ".\\HGamer3D\\Bindings\\Ogre\\ClassBillboardChain.chs" #-} import HGamer3D.Bindings.Ogre.StructVec3 {-# LINE 44 ".\\HGamer3D\\Bindings\\Ogre\\ClassBillboardChain.chs" #-} import HGamer3D.Bindings.Ogre.StructSharedPtr {-# LINE 45 ".\\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 50 ".\\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 55 ".\\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 60 ".\\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 65 ".\\HGamer3D\\Bindings\\Ogre\\ClassBillboardChain.chs" #-} -- | Get the number of chain segments (this class can render multiple chains -- 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 70 ".\\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 75 ".\\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 80 ".\\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 85 ".\\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 90 ".\\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 96 ".\\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 101 ".\\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 106 ".\\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 111 ".\\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 116 ".\\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 121 ".\\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 127 ".\\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 132 ".\\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 136 ".\\HGamer3D\\Bindings\\Ogre\\ClassBillboardChain.chs" #-} -- | Sets whether the billboard should always be facing the camera or a custom direction --set by each point element. --Billboards facing the camera are useful for smoke trails, light beams, etc by simulating a cylinder. However, because of this property, wide trails can cause several artefacts unless the head is properly covered. Therefore, non-camera-facing billboards are much more convenient for leaving big trails of movement from thin objects, for example a sword swing as seen in many fighting games. setFaceCamera :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> Bool -- ^ faceCamera - True to be always facing the camera (Default value: True) -> Vec3 -- ^ normalVector - Only used when faceCamera == false. Must be a non-zero vector. This vector is the "point of reference" for each point orientation. For example, if normalVector is Vector3::UNIT_Z, and the point's orientation is an identity matrix, the segment corresponding to that point will be facing towards UNIT_Z This vector is internally normalized. -> IO () -- ^ setFaceCamera a1 a2 a3 = withHG3DClass a1 $ \a1' -> let {a2' = fromBool a2} in withVec3 a3 $ \a3' -> setFaceCamera'_ a1' a2' a3' >>= \res -> return () {-# LINE 142 ".\\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 147 ".\\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 153 ".\\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 159 ".\\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 164 ".\\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 169 ".\\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 174 ".\\HGamer3D\\Bindings\\Ogre\\ClassBillboardChain.chs" #-} -- | Called just prior to the Renderable being rendered. --OGRE is a queued renderer, so the actual render commands are executed at a later time than the point at which an object is discovered to be visible. This allows ordering & grouping of renders without the discovery process having to be aware of it. It also means OGRE uses declarative render information rather than immediate mode rendering - this is very useful in that certain effects and processes can automatically be applied to a wide range of scenes, but the downside is that special cases are more difficult to handle, because there is not the declared state to cope with it. This method allows a RenderableRenderableRenderable preRender :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> HG3DClass -- ^ sm -> HG3DClass -- ^ rsys -> IO (Bool) -- ^ return value - true if the automatic render should proceed, false to skip it on the assumption that the preRender a1 a2 a3 = withHG3DClass a1 $ \a1' -> withHG3DClass a2 $ \a2' -> withHG3DClass a3 $ \a3' -> alloca $ \a4' -> preRender'_ a1' a2' a3' a4' >>= \res -> peekBoolUtil a4'>>= \a4'' -> return (a4'') {-# LINE 181 ".\\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_setFaceCamera" setFaceCamera'_ :: ((HG3DClassPtr) -> (CInt -> ((Vec3Ptr) -> (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 ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassBillboardChain.chs.h ogre_bbdc_preRender" preRender'_ :: ((HG3DClassPtr) -> ((HG3DClassPtr) -> ((HG3DClassPtr) -> ((Ptr CInt) -> (IO ())))))