flaw-visual-0.1.0.0

LicenseMIT
Safe HaskellNone
LanguageHaskell2010

Flaw.Visual.Frustum

Description

 
Synopsis

Documentation

data Frustum Source #

Frustum data structure. Near and far plane distances must be > 0, but linear depths corresponding to homogeneous 0 and (-1) are (-frustumNear) and (-frustumFar) respectively (because spaces are right-handled).

Constructors

Frustum 

Fields

identityFrustum :: Frustum Source #

Identity frustum.

orthoFrustum :: Float -> Float -> Float -> Float -> Frustum -> Frustum Source #

Set orthographic projection for frustum.

perspectiveFrustum :: Float -> Float -> Float -> Float -> Frustum -> Frustum Source #

Set perspective projection for frustum.

lookAtFrustum :: Float3 -> Float3 -> Float3 -> Frustum -> Frustum Source #

Set look-at view matrix for frustum.

frustumDepthHomogeneousToLinear :: FrustumNode -> Node Float -> Node Float Source #

Get linear depth from homogeneous depth.

frustumProjCoordToLinearDepth :: FrustumNode -> Node Float4 -> Node Float Source #

Get linear depth from projection-space coord.