Copyright | (c) 2015 Brian W Bush |
---|---|
License | MIT |
Maintainer | Brian W Bush <consult@brianwbush.info> |
Stability | Stable |
Portability | Portable |
Safe Haskell | None |
Language | Haskell2010 |
Functions and types for managing objects represented as collections of faces.
- type Face a = [(a, a, a)]
- type Edges a = [(a, a, a)]
- faceToEdges :: Face a -> Edges a
- drawFaces :: (Num a, VertexComponent a) => [Face a] -> IO ()
- drawFrame :: (Num a, VertexComponent a) => [Face a] -> IO ()
- coneFaces :: (Enum a, Floating a, VertexComponent a) => Int -> a -> a -> [Face a]
- brickFaces :: Num a => a -> a -> a -> [Face a]
Types
faceToEdges :: Face a -> Edges a Source
Convert a face to a
Rendering
:: (Num a, VertexComponent a) | |
=> [Face a] | The faces. |
-> IO () | An action to draw the faces. |
Draw faces.
:: (Num a, VertexComponent a) | |
=> [Face a] | The faces. |
-> IO () | An action to draw the frame of the faces' edges. |
Draw the frame around faces.
Particular Objects
:: (Enum a, Floating a, VertexComponent a) | |
=> Int | The number of faces around the cone. |
-> a | The height of the cone. |
-> a | The radius of the cone. |
-> [Face a] | Faces representing the cone. |
The faces of a truncated cone that has its tip at the origin and points towards the negative z axis.