Class: GluTesselator

GluTesselator()

new GluTesselator()

The tesselator main class, providing the public API.
Source:

Members

boundaryOnly :boolean

Extract contours, not triangles
Type:
  • boolean
Source:

cache :Array.<libtess.CachedVertex>

the vertex data
Type:
Source:

cacheCount :number

number of cached vertices
Type:
  • number
Source:

dict :libtess.Dict

edge dictionary for sweep line
Type:
Source:

emptyCache :boolean

empty cache on next vertex() call
Type:
  • boolean
Source:

event :libtess.GluVertex

current sweep event being processed
Type:
Source:

fatalError :boolean

fatal error: needed combine callback
Type:
  • boolean
Source:

mesh :libtess.GluMesh

stores the input contours, and eventually the tessellation itself
Type:
Source:

(non-null) mesh :libtess.GluMesh

Type:
Source:

(non-null) normal :Array.<number>

user-specified normal (if provided)
Type:
  • Array.<number>
Source:

pq :libtess.PriorityQ

priority queue of vertex events
Type:
Source:

relTolerance :number

tolerance for merging features
Type:
  • number
Source:

state :libtess.GluTesselator.tessState_

what begin/end calls have we seen?
Type:
Source:

(non-null) sUnit :Array.<number>

unit vector in s-direction (debugging)
Type:
  • Array.<number>
Source:

(non-null) tUnit :Array.<number>

unit vector in t-direction (debugging)
Type:
  • Array.<number>
Source:

windingRule :libtess.windingRule

rule for determining polygon interior
Type:
Source:

Methods

callBeginOrBeginData(type)

[callBeginOrBeginData description]
Parameters:
Name Type Description
type libtess.primitiveType [description].
Source:

callCombineOrCombineData(coords, data, weight) → {Object}

[callCombineOrCombineData description]
Parameters:
Name Type Description
coords Array.<number> [description].
data Array.<Object> [description].
weight Array.<number> [description].
Source:
Returns:
Interpolated vertex.
Type
Object

callEdgeFlagOrEdgeFlagData(flag)

[callEdgeFlagOrEdgeFlagData description]
Parameters:
Name Type Description
flag boolean [description].
Source:

callEndOrEndData()

[callEndOrEndData description]
Source:

callErrorOrErrorData(errno)

[callErrorOrErrorData description]
Parameters:
Name Type Description
errno libtess.errorType | libtess.gluEnum [description].
Source:

callVertexOrVertexData(data)

[callVertexOrVertexData description]
Parameters:
Name Type Description
data Object [description].
Source:

gluDeleteTess()

Destory the tesselator object. See README.
Source:

gluGetTessProperty(which) → {number|boolean}

Returns tessellator property
Parameters:
Name Type Description
which libtess.gluEnum [description].
Source:
Returns:
[description].
Type
number | boolean

gluTessBeginContour()

[gluTessBeginContour description]
Source:

gluTessBeginPolygon(data)

[gluTessBeginPolygon description]
Parameters:
Name Type Description
data Object Client data for current polygon.
Source:

gluTessCallback(which, opt_fnopt, nullable)

Specify callbacks. See README. A null or undefined opt_fn removes current callback.
Parameters:
Name Type Attributes Description
which libtess.gluEnum [description].
opt_fn function <optional>
<nullable>
[description].
Source:

gluTessEndContour()

[gluTessEndContour description]
Source:

gluTessEndPolygon()

[gluTessEndPolygon description]
Source:

gluTessNormal(x, y, z)

Lets the user supply the polygon normal, if known. All input data is projected into a plane perpendicular to the normal before tesselation. All output triangles are oriented CCW with respect to the normal (CW orientation can be obtained by reversing the sign of the supplied normal). For example, if you know that all polygons lie in the x-y plane, call "tess.gluTessNormal(0.0, 0.0, 1.0)" before rendering any polygons.
Parameters:
Name Type Description
x number [description].
y number [description].
z number [description].
Source:

gluTessProperty(which, value)

Set properties for control over tesselation. See README.
Parameters:
Name Type Description
which libtess.gluEnum [description].
value number | boolean [description].
Source:

gluTessVertex(coords, data)

Specify a vertex and associated data. Must be within calls to beginContour/endContour. See README.
Parameters:
Name Type Description
coords Array.<number> [description].
data Object [description].
Source: