| Copyright | (c) 2015 Brian W Bush |
|---|---|
| License | MIT |
| Maintainer | Brian W Bush <consult@brianwbush.info> |
| Stability | Stable |
| Portability | Portable |
| Safe Haskell | None |
| Language | Haskell2010 |
Graphics.Rendering.Handa.Viewer
Description
Functions for managing perspectives and frusta.
- data ViewerParameters = ViewerParameters {}
- viewerGeometry :: GLdouble -> GLdouble -> GLdouble -> ViewerParameters
- fieldOfView :: ViewerParameters -> GLdouble
- phoneViewer :: ViewerParameters
- laptopViewer :: ViewerParameters
- desktopViewer :: ViewerParameters
- projectorViewer :: ViewerParameters
- reshape :: ViewerParameters -> ReshapeCallback
- loadViewer :: ViewerParameters -> DlpEye -> IO ()
- dlpViewerDisplay :: DlpEncoding -> ViewerParameters -> DisplayCallback -> DlpDisplay
Viewer Geometry
data ViewerParameters Source #
Paramaters specifying a viewer, including the frustum of the view.
Constructors
| ViewerParameters | |
Fields
| |
Arguments
| :: GLdouble | The width of the screen or display. |
| -> GLdouble | The height of the screen or display. |
| -> GLdouble | The distance from the eyes to the screen or display. |
| -> ViewerParameters | The corresponding viewer parameters. |
Construct viewer geometry from physical geometry.
Arguments
| :: ViewerParameters | The viewer parameters |
| -> GLdouble | The field of view, in degrees. |
Compute the field of view for viewer parameters.
Typical Devices
phoneViewer :: ViewerParameters Source #
Viewer parameters for a typical smartphone screen.
laptopViewer :: ViewerParameters Source #
Viewer parameters for a typical laptop screen.
desktopViewer :: ViewerParameters Source #
Viewer parameters for a typical desktop monitor.
projectorViewer :: ViewerParameters Source #
Viewer parameters for a typical projector.
Callbacks and Rendering
Arguments
| :: ViewerParameters | The viewer parameters. |
| -> ReshapeCallback | The reshape callback. |
Construct a reshape callback from viewer parameters. This simply sets the frustum based on the viewer parameters and the size of the viewport.
Arguments
| :: ViewerParameters | The viewer parameters. |
| -> DlpEye | The eye from which to view. |
| -> IO () | An action for looking at the scene using the specified eye and viewer parameters. |
Create an action look at the scene according to the viewer parameters.
Arguments
| :: DlpEncoding | The DLP encoding. |
| -> ViewerParameters | The viewer parameters. |
| -> DisplayCallback | The display callback. |
| -> DlpDisplay | The DLP display data for using the specified encoding, viewer parameters, and display callback. |
Construct a DLP display from a display callback.