Copyright | (c) 2014 diagrams team (see LICENSE) |
---|---|
License | BSD-style (see LICENSE) |
Maintainer | diagrams-discuss@googlegroups.com |
Safe Haskell | None |
Language | Haskell2010 |
Functions for converting between Transformation
s and matricies.
- mkMat :: (HasBasis v, Num n) => Transformation v n -> v (v n)
- mkMatHomo :: Num n => Transformation V3 n -> M44 n
- fromMat22 :: (Epsilon n, Floating n) => M22 n -> V2 n -> Maybe (T2 n)
- fromMat33 :: (Epsilon n, Floating n) => M33 n -> V3 n -> Maybe (T3 n)
- fromMatWithInv :: (Additive v, Distributive v, Foldable v, Num n) => v (v n) -> v (v n) -> v n -> Transformation v n
- mat22 :: (Epsilon n, Floating n) => Prism' (M22 n, V2 n) (T2 n)
- mat33 :: (Epsilon n, Floating n) => Prism' (M33 n, V3 n) (T3 n)
Documentation
mkMat :: (HasBasis v, Num n) => Transformation v n -> v (v n) Source
Build a matrix from a Transformation
, ignoring the translation.
mkMatHomo :: Num n => Transformation V3 n -> M44 n Source
Build a 3D transformation matrix in homogeneous coordinates from a 'Transformation V3'.
fromMat22 :: (Epsilon n, Floating n) => M22 n -> V2 n -> Maybe (T2 n) Source
Make a 2D transformation from a 2x2 transform matrix and a
translation vector. If the matrix is not invertible, Nothing
is
returned.
fromMat33 :: (Epsilon n, Floating n) => M33 n -> V3 n -> Maybe (T3 n) Source
Make a 3D transformation from a 3x3 transform matrix and a
translation vector. If the matrix is not invertible, Nothing
is
returned.
:: (Additive v, Distributive v, Foldable v, Num n) | |
=> v (v n) | matrix |
-> v (v n) | inverse |
-> v n | translation |
-> Transformation v n |
Build a transform with a maxtrix along with its inverse.