handa-opengl-0.1.12.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

Instances

Functor Screen Source # 

Methods

fmap :: (a -> b) -> Screen a -> Screen b #

(<$) :: a -> Screen b -> Screen a #

Eq a => Eq (Screen a) Source # 

Methods

(==) :: Screen a -> Screen a -> Bool #

(/=) :: Screen a -> Screen a -> Bool #

Data a => Data (Screen a) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Screen a -> c (Screen a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Screen a) #

toConstr :: Screen a -> Constr #

dataTypeOf :: Screen a -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (Screen a)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Screen a)) #

gmapT :: (forall b. Data b => b -> b) -> Screen a -> Screen a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Screen a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Screen a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Screen a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Screen a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Screen a -> m (Screen a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Screen a -> m (Screen a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Screen a -> m (Screen a) #

Read a => Read (Screen a) Source # 
Show a => Show (Screen a) Source # 

Methods

showsPrec :: Int -> Screen a -> ShowS #

show :: Screen a -> String #

showList :: [Screen a] -> ShowS #

Generic (Screen a) Source # 

Associated Types

type Rep (Screen a) :: * -> * #

Methods

from :: Screen a -> Rep (Screen a) x #

to :: Rep (Screen a) x -> Screen a #

(Generic a, FromJSON a) => FromJSON (Screen a) Source # 
(Generic a, Binary a) => Binary (Screen a) Source # 

Methods

put :: Screen a -> Put #

get :: Get (Screen a) #

putList :: [Screen a] -> Put #

type Rep (Screen a) Source # 
type Rep (Screen a) = D1 (MetaData "Screen" "Graphics.Rendering.Handa.Projection" "handa-opengl-0.1.12.1-1kPa5QvhFvW7EPEJhuE1zR" False) (C1 (MetaCons "Screen" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "lowerLeft") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Vertex3 a))) ((:*:) (S1 (MetaSel (Just Symbol "lowerRight") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Vertex3 a))) (S1 (MetaSel (Just Symbol "upperLeft") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Vertex3 a))))))

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.

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.