public static class Voronoi.Triangle
extends java.lang.Object
implements java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
CoordDouble |
a |
CoordDouble |
b |
CoordDouble |
c |
CoordDouble |
centroid |
| Constructor and Description |
|---|
Triangle(CoordDouble a,
CoordDouble b,
CoordDouble c)
Constructor of the 2D triangle class used to create a new triangle
instance from three 2D vectors describing the triangle's vertices.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(CoordDouble point)
Tests if a 2D point lies inside this 2D triangle.
|
CoordDouble |
getNonEdgeVertex(CoordDouble ea,
CoordDouble eb) |
CoordDouble |
getNonEdgeVertex(Voronoi.Edge edge)
Returns the vertex of this triangle that is not part of the given edge.
|
boolean |
hasVertex(CoordDouble vertex)
Returns true if the given vertex is one of the vertices describing this
triangle.
|
boolean |
isNeighbor(CoordDouble ea,
CoordDouble eb) |
boolean |
isNeighbor(Voronoi.Edge edge)
Returns true if this triangle contains the given edge.
|
boolean |
isOrientedCCW()
Test if this triangle is oriented counterclockwise (CCW).
|
boolean |
isPointInCircumcircle(CoordDouble point)
Tests if a given point lies in the circumcircle of this triangle.
|
java.lang.String |
toString() |
public CoordDouble a
public CoordDouble b
public CoordDouble c
public CoordDouble centroid
public Triangle(CoordDouble a, CoordDouble b, CoordDouble c)
a - The first vertex of the triangleb - The second vertex of the trianglec - The third vertex of the trianglepublic boolean contains(CoordDouble point)
point - The point to be testedpublic boolean isPointInCircumcircle(CoordDouble point)
point - The point to be testedpublic boolean isOrientedCCW()
public boolean isNeighbor(Voronoi.Edge edge)
edge - The edge to be testedpublic boolean isNeighbor(CoordDouble ea, CoordDouble eb)
public CoordDouble getNonEdgeVertex(Voronoi.Edge edge)
edge - The edgepublic CoordDouble getNonEdgeVertex(CoordDouble ea, CoordDouble eb)
public boolean hasVertex(CoordDouble vertex)
vertex - The vertex to be testedpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © Eben Howard 2012–2022. All rights reserved.