handa-opengl-0.1.13.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.Projection

Contents

Description

Functions for off-axis projection.

Synopsis

Screens.

data Screen a Source

Description of a physical screen geometry.

Constructors

Screen 

Fields

lowerLeft :: Vertex3 a

The lower left corner.

lowerRight :: Vertex3 a

The lower right corner.

upperLeft :: Vertex3 a

The upper left corner.

Instances

upperRight :: Num a => Screen a -> Vertex3 a Source

The upper right corner.

aspectRatio Source

Arguments

:: (AdditiveGroup a, RealFloat a) 
=> Screen a

The screen geometry.

-> a

The aspect ratio, namely the screen width divided by its height.

The aspect ratio.

throwRatio Source

Arguments

:: (AdditiveGroup a, RealFloat a) 
=> Screen a

The screen geometry.

-> Vertex3 a

The eye position.

-> a

The throw ratio, name the distance to the screen divided by its width.

The throw ratio.

Projections.

data OffAxisProjection Source

The equations to use for off-axis projection.

Constructors

KooimaOffAxis

Based on Kooima 2009, <http://csc.lsu.edu/~kooima/pdfs/gen-perspective.pdf>, which assumes a rectangular screen.

VTKOffAxis

Based on VTK 6.3.0, <https://gitlab.kitware.com/vtk/vtk/blob/v6.3.0/Rendering/Core/vtkCamera.cxx#L414>, which does not assume a rectangular screen.

projection Source

Arguments

:: (AdditiveGroup a, MatrixComponent a, RealFloat a) 
=> OffAxisProjection

The off-axis equations to use.

-> Screen a

The screen geometry.

-> Vertex3 a

The eye position.

-> a

The distance to the near culling plane.

-> a

The distance to the far culling plane.

-> IO ()

An action for performing the off-axis projection.

Make an off-axis projection for a screen.

fetchProjection Source

Arguments

:: (MatrixComponent a, RealFloat a) 
=> IO [[a]]

An action to retrieve the projection matrix, in row-major order.

Retrieve the current projection matrix.