Next: Introduction, Previous: (dir), Up: (dir) [Contents][Index]
This is the glu-tessellate Reference Manual, version 0.1.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Aug 15 04:42:51 2022 GMT+0.
Next: Systems, Previous: The glu-tessellate Reference Manual, Up: The glu-tessellate Reference Manual [Contents][Index]
This is a triangulation library that wraps around GLU's tessellation routines to make turning vectors of point data into triangles stupid easy.
Yes, it supports concave polygons, and yes it supports holes. It also allows you to specify which winding rule you use to triangulate.
It also returns every triangle it produces in counter-clockwise order. You can change this to
clockwise by passing :cw t
.
The library has one public function (don't you love simplicity?) which takes a vector points (a point being an '(x y) list) into a list of triangles:
;; returns two triangles making up this square
(glu-tessellate:tessellate #( (0 0) (0 10) (10 10) (10 0) )) ->
(((10.0d0 10.0d0) (0.0d0 10.0d0) (0.0d0 0.0d0))
((10.0d0 0.0d0) (10.0d0 10.0d0) (0.0d0 0.0d0)))
It also supports polygons with holes. Holes are specified as a list of point vectors:
;; a square with a hole returns quite a few more triangles
(glu-tessellate:tessellate #( (0 0) (0 10) (10 10) (10 0) ) :holes '( #((3 3) (3 7) (7 7) (7 3)) )) ->
(((10.0d0 10.0d0) (0.0d0 10.0d0) (3.0d0 7.0d0))
((0.0d0 0.0d0) (3.0d0 7.0d0) (0.0d0 10.0d0))
((3.0d0 7.0d0) (0.0d0 0.0d0) (3.0d0 3.0d0))
((10.0d0 0.0d0) (3.0d0 3.0d0) (0.0d0 0.0d0))
((3.0d0 3.0d0) (10.0d0 0.0d0) (7.0d0 3.0d0))
((10.0d0 10.0d0) (7.0d0 3.0d0) (10.0d0 0.0d0))
((7.0d0 3.0d0) (10.0d0 10.0d0) (7.0d0 7.0d0))
((3.0d0 7.0d0) (7.0d0 7.0d0) (10.0d0 10.0d0)))
The one function this library uses takes the following keyword arguments:
:holes ; a list of point vectors describing the holes in the polygon
:winding-rule ; a keyword describing the winding rule: (:odd :nonzero :positive :negative :abs-geq-two)
:cw ; if T, produced triangles will be in CW order instead of CCW
GLU tessellation normally allows you to store arbitrary data with each point and also merge this point data when new points are created. This library doesn't currently allow this, and is only used for triangulation of points. If you need to attach colors to your triangles, it must be done so outside of the library...unless, of course, you wish to add arbitrary data support and issue a pull request ;).
The only other limitation I can think of is that it relies on GLU being on the system. Show me a system without GLU and I'll show you a computer from an alternate universe where Microsoft finally did away with all competition and DirectX rules o'er the land with an iron fist.
Next: Files, Previous: Introduction, Up: The glu-tessellate Reference Manual [Contents][Index]
The main system appears first, followed by any subsystem dependency.
A simple triangulation engine that wraps around GLU’s tessellation system.
Andrew Lyon <orthecreedence@gmail.com>
MIT
0.1.0
cffi (system).
Next: Packages, Previous: Systems, Up: The glu-tessellate Reference Manual [Contents][Index]
Files are sorted by type and then listed depth-first from the systems components trees.
Next: glu-tessellate/package.lisp, Previous: Lisp, Up: Lisp [Contents][Index]
glu-tessellate (system).
Next: glu-tessellate/tessellate.lisp, Previous: glu-tessellate/glu-tessellate.asd, Up: Lisp [Contents][Index]
glu-tessellate (system).
Previous: glu-tessellate/package.lisp, Up: Lisp [Contents][Index]
package.lisp (file).
glu-tessellate (system).
tessellate (function).
Next: Definitions, Previous: Files, Up: The glu-tessellate Reference Manual [Contents][Index]
Packages are listed by definition order.
tess
tessellate (function).
Next: Indexes, Previous: Packages, Up: The glu-tessellate Reference Manual [Contents][Index]
Definitions are sorted by export status, category, package, and then by lexicographic order.
Next: Internals, Previous: Definitions, Up: Definitions [Contents][Index]
Previous: Public Interface, Up: Public Interface [Contents][Index]
Tessellate a polygon into triangles.
Previous: Public Interface, Up: Definitions [Contents][Index]
Next: Special variables, Previous: Internals, Up: Internals [Contents][Index]
Next: Ordinary functions, Previous: Special variables, Up: Internals [Contents][Index]
Called when a tessellation shape begins. Stores the shape type for later reference.
Called when tessellation must create a new point. Ideally this is where user data would be merged into a new point, but since we don’t support user data, there’s nothing to do but create the point and return =].
Called with tessellation finishes with a shape. Saves all relevant data and sets up for another shape to come its way.
Error!!!!
Called when tessellation sends us a vertex. Uses the current shape type to figure out how the vertex will be processed/stored.
Get the global winding rule for the keyword passed in.
Determine if the points of a polygon are in clockwise order.
Previous: Definitions, Up: The glu-tessellate Reference Manual [Contents][Index]
Jump to: | B D E F G M N P T |
---|
Jump to: | B D E F G M N P T |
---|
Next: Data types, Previous: Functions, Up: Indexes [Contents][Index]
Jump to: | *
+
C S |
---|
Jump to: | *
+
C S |
---|
Jump to: | F G P S T |
---|
Jump to: | F G P S T |
---|