|
JTS Topology Suite version 1.13 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.vividsolutions.jts.geomgraph.Quadrant
public class Quadrant
Utility functions for working with quadrants, which are numbered as follows:
1 | 0 --+-- 2 | 3
Field Summary | |
---|---|
static int |
NE
|
static int |
NW
|
static int |
SE
|
static int |
SW
|
Constructor Summary | |
---|---|
Quadrant()
|
Method Summary | |
---|---|
static int |
commonHalfPlane(int quad1,
int quad2)
Returns the right-hand quadrant of the halfplane defined by the two quadrants, or -1 if the quadrants are opposite, or the quadrant if they are identical. |
static boolean |
isInHalfPlane(int quad,
int halfPlane)
Returns whether the given quadrant lies within the given halfplane (specified by its right-hand quadrant). |
static boolean |
isNorthern(int quad)
Returns true if the given quadrant is 0 or 1. |
static boolean |
isOpposite(int quad1,
int quad2)
Returns true if the quadrants are 1 and 3, or 2 and 4 |
static int |
quadrant(Coordinate p0,
Coordinate p1)
Returns the quadrant of a directed line segment from p0 to p1. |
static int |
quadrant(double dx,
double dy)
Returns the quadrant of a directed line segment (specified as x and y displacements, which cannot both be 0). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int NE
public static final int NW
public static final int SW
public static final int SE
Constructor Detail |
---|
public Quadrant()
Method Detail |
---|
public static int quadrant(double dx, double dy)
java.lang.IllegalArgumentException
- if the displacements are both 0public static int quadrant(Coordinate p0, Coordinate p1)
java.lang.IllegalArgumentException
- if the points are equalpublic static boolean isOpposite(int quad1, int quad2)
public static int commonHalfPlane(int quad1, int quad2)
public static boolean isInHalfPlane(int quad, int halfPlane)
public static boolean isNorthern(int quad)
|
JTS Topology Suite version 1.13 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |