Various facilities for dealing with vectors generically.
- class VectorAxis vector axis where
- class Project lo hi where
- orthographic_down :: hi -> (lo, Scalar)
- orthographic_up :: (lo, Scalar) -> hi
- perspective_down :: hi -> (lo, Scalar)
- perspective_up :: (lo, Scalar) -> hi
Documentation
class VectorAxis vector axis whereSource
Class for generically reading/writing vector coordinates.
class Project lo hi whereSource
This class relates two vector types having consecutive sizes.
orthographic_down :: hi -> (lo, Scalar)Source
Reduce number of dimensions by one. (Return the dropped dimension as a Scalar
.)
orthographic_up :: (lo, Scalar) -> hiSource
Increase number of dimensions by one. (Supply value for new dimension as a Scalar
.)
perspective_down :: hi -> (lo, Scalar)Source
Perspective-project to N-1 dimensions. (Also return the distance from the camera as a Scalar
.)
perspective_up :: (lo, Scalar) -> hiSource
Inverse-perspective project into N+1 dimension. (Supply the distance from the camera as a Scalar
.)