handa-opengl-0.1.11.2: 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

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.

projection Source

Arguments

:: (AdditiveGroup a, MatrixComponent a, RealFloat a) 
=> 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. This projection is based on the equations in <http://csc.lsu.edu/~kooima/pdfs/gen-perspective.pdf> .