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
- data PerspectiveLens = PerspectiveLens {}
- data OrthoLens = OrthoLens {}
- horizontalFieldOfView :: Lens' PerspectiveLens Angle
- verticalFieldOfView :: Lens' PerspectiveLens Angle
- orthoWidth :: Lens' OrthoLens Double
- orthoHeight :: Lens' OrthoLens Double
- camLoc :: Camera l -> P3
- camForward :: Camera l -> Direction
- camUp :: Camera l -> Direction
- camRight :: Camera l -> Direction
- camLens :: Camera l -> l
- facing_ZCamera :: (CameraLens l, Backend b R3, Renderable (Camera l) b) => l -> Diagram b R3
- mm50Camera :: (Backend b R3, Renderable (Camera PerspectiveLens) b) => Diagram b R3
- mm50 :: PerspectiveLens
- mm50Wide :: PerspectiveLens
- mm50Narrow :: PerspectiveLens
- aspect :: CameraLens l => l -> Double
- camAspect :: CameraLens l => Camera l -> Double
Documentation
data Camera l
Transformable (Camera l) | |
Renderable (Camera l) NullBackend | |
Typeable (* -> *) Camera | |
type V (Camera l) = R3 |
data PerspectiveLens
A perspective projection
PerspectiveLens | |
|
data OrthoLens
An orthographic projection
OrthoLens | |
|
camForward :: Camera l -> Direction
facing_ZCamera :: (CameraLens l, Backend b R3, Renderable (Camera l) b) => l -> Diagram b R3
'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 :: (Backend b R3, Renderable (Camera PerspectiveLens) b) => Diagram b R3
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 has the field of view of a 50mm lens on standard 35mm film, hence an aspect ratio of 3:2.
mm50blWide has the same vertical field of view as mm50, but an aspect ratio of 1.6, suitable for wide screen computer monitors.
mm50Narrow has the same vertical field of view as mm50, but an aspect ratio of 4:3, for VGA and similar computer resulotions.