Copyright | (c) 2013 diagrams-lib team (see LICENSE) |
---|---|
License | BSD-style (see LICENSE) |
Maintainer | diagrams-discuss@googlegroups.com |
Safe Haskell | None |
Language | Haskell2010 |
Types to specify viewpoint for 3D rendering.
- data Camera l n
- data PerspectiveLens n = PerspectiveLens {}
- data OrthoLens n = OrthoLens {
- _orthoWidth :: n
- _orthoHeight :: n
- horizontalFieldOfView :: forall n. Lens' (PerspectiveLens n) (Angle n)
- verticalFieldOfView :: forall n. Lens' (PerspectiveLens n) (Angle n)
- orthoWidth :: forall n. Lens' (OrthoLens n) n
- orthoHeight :: forall n. Lens' (OrthoLens n) n
- camLoc :: Camera l n -> Point V3 n
- camForward :: Camera l n -> Direction V3 n
- camUp :: Camera l n -> Direction V3 n
- camRight :: Fractional n => Camera l n -> Direction V3 n
- camLens :: Camera l n -> l n
- facing_ZCamera :: (Floating n, Ord n, Typeable n, CameraLens l, Renderable (Camera l n) b) => l n -> QDiagram b V3 n Any
- mm50Camera :: (Typeable n, Floating n, Ord n, Renderable (Camera PerspectiveLens n) b) => QDiagram b V3 n Any
- mm50 :: Floating n => PerspectiveLens n
- mm50Wide :: Floating n => PerspectiveLens n
- mm50Narrow :: Floating n => PerspectiveLens n
- aspect :: (CameraLens l, Floating n) => l n -> n
- camAspect :: (Floating n, CameraLens l) => Camera l n -> n
Documentation
data PerspectiveLens n Source #
A perspective projection
PerspectiveLens | |
|
type V (PerspectiveLens n) Source # | |
type N (PerspectiveLens n) Source # | |
An orthographic projection
OrthoLens | |
|
horizontalFieldOfView :: forall n. Lens' (PerspectiveLens n) (Angle n) Source #
verticalFieldOfView :: forall n. Lens' (PerspectiveLens n) (Angle n) Source #
orthoWidth :: forall n. Lens' (OrthoLens n) n Source #
orthoHeight :: forall n. Lens' (OrthoLens n) n Source #
facing_ZCamera :: (Floating n, Ord n, Typeable n, CameraLens l, Renderable (Camera l n) b) => l n -> QDiagram b V3 n Any Source #
'facing_ZCamera l' is a camera at the origin facing along the negative Z axis, with its up-axis coincident with the positive Y axis, with the projection defined by l.
mm50Camera :: (Typeable n, Floating n, Ord n, Renderable (Camera PerspectiveLens n) b) => QDiagram b V3 n Any Source #
A camera at the origin facing along the negative Z axis, with its up-axis coincident with the positive Y axis. The field of view is chosen to match a 50mm camera on 35mm film. Note that Cameras take up no space in the Diagram.
mm50 :: Floating n => PerspectiveLens n Source #
mm50 has the field of view of a 50mm lens on standard 35mm film, hence an aspect ratio of 3:2.
mm50Wide :: Floating n => PerspectiveLens n Source #
mm50blWide has the same vertical field of view as mm50, but an aspect ratio of 1.6, suitable for wide screen computer monitors.
mm50Narrow :: Floating n => PerspectiveLens n Source #
mm50Narrow has the same vertical field of view as mm50, but an aspect ratio of 4:3, for VGA and similar computer resolutions.