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 lighting for 3D rendering.
Synopsis
- data PointLight n = PointLight (Point V3 n) (Colour Double)
- data ParallelLight n = ParallelLight (V3 n) (Colour Double)
- pointLight :: (Typeable n, Num n, Ord n, Renderable (PointLight n) b) => Colour Double -> QDiagram b V3 n Any
- parallelLight :: (Typeable n, OrderedField n, Renderable (ParallelLight n) b) => Direction V3 n -> Colour Double -> QDiagram b V3 n Any
Documentation
data PointLight n Source #
A PointLight
radiates uniformly in all directions from a given
point.
PointLight (Point V3 n) (Colour Double) |
Instances
Fractional n => Transformable (PointLight n) Source # | |
Defined in Diagrams.ThreeD.Light transform :: Transformation (V (PointLight n)) (N (PointLight n)) -> PointLight n -> PointLight n # | |
type V (PointLight n) Source # | |
Defined in Diagrams.ThreeD.Light | |
type N (PointLight n) Source # | |
Defined in Diagrams.ThreeD.Light |
data ParallelLight n Source #
A ParallelLight
casts parallel rays in the specified direction,
from some distant location outside the scene.
ParallelLight (V3 n) (Colour Double) |
Instances
Transformable (ParallelLight n) Source # | |
Defined in Diagrams.ThreeD.Light transform :: Transformation (V (ParallelLight n)) (N (ParallelLight n)) -> ParallelLight n -> ParallelLight n # | |
type V (ParallelLight n) Source # | |
Defined in Diagrams.ThreeD.Light | |
type N (ParallelLight n) Source # | |
Defined in Diagrams.ThreeD.Light |
:: (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.
:: (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.