handa-opengl-0.1.6.1: Utility functions for OpenGL and GLUT

Copyright(c) 2015 Brian W Bush
LicenseMIT
MaintainerBrian W Bush <consult@brianwbush.info>
StabilityStable
PortabilityPortable
Safe HaskellNone
LanguageHaskell2010

Graphics.Rendering.Handa.Viewer

Contents

Description

Functions for managing perspectives and frusta.

Synopsis

Viewer Geometry

data ViewerParameters Source #

Paramaters specifying a viewer, including the frustum of the view.

Constructors

ViewerParameters 

Fields

viewerGeometry Source #

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.

fieldOfView Source #

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

reshape Source #

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.

loadViewer Source #

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.

dlpViewerDisplay Source #

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.