vect-0.4.0: A low-dimensional linear algebra library, tailored to computer graphics.Source codeContentsIndex
Data.Vect.Double.Util.Projective
Description

Classic 4x4 projective matrices. Our convention is that they are intended for multiplication on the right, that is, they are of the form

     _____
 [  |     |  0  ]
 [  | 3x3 |  0  ]
 [  |_____|  0  ]
 [  p  q  r  1  ]

Please note that by default, OpenGL stores the matrices (in memory) by columns, while we store them by rows; but OpenGL also use the opposite convention (so the OpenGL projective matrices are intended for multiplication on the left). So in effect, they are the same when stored in the memory, say with poke :: Ptr Mat4 -> Mat4 -> IO ().

Synopsis
class ExtendProjective v e | v -> e where
extendProj :: v -> e
extendProjWith :: Double -> v -> e
rotMatrixProj :: Double -> Normal3 -> Mat4
rotMatrixProj' :: Double -> Vec3 -> Mat4
translMatrixProj :: Vec3 -> Mat4
translWithProj :: Vec3 -> Mat4 -> Mat4
scaleMatrixProj :: Vec3 -> Mat4
scaleMatrixUniformProj :: Double -> Mat4
class ProjectiveAction v where
actProj :: v -> Mat4 -> v
invertProj :: Mat4 -> Mat4
Documentation
class ExtendProjective v e | v -> e whereSource
Methods
extendProj :: v -> eSource
extendProjWith :: Double -> v -> eSource
show/hide Instances
rotMatrixProj :: Double -> Normal3 -> Mat4Source
rotMatrixProj' :: Double -> Vec3 -> Mat4Source
translMatrixProj :: Vec3 -> Mat4Source
translWithProj :: Vec3 -> Mat4 -> Mat4Source
we assume that the bottom-right corner is 1.
scaleMatrixProj :: Vec3 -> Mat4Source
scaleMatrixUniformProj :: Double -> Mat4Source
class ProjectiveAction v whereSource
Methods
actProj :: v -> Mat4 -> vSource
show/hide Instances
invertProj :: Mat4 -> Mat4Source
Inverts a projective 4x4 matrix, assuming that the top-left 3x3 part is orthogonal, and the bottom-right corner is 1.
Produced by Haddock version 2.4.2