C# Class FarseerPhysics.Common.Decomposition.CDT.Delaunay.Sweep.DTSweep

Afficher le fichier Open project: prime31/Nez

Méthodes publiques

Méthode Description
Triangulate ( DTSweepContext tcx ) : void

Triangulate simple polygon with holes

Private Methods

Méthode Description
Angle ( TriangulationPoint origin, TriangulationPoint pa, TriangulationPoint pb ) : double
AngleExceeds90Degrees ( TriangulationPoint origin, TriangulationPoint pa, TriangulationPoint pb ) : bool
AngleExceedsPlus90DegreesOrIsNegative ( TriangulationPoint origin, TriangulationPoint pa, TriangulationPoint pb ) : bool
BasinAngle ( AdvancingFrontNode node ) : double

The basin angle is decided against the horizontal line [1,0]

EdgeEvent ( DTSweepContext tcx, DTSweepConstraint edge, AdvancingFrontNode node ) : void
EdgeEvent ( DTSweepContext tcx, TriangulationPoint ep, TriangulationPoint eq, DelaunayTriangle triangle, TriangulationPoint point ) : void
Fill ( DTSweepContext tcx, AdvancingFrontNode node ) : void

Adds a triangle to the advancing front to fill a hole.

FillAdvancingFront ( DTSweepContext tcx, AdvancingFrontNode n ) : void

Fills holes in the Advancing Front

FillBasin ( DTSweepContext tcx, AdvancingFrontNode node ) : void

Fills a basin that has formed on the Advancing Front to the right of given node. First we decide a left,bottom and right node that forms the boundaries of the basin. Then we do a reqursive fill.

FillBasinReq ( DTSweepContext tcx, AdvancingFrontNode node ) : void

Recursive algorithm to fill a Basin with triangles

FillEdgeEvent ( DTSweepContext tcx, DTSweepConstraint edge, AdvancingFrontNode node ) : void
FillLeftAboveEdgeEvent ( DTSweepContext tcx, DTSweepConstraint edge, AdvancingFrontNode node ) : void
FillLeftBelowEdgeEvent ( DTSweepContext tcx, DTSweepConstraint edge, AdvancingFrontNode node ) : void
FillLeftConcaveEdgeEvent ( DTSweepContext tcx, DTSweepConstraint edge, AdvancingFrontNode node ) : void
FillLeftConvexEdgeEvent ( DTSweepContext tcx, DTSweepConstraint edge, AdvancingFrontNode node ) : void
FillRightAboveEdgeEvent ( DTSweepContext tcx, DTSweepConstraint edge, AdvancingFrontNode node ) : void
FillRightBelowEdgeEvent ( DTSweepContext tcx, DTSweepConstraint edge, AdvancingFrontNode node ) : void
FillRightConcaveEdgeEvent ( DTSweepContext tcx, DTSweepConstraint edge, AdvancingFrontNode node ) : void
FillRightConvexEdgeEvent ( DTSweepContext tcx, DTSweepConstraint edge, AdvancingFrontNode node ) : void
FinalizationConvexHull ( DTSweepContext tcx ) : void

If this is a Delaunay Triangulation of a pointset we need to fill so the triangle mesh gets a ConvexHull

FinalizationPolygon ( DTSweepContext tcx ) : void
FlipEdgeEvent ( DTSweepContext tcx, TriangulationPoint ep, TriangulationPoint eq, DelaunayTriangle t, TriangulationPoint p ) : void
FlipScanEdgeEvent ( DTSweepContext tcx, TriangulationPoint ep, TriangulationPoint eq, DelaunayTriangle flipTriangle, DelaunayTriangle t, TriangulationPoint p ) : void

Scan part of the FlipScan algorithm When a triangle pair isn't flippable we will scan for the next point that is inside the flip triangle scan area. When found we generate a new flipEdgeEvent

HoleAngle ( AdvancingFrontNode node ) : double

???

IsEdgeSideOfTriangle ( DelaunayTriangle triangle, TriangulationPoint ep, TriangulationPoint eq ) : bool
IsShallow ( DTSweepContext tcx, AdvancingFrontNode node ) : bool
LargeHole_DontFill ( AdvancingFrontNode node ) : bool
Legalize ( DTSweepContext tcx, DelaunayTriangle t ) : bool

Returns true if triangle was legalized

NewFrontTriangle ( DTSweepContext tcx, TriangulationPoint point, AdvancingFrontNode node ) : AdvancingFrontNode

Creates a new front triangle and legalize it

NextFlipPoint ( TriangulationPoint ep, TriangulationPoint eq, DelaunayTriangle ot, TriangulationPoint op ) : TriangulationPoint

When we need to traverse from one triangle to the next we need the point in current triangle that is the opposite point to the next triangle.

NextFlipTriangle ( DTSweepContext tcx, Orientation o, DelaunayTriangle t, DelaunayTriangle ot, TriangulationPoint p, TriangulationPoint op ) : DelaunayTriangle

After a flip we have two triangles and know that only one will still be intersecting the edge. So decide which to contiune with and legalize the other

PointEvent ( DTSweepContext tcx, TriangulationPoint point ) : AdvancingFrontNode

Find closes node to the left of the new point and create a new triangle. If needed new holes and basins will be filled to.

RotateTrianglePair ( DelaunayTriangle t, TriangulationPoint p, DelaunayTriangle ot, TriangulationPoint op ) : void

Rotates a triangle pair one vertex CW n2 n2 P +-----+ P +-----+ | t /| |\ t | | / | | \ | n1| / |n3 n1| \ |n3 | / | after CW | \ | |/ oT | | oT \| +-----+ oP +-----+ n4 n4

Sweep ( DTSweepContext tcx ) : void

Start sweeping the Y-sorted point set from bottom to top

TurnAdvancingFrontConvex ( DTSweepContext tcx, AdvancingFrontNode b, AdvancingFrontNode c ) : void

We will traverse the entire advancing front and fill it to form a convex hull.

Method Details

Triangulate() public static méthode

Triangulate simple polygon with holes
public static Triangulate ( DTSweepContext tcx ) : void
tcx DTSweepContext
Résultat void