Table of Contents

Class Polygon

The polygon class

internal class Polygon : Triangulatable

Inheritance

Implements

Inherited Members

Constructors

Polygon(IList<PolygonPoint>)

Create a polygon from a list of at least 3 points with no duplicates.

public Polygon(IList<PolygonPoint> points)

Parameters

points IList<PolygonPoint>

A list of unique points

Polygon(IEnumerable<PolygonPoint>)

Create a polygon from a list of at least 3 points with no duplicates.

public Polygon(IEnumerable<PolygonPoint> points)

Parameters

points IEnumerable<PolygonPoint>

A list of unique points.

Polygon()

Initializes a new instance of the Alis.Core.Physic.Common.Decomposition.CDT.Polygon.Polygon class

public Polygon()

Fields

_holes

The holes

protected List<Polygon> _holes

Field Value

List<Polygon>

_last

The last

protected PolygonPoint _last

Field Value

PolygonPoint

_points

The triangulation point

protected List<TriangulationPoint> _points

Field Value

List<TriangulationPoint>

_steinerPoints

The steiner points

protected List<TriangulationPoint> _steinerPoints

Field Value

List<TriangulationPoint>

_triangles

The triangles

protected List<DelaunayTriangle> _triangles

Field Value

List<DelaunayTriangle>

Properties

Holes

Gets the value of the holes

public IList<Polygon> Holes { get; }

Property Value

IList<Polygon>

Points

Gets the value of the points

public IList<TriangulationPoint> Points { get; }

Property Value

IList<TriangulationPoint>

Triangles

Gets the value of the triangles

public IList<DelaunayTriangle> Triangles { get; }

Property Value

IList<DelaunayTriangle>

TriangulationMode

Gets the value of the triangulation mode

public TriangulationMode TriangulationMode { get; }

Property Value

TriangulationMode

Methods

AddHole(Polygon)

Add a hole to the polygon.

public void AddHole(Polygon poly)

Parameters

poly Polygon

A subtraction polygon fully contained inside this polygon.

AddPoint(PolygonPoint)

Adds a point after the last in the polygon.

public void AddPoint(PolygonPoint p)

Parameters

p PolygonPoint

The point to add

AddPoints(IEnumerable<PolygonPoint>)

Inserts list (after last point in polygon?)

public void AddPoints(IEnumerable<PolygonPoint> list)

Parameters

list IEnumerable<PolygonPoint>

AddSteinerPoint(TriangulationPoint)

Adds the steiner point using the specified point

public void AddSteinerPoint(TriangulationPoint point)

Parameters

point TriangulationPoint

The point

AddSteinerPoints(List<TriangulationPoint>)

Adds the steiner points using the specified points

public void AddSteinerPoints(List<TriangulationPoint> points)

Parameters

points List<TriangulationPoint>

The points

AddTriangle(DelaunayTriangle)

Adds the triangle using the specified t

public void AddTriangle(DelaunayTriangle t)

Parameters

t DelaunayTriangle

The

AddTriangles(IEnumerable<DelaunayTriangle>)

Adds the triangles using the specified list

public void AddTriangles(IEnumerable<DelaunayTriangle> list)

Parameters

list IEnumerable<DelaunayTriangle>

The list

ClearSteinerPoints()

Clears the steiner points

public void ClearSteinerPoints()

ClearTriangles()

Clears the triangles

public void ClearTriangles()

InsertPointAfter(PolygonPoint, PolygonPoint)

Inserts newPoint after point.

public void InsertPointAfter(PolygonPoint point, PolygonPoint newPoint)

Parameters

point PolygonPoint

The point to insert after in the polygon

newPoint PolygonPoint

The point to insert into the polygon

PrepareTriangulation(TriangulationContext)

Creates constraints and populates the context with points

public void PrepareTriangulation(TriangulationContext tcx)

Parameters

tcx TriangulationContext

The context

RemovePoint(PolygonPoint)

Removes a point from the polygon.

public void RemovePoint(PolygonPoint p)

Parameters

p PolygonPoint

See Also