Copyright | (C) Frank Staals |
---|---|
License | see the LICENSE file |
Maintainer | Frank Staals |
Safe Haskell | None |
Language | Haskell2010 |
Description : Some rendering functions for rendering (drawing) geometric objects
Synopsis
- renderTriangle :: Fractional r => Transformation 3 r -> Triangle 3 p r -> Triangle 2 p r
- renderPoint :: Fractional r => Transformation 3 r -> Point 3 r -> Point 2 r
- renderLineSegment :: Fractional r => Transformation 3 r -> LineSegment 3 p r -> LineSegment 2 p r
- renderWithTransform :: (Fractional r, IsTransformable g, Dimension g ~ 3, NumType g ~ r) => (g -> g') -> Transformation 3 r -> g -> g'
Rendering functions
renderTriangle :: Fractional r => Transformation 3 r -> Triangle 3 p r -> Triangle 2 p r Source #
Rendering function for a triangle.
renderPoint :: Fractional r => Transformation 3 r -> Point 3 r -> Point 2 r Source #
Render a point
renderLineSegment :: Fractional r => Transformation 3 r -> LineSegment 3 p r -> LineSegment 2 p r Source #
Renders a line segment
:: (Fractional r, IsTransformable g, Dimension g ~ 3, NumType g ~ r) | |
=> (g -> g') | Projection function |
-> Transformation 3 r | The camera transform |
-> g | The thing we wish to transform |
-> g' |
Generic Rendering Function