public class SimpleTriangle extends Object
| Constructor and Description |
|---|
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.
|
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.
|
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 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.Copyright © 2019. All rights reserved.