Safe Haskell | None |
---|---|

Language | Haskell98 |

A camera designed for 2D viewing. The camera may be translated perpendicular to its view direction, or rolled about its view direction.

- data Camera a = Camera {
- forward :: V3 a
- upward :: V3 a
- rightward :: V3 a
- orientation :: Quaternion a
- location :: V3 a

- track :: (Conjugate a, Epsilon a, RealFloat a) => V2 a -> Camera a -> Camera a
- roll :: (Epsilon a, RealFloat a) => a -> Camera a -> Camera a
- rollRad :: (Epsilon a, RealFloat a) => a -> Camera a -> Camera a
- camera2D :: (Epsilon a, RealFloat a) => Camera a
- camMatrix :: (Conjugate a, Epsilon a, RealFloat a) => Camera a -> M33 a
- deg2rad :: RealFloat a => a -> a

# Camera movement

A `Camera`

may be translated and rotated to provide a coordinate
frame into which 3D points may be transformed.

track :: (Conjugate a, Epsilon a, RealFloat a) => V2 a -> Camera a -> Camera a Source

Move the camera side-to-side or up-and-down as in a tracking shot.

roll :: (Epsilon a, RealFloat a) => a -> Camera a -> Camera a Source

Roll a camera view about its view direction by an angle given in degrees.

rollRad :: (Epsilon a, RealFloat a) => a -> Camera a -> Camera a Source

Roll a camera view about its view direction by an angle given in radians.