-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Haskell binding to a subset of OGRE -- -- This package contains bindings to a subset of OGRE (Object-Oriented -- Graphics Rendering Engine) (http://www.ogre3d.org/). @package hogre @version 0.0.2 -- | This module allows simple OGRE usage from Haskell. Note that you need -- OGRE and CEGUI libraries and headers. Currently, only OGRE version -- 1.7.0dev-unstable (Cthugha) has been tested. Usage for a simple scene -- creation: -- --
    --
  1. Define the settings structure OgreSettings.
  2. --
  3. Define your scene by building up an OgreScene.
  4. --
  5. call initOgre with your OgreSettings as the parameter.
  6. --
  7. add your scene using addScene.
  8. --
  9. Call renderOgre in a loop.
  10. --
  11. To ensure clean shutdown, call cleanupOgre.
  12. --
module Graphics.Ogre.Ogre data Vector3 Vector3 :: Float -> Float -> Float -> Vector3 x :: Vector3 -> Float y :: Vector3 -> Float z :: Vector3 -> Float type Angle = Float data Rotation YPR :: Angle -> Angle -> Angle -> Rotation yaw :: Rotation -> Angle pitch :: Rotation -> Angle roll :: Rotation -> Angle data Color Color :: Float -> Float -> Float -> Color r :: Color -> Float g :: Color -> Float b :: Color -> Float data TransformSpace Local :: TransformSpace Parent :: TransformSpace World :: TransformSpace data ShadowTechnique None :: ShadowTechnique -- | Note: as of 0.0.1, stencil shadows do not work when the window was -- created by SDL. StencilModulative :: ShadowTechnique StencilAdditive :: ShadowTechnique TextureModulative :: ShadowTechnique TextureAdditive :: ShadowTechnique TextureAdditiveIntegrated :: ShadowTechnique TextureModulativeIntegrated :: ShadowTechnique data Light Light :: String -> Color -> Color -> LightType -> Light lightname :: Light -> String diffuse :: Light -> Color specular :: Light -> Color lighttype :: Light -> LightType data LightType PointLight :: Vector3 -> LightType plposition :: LightType -> Vector3 DirectionalLight :: Vector3 -> LightType dldirection :: LightType -> Vector3 SpotLight :: Vector3 -> Vector3 -> (Angle, Angle) -> LightType slposition :: LightType -> Vector3 sldirection :: LightType -> Vector3 -- | Angle in radians range :: LightType -> (Angle, Angle) -- | For Plane parameters, see OGRE documentation at -- http://www.ogre3d.org/docs/api/html/classOgre_1_1Plane.html and -- Ogre::MeshManager::createPlane: -- http://www.ogre3d.org/docs/api/html/classOgre_1_1MeshManager.html data EntityType StdMesh :: String -> Rotation -> EntityType mesh :: EntityType -> String rotation :: EntityType -> Rotation Plane :: Vector3 -> Float -> Float -> Float -> Int -> Int -> Float -> Float -> Vector3 -> String -> EntityType normal :: EntityType -> Vector3 shift :: EntityType -> Float width :: EntityType -> Float height :: EntityType -> Float xsegments :: EntityType -> Int ysegments :: EntityType -> Int utile :: EntityType -> Float vtile :: EntityType -> Float upvector :: EntityType -> Vector3 material :: EntityType -> String data Camera Camera :: Vector3 -> Angle -> Vector3 -> Camera lookat :: Camera -> Vector3 camroll :: Camera -> Angle camposition :: Camera -> Vector3 data Entity Entity :: String -> Vector3 -> EntityType -> Bool -> Vector3 -> Entity -- | Unique identifier for the entity. name :: Entity -> String position :: Entity -> Vector3 -- | EntityType is usually a mesh. entitytype :: Entity -> EntityType castshadows :: Entity -> Bool scale :: Entity -> Vector3 -- | General, scene-wide Ogre settings. Main configuration structure for -- Ogre. data OgreSettings OgreSettings :: FilePath -> Bool -> String -> Color -> ShadowTechnique -> [SceneManagerType] -> OgreSettings -- | Path to resources.cfg. resourcefile :: OgreSettings -> FilePath -- | Whether the window should be created automatically (by Ogre). Turn -- this off if the window should be created by another library (e.g.) -- SDL. autocreatewindow :: OgreSettings -> Bool -- | Window caption. caption :: OgreSettings -> String ambientlight :: OgreSettings -> Color shadowtechnique :: OgreSettings -> ShadowTechnique -- | Flags for the scene manager. Most scenes only need to set Generic as -- type. scenemanagertype :: OgreSettings -> [SceneManagerType] -- | Entities and other objects that define the scene. data OgreScene OgreScene :: Camera -> [Entity] -> [Light] -> OgreScene camera :: OgreScene -> Camera entities :: OgreScene -> [Entity] lights :: OgreScene -> [Light] data SceneManagerType Generic :: SceneManagerType ExteriorClose :: SceneManagerType ExteriorFar :: SceneManagerType ExteriorRealFar :: SceneManagerType Interior :: SceneManagerType halfPI :: Float degToRad :: Float -> Float unitX :: Vector3 unitY :: Vector3 unitZ :: Vector3 negUnitX :: Vector3 negUnitY :: Vector3 negUnitZ :: Vector3 -- | Initializes Ogre with given settings. This must be called before -- manipulating or rendering the scene. initOgre :: OgreSettings -> IO () addScene :: OgreScene -> IO () setupCamera :: Camera -> IO () clearScene :: IO () addLight :: Light -> IO () addEntity :: Entity -> IO () setLightPosition :: String -> Vector3 -> IO () setEntityPosition :: String -> Vector3 -> IO () rotateEntity :: String -> Rotation -> TransformSpace -> IO () rotateCamera :: Rotation -> TransformSpace -> IO () translateEntity :: String -> Vector3 -> TransformSpace -> IO () translateCamera :: Vector3 -> IO () setLightVisible :: String -> Bool -> IO () setAmbientLight :: Color -> IO () -- | See Ogre::SceneManager::setSkyDome(). setSkyDome :: Maybe (String, Float) -> IO () -- | See Ogre::SceneManager::setWorldGeometry(). setWorldGeometry :: String -> IO () setCameraPosition :: Vector3 -> IO () getCameraPosition :: IO Vector3 -- | Creates a ray scene query. raySceneQuerySimple :: Vector3 -> Vector3 -> IO (Maybe Vector3) -- | Creates a ray scene query based on given mouse coordinates. raySceneQueryMouseSimple :: Float -> Float -> IO (Maybe Vector3) -- | renderOgre renders one frame. renderOgre :: IO () cleanupOgre :: IO () instance Eq OgreScene instance Show OgreScene instance Read OgreScene instance Eq OgreSettings instance Show OgreSettings instance Read OgreSettings instance Eq SceneManagerType instance Show SceneManagerType instance Read SceneManagerType instance Eq Entity instance Show Entity instance Read Entity instance Eq Camera instance Show Camera instance Read Camera instance Eq EntityType instance Show EntityType instance Read EntityType instance Eq LightType instance Show LightType instance Read LightType instance Eq Light instance Show Light instance Read Light instance Eq ShadowTechnique instance Show ShadowTechnique instance Read ShadowTechnique instance Enum ShadowTechnique instance Eq Color instance Show Color instance Read Color instance Eq Rotation instance Show Rotation instance Read Rotation instance Eq TransformSpace instance Show TransformSpace instance Read TransformSpace instance Enum TransformSpace instance Eq Vector3 instance Show Vector3 instance Read Vector3