C# Class Nez.Triangulator

simple ear clipping triangulator. the final triangles will be present in the triangleIndices list
Afficher le fichier Open project: prime31/Nez Class Usage Examples

Méthodes publiques

Свойство Type Description
triangleIndices List

Méthodes publiques

Méthode Description
initialize ( int count ) : void
testPointTriangle ( Vector2 point, Vector2 a, Vector2 b, Vector2 c ) : bool
triangulate ( Vector2 points, bool arePointsCCW = true ) : void

Computes a triangle list that fully covers the area enclosed by the given set of points. If points are not CCW, pass false for the arePointsCCW parameter

Method Details

initialize() public méthode

public initialize ( int count ) : void
count int
Résultat void

testPointTriangle() public static méthode

public static testPointTriangle ( Vector2 point, Vector2 a, Vector2 b, Vector2 c ) : bool
point Vector2
a Vector2
b Vector2
c Vector2
Résultat bool

triangulate() public méthode

Computes a triangle list that fully covers the area enclosed by the given set of points. If points are not CCW, pass false for the arePointsCCW parameter
public triangulate ( Vector2 points, bool arePointsCCW = true ) : void
points Vector2 A list of points that defines an enclosing path.
arePointsCCW bool
Résultat void

Property Details

triangleIndices public_oe property

The indexes of triangle list entries for the list of points used in the last triangulate call.
public List triangleIndices
Résultat List