| Copyright | (c) 2015 Brian W Bush |
|---|---|
| License | MIT |
| Maintainer | Brian W Bush <consult@brianwbush.info> |
| Stability | Stable |
| Portability | Portable |
| Safe Haskell | None |
| Language | Haskell2010 |
Graphics.Rendering.Handa.Projection
Contents
Description
Functions for off-axis projection.
- data Screen a = Screen {}
- upperRight :: Num a => Screen a -> Vertex3 a
- aspectRatio :: (AdditiveGroup a, RealFloat a) => Screen a -> a
- throwRatio :: (AdditiveGroup a, RealFloat a) => Screen a -> Vertex3 a -> a
- data OffAxisProjection
- projection :: forall a. (AdditiveGroup a, MatrixComponent a, RealFloat a) => OffAxisProjection -> Screen a -> Vertex3 a -> a -> a -> IO ()
- fetchProjection :: forall a. (MatrixComponent a, RealFloat a) => IO [[a]]
Screens.
Description of a physical screen geometry.
Constructors
| Screen | |
Instances
| Functor Screen Source | |
| Eq a => Eq (Screen a) Source | |
| Data a => Data (Screen a) Source | |
| Read a => Read (Screen a) Source | |
| Show a => Show (Screen a) Source | |
| Generic (Screen a) Source | |
| (Generic a, FromJSON a) => FromJSON (Screen a) Source | |
| (Generic a, Binary a) => Binary (Screen a) Source | |
| type Rep (Screen a) Source |
upperRight :: Num a => Screen a -> Vertex3 a Source
The upper right corner.
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.
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. |
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.
Arguments
| :: (MatrixComponent a, RealFloat a) | |
| => IO [[a]] | An action to retrieve the projection matrix, in row-major order. |
Retrieve the current projection matrix.