|
JTS Topology Suite version 1.12 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.vividsolutions.jts.triangulate.quadedge.TrianglePredicate
public class TrianglePredicate
Algorithms for computing values and predicates associated with triangles. For some algorithms extended-precision implementations are provided, which are more robust (i.e. they produce correct answers in more cases). Also, some more robust formulations of some algorithms are provided, which utilize normalization to the origin.
Constructor Summary | |
---|---|
TrianglePredicate()
|
Method Summary | |
---|---|
static boolean |
isInCircleCC(Coordinate a,
Coordinate b,
Coordinate c,
Coordinate p)
Computes the inCircle test using distance from the circumcentre. |
static boolean |
isInCircleDDFast(Coordinate a,
Coordinate b,
Coordinate c,
Coordinate p)
|
static boolean |
isInCircleDDNormalized(Coordinate a,
Coordinate b,
Coordinate c,
Coordinate p)
|
static boolean |
isInCircleDDSlow(Coordinate a,
Coordinate b,
Coordinate c,
Coordinate p)
Tests if a point is inside the circle defined by the triangle with vertices a, b, c (oriented counter-clockwise). |
static boolean |
isInCircleNonRobust(Coordinate a,
Coordinate b,
Coordinate c,
Coordinate p)
Tests if a point is inside the circle defined by the triangle with vertices a, b, c (oriented counter-clockwise). |
static boolean |
isInCircleNormalized(Coordinate a,
Coordinate b,
Coordinate c,
Coordinate p)
Tests if a point is inside the circle defined by the triangle with vertices a, b, c (oriented counter-clockwise). |
static boolean |
isInCircleRobust(Coordinate a,
Coordinate b,
Coordinate c,
Coordinate p)
Tests if a point is inside the circle defined by the triangle with vertices a, b, c (oriented counter-clockwise). |
static DD |
triAreaDDFast(Coordinate a,
Coordinate b,
Coordinate c)
|
static DD |
triAreaDDSlow(DD ax,
DD ay,
DD bx,
DD by,
DD cx,
DD cy)
Computes twice the area of the oriented triangle (a, b, c), i.e., the area is positive if the triangle is oriented counterclockwise. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TrianglePredicate()
Method Detail |
---|
public static boolean isInCircleNonRobust(Coordinate a, Coordinate b, Coordinate c, Coordinate p)
a
- a vertex of the triangleb
- a vertex of the trianglec
- a vertex of the triangleP
- the point to test
public static boolean isInCircleNormalized(Coordinate a, Coordinate b, Coordinate c, Coordinate p)
Based on code by J.R.Shewchuk.
a
- a vertex of the triangleb
- a vertex of the trianglec
- a vertex of the triangleP
- the point to test
public static boolean isInCircleRobust(Coordinate a, Coordinate b, Coordinate c, Coordinate p)
a
- a vertex of the triangleb
- a vertex of the trianglec
- a vertex of the triangleP
- the point to test
public static boolean isInCircleDDSlow(Coordinate a, Coordinate b, Coordinate c, Coordinate p)
DD
arithmetic for robustness.
a
- a vertex of the triangleb
- a vertex of the trianglec
- a vertex of the triangleP
- the point to test
public static DD triAreaDDSlow(DD ax, DD ay, DD bx, DD by, DD cx, DD cy)
DD
arithmetic for robustness.
ax
- the x ordinate of a vertex of the triangleay
- the y ordinate of a vertex of the trianglebx
- the x ordinate of a vertex of the triangleby
- the y ordinate of a vertex of the trianglecx
- the x ordinate of a vertex of the trianglecy
- the y ordinate of a vertex of the trianglepublic static boolean isInCircleDDFast(Coordinate a, Coordinate b, Coordinate c, Coordinate p)
public static DD triAreaDDFast(Coordinate a, Coordinate b, Coordinate c)
public static boolean isInCircleDDNormalized(Coordinate a, Coordinate b, Coordinate c, Coordinate p)
public static boolean isInCircleCC(Coordinate a, Coordinate b, Coordinate c, Coordinate p)
In general this doesn't appear to be any more robust than the standard calculation. However, there is at least one case where the test point is far enough from the circumcircle that this test gives the correct answer.
LINESTRING (1507029.9878 518325.7547, 1507022.1120341457 518332.8225183258, 1507029.9833 518325.7458, 1507029.9896965567 518325.744909031)
a
- a vertex of the triangleb
- a vertex of the trianglec
- a vertex of the trianglep
- the point to test
|
JTS Topology Suite version 1.12 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |