public final class CompJGeom
extends java.lang.Object
Constructor and Description |
---|
CompJGeom() |
Modifier and Type | Method and Description |
---|---|
static double |
distLineToLine(JPoint2DD p1,
JPoint2DD p2,
JPoint2DD q1,
JPoint2DD q2,
CoordSysInfo CSI)
Compute the distance from a line to a line.
|
static double |
distToLine(double px,
double py,
double q1x,
double q1y,
double q2x,
double q2y)
Finds the planar closest distance from a point to a line segment.
|
static double |
distToLine(JPoint2DD pt,
JPoint2DD q1,
JPoint2DD q2,
CoordSysInfo CSI)
Compute the distance from a point to a line.
|
static double |
distToPoint(double q1x,
double q1y,
double q2x,
double q2y)
Finds the planar closest distance from a point to a point.
|
static double |
distToPoint(JPoint2DD p1,
JPoint2DD p2,
CoordSysInfo CSI)
Compute the distance from a point to a line.
|
static double |
isInsideCheck(JGeometry geom1,
JGeometry geom2,
CoordSysInfo CSI) |
static double |
jmdDcl(JGeometry geom1,
JGeometry geom2,
CoordSysInfo CSI) |
static double |
jmdDclcl(JGeometry geom1,
JGeometry geom2,
CoordSysInfo CSI) |
static double |
jmdDcurv(JGeometry geom1,
JGeometry geom2,
CoordSysInfo CSI) |
static double |
jmdDistance(JGeometry geom1,
JGeometry geom2,
CoordSysInfo CSI) |
static double |
jmdDlinecurve(JPoint2DD[] line1,
JGeometry geom,
CoordSysInfo CSI) |
static double |
jmdDlinepolygon(JPoint2DD[] line1,
JGeometry geom,
CoordSysInfo CSI) |
static double |
jmdDpg(JGeometry geom1,
JGeometry geom2,
CoordSysInfo CSI) |
static double |
jmdDpgpg(JGeometry geom1,
JGeometry geom2,
CoordSysInfo CSI) |
static double |
jmdDpnt(JGeometry geom1,
JGeometry geom2,
CoordSysInfo CSI) |
static double |
jmdDpntcurve(JPoint2DD p1,
JGeometry geom2,
CoordSysInfo CSI) |
static double |
jmdDpntpolygon(JPoint2DD point,
JGeometry geom,
CoordSysInfo CSI) |
static boolean |
lineLineIntersect(double a1x,
double a1y,
double a2x,
double a2y,
double b1x,
double b1y,
double b2x,
double b2y,
double[] c)
Finds the open-set intersection of two line segments, if any.
|
static double |
MBRDistance(double[] mbrA,
double[] mbrB,
CoordSysInfo CSI) |
static boolean |
MBRIscts(double[] mbrA,
double[] mbrB,
CoordSysInfo CSI) |
public static final boolean lineLineIntersect(double a1x, double a1y, double a2x, double a2y, double b1x, double b1y, double b2x, double b2y, double[] c)
Returns false ("no intersection") if the lines are nearly parallel (regardless of whether they cross).
If the end-point of a segment lies very near to the other segment, intersection test is not reliable; the caller should test the point-on-line case separately. If the endpoint lies exactly on an endpoint of the other segment this method guarantees to return false.
a1x
- the first endpoint x-value of line segment aa1y
- the first endpoint y-value of line segment aa2x
- the first endpoint x-value of line segment aa2y
- the first endpoint y-value of line segment ab1x
- the first endpoint x-value of line segment bb1y
- the first endpoint y-value of line segment bb2x
- the first endpoint x-value of line segment bb2y
- the first endpoint y-value of line segment ac
- the intersection (if any). May pass null. If non-null, may be overwritten even if result is false.public static final double distToPoint(JPoint2DD p1, JPoint2DD p2, CoordSysInfo CSI)
p1
- the pointp2
- other end of the lineCSI
- coordinate systempublic static final double distToLine(JPoint2DD pt, JPoint2DD q1, JPoint2DD q2, CoordSysInfo CSI)
pt
- the pointq1
- one end of the lineq2
- other end of the lineCSI
- coordinate systempublic static final double distLineToLine(JPoint2DD p1, JPoint2DD p2, JPoint2DD q1, JPoint2DD q2, CoordSysInfo CSI)
pt1
- one end of the linept2
- other end of the lineq1
- one end of the lineq2
- other end of the lineCSI
- coordinate systempublic static final double distToPoint(double q1x, double q1y, double q2x, double q2y)
p1
- The first pointp2
- The second pointpublic static final double distToLine(double px, double py, double q1x, double q1y, double q2x, double q2y)
p
- The pointq1
- The first vertex of the line segmentq2
- The second vertex of the line segmentpublic static double jmdDistance(JGeometry geom1, JGeometry geom2, CoordSysInfo CSI)
public static double jmdDpnt(JGeometry geom1, JGeometry geom2, CoordSysInfo CSI)
public static double jmdDcurv(JGeometry geom1, JGeometry geom2, CoordSysInfo CSI)
public static double jmdDpntcurve(JPoint2DD p1, JGeometry geom2, CoordSysInfo CSI)
public static double jmdDlinecurve(JPoint2DD[] line1, JGeometry geom, CoordSysInfo CSI)
public static double jmdDlinepolygon(JPoint2DD[] line1, JGeometry geom, CoordSysInfo CSI)
public static double jmdDpntpolygon(JPoint2DD point, JGeometry geom, CoordSysInfo CSI)
public static double jmdDpg(JGeometry geom1, JGeometry geom2, CoordSysInfo CSI)
public static double jmdDpgpg(JGeometry geom1, JGeometry geom2, CoordSysInfo CSI)
public static double jmdDcl(JGeometry geom1, JGeometry geom2, CoordSysInfo CSI)
public static double jmdDclcl(JGeometry geom1, JGeometry geom2, CoordSysInfo CSI)
public static boolean MBRIscts(double[] mbrA, double[] mbrB, CoordSysInfo CSI)
public static double MBRDistance(double[] mbrA, double[] mbrB, CoordSysInfo CSI)
public static double isInsideCheck(JGeometry geom1, JGeometry geom2, CoordSysInfo CSI)