diagrams-lib-1.1.0.7: Embedded domain-specific language for declarative graphics

Maintainerdiagrams-discuss@googlegroups.com
Safe HaskellNone

Diagrams.ThreeD.Camera

Description

Types to specify viewpoint for 3D rendering.

Synopsis

Documentation

data PerspectiveLens Source

A perspective projection

Constructors

PerspectiveLens 

Fields

_horizontalFieldOfView :: Angle

Horizontal field of view.

_verticalFieldOfView :: Angle

Vertical field of view.

data OrthoLens Source

An orthographic projection

Constructors

OrthoLens 

Fields

_orthoWidth :: Double

Width

_orthoHeight :: Double

Height

Instances

facing_ZCamera :: (CameraLens l, Backend b R3, Renderable (Camera l) b) => l -> Diagram b R3Source

'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 R3Source

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 :: PerspectiveLensSource

mm50 has the field of view of a 50mm lens on standard 35mm film, hence an aspect ratio of 3:2.

mm50Wide :: PerspectiveLensSource

mm50blWide has the same vertical field of view as mm50, but an aspect ratio of 1.6, suitable for wide screen computer monitors.

mm50Narrow :: PerspectiveLensSource

mm50Narrow has the same vertical field of view as mm50, but an aspect ratio of 4:3, for VGA and similar computer resulotions.

aspect :: CameraLens l => l -> DoubleSource

The natural aspect ratio of the projection.

camAspect :: CameraLens l => Camera l -> DoubleSource