| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Vis
Synopsis
- data Options = Options {}
- data Antialiasing
- data Camera0 = Camera0 {}
- defaultOpts :: Options
- display :: Real b => Options -> VisObject b -> IO ()
- animate :: Real b => Options -> (Float -> VisObject b) -> IO ()
- simulate :: Real b => Options -> Double -> world -> (world -> VisObject b) -> (Float -> world -> world) -> IO ()
- play :: Real b => Options -> Double -> world -> (world -> (VisObject b, Maybe Cursor)) -> (Float -> world -> world) -> (world -> IO ()) -> Maybe (world -> Key -> KeyState -> Modifiers -> Position -> world) -> Maybe (world -> Position -> world) -> Maybe (world -> Position -> world) -> IO ()
- animateIO :: Real b => Options -> (Float -> IO (VisObject b)) -> IO ()
- simulateIO :: Real b => Options -> Double -> world -> (world -> IO (VisObject b)) -> (Float -> world -> IO world) -> IO ()
- playIO :: Real b => Options -> Double -> world -> (world -> IO (VisObject b, Maybe Cursor)) -> (Float -> world -> IO world) -> (world -> IO ()) -> Maybe (world -> Key -> KeyState -> Modifiers -> Position -> world) -> Maybe (world -> Position -> world) -> Maybe (world -> Position -> world) -> IO ()
- visMovie :: forall b. Real b => Options -> (Int -> FilePath) -> Double -> [VisObject b] -> Maybe Cursor -> IO ()
- data VisObject a
- = VisObjects [VisObject a]
- | Trans (V3 a) (VisObject a)
- | RotQuat (Quaternion a) (VisObject a)
- | RotDcm (M33 a) (VisObject a)
- | RotEulerRad (Euler a) (VisObject a)
- | RotEulerDeg (Euler a) (VisObject a)
- | Scale (a, a, a) (VisObject a)
- | Cylinder (a, a) Color
- | Box (a, a, a) Flavour Color
- | Cube a Flavour Color
- | Sphere a Flavour Color
- | Ellipsoid (a, a, a) Flavour Color
- | Line (Maybe a) [V3 a] Color
- | Line' (Maybe a) [(V3 a, Color)]
- | Arrow (a, a) (V3 a) Color
- | Axes (a, a)
- | Plane (V3 a) Color Color
- | Triangle (V3 a) (V3 a) (V3 a) Color
- | Quad (V3 a) (V3 a) (V3 a) (V3 a) Color
- | Text3d String (V3 a) BitmapFont Color
- | Text2d String (a, a) BitmapFont Color
- | Points [V3 a] (Maybe GLfloat) Color
- | ObjModel LoadedObjModel Color
- data SpecialKey
- data BitmapFont
- data Flavour
- data Euler a = Euler {}
- data LoadedObjModel
- loadObjModel :: Foldable f => f (V3 Double, V3 Double) -> LoadedObjModel
- module Vis.GlossColor
Documentation
Constructors
| Options | |
Fields
| |
data Antialiasing Source #
Constructors
| Aliased | |
| Smoothed | |
| Multisampled Int |
Instances
| Show Antialiasing Source # | |
Defined in Vis.Vis Methods showsPrec :: Int -> Antialiasing -> ShowS # show :: Antialiasing -> String # showList :: [Antialiasing] -> ShowS # | |
| Eq Antialiasing Source # | |
Defined in Vis.Vis | |
| Ord Antialiasing Source # | |
Defined in Vis.Vis Methods compare :: Antialiasing -> Antialiasing -> Ordering # (<) :: Antialiasing -> Antialiasing -> Bool # (<=) :: Antialiasing -> Antialiasing -> Bool # (>) :: Antialiasing -> Antialiasing -> Bool # (>=) :: Antialiasing -> Antialiasing -> Bool # max :: Antialiasing -> Antialiasing -> Antialiasing # min :: Antialiasing -> Antialiasing -> Antialiasing # | |
defaultOpts :: Options Source #
Some reasonable default options. Consider changing the window name with something like:
myOptions = defaultOpts {optWindowName = "my rad program"}draw a static image
Arguments
| :: Real b | |
| => Options | user options |
| -> Double | sample rate |
| -> world | initial state |
| -> (world -> VisObject b) | draw function |
| -> (Float -> world -> world) | state propogation function (takes time since start and state as inputs) |
| -> IO () |
run a simulation
Arguments
| :: Real b | |
| => Options | user options |
| -> Double | sample time |
| -> world | initial state |
| -> (world -> (VisObject b, Maybe Cursor)) | draw function, can give a different cursor |
| -> (Float -> world -> world) | state propogation function (takes time since start and state as inputs) |
| -> (world -> IO ()) | set where camera looks |
| -> Maybe (world -> Key -> KeyState -> Modifiers -> Position -> world) | keyboard/mouse press callback |
| -> Maybe (world -> Position -> world) | mouse drag callback |
| -> Maybe (world -> Position -> world) | mouse move callback |
| -> IO () |
Arguments
| :: Real b | |
| => Options | user options |
| -> (Float -> IO (VisObject b)) | draw function (takes time since start as input) |
| -> IO () |
display an animation impurely
Arguments
| :: Real b | |
| => Options | user options |
| -> Double | sample rate |
| -> world | initial state |
| -> (world -> IO (VisObject b)) | draw function |
| -> (Float -> world -> IO world) | state propogation function (takes time since start and state as inputs) |
| -> IO () |
run a simulation impurely
Arguments
| :: Real b | |
| => Options | user options |
| -> Double | sample time |
| -> world | initial state |
| -> (world -> IO (VisObject b, Maybe Cursor)) | draw function, can give a different cursor |
| -> (Float -> world -> IO world) | state propogation function (takes time since start and state as inputs) |
| -> (world -> IO ()) | set where camera looks |
| -> Maybe (world -> Key -> KeyState -> Modifiers -> Position -> world) | keyboard/mouse press callback |
| -> Maybe (world -> Position -> world) | mouse drag callback |
| -> Maybe (world -> Position -> world) | mouse move callback |
| -> IO () |
Constructors
| VisObjects [VisObject a] | |
| Trans (V3 a) (VisObject a) | |
| RotQuat (Quaternion a) (VisObject a) | |
| RotDcm (M33 a) (VisObject a) | |
| RotEulerRad (Euler a) (VisObject a) | |
| RotEulerDeg (Euler a) (VisObject a) | |
| Scale (a, a, a) (VisObject a) | |
| Cylinder (a, a) Color | |
| Box (a, a, a) Flavour Color | |
| Cube a Flavour Color | |
| Sphere a Flavour Color | |
| Ellipsoid (a, a, a) Flavour Color | |
| Line (Maybe a) [V3 a] Color | |
| Line' (Maybe a) [(V3 a, Color)] | |
| Arrow (a, a) (V3 a) Color | |
| Axes (a, a) | |
| Plane (V3 a) Color Color | |
| Triangle (V3 a) (V3 a) (V3 a) Color | |
| Quad (V3 a) (V3 a) (V3 a) (V3 a) Color | |
| Text3d String (V3 a) BitmapFont Color | |
| Text2d String (a, a) BitmapFont Color | |
| Points [V3 a] (Maybe GLfloat) Color | |
| ObjModel LoadedObjModel Color |
Instances
data SpecialKey #
Special keys
Constructors
| KeyF1 | |
| KeyF2 | |
| KeyF3 | |
| KeyF4 | |
| KeyF5 | |
| KeyF6 | |
| KeyF7 | |
| KeyF8 | |
| KeyF9 | |
| KeyF10 | |
| KeyF11 | |
| KeyF12 | |
| KeyLeft | |
| KeyUp | |
| KeyRight | |
| KeyDown | |
| KeyPageUp | |
| KeyPageDown | |
| KeyHome | |
| KeyEnd | |
| KeyInsert | |
| KeyNumLock | |
| KeyBegin | |
| KeyDelete | |
| KeyShiftL | |
| KeyShiftR | |
| KeyCtrlL | |
| KeyCtrlR | |
| KeyAltL | |
| KeyAltR | |
| KeyUnknown Int | You should actually never encounter this value, it is just here as a safeguard against future changes in the native GLUT library. |
Instances
| Show SpecialKey | |
Defined in Graphics.UI.GLUT.Callbacks.Window Methods showsPrec :: Int -> SpecialKey -> ShowS # show :: SpecialKey -> String # showList :: [SpecialKey] -> ShowS # | |
| Eq SpecialKey | |
Defined in Graphics.UI.GLUT.Callbacks.Window | |
| Ord SpecialKey | |
Defined in Graphics.UI.GLUT.Callbacks.Window Methods compare :: SpecialKey -> SpecialKey -> Ordering # (<) :: SpecialKey -> SpecialKey -> Bool # (<=) :: SpecialKey -> SpecialKey -> Bool # (>) :: SpecialKey -> SpecialKey -> Bool # (>=) :: SpecialKey -> SpecialKey -> Bool # max :: SpecialKey -> SpecialKey -> SpecialKey # min :: SpecialKey -> SpecialKey -> SpecialKey # | |
data BitmapFont #
The bitmap fonts available in GLUT. The exact bitmap to be used is defined by the standard X glyph bitmaps for the X font with the given name.
Constructors
| Fixed8By13 | A fixed width font with every character fitting in an 8
by 13 pixel rectangle.
( |
| Fixed9By15 | A fixed width font with every character fitting in an 9
by 15 pixel rectangle.
( |
| TimesRoman10 | A 10-point proportional spaced Times Roman font.
( |
| TimesRoman24 | A 24-point proportional spaced Times Roman font.
( |
| Helvetica10 | A 10-point proportional spaced Helvetica font.
( |
| Helvetica12 | A 12-point proportional spaced Helvetica font.
( |
| Helvetica18 | A 18-point proportional spaced Helvetica font.
( |
Instances
| Font BitmapFont | |
Defined in Graphics.UI.GLUT.Fonts Methods renderString :: MonadIO m => BitmapFont -> String -> m () # stringWidth :: MonadIO m => BitmapFont -> String -> m GLint # fontHeight :: MonadIO m => BitmapFont -> m GLfloat # | |
| Show BitmapFont | |
Defined in Graphics.UI.GLUT.Raw.Fonts Methods showsPrec :: Int -> BitmapFont -> ShowS # show :: BitmapFont -> String # showList :: [BitmapFont] -> ShowS # | |
| Binary BitmapFont Source # | |
Defined in Vis.VisObject | |
| Eq BitmapFont | |
Defined in Graphics.UI.GLUT.Raw.Fonts | |
| Ord BitmapFont | |
Defined in Graphics.UI.GLUT.Raw.Fonts Methods compare :: BitmapFont -> BitmapFont -> Ordering # (<) :: BitmapFont -> BitmapFont -> Bool # (<=) :: BitmapFont -> BitmapFont -> Bool # (>) :: BitmapFont -> BitmapFont -> Bool # (>=) :: BitmapFont -> BitmapFont -> Bool # max :: BitmapFont -> BitmapFont -> BitmapFont # min :: BitmapFont -> BitmapFont -> BitmapFont # | |
Flavour of object rendering
Constructors
| Solid | Object is rendered as a solid with shading and surface normals. |
| Wireframe | Object is rendered as a wireframe without surface normals. |
3-2-1 Euler angle rotation sequence
Instances
| Functor Euler Source # | |
| Generic (Euler a) Source # | |
| Show a => Show (Euler a) Source # | |
| Binary a => Binary (Euler a) Source # | |
| Eq a => Eq (Euler a) Source # | |
| Ord a => Ord (Euler a) Source # | |
| type Rep (Euler a) Source # | |
Defined in Vis.VisObject type Rep (Euler a) = D1 ('MetaData "Euler" "Vis.VisObject" "Vis-1.0.0-FwQfBMNitksJIapZIBfVJt" 'False) (C1 ('MetaCons "Euler" 'PrefixI 'True) (S1 ('MetaSel ('Just "eYaw") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: (S1 ('MetaSel ('Just "ePitch") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Just "eRoll") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))) | |
data LoadedObjModel Source #
Instances
| Generic LoadedObjModel Source # | |
Defined in Vis.VisObject Associated Types type Rep LoadedObjModel :: Type -> Type # Methods from :: LoadedObjModel -> Rep LoadedObjModel x # to :: Rep LoadedObjModel x -> LoadedObjModel # | |
| Binary LoadedObjModel Source # | |
Defined in Vis.VisObject Methods put :: LoadedObjModel -> Put # get :: Get LoadedObjModel # putList :: [LoadedObjModel] -> Put # | |
| type Rep LoadedObjModel Source # | |
Defined in Vis.VisObject type Rep LoadedObjModel = D1 ('MetaData "LoadedObjModel" "Vis.VisObject" "Vis-1.0.0-FwQfBMNitksJIapZIBfVJt" 'False) (C1 ('MetaCons "LoadedObjModel" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Vector Double)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Vector Double)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)))) | |
loadObjModel :: Foldable f => f (V3 Double, V3 Double) -> LoadedObjModel Source #
turn a list of vertexnormal tuples into vertexnormal arrays
module Vis.GlossColor