
Graphics.Rendering.OpenGL.GLU.Tessellation  Portability  portable  Stability  provisional  Maintainer  sven.panne@aedion.de 





Description 
This module corresponds to chapter 5 (Polygon Tessellation) of the GLU specs.


Synopsis 




Polygon description


data AnnotatedVertex v 
The basic building block in tessellation is a 3D vertex with an associated
property, e.g. color, texture coordinates, etc.
 Constructors   Instances  


newtype ComplexContour v 
A complex contour, which can be selfintersecting and/or concave.
 Constructors   Instances  


newtype ComplexPolygon v 
A complex (possibly concave) polygon, represented by one or more complex
and possibly intersecting contours.
 Constructors   Instances  


Combining vertices


data WeightedProperties v 
Four vertex properties (cf. AnnotatedVertex) with associated weigths
summing up to 1.0.
 Constructors   Instances  


type Combiner v = Vertex3 GLdouble > WeightedProperties v > v 
A function combining given vertex properties into a property for a newly
generated vertex


Tessellation parameters


data TessWinding 
Constructors  TessWindingOdd   TessWindingNonzero   TessWindingPositive   TessWindingNegative   TessWindingAbsGeqTwo  
 Instances  


type Tolerance = GLdouble 
The relative tolerance under which two vertices can be combined (see
Combiner). Multiplication with the largest coordinate magnitude of all
polygon vertices yields the maximum distance between two mergeable vertices.
Note that merging is optional and the tolerance is only a hint.


Tessellator type


type Tessellator p v = TessWinding > Tolerance > Normal3 GLdouble > Combiner v > ComplexPolygon v > IO (p v) 
A general tessellator type.
Before tessellation of a complex polygon, all its vertices are projected into
a plane perpendicular to the given normal. If the given normal is
Normal3 0 0 0, a fitting plane of all vertices is used.


Contour extraction


newtype SimpleContour v 
A simple, nonselfintersecting contour
 Constructors   Instances  


newtype PolygonContours v 
The contours of a complex polygon, represented by one or more
nonintersecting simple contours
 Constructors   Instances  


extractContours :: Storable v => Tessellator PolygonContours v 

Triangulation


type TriangleVertex v = AnnotatedVertex (v, EdgeFlag) 
A triangle vertex with additional information about the edge it begins


data Triangle v 
A triangle, represented by three triangle vertices
 Constructors   Instances  


newtype Triangulation v 
A triangulation of a complex polygon
 Constructors   Instances  


triangulate :: Storable v => Tessellator Triangulation v 

Tessellation into primitives


data Primitive v 
Constructors   Instances  


newtype SimplePolygon v 
Constructors   Instances  


tessellate :: Storable v => Tessellator SimplePolygon v 

Produced by Haddock version 0.8 