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

Copyright(c) 2013 diagrams-lib team (see LICENSE)
LicenseBSD-style (see LICENSE)
Maintainerdiagrams-discuss@googlegroups.com
Safe HaskellNone
LanguageHaskell2010

Diagrams.ThreeD.Light

Description

Types to specify lighting for 3D rendering.

Synopsis

Documentation

data PointLight n

A PointLight radiates uniformly in all directions from a given point.

Constructors

PointLight (Point V3 n) (Colour Double) 

Instances

Fractional n => Transformable (PointLight n) 
type V (PointLight n) = V3 
type N (PointLight n) = n 

data ParallelLight n

A ParallelLight casts parallel rays in the specified direction, from some distant location outside the scene.

Constructors

ParallelLight (V3 n) (Colour Double) 

Instances

Fractional n => Transformable (ParallelLight n) 
type V (ParallelLight n) = V3 
type N (ParallelLight n) = n 

pointLight

Arguments

:: (Typeable n, Num n, Ord n, Renderable (PointLight n) b) 
=> Colour Double

The color of the light

-> QDiagram b V3 n Any 

Construct a Diagram with a single PointLight at the origin, which takes up no space.

parallelLight

Arguments

:: (Typeable n, OrderedField n, Renderable (ParallelLight n) b) 
=> Direction V3 n

The direction in which the light travels.

-> Colour Double

The color of the light.

-> QDiagram b V3 n Any 

Construct a Diagram with a single ParallelLight, which takes up no space.