public class SimpleTriangle extends Object
Constructor and Description |
---|
SimpleTriangle(IIncrementalTin tin,
IQuadEdge a)
Construct a simple triangle from the specified edges.
|
SimpleTriangle(IIncrementalTin tin,
IQuadEdge a,
IQuadEdge b,
IQuadEdge c)
Construct a simple triangle from the specified edges.
|
Modifier and Type | Method and Description |
---|---|
double |
getArea()
Gets the area of the triangle.
|
Circumcircle |
getCircumcircle()
Obtains the circumcircle for a simple triangle.
|
IConstraint |
getContainingRegion()
Gets the polygon-based constraint that contains this triangle, if any.
|
IQuadEdge |
getEdgeA()
Get edge a from the triangle
|
IQuadEdge |
getEdgeB()
Get edge b from the triangle
|
IQuadEdge |
getEdgeC()
Get edge c from the triangle
|
Path2D |
getPath2D(AffineTransform transform)
Gets a Java Path2D based on the geometry of the triangle mapped through an
optional affine transform.
|
Vertex |
getVertexA()
Gets vertex A of the triangle.
|
Vertex |
getVertexB()
Gets vertex B of the triangle.
|
Vertex |
getVertexC()
Gets vertex A of the triangle.
|
boolean |
isGhost()
Indicates whether the triangle is a ghost triangle.
|
public SimpleTriangle(IIncrementalTin tin, IQuadEdge a, IQuadEdge b, IQuadEdge c)
tin
- a reference to the TIN that was used to create this triangle.a
- a valid edgeb
- a valid edgec
- a valid edgepublic SimpleTriangle(IIncrementalTin tin, IQuadEdge a)
tin
- a reference to the TIN that was used to create this triangle.a
- a valid edge which must be a member of the specified TIN.public IQuadEdge getEdgeA()
public IQuadEdge getEdgeB()
public IQuadEdge getEdgeC()
public Vertex getVertexA()
public Vertex getVertexB()
public Vertex getVertexC()
public double getArea()
public IConstraint getContainingRegion()
Under ConstructionThis method is not yet complete. Because the Tinfour implementation does not yet record which side of an edge an region-based constraint lies on, there are cases involving constraint borders that will not be accurately detected. It can only reliably report membership when a triangle has at least one edge that is entirely inside a constraint area
public Path2D getPath2D(AffineTransform transform)
transform
- a valid transform, or the null to use the identity
transform.public Circumcircle getCircumcircle()
This method uses an ordinary-precision computation for circumcircles that yields acceptable accuracy for well-formed triangles. Applications that need more accuracy or may need to deal with nearly degenerate triangles (nearly flat triangles) may prefer to use Tinfour's GeometricOperations class for that purpose.
public boolean isGhost()
The TriangleCollector class does not produce ghost triangles, but those created from perimeter edges may be ghosts.
Copyright © 2021. All rights reserved.