Portability | non-portable |
---|---|

Stability | experimental |

Maintainer | Edward Kmett <ekmett@gmail.com> |

Safe Haskell | None |

Simple matrix operation for low-dimensional primitives.

- (!*!) :: (Functor m, Foldable r, Applicative r, Distributive n, Num a) => m (r a) -> r (n a) -> m (n a)
- (!*) :: (Functor m, Metric r, Num a) => m (r a) -> r a -> m a
- (*!) :: (Metric r, Distributive n, Num a) => r a -> r (n a) -> n a
- (!!*) :: (Functor m, Functor r, Num a) => m (r a) -> a -> m (r a)
- (*!!) :: (Functor m, Functor r, Num a) => a -> m (r a) -> m (r a)
- adjoint :: (Functor m, Distributive n, Conjugate a) => m (n a) -> n (m a)
- type M22 a = V2 (V2 a)
- type M33 a = V3 (V3 a)
- type M44 a = V4 (V4 a)
- type M43 a = V4 (V3 a)
- m33_to_m44 :: Num a => M33 a -> M44 a
- m43_to_m44 :: Num a => M43 a -> M44 a
- det22 :: Num a => V2 (V2 a) -> a
- det33 :: Num a => V3 (V3 a) -> a
- inv22 :: (Epsilon a, Floating a) => M22 a -> Maybe (M22 a)
- inv33 :: (Epsilon a, Floating a) => M33 a -> Maybe (M33 a)
- eye3 :: Num a => M33 a
- eye4 :: Num a => M44 a
- trace :: (Monad f, Foldable f, Num a) => f (f a) -> a
- translation :: (R3 t, R4 v, Functor f, Functor t) => (V3 a -> f (V3 a)) -> t (v a) -> f (t a)
- fromQuaternion :: Num a => Quaternion a -> M33 a
- mkTransformation :: Num a => Quaternion a -> V3 a -> M44 a

# Documentation

(!*!) :: (Functor m, Foldable r, Applicative r, Distributive n, Num a) => m (r a) -> r (n a) -> m (n a)Source

matrix product

(*!) :: (Metric r, Distributive n, Num a) => r a -> r (n a) -> n aSource

row vector * matrix

adjoint :: (Functor m, Distributive n, Conjugate a) => m (n a) -> n (m a)Source

hermitian conjugate or conjugate transpose

m33_to_m44 :: Num a => M33 a -> M44 aSource

m43_to_m44 :: Num a => M43 a -> M44 aSource

translation :: (R3 t, R4 v, Functor f, Functor t) => (V3 a -> f (V3 a)) -> t (v a) -> f (t a)Source

Extract the translation vector (first three entries of the last column) from a 3x4 or 4x4 matrix

fromQuaternion :: Num a => Quaternion a -> M33 aSource

Build a rotation matrix from a unit `Quaternion`

.

mkTransformation :: Num a => Quaternion a -> V3 a -> M44 aSource

Build a transformation matrix from a rotation expressed as a
`Quaternion`

and a translation vector.