Safe Haskell | None |
---|---|
Language | Haskell2010 |
Graphics.SceneGraph.Types
Synopsis
- type SceneGraph g = Gr (SceneNode g) SceneEdge
- data SceneEdge = DefaultEdge
- data SceneNode g = SceneNode {}
- nullNode :: Node -> SceneNode g
- trivialGr :: SceneNode g -> SceneGraph g
- data Scene g = Scene {
- sceneGraph :: SceneGraph g
- sceneRoot :: Node
- data Viewport g = Viewport {
- viewCamera :: Node
- viewScene :: Scene g
- data World g = World {
- worldScene :: Scene g
- worldViewports :: [Viewport g]
- data KeyState
- type ClickHandler g = Scene g -> KeyState -> IO (SceneGraph g)
- type DragHandler g = Scene g -> V3 Float -> IO (SceneGraph g, Float)
- type Sink a = a -> IO ()
- data SceneData g
- data Geometry
- data Color
- mapColor :: Color -> V4 Float
- data Phong = Phong {}
- colorToPhong :: Color -> Phong
- llab :: SceneGraph g -> Node -> SceneNode g
Documentation
Empty edge label for scene graphs.
Constructors
DefaultEdge |
Instances
Eq SceneEdge Source # | |
Ord SceneEdge Source # | |
Show SceneEdge Source # | |
Labellable SceneEdge Source # | |
Defined in Graphics.SceneGraph.Visualise Methods toLabelValue :: SceneEdge -> Label # | |
Show (DragHandler g) Source # | |
Defined in Graphics.SceneGraph.Types Methods showsPrec :: Int -> DragHandler g -> ShowS # show :: DragHandler g -> String # showList :: [DragHandler g] -> ShowS # | |
Show (ClickHandler g) Source # | |
Defined in Graphics.SceneGraph.Types Methods showsPrec :: Int -> ClickHandler g -> ShowS # show :: ClickHandler g -> String # showList :: [ClickHandler g] -> ShowS # |
Scene Node. Made up of data and maybe a widget
Instances
Eq (SceneNode g) Source # | |
Show (DragHandler g) Source # | |
Defined in Graphics.SceneGraph.Types Methods showsPrec :: Int -> DragHandler g -> ShowS # show :: DragHandler g -> String # showList :: [DragHandler g] -> ShowS # | |
Show (ClickHandler g) Source # | |
Defined in Graphics.SceneGraph.Types Methods showsPrec :: Int -> ClickHandler g -> ShowS # show :: ClickHandler g -> String # showList :: [ClickHandler g] -> ShowS # | |
Show (SceneNode g) Source # | |
Labellable (SceneNode g) Source # | |
Defined in Graphics.SceneGraph.Visualise Methods toLabelValue :: SceneNode g -> Label # |
trivialGr :: SceneNode g -> SceneGraph g Source #
Creates a scene graph containing the supplied node
Scene Graph with indicate root node
Constructors
Scene | |
Fields
|
Instances
Show (DragHandler g) Source # | |
Defined in Graphics.SceneGraph.Types Methods showsPrec :: Int -> DragHandler g -> ShowS # show :: DragHandler g -> String # showList :: [DragHandler g] -> ShowS # | |
Show (ClickHandler g) Source # | |
Defined in Graphics.SceneGraph.Types Methods showsPrec :: Int -> ClickHandler g -> ShowS # show :: ClickHandler g -> String # showList :: [ClickHandler g] -> ShowS # |
View port refers to a camera node and has its own Scene which is drawn flattened
Constructors
Viewport | |
Fields
|
A scene with a number of view ports looking onto it.
Constructors
World | |
Fields
|
type ClickHandler g = Scene g -> KeyState -> IO (SceneGraph g) Source #
type DragHandler g = Scene g -> V3 Float -> IO (SceneGraph g, Float) Source #
Scene Node Data.
Constructors
Group | |
Geode Text g | |
LOD | |
MatrixTransform (M44 Float) | |
Switch Int | |
Material Phong | |
Handler (Maybe (ClickHandler g, Sink ())) (Maybe (DragHandler g, Sink Float)) | |
Light | |
Camera | |
Texture FilePath | |
Text Text |
Instances
Show (SceneData g) Source # | |
Labellable (SceneData g) Source # | |
Defined in Graphics.SceneGraph.Visualise Methods toLabelValue :: SceneData g -> Label # |
Simple colors
Phong lighting
Constructors
Phong | |
colorToPhong :: Color -> Phong Source #
Convert from simple color to Phong