-- 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\\ClassLight.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. -- -- ClassLight.chs -- module HGamer3D.Bindings.Ogre.ClassLight 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\\ClassLight.chs" #-} import HGamer3D.Bindings.Ogre.ClassPtr {-# LINE 43 ".\\HGamer3D\\Bindings\\Ogre\\ClassLight.chs" #-} import HGamer3D.Bindings.Ogre.StructHG3DClass {-# LINE 44 ".\\HGamer3D\\Bindings\\Ogre\\ClassLight.chs" #-} import HGamer3D.Bindings.Ogre.EnumLightType {-# LINE 45 ".\\HGamer3D\\Bindings\\Ogre\\ClassLight.chs" #-} import HGamer3D.Bindings.Ogre.StructColour {-# LINE 46 ".\\HGamer3D\\Bindings\\Ogre\\ClassLight.chs" #-} import HGamer3D.Bindings.Ogre.StructVec3 {-# LINE 47 ".\\HGamer3D\\Bindings\\Ogre\\ClassLight.chs" #-} import HGamer3D.Bindings.Ogre.StructRadians {-# LINE 48 ".\\HGamer3D\\Bindings\\Ogre\\ClassLight.chs" #-} -- | Normal constructor. Should not be called directly, but rather the SceneManager::createLight new :: String -- ^ name -> IO (HG3DClass) -- ^ new a1 = withCString a1 $ \a1' -> alloca $ \a2' -> new'_ a1' a2' >>= \res -> peek a2'>>= \a2'' -> return (a2'') {-# LINE 54 ".\\HGamer3D\\Bindings\\Ogre\\ClassLight.chs" #-} -- | Standard 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 58 ".\\HGamer3D\\Bindings\\Ogre\\ClassLight.chs" #-} -- | Sets the type of light - see LightTypes for more info. setType :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> EnumLightType -- ^ type -> IO () -- ^ setType a1 a2 = withHG3DClass a1 $ \a1' -> let {a2' = cIntFromEnum a2} in setType'_ a1' a2' >>= \res -> return () {-# LINE 63 ".\\HGamer3D\\Bindings\\Ogre\\ClassLight.chs" #-} -- | Returns the light type. getType :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO (EnumLightType) -- ^ getType a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> getType'_ a1' a2' >>= \res -> peekEnumUtil a2'>>= \a2'' -> return (a2'') {-# LINE 68 ".\\HGamer3D\\Bindings\\Ogre\\ClassLight.chs" #-} -- | Sets the colour of the diffuse light given off by this source. MaterialDiffuse light simulates the typical light emanating from light sources and affects the base colour of objects together with ambient light. setDiffuseColour :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> Float -- ^ red -> Float -- ^ green -> Float -- ^ blue -> IO () -- ^ setDiffuseColour a1 a2 a3 a4 = withHG3DClass a1 $ \a1' -> let {a2' = realToFrac a2} in let {a3' = realToFrac a3} in let {a4' = realToFrac a4} in setDiffuseColour'_ a1' a2' a3' a4' >>= \res -> return () {-# LINE 75 ".\\HGamer3D\\Bindings\\Ogre\\ClassLight.chs" #-} -- | Sets the colour of the diffuse light given off by this source. MaterialDiffuse light simulates the typical light emanating from light sources and affects the base colour of objects together with ambient light. setDiffuseColour2 :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> Colour -- ^ colour -> IO () -- ^ setDiffuseColour2 a1 a2 = withHG3DClass a1 $ \a1' -> withColour a2 $ \a2' -> setDiffuseColour2'_ a1' a2' >>= \res -> return () {-# LINE 80 ".\\HGamer3D\\Bindings\\Ogre\\ClassLight.chs" #-} -- | Returns the colour of the diffuse light given off by this light source (see setDiffuseColour for more info). getDiffuseColour :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO (Colour) -- ^ getDiffuseColour a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> getDiffuseColour'_ a1' a2' >>= \res -> peekColour a2'>>= \a2'' -> return (a2'') {-# LINE 85 ".\\HGamer3D\\Bindings\\Ogre\\ClassLight.chs" #-} -- | Sets the colour of the specular light given off by this source. MaterialSpecular light affects the appearance of shiny highlights on objects, and is also dependent on the 'shininess' Material setSpecularColour :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> Float -- ^ red -> Float -- ^ green -> Float -- ^ blue -> IO () -- ^ setSpecularColour a1 a2 a3 a4 = withHG3DClass a1 $ \a1' -> let {a2' = realToFrac a2} in let {a3' = realToFrac a3} in let {a4' = realToFrac a4} in setSpecularColour'_ a1' a2' a3' a4' >>= \res -> return () {-# LINE 92 ".\\HGamer3D\\Bindings\\Ogre\\ClassLight.chs" #-} -- | Sets the colour of the specular light given off by this source. MaterialSpecular light affects the appearance of shiny highlights on objects, and is also dependent on the 'shininess' Material setSpecularColour2 :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> Colour -- ^ colour -> IO () -- ^ setSpecularColour2 a1 a2 = withHG3DClass a1 $ \a1' -> withColour a2 $ \a2' -> setSpecularColour2'_ a1' a2' >>= \res -> return () {-# LINE 97 ".\\HGamer3D\\Bindings\\Ogre\\ClassLight.chs" #-} -- | Returns the colour of specular light given off by this light source. getSpecularColour :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO (Colour) -- ^ getSpecularColour a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> getSpecularColour'_ a1' a2' >>= \res -> peekColour a2'>>= \a2'' -> return (a2'') {-# LINE 102 ".\\HGamer3D\\Bindings\\Ogre\\ClassLight.chs" #-} -- | Sets the attenuation parameters of the light source i.e. how it diminishes with distance. Lights normally get fainter the further they are away. Also, each light is given a maximum range beyond which it cannot affect any objects. LightThis follows a standard attenuation approach - see any good 3D text for the details of what they mean since i don't have room here! setAttenuation :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> Float -- ^ range - The absolute upper range of the light in world units -> Float -- ^ constant - The constant factor in the attenuation formula: 1.0 means never attenuate, 0.0 is complete attenuation -> Float -- ^ linear - The linear factor in the attenuation formula: 1 means attenuate evenly over the distance -> Float -- ^ quadratic - The quadratic factor in the attenuation formula: adds a curvature to the attenuation formula. -> IO () -- ^ setAttenuation a1 a2 a3 a4 a5 = withHG3DClass a1 $ \a1' -> let {a2' = realToFrac a2} in let {a3' = realToFrac a3} in let {a4' = realToFrac a4} in let {a5' = realToFrac a5} in setAttenuation'_ a1' a2' a3' a4' a5' >>= \res -> return () {-# LINE 110 ".\\HGamer3D\\Bindings\\Ogre\\ClassLight.chs" #-} -- | Returns the absolute upper range of the light. getAttenuationRange :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO (Float) -- ^ getAttenuationRange a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> getAttenuationRange'_ a1' a2' >>= \res -> peekFloatConv a2'>>= \a2'' -> return (a2'') {-# LINE 115 ".\\HGamer3D\\Bindings\\Ogre\\ClassLight.chs" #-} -- | Returns the constant factor in the attenuation formula. getAttenuationConstant :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO (Float) -- ^ getAttenuationConstant a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> getAttenuationConstant'_ a1' a2' >>= \res -> peekFloatConv a2'>>= \a2'' -> return (a2'') {-# LINE 120 ".\\HGamer3D\\Bindings\\Ogre\\ClassLight.chs" #-} -- | Returns the linear factor in the attenuation formula. getAttenuationLinear :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO (Float) -- ^ getAttenuationLinear a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> getAttenuationLinear'_ a1' a2' >>= \res -> peekFloatConv a2'>>= \a2'' -> return (a2'') {-# LINE 125 ".\\HGamer3D\\Bindings\\Ogre\\ClassLight.chs" #-} -- | Returns the quadric factor in the attenuation formula. getAttenuationQuadric :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO (Float) -- ^ getAttenuationQuadric a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> getAttenuationQuadric'_ a1' a2' >>= \res -> peekFloatConv a2'>>= \a2'' -> return (a2'') {-# LINE 130 ".\\HGamer3D\\Bindings\\Ogre\\ClassLight.chs" #-} -- | Sets the position of the light. Applicable to point lights and spotlights only. This will be overridden if the light is attached to a SceneNode setPosition :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> Float -- ^ x -> Float -- ^ y -> Float -- ^ z -> IO () -- ^ setPosition a1 a2 a3 a4 = withHG3DClass a1 $ \a1' -> let {a2' = realToFrac a2} in let {a3' = realToFrac a3} in let {a4' = realToFrac a4} in setPosition'_ a1' a2' a3' a4' >>= \res -> return () {-# LINE 137 ".\\HGamer3D\\Bindings\\Ogre\\ClassLight.chs" #-} -- | Sets the position of the light. Applicable to point lights and spotlights only. This will be overridden if the light is attached to a SceneNode setPosition2 :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> Vec3 -- ^ vec -> IO () -- ^ setPosition2 a1 a2 = withHG3DClass a1 $ \a1' -> withVec3 a2 $ \a2' -> setPosition2'_ a1' a2' >>= \res -> return () {-# LINE 142 ".\\HGamer3D\\Bindings\\Ogre\\ClassLight.chs" #-} -- | Returns the position of the light. Applicable to point lights and spotlights only. getPosition :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO (Vec3) -- ^ getPosition a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> getPosition'_ a1' a2' >>= \res -> peekVec3 a2'>>= \a2'' -> return (a2'') {-# LINE 147 ".\\HGamer3D\\Bindings\\Ogre\\ClassLight.chs" #-} -- | Sets the direction in which a light points. Applicable only to the spotlight and directional light types. This will be overridden if the light is attached to a SceneNode setDirection :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> Float -- ^ x -> Float -- ^ y -> Float -- ^ z -> IO () -- ^ setDirection a1 a2 a3 a4 = withHG3DClass a1 $ \a1' -> let {a2' = realToFrac a2} in let {a3' = realToFrac a3} in let {a4' = realToFrac a4} in setDirection'_ a1' a2' a3' a4' >>= \res -> return () {-# LINE 154 ".\\HGamer3D\\Bindings\\Ogre\\ClassLight.chs" #-} -- | Sets the direction in which a light points. Applicable only to the spotlight and directional light types. This will be overridden if the light is attached to a SceneNode setDirection2 :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> Vec3 -- ^ vec -> IO () -- ^ setDirection2 a1 a2 = withHG3DClass a1 $ \a1' -> withVec3 a2 $ \a2' -> setDirection2'_ a1' a2' >>= \res -> return () {-# LINE 159 ".\\HGamer3D\\Bindings\\Ogre\\ClassLight.chs" #-} -- | Returns the light's direction. Applicable only to the spotlight and directional light types. getDirection :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO (Vec3) -- ^ getDirection a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> getDirection'_ a1' a2' >>= \res -> peekVec3 a2'>>= \a2'' -> return (a2'') {-# LINE 164 ".\\HGamer3D\\Bindings\\Ogre\\ClassLight.chs" #-} -- | Sets the range of a spotlight, i.e. the angle of the inner and outer cones and the rate of falloff between them. setSpotlightRange :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> Radians -- ^ innerAngle - Angle covered by the bright inner cone The inner cone applicable only to Direct3D, it'll always treat as zero in OpenGL. -> Radians -- ^ outerAngle - Angle covered by the outer cone -> Float -- ^ falloff - The rate of falloff between the inner and outer cones. 1.0 means a linear falloff, less means slower falloff, higher means faster falloff. -> IO () -- ^ setSpotlightRange a1 a2 a3 a4 = withHG3DClass a1 $ \a1' -> withRadians a2 $ \a2' -> withRadians a3 $ \a3' -> let {a4' = realToFrac a4} in setSpotlightRange'_ a1' a2' a3' a4' >>= \res -> return () {-# LINE 171 ".\\HGamer3D\\Bindings\\Ogre\\ClassLight.chs" #-} -- | Returns the angle covered by the spotlights inner cone. getSpotlightInnerAngle :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO (Radians) -- ^ getSpotlightInnerAngle a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> getSpotlightInnerAngle'_ a1' a2' >>= \res -> peekRadians a2'>>= \a2'' -> return (a2'') {-# LINE 176 ".\\HGamer3D\\Bindings\\Ogre\\ClassLight.chs" #-} -- | Returns the angle covered by the spotlights outer cone. getSpotlightOuterAngle :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO (Radians) -- ^ getSpotlightOuterAngle a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> getSpotlightOuterAngle'_ a1' a2' >>= \res -> peekRadians a2'>>= \a2'' -> return (a2'') {-# LINE 181 ".\\HGamer3D\\Bindings\\Ogre\\ClassLight.chs" #-} -- | Returns the falloff between the inner and outer cones of the spotlight. getSpotlightFalloff :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO (Float) -- ^ getSpotlightFalloff a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> getSpotlightFalloff'_ a1' a2' >>= \res -> peekFloatConv a2'>>= \a2'' -> return (a2'') {-# LINE 186 ".\\HGamer3D\\Bindings\\Ogre\\ClassLight.chs" #-} -- | Sets the angle covered by the spotlights inner cone. setSpotlightInnerAngle :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> Radians -- ^ val -> IO () -- ^ setSpotlightInnerAngle a1 a2 = withHG3DClass a1 $ \a1' -> withRadians a2 $ \a2' -> setSpotlightInnerAngle'_ a1' a2' >>= \res -> return () {-# LINE 191 ".\\HGamer3D\\Bindings\\Ogre\\ClassLight.chs" #-} -- | Sets the angle covered by the spotlights outer cone. setSpotlightOuterAngle :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> Radians -- ^ val -> IO () -- ^ setSpotlightOuterAngle a1 a2 = withHG3DClass a1 $ \a1' -> withRadians a2 $ \a2' -> setSpotlightOuterAngle'_ a1' a2' >>= \res -> return () {-# LINE 196 ".\\HGamer3D\\Bindings\\Ogre\\ClassLight.chs" #-} -- | Sets the falloff between the inner and outer cones of the spotlight. setSpotlightFalloff :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> Float -- ^ val -> IO () -- ^ setSpotlightFalloff a1 a2 = withHG3DClass a1 $ \a1' -> let {a2' = realToFrac a2} in setSpotlightFalloff'_ a1' a2' >>= \res -> return () {-# LINE 201 ".\\HGamer3D\\Bindings\\Ogre\\ClassLight.chs" #-} -- | Set a scaling factor to indicate the relative power of a light. This factor is only useful in High Dynamic Range (HDR) rendering. You can bind it to a shader variable to take it into account, GpuProgramParameters setPowerScale :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> Float -- ^ power - The power rating of this light, default is 1.0. -> IO () -- ^ setPowerScale a1 a2 = withHG3DClass a1 $ \a1' -> let {a2' = realToFrac a2} in setPowerScale'_ a1' a2' >>= \res -> return () {-# LINE 206 ".\\HGamer3D\\Bindings\\Ogre\\ClassLight.chs" #-} -- | Set the scaling factor which indicates the relative power of a light. getPowerScale :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO (Float) -- ^ getPowerScale a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> getPowerScale'_ a1' a2' >>= \res -> peekFloatConv a2'>>= \a2'' -> return (a2'') {-# LINE 211 ".\\HGamer3D\\Bindings\\Ogre\\ClassLight.chs" #-} -- | Overridden from MovableObject 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 216 ".\\HGamer3D\\Bindings\\Ogre\\ClassLight.chs" #-} -- | Retrieves the position of the light including any transform from nodes it is attached to. getDerivedPosition :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> Bool -- ^ cameraRelativeIfSet - If set to true, returns data in camera-relative units if that's been set up (render use) -> IO (Vec3) -- ^ getDerivedPosition a1 a2 = withHG3DClass a1 $ \a1' -> let {a2' = fromBool a2} in alloca $ \a3' -> getDerivedPosition'_ a1' a2' a3' >>= \res -> peekVec3 a3'>>= \a3'' -> return (a3'') {-# LINE 222 ".\\HGamer3D\\Bindings\\Ogre\\ClassLight.chs" #-} -- | Retrieves the direction of the light including any transform from nodes it is attached to. getDerivedDirection :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO (Vec3) -- ^ getDerivedDirection a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> getDerivedDirection'_ a1' a2' >>= \res -> peekVec3 a2'>>= \a2'' -> return (a2'') {-# LINE 227 ".\\HGamer3D\\Bindings\\Ogre\\ClassLight.chs" #-} -- | Overridden from MovableObjectAlthough lights themselves are not 'visible', setting a light to invisible means it no longer affects the scene. setVisible :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> Bool -- ^ visible -> IO () -- ^ setVisible a1 a2 = withHG3DClass a1 $ \a1' -> let {a2' = fromBool a2} in setVisible'_ a1' a2' >>= \res -> return () {-# LINE 232 ".\\HGamer3D\\Bindings\\Ogre\\ClassLight.chs" #-} -- | Overridden from MovableObject 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 237 ".\\HGamer3D\\Bindings\\Ogre\\ClassLight.chs" #-} -- | Override to return specific type flag. getTypeFlags :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO (Int) -- ^ getTypeFlags a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> getTypeFlags'_ a1' a2' >>= \res -> peekIntConv a2'>>= \a2'' -> return (a2'') {-# LINE 242 ".\\HGamer3D\\Bindings\\Ogre\\ClassLight.chs" #-} -- | Reset the shadow camera setup to the default. ShadowCameraSetup resetCustomShadowCameraSetup :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO () -- ^ resetCustomShadowCameraSetup a1 = withHG3DClass a1 $ \a1' -> resetCustomShadowCameraSetup'_ a1' >>= \res -> return () {-# LINE 246 ".\\HGamer3D\\Bindings\\Ogre\\ClassLight.chs" #-} -- | Sets the maximum distance away from the camera that shadows by this light will be visible. Shadow techniques can be expensive, therefore it is a good idea to limit them to being rendered close to the camera if possible, and to skip the expense of rendering shadows for distance objects. This method allows you to set the distance at which shadows will no longer be rendered. Each shadow technique can interpret this subtely differently. For example, one technique may use this to eliminate casters, another might use it to attenuate the shadows themselves. You should tweak this value to suit your chosen shadow technique and scene setup. setShadowFarDistance :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> Float -- ^ distance -> IO () -- ^ setShadowFarDistance a1 a2 = withHG3DClass a1 $ \a1' -> let {a2' = realToFrac a2} in setShadowFarDistance'_ a1' a2' >>= \res -> return () {-# LINE 251 ".\\HGamer3D\\Bindings\\Ogre\\ClassLight.chs" #-} -- | Tells the light to use the shadow far distance of the SceneManager resetShadowFarDistance :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO () -- ^ resetShadowFarDistance a1 = withHG3DClass a1 $ \a1' -> resetShadowFarDistance'_ a1' >>= \res -> return () {-# LINE 255 ".\\HGamer3D\\Bindings\\Ogre\\ClassLight.chs" #-} -- | Gets the maximum distance away from the camera that shadows by this light will be visible. getShadowFarDistance :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO (Float) -- ^ getShadowFarDistance a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> getShadowFarDistance'_ a1' a2' >>= \res -> peekFloatConv a2'>>= \a2'' -> return (a2'') {-# LINE 260 ".\\HGamer3D\\Bindings\\Ogre\\ClassLight.chs" #-} -- | getShadowFarDistanceSquared :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO (Float) -- ^ getShadowFarDistanceSquared a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> getShadowFarDistanceSquared'_ a1' a2' >>= \res -> peekFloatConv a2'>>= \a2'' -> return (a2'') {-# LINE 265 ".\\HGamer3D\\Bindings\\Ogre\\ClassLight.chs" #-} -- | Set the near clip plane distance to be used by the shadow camera, if this light casts texture shadows. setShadowNearClipDistance :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> Float -- ^ nearClip -> IO () -- ^ setShadowNearClipDistance a1 a2 = withHG3DClass a1 $ \a1' -> let {a2' = realToFrac a2} in setShadowNearClipDistance'_ a1' a2' >>= \res -> return () {-# LINE 270 ".\\HGamer3D\\Bindings\\Ogre\\ClassLight.chs" #-} -- | Get the near clip plane distance to be used by the shadow camera, if this light casts texture shadows. May be zero if the light doesn't have it's own near distance set; use _deriveShadowNearDistance for a version guaranteed to give a result. getShadowNearClipDistance :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO (Float) -- ^ getShadowNearClipDistance a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> getShadowNearClipDistance'_ a1' a2' >>= \res -> peekFloatConv a2'>>= \a2'' -> return (a2'') {-# LINE 275 ".\\HGamer3D\\Bindings\\Ogre\\ClassLight.chs" #-} -- | Set the far clip plane distance to be used by the shadow camera, if this light casts texture shadows. This is different from the 'shadow far distance', which is always measured from the main camera. This distance is the far clip plane of the light camera. setShadowFarClipDistance :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> Float -- ^ farClip -> IO () -- ^ setShadowFarClipDistance a1 a2 = withHG3DClass a1 $ \a1' -> let {a2' = realToFrac a2} in setShadowFarClipDistance'_ a1' a2' >>= \res -> return () {-# LINE 280 ".\\HGamer3D\\Bindings\\Ogre\\ClassLight.chs" #-} -- | Get the far clip plane distance to be used by the shadow camera, if this light casts texture shadows. May be zero if the light doesn't have it's own far distance set; use _deriveShadowfarDistance for a version guaranteed to give a result. getShadowFarClipDistance :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO (Float) -- ^ getShadowFarClipDistance a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> getShadowFarClipDistance'_ a1' a2' >>= \res -> peekFloatConv a2'>>= \a2'' -> return (a2'') {-# LINE 285 ".\\HGamer3D\\Bindings\\Ogre\\ClassLight.chs" #-} foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassLight.chs.h ogre_lgt_construct" new'_ :: ((Ptr CChar) -> ((HG3DClassPtr) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassLight.chs.h ogre_lgt_destruct" delete'_ :: ((HG3DClassPtr) -> (IO ())) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassLight.chs.h ogre_lgt_setType" setType'_ :: ((HG3DClassPtr) -> (CInt -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassLight.chs.h ogre_lgt_getType" getType'_ :: ((HG3DClassPtr) -> ((Ptr CInt) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassLight.chs.h ogre_lgt_setDiffuseColour" setDiffuseColour'_ :: ((HG3DClassPtr) -> (CFloat -> (CFloat -> (CFloat -> (IO ()))))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassLight.chs.h ogre_lgt_setDiffuseColour2" setDiffuseColour2'_ :: ((HG3DClassPtr) -> ((ColourPtr) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassLight.chs.h ogre_lgt_getDiffuseColour" getDiffuseColour'_ :: ((HG3DClassPtr) -> ((ColourPtr) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassLight.chs.h ogre_lgt_setSpecularColour" setSpecularColour'_ :: ((HG3DClassPtr) -> (CFloat -> (CFloat -> (CFloat -> (IO ()))))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassLight.chs.h ogre_lgt_setSpecularColour2" setSpecularColour2'_ :: ((HG3DClassPtr) -> ((ColourPtr) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassLight.chs.h ogre_lgt_getSpecularColour" getSpecularColour'_ :: ((HG3DClassPtr) -> ((ColourPtr) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassLight.chs.h ogre_lgt_setAttenuation" setAttenuation'_ :: ((HG3DClassPtr) -> (CFloat -> (CFloat -> (CFloat -> (CFloat -> (IO ())))))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassLight.chs.h ogre_lgt_getAttenuationRange" getAttenuationRange'_ :: ((HG3DClassPtr) -> ((Ptr CFloat) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassLight.chs.h ogre_lgt_getAttenuationConstant" getAttenuationConstant'_ :: ((HG3DClassPtr) -> ((Ptr CFloat) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassLight.chs.h ogre_lgt_getAttenuationLinear" getAttenuationLinear'_ :: ((HG3DClassPtr) -> ((Ptr CFloat) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassLight.chs.h ogre_lgt_getAttenuationQuadric" getAttenuationQuadric'_ :: ((HG3DClassPtr) -> ((Ptr CFloat) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassLight.chs.h ogre_lgt_setPosition" setPosition'_ :: ((HG3DClassPtr) -> (CFloat -> (CFloat -> (CFloat -> (IO ()))))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassLight.chs.h ogre_lgt_setPosition2" setPosition2'_ :: ((HG3DClassPtr) -> ((Vec3Ptr) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassLight.chs.h ogre_lgt_getPosition" getPosition'_ :: ((HG3DClassPtr) -> ((Vec3Ptr) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassLight.chs.h ogre_lgt_setDirection" setDirection'_ :: ((HG3DClassPtr) -> (CFloat -> (CFloat -> (CFloat -> (IO ()))))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassLight.chs.h ogre_lgt_setDirection2" setDirection2'_ :: ((HG3DClassPtr) -> ((Vec3Ptr) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassLight.chs.h ogre_lgt_getDirection" getDirection'_ :: ((HG3DClassPtr) -> ((Vec3Ptr) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassLight.chs.h ogre_lgt_setSpotlightRange" setSpotlightRange'_ :: ((HG3DClassPtr) -> ((RadiansPtr) -> ((RadiansPtr) -> (CFloat -> (IO ()))))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassLight.chs.h ogre_lgt_getSpotlightInnerAngle" getSpotlightInnerAngle'_ :: ((HG3DClassPtr) -> ((RadiansPtr) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassLight.chs.h ogre_lgt_getSpotlightOuterAngle" getSpotlightOuterAngle'_ :: ((HG3DClassPtr) -> ((RadiansPtr) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassLight.chs.h ogre_lgt_getSpotlightFalloff" getSpotlightFalloff'_ :: ((HG3DClassPtr) -> ((Ptr CFloat) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassLight.chs.h ogre_lgt_setSpotlightInnerAngle" setSpotlightInnerAngle'_ :: ((HG3DClassPtr) -> ((RadiansPtr) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassLight.chs.h ogre_lgt_setSpotlightOuterAngle" setSpotlightOuterAngle'_ :: ((HG3DClassPtr) -> ((RadiansPtr) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassLight.chs.h ogre_lgt_setSpotlightFalloff" setSpotlightFalloff'_ :: ((HG3DClassPtr) -> (CFloat -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassLight.chs.h ogre_lgt_setPowerScale" setPowerScale'_ :: ((HG3DClassPtr) -> (CFloat -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassLight.chs.h ogre_lgt_getPowerScale" getPowerScale'_ :: ((HG3DClassPtr) -> ((Ptr CFloat) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassLight.chs.h ogre_lgt_getMovableType" getMovableType'_ :: ((HG3DClassPtr) -> ((Ptr CChar) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassLight.chs.h ogre_lgt_getDerivedPosition" getDerivedPosition'_ :: ((HG3DClassPtr) -> (CInt -> ((Vec3Ptr) -> (IO ())))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassLight.chs.h ogre_lgt_getDerivedDirection" getDerivedDirection'_ :: ((HG3DClassPtr) -> ((Vec3Ptr) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassLight.chs.h ogre_lgt_setVisible" setVisible'_ :: ((HG3DClassPtr) -> (CInt -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassLight.chs.h ogre_lgt_getBoundingRadius" getBoundingRadius'_ :: ((HG3DClassPtr) -> ((Ptr CFloat) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassLight.chs.h ogre_lgt_getTypeFlags" getTypeFlags'_ :: ((HG3DClassPtr) -> ((Ptr CUInt) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassLight.chs.h ogre_lgt_resetCustomShadowCameraSetup" resetCustomShadowCameraSetup'_ :: ((HG3DClassPtr) -> (IO ())) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassLight.chs.h ogre_lgt_setShadowFarDistance" setShadowFarDistance'_ :: ((HG3DClassPtr) -> (CFloat -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassLight.chs.h ogre_lgt_resetShadowFarDistance" resetShadowFarDistance'_ :: ((HG3DClassPtr) -> (IO ())) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassLight.chs.h ogre_lgt_getShadowFarDistance" getShadowFarDistance'_ :: ((HG3DClassPtr) -> ((Ptr CFloat) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassLight.chs.h ogre_lgt_getShadowFarDistanceSquared" getShadowFarDistanceSquared'_ :: ((HG3DClassPtr) -> ((Ptr CFloat) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassLight.chs.h ogre_lgt_setShadowNearClipDistance" setShadowNearClipDistance'_ :: ((HG3DClassPtr) -> (CFloat -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassLight.chs.h ogre_lgt_getShadowNearClipDistance" getShadowNearClipDistance'_ :: ((HG3DClassPtr) -> ((Ptr CFloat) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassLight.chs.h ogre_lgt_setShadowFarClipDistance" setShadowFarClipDistance'_ :: ((HG3DClassPtr) -> (CFloat -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassLight.chs.h ogre_lgt_getShadowFarClipDistance" getShadowFarClipDistance'_ :: ((HG3DClassPtr) -> ((Ptr CFloat) -> (IO ())))