com.vividsolutions.jts.triangulate.quadedge
public class QuadEdgeTriangle extends java.lang.Object
Quadedge
s in a Subdivision
. Provides methods to
access the topological and geometric properties of the triangle. Triangle edges are oriented CCW.Constructor and Description |
---|
QuadEdgeTriangle(QuadEdge[] edge) |
Modifier and Type | Method and Description |
---|---|
boolean |
contains(Coordinate pt) |
static boolean |
contains(QuadEdge[] tri,
Coordinate pt)
Tests whether the point pt is contained in the triangle defined by 3
QuadEdge es. |
static boolean |
contains(Vertex[] tri,
Coordinate pt)
Tests whether the point pt is contained in the triangle defined by 3
Vertex es. |
QuadEdgeTriangle |
getAdjacentTriangleAcrossEdge(int edgeIndex) |
int |
getAdjacentTriangleEdgeIndex(int i) |
Coordinate |
getCoordinate(int i) |
Coordinate[] |
getCoordinates() |
QuadEdge |
getEdge(int i) |
int |
getEdgeIndex(QuadEdge e)
Gets the index for the given edge of this triangle
|
int |
getEdgeIndex(Vertex v)
Gets the index for the edge that starts at vertex v.
|
QuadEdge[] |
getEdges() |
void |
getEdgeSegment(int i,
LineSegment seg) |
Geometry |
getGeometry(GeometryFactory fact) |
QuadEdgeTriangle[] |
getNeighbours()
Gets the neighbours of this triangle.
|
java.util.List |
getTrianglesAdjacentToVertex(int vertexIndex) |
Vertex |
getVertex(int i) |
Vertex[] |
getVertices()
Gets the vertices for this triangle.
|
boolean |
isBorder()
Tests whether this triangle is adjacent to the outside of the subdivision.
|
boolean |
isBorder(int i) |
boolean |
isLive() |
void |
kill() |
static int |
nextIndex(int index)
Finds the next index around the triangle.
|
static Geometry |
toPolygon(QuadEdge[] e) |
static Geometry |
toPolygon(Vertex[] v) |
java.lang.String |
toString() |
public QuadEdgeTriangle(QuadEdge[] edge)
public static boolean contains(Vertex[] tri, Coordinate pt)
Vertex
es.tri
- an array containing at least 3 Vertexespt
- the point to testpublic static boolean contains(QuadEdge[] tri, Coordinate pt)
QuadEdge
es.tri
- an array containing at least 3 QuadEdgespt
- the point to testpublic static int nextIndex(int index)
index
- public void kill()
public boolean isLive()
public QuadEdge[] getEdges()
public QuadEdge getEdge(int i)
public Vertex getVertex(int i)
public Vertex[] getVertices()
public Coordinate getCoordinate(int i)
public int getEdgeIndex(QuadEdge e)
e
- a QuadEdgepublic int getEdgeIndex(Vertex v)
v
- the vertex to find the edge forpublic void getEdgeSegment(int i, LineSegment seg)
public Coordinate[] getCoordinates()
public boolean contains(Coordinate pt)
public Geometry getGeometry(GeometryFactory fact)
public java.lang.String toString()
toString
in class java.lang.Object
public boolean isBorder()
public boolean isBorder(int i)
public QuadEdgeTriangle getAdjacentTriangleAcrossEdge(int edgeIndex)
public int getAdjacentTriangleEdgeIndex(int i)
public java.util.List getTrianglesAdjacentToVertex(int vertexIndex)
public QuadEdgeTriangle[] getNeighbours()
null