C# Класс Nez.Triangulator

simple ear clipping triangulator. the final triangles will be present in the triangleIndices list
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
triangleIndices List

Открытые методы

Метод Описание
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

Описание методов

initialize() публичный Метод

public initialize ( int count ) : void
count int
Результат void

testPointTriangle() публичный статический Метод

public static testPointTriangle ( Vector2 point, Vector2 a, Vector2 b, Vector2 c ) : bool
point Vector2
a Vector2
b Vector2
c Vector2
Результат bool

triangulate() публичный Метод

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
Результат void

Описание свойств

triangleIndices публичное свойство

The indexes of triangle list entries for the list of points used in the last triangulate call.
public List triangleIndices
Результат List