handa-opengl-0.1.6.1: Utility functions for OpenGL and GLUT

Copyright(c) 2015 Brian W Bush
LicenseMIT
MaintainerBrian W Bush <consult@brianwbush.info>
StabilityStable
PortabilityPortable
Safe HaskellNone
LanguageHaskell2010

Graphics.Rendering.Handa.Face

Contents

Description

Functions and types for managing objects represented as collections of faces.

Synopsis

Types

type Face a = [(a, a, a)] Source #

A face is a collections of the vertices on its boundary.

type Edges a = [(a, a, a)] Source #

Edges are paired series of triple of vertex components.

faceToEdges :: Face a -> Edges a Source #

Convert a face to a

Rendering

drawFaces Source #

Arguments

:: (Num a, VertexComponent a) 
=> [Face a]

The faces.

-> IO ()

An action to draw the faces.

Draw faces.

drawFrame Source #

Arguments

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

coneFaces Source #

Arguments

:: (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.

brickFaces Source #

Arguments

:: Num a 
=> a

The x (width) dimension of the brick.

-> a

The y (height) dimension of the brick.

-> a

The z (depth) dimension of the brick.

-> [Face a]

Faces representing the brick.

The faces of a brick that has one corner at the origin.