Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data OSGState g = OSGState {}
- emptyState :: OSGState g
- type OSGT m g = StateT (OSGState g) m
- type OSGSceneT m g = OSGT m g (SceneNode g)
- type OSG g = OSGT Identity g
- runOSG :: Monad m => OSGState g -> OSGSceneT m g -> m (SceneNode g, OSGState g, Node)
- runOSGShow :: OSGSceneT IO g -> IO ()
- osg :: Monad m => OSGSceneT m g -> m (Scene g)
- idd :: SceneNode g -> Node
- addNodeBasic :: Monad m => SceneNode g -> OSGSceneT m g
- addBasicNode :: Monad m => SceneData g -> OSGSceneT m g
- addBasicNamedNode :: Monad m => String -> SceneData g -> OSGSceneT m g
- addNullNode :: Monad m => OSGSceneT m g
- addNode :: Monad m => SceneNode g -> [(SceneEdge, Node)] -> OSGSceneT m g
- addNode' :: OSGState g -> SceneNode g -> [(SceneEdge, Node)] -> (SceneNode g, OSGState g)
- replaceNode :: Monad m => SceneNode g -> OSGSceneT m g
- replaceNode' :: Monad md => SceneGraph g -> SceneNode g -> md (SceneGraph g)
- replaceNode'' :: SceneGraph g -> SceneNode g -> SceneGraph g
- runOSGL :: Monad m => OSGState g -> OSGSceneT m g -> OSGT m g (SceneNode g, OSGState g, Node)
- runOSGL' :: Monad m => OSGSceneT m g -> OSGT m g (SceneNode g, Node)
- doOnNode :: Monad m => OSGSceneT m g -> (SceneNode g -> SceneNode g) -> OSGSceneT m g
- light :: Monad m => OSGSceneT m g
- camera :: Monad m => OSGSceneT m g
- mesh :: Monad m => Text -> g -> OSGSceneT m g
- fi :: (Integral a, Integral b) => a -> b
- scaleS :: Monad m => Float -> OSGSceneT m g -> OSGSceneT m g
- scale :: Monad m => V3 Float -> OSGSceneT m g -> OSGSceneT m g
- translate :: Monad m => V3 Float -> OSGSceneT m g -> OSGSceneT m g
- rotate :: Monad m => (Float, V3 Float) -> OSGSceneT m g -> OSGSceneT m g
- rad :: Float -> Float
- rotateX :: Monad m => Float -> OSGSceneT m g -> OSGSceneT m g
- rotateY :: Monad m => Float -> OSGSceneT m g -> OSGSceneT m g
- rotateZ :: Monad m => Float -> OSGSceneT m g -> OSGSceneT m g
- colourSG :: Monad m => OSGSceneT m g -> (Phong -> Phong) -> (OSGSceneT m g -> OSGSceneT m g) -> OSGSceneT m g
- transformSG :: Monad m => (M44 Float -> M44 Float) -> (OSGSceneT m g -> OSGSceneT m g) -> OSGSceneT m g -> OSGSceneT m g
- transformSG' :: SceneGraph g -> Node -> (M44 Float -> M44 Float) -> SceneGraph g
- translateSG' :: SceneGraph g -> Node -> V3 Float -> SceneGraph g
- translatePostSG' :: SceneGraph g -> Node -> V3 Float -> SceneGraph g
- rotatePostSG' :: SceneGraph g -> Node -> V3 Float -> Float -> SceneGraph g
- color :: Monad m => Color -> OSGSceneT m g -> OSGSceneT m g
- label :: Monad m => OSGSceneT m g -> String -> OSGSceneT m g
- texture :: Monad m => OSGSceneT m g -> String -> OSGSceneT m g
- text :: Monad m => Text -> OSGSceneT m g
- (<+>) :: Monad m => OSGSceneT m g -> OSGSceneT m g -> OSGSceneT m g
- (<->) :: Monad m => OSGSceneT m g -> V3 Float -> OSGSceneT m g
- (</>) :: Monad m => OSGSceneT m g -> V3 Float -> OSGSceneT m g
- doNothing :: Monad m => p -> m ()
- handler :: Monad m => OSGSceneT m g -> ClickHandler g -> OSGSceneT m g
- handler2 :: Monad m => OSGSceneT m g -> (ClickHandler g, DragHandler g) -> OSGSceneT m g
- dragHandler :: DragHandler g
- switchHandler :: ClickHandler g
- switchNode' :: Node -> Int -> SceneGraph g -> SceneGraph g
- switchNode :: SceneNode g -> Int -> SceneGraph g -> SceneGraph g
- switch :: Monad m => OSGSceneT m g -> OSGSceneT m g -> OSGSceneT m g
- switch' :: Monad m => Int -> OSGSceneT m g -> OSGSceneT m g -> OSGSceneT m g
- group :: Monad m => [SceneNode g] -> OSGSceneT m g
- emptyScene :: Scene g
- getHitAction :: Scene g -> Int -> IO ()
- findHandler :: SceneGraph g -> Int -> Maybe (SceneNode g)
- findHandlerDown :: SceneGraph g -> Int -> Int
- findTextDown :: SceneGraph g -> Int -> Int
- handleClickEvent :: Scene g -> Int -> KeyState -> IO (Scene g, Maybe (Scene g), Maybe (SceneGraph g -> SceneGraph g))
- emptyOSG :: SceneGraph g
- findCamera :: Scene g -> Int -> Node
- findCameraPath :: Scene g -> Int -> Path
- getTransformTo :: Scene g -> Node -> M44 Float
- getByLabel :: SceneGraph g -> String -> Node
Documentation
Holds state of graph as it is built.
emptyState :: OSGState g Source #
type OSGT m g = StateT (OSGState g) m Source #
The OSG monad within which construction of scene graphs occur. was 'type OSGT m = ErrorT Throwable (ST.StateT OSGState m)'
runOSG :: Monad m => OSGState g -> OSGSceneT m g -> m (SceneNode g, OSGState g, Node) Source #
Create and run a OSG monad to return a scene graph and root node.
osg :: Monad m => OSGSceneT m g -> m (Scene g) Source #
Wrapper for running the OSG monad to return a scene graph and root node.
addBasicNamedNode :: Monad m => String -> SceneData g -> OSGSceneT m g Source #
Add node with scene data
addNullNode :: Monad m => OSGSceneT m g Source #
Add empty node
addNode :: Monad m => SceneNode g -> [(SceneEdge, Node)] -> OSGSceneT m g Source #
Add a node to a scene graph with supplied children
addNode' :: OSGState g -> SceneNode g -> [(SceneEdge, Node)] -> (SceneNode g, OSGState g) Source #
Non-monadic form of addNode
replaceNode' :: Monad md => SceneGraph g -> SceneNode g -> md (SceneGraph g) Source #
Inner monad version of replace node
replaceNode'' :: SceneGraph g -> SceneNode g -> SceneGraph g Source #
Actually does the job of replacing node in a scene graph
runOSGL :: Monad m => OSGState g -> OSGSceneT m g -> OSGT m g (SceneNode g, OSGState g, Node) Source #
Run the monad but keep it in the family.
runOSGL' :: Monad m => OSGSceneT m g -> OSGT m g (SceneNode g, Node) Source #
Run the monad but keep it in the family.
doOnNode :: Monad m => OSGSceneT m g -> (SceneNode g -> SceneNode g) -> OSGSceneT m g Source #
Perform a function on a scene node
scaleS :: Monad m => Float -> OSGSceneT m g -> OSGSceneT m g Source #
Scale a node by equal amounts in all directions
rotate :: Monad m => (Float, V3 Float) -> OSGSceneT m g -> OSGSceneT m g Source #
Rotate a node by an angle around a vector.
colourSG :: Monad m => OSGSceneT m g -> (Phong -> Phong) -> (OSGSceneT m g -> OSGSceneT m g) -> OSGSceneT m g Source #
Apply colour to the node
transformSG :: Monad m => (M44 Float -> M44 Float) -> (OSGSceneT m g -> OSGSceneT m g) -> OSGSceneT m g -> OSGSceneT m g Source #
Transform the node of a scene graph within the Monad with the supplied matrix transform
transformSG' :: SceneGraph g -> Node -> (M44 Float -> M44 Float) -> SceneGraph g Source #
Transform the node of a scene graph with the supplied matrix transform
translateSG' :: SceneGraph g -> Node -> V3 Float -> SceneGraph g Source #
translatePostSG' :: SceneGraph g -> Node -> V3 Float -> SceneGraph g Source #
rotatePostSG' :: SceneGraph g -> Node -> V3 Float -> Float -> SceneGraph g Source #
(<+>) :: Monad m => OSGSceneT m g -> OSGSceneT m g -> OSGSceneT m g infixr 5 Source #
Join two graphs together
handler2 :: Monad m => OSGSceneT m g -> (ClickHandler g, DragHandler g) -> OSGSceneT m g Source #
dragHandler :: DragHandler g Source #
Create a DragHandler
switchHandler :: ClickHandler g Source #
Create a ClickHandler
switchNode' :: Node -> Int -> SceneGraph g -> SceneGraph g Source #
switchNode :: SceneNode g -> Int -> SceneGraph g -> SceneGraph g Source #
emptyScene :: Scene g Source #
findHandler :: SceneGraph g -> Int -> Maybe (SceneNode g) Source #
Work up the tree from indicated no to find the first handler scene node.
findHandlerDown :: SceneGraph g -> Int -> Int Source #
Work down the tree from indicated no to find the first handler scene node.
findTextDown :: SceneGraph g -> Int -> Int Source #
handleClickEvent :: Scene g -> Int -> KeyState -> IO (Scene g, Maybe (Scene g), Maybe (SceneGraph g -> SceneGraph g)) Source #
Handle some event
emptyOSG :: SceneGraph g Source #
getTransformTo :: Scene g -> Node -> M44 Float Source #
Return the matrix got by traversing down the Node
getByLabel :: SceneGraph g -> String -> Node Source #