Class DelaunayTriangle
- Assembly
- Alis.dll
The delaunay triangle class
internal class DelaunayTriangle
Inheritance
Inherited Members
Constructors
DelaunayTriangle(TriangulationPoint, TriangulationPoint, TriangulationPoint)
Initializes a new instance of the Alis.Core.Physic.Common.Decomposition.CDT.Delaunay.DelaunayTriangle class
public DelaunayTriangle(TriangulationPoint p1, TriangulationPoint p2, TriangulationPoint p3)
Parameters
p1
TriangulationPoint-
The
p2
TriangulationPoint-
The
p3
TriangulationPoint-
The
Fields
EdgeIsConstrained
The edge is constrained
public FixedBitArray3 EdgeIsConstrained
Field Value
EdgeIsDelaunay
The edge is delaunay
public FixedBitArray3 EdgeIsDelaunay
Field Value
Neighbors
The neighbors
public FixedArray3<DelaunayTriangle> Neighbors
Field Value
Points
The points
public FixedArray3<TriangulationPoint> Points
Field Value
Properties
IsInterior
Gets or sets the value of the is interior
public bool IsInterior { get; set; }
Property Value
Methods
Area()
Areas this instance
public double Area()
Returns
- double
-
The double
Centroid()
Centroids this instance
public TriangulationPoint Centroid()
Returns
- TriangulationPoint
-
The triangulation point
Clear()
Clears this instance
public void Clear()
ClearNeighbor(DelaunayTriangle)
Clears the neighbor using the specified triangle
public void ClearNeighbor(DelaunayTriangle triangle)
Parameters
triangle
DelaunayTriangle-
The triangle
ClearNeighbors()
Clears the neighbors
public void ClearNeighbors()
Contains(TriangulationPoint)
Describes whether this instance contains
public bool Contains(TriangulationPoint p)
Parameters
p
TriangulationPoint-
The
Returns
- bool
-
The bool
Contains(DtSweepConstraint)
Describes whether this instance contains
public bool Contains(DtSweepConstraint e)
Parameters
e
DtSweepConstraint-
The
Returns
- bool
-
The bool
Contains(TriangulationPoint, TriangulationPoint)
Describes whether this instance contains
public bool Contains(TriangulationPoint p, TriangulationPoint q)
Parameters
p
TriangulationPoint-
The
q
TriangulationPoint-
The
Returns
- bool
-
The bool
EdgeIndex(TriangulationPoint, TriangulationPoint)
Get the index of the neighbor that shares this edge (or -1 if it isn't shared)
public int EdgeIndex(TriangulationPoint p1, TriangulationPoint p2)
Parameters
Returns
- int
-
index of the shared edge or -1 if edge isn't shared
GetConstrainedEdgeAcross(TriangulationPoint)
Describes whether this instance get constrained edge across
public bool GetConstrainedEdgeAcross(TriangulationPoint p)
Parameters
p
TriangulationPoint-
The
Returns
- bool
-
The bool
GetConstrainedEdgeCCW(TriangulationPoint)
Describes whether this instance get constrained edge ccw
public bool GetConstrainedEdgeCCW(TriangulationPoint p)
Parameters
p
TriangulationPoint-
The
Returns
- bool
-
The bool
GetConstrainedEdgeCW(TriangulationPoint)
Describes whether this instance get constrained edge cw
public bool GetConstrainedEdgeCW(TriangulationPoint p)
Parameters
p
TriangulationPoint-
The
Returns
- bool
-
The bool
GetDelaunayEdgeAcross(TriangulationPoint)
Describes whether this instance get delaunay edge across
public bool GetDelaunayEdgeAcross(TriangulationPoint p)
Parameters
p
TriangulationPoint-
The
Returns
- bool
-
The bool
GetDelaunayEdgeCCW(TriangulationPoint)
Describes whether this instance get delaunay edge ccw
public bool GetDelaunayEdgeCCW(TriangulationPoint p)
Parameters
p
TriangulationPoint-
The
Returns
- bool
-
The bool
GetDelaunayEdgeCW(TriangulationPoint)
Describes whether this instance get delaunay edge cw
public bool GetDelaunayEdgeCW(TriangulationPoint p)
Parameters
p
TriangulationPoint-
The
Returns
- bool
-
The bool
IndexCCW(TriangulationPoint)
Indexes the ccw using the specified p
public int IndexCCW(TriangulationPoint p)
Parameters
p
TriangulationPoint-
The
Returns
- int
-
The int
IndexCW(TriangulationPoint)
Indexes the cw using the specified p
public int IndexCW(TriangulationPoint p)
Parameters
p
TriangulationPoint-
The
Returns
- int
-
The int
IndexOf(TriangulationPoint)
Indexes the of using the specified p
public int IndexOf(TriangulationPoint p)
Parameters
p
TriangulationPoint-
The
Returns
- int
-
The
Exceptions
- Exception
-
Calling index with a point that doesn't exist in triangle
Legalize(TriangulationPoint, TriangulationPoint)
Legalize triangle by rotating clockwise around oPoint
public void Legalize(TriangulationPoint oPoint, TriangulationPoint nPoint)
Parameters
oPoint
TriangulationPoint-
The origin point to rotate around
nPoint
TriangulationPoint-
???
MarkConstrainedEdge(int)
Marks the constrained edge using the specified index
public void MarkConstrainedEdge(int index)
Parameters
index
int-
The index
MarkConstrainedEdge(DtSweepConstraint)
Marks the constrained edge using the specified edge
public void MarkConstrainedEdge(DtSweepConstraint edge)
Parameters
edge
DtSweepConstraint-
The edge
MarkConstrainedEdge(TriangulationPoint, TriangulationPoint)
Mark edge as constrained
public void MarkConstrainedEdge(TriangulationPoint p, TriangulationPoint q)
Parameters
MarkEdge(DelaunayTriangle)
Marks the edge using the specified triangle
public void MarkEdge(DelaunayTriangle triangle)
Parameters
triangle
DelaunayTriangle-
The triangle
MarkEdge(List<DelaunayTriangle>)
Marks the edge using the specified t list
public void MarkEdge(List<DelaunayTriangle> tList)
Parameters
tList
List<DelaunayTriangle>-
The list
MarkNeighbor(TriangulationPoint, TriangulationPoint, DelaunayTriangle)
Update neighbor pointers
private void MarkNeighbor(TriangulationPoint p1, TriangulationPoint p2, DelaunayTriangle t)
Parameters
p1
TriangulationPoint-
Point 1 of the shared edge
p2
TriangulationPoint-
Point 2 of the shared edge
t
DelaunayTriangle-
This triangle's new neighbor
MarkNeighbor(DelaunayTriangle)
Exhaustive search to update neighbor pointers
public void MarkNeighbor(DelaunayTriangle t)
Parameters
MarkNeighborEdges()
Finalize edge marking
public void MarkNeighborEdges()
NeighborAcross(TriangulationPoint)
Neighbors the across using the specified point
public DelaunayTriangle NeighborAcross(TriangulationPoint point)
Parameters
point
TriangulationPoint-
The point
Returns
- DelaunayTriangle
-
The delaunay triangle
NeighborCCW(TriangulationPoint)
Neighbors the ccw using the specified point
public DelaunayTriangle NeighborCCW(TriangulationPoint point)
Parameters
point
TriangulationPoint-
The point
Returns
- DelaunayTriangle
-
The delaunay triangle
NeighborCW(TriangulationPoint)
Neighbors the cw using the specified point
public DelaunayTriangle NeighborCW(TriangulationPoint point)
Parameters
point
TriangulationPoint-
The point
Returns
- DelaunayTriangle
-
The delaunay triangle
OppositePoint(DelaunayTriangle, TriangulationPoint)
public TriangulationPoint OppositePoint(DelaunayTriangle t, TriangulationPoint p)
Parameters
t
DelaunayTriangle-
Opposite triangle
p
TriangulationPoint-
The point in t that isn't shared between the triangles
Returns
PointCCW(TriangulationPoint)
Points the ccw using the specified point
public TriangulationPoint PointCCW(TriangulationPoint point)
Parameters
point
TriangulationPoint-
The point
Returns
- TriangulationPoint
-
The triangulation point
PointCW(TriangulationPoint)
Points the cw using the specified point
public TriangulationPoint PointCW(TriangulationPoint point)
Parameters
point
TriangulationPoint-
The point
Returns
- TriangulationPoint
-
The triangulation point
RotateCW()
Rotates the cw
private void RotateCW()
SetConstrainedEdgeAcross(TriangulationPoint, bool)
Sets the constrained edge across using the specified p
public void SetConstrainedEdgeAcross(TriangulationPoint p, bool ce)
Parameters
p
TriangulationPoint-
The
ce
bool-
The ce
SetConstrainedEdgeCCW(TriangulationPoint, bool)
Sets the constrained edge ccw using the specified p
public void SetConstrainedEdgeCCW(TriangulationPoint p, bool ce)
Parameters
p
TriangulationPoint-
The
ce
bool-
The ce
SetConstrainedEdgeCW(TriangulationPoint, bool)
Sets the constrained edge cw using the specified p
public void SetConstrainedEdgeCW(TriangulationPoint p, bool ce)
Parameters
p
TriangulationPoint-
The
ce
bool-
The ce
SetDelaunayEdgeAcross(TriangulationPoint, bool)
Sets the delaunay edge across using the specified p
public void SetDelaunayEdgeAcross(TriangulationPoint p, bool ce)
Parameters
p
TriangulationPoint-
The
ce
bool-
The ce
SetDelaunayEdgeCCW(TriangulationPoint, bool)
Sets the delaunay edge ccw using the specified p
public void SetDelaunayEdgeCCW(TriangulationPoint p, bool ce)
Parameters
p
TriangulationPoint-
The
ce
bool-
The ce
SetDelaunayEdgeCW(TriangulationPoint, bool)
Sets the delaunay edge cw using the specified p
public void SetDelaunayEdgeCW(TriangulationPoint p, bool ce)
Parameters
p
TriangulationPoint-
The
ce
bool-
The ce
ToString()
Returns the string
public override string ToString()
Returns
- string
-
The string