Vec-Transform-1.0.0: Extends the Vec package with some 4x4 transform matricesSource codeContentsIndex
Data.Vec.LinAlg.Transform3D
Description
Some 4x4 transformation matrices, using a right handed coordinate system. These matrices are used by multiplying vectors from the right.
Synopsis
translation :: Num a => Vec3 a -> Mat44 a
rotationX :: Floating a => a -> Mat44 a
rotationY :: Floating a => a -> Mat44 a
rotationZ :: Floating a => a -> Mat44 a
rotationVec :: Floating a => Vec3 a -> a -> Mat44 a
rotationEuler :: Floating a => Vec3 a -> Mat44 a
rotationQuat :: Num a => Vec4 a -> Mat44 a
scaling :: Num a => Vec3 a -> Mat44 a
perspective :: Floating a => a -> a -> a -> a -> Mat44 a
orthogonal :: Fractional a => a -> a -> Vec2 a -> Mat44 a
Documentation
translation :: Num a => Vec3 a -> Mat44 aSource
A 4x4 translation matrix
rotationXSource
:: Floating a
=> aThe angle in radians
-> Mat44 a
A 4x4 rotation matrix for a rotation around the X axis
rotationYSource
:: Floating a
=> aThe angle in radians
-> Mat44 a
A 4x4 rotation matrix for a rotation around the Y axis
rotationZSource
:: Floating a
=> aThe angle in radians
-> Mat44 a
A 4x4 rotation matrix for a rotation around the Z axis
rotationVecSource
:: Floating a
=> Vec3 aThe normalized vector around which the rotation goes
-> aThe angle in radians
-> Mat44 a
A 4x4 rotation matrix for a rotation around an arbitrary normalized vector
rotationEuler :: Floating a => Vec3 a -> Mat44 aSource
A 4x4 rotation matrix from the euler angles yaw pitch and roll. Could be useful in e.g. first person shooter games,
rotationQuatSource
:: Num a
=> Vec4 aThe quaternion with the real part (w) last
-> Mat44 a
A 4x4 rotation matrix from a normalized quaternion. Useful for most free flying rotations, such as airplanes.
scaling :: Num a => Vec3 a -> Mat44 aSource
A 4x4 scaling matrix
perspectiveSource
:: Floating a
=> aNear plane clipping distance
-> aFar plane clipping distance
-> aField of view of the y axis, in radians
-> aAspect ratio, i.e. screen's width/height
-> Mat44 a
A perspective projection matrix for a right handed coordinate system looking down negative z
orthogonalSource
:: Fractional a
=> aNear plane clipping distance
-> aFar plane clipping distance
-> Vec2 aThe size of the view (center aligned around origo)
-> Mat44 a
An orthogonal projection matrix for a right handed coordinate system looking down negative z
Produced by Haddock version 2.4.2