public final class Line2D extends Object implements Component2D
Line Line2D
Construction takes O(n log n)
time for sorting and tree construction.
relate()
are O(n)
, but for most practical lines are much faster than brute force.
Component2D.WithinRelation
Modifier and Type | Method and Description |
---|---|
boolean |
contains(double x,
double y) |
static Component2D |
create(Line... lines)
create a Line2D edge tree from provided array of Linestrings
|
static Component2D |
create(XYLine... lines)
create a Line2D edge tree from provided array of Linestrings
|
double |
getMaxX() |
double |
getMaxY() |
double |
getMinX() |
double |
getMinY() |
PointValues.Relation |
relate(double minX,
double maxX,
double minY,
double maxY) |
PointValues.Relation |
relateTriangle(double minX,
double maxX,
double minY,
double maxY,
double ax,
double ay,
double bx,
double by,
double cx,
double cy) |
Component2D.WithinRelation |
withinTriangle(double minX,
double maxX,
double minY,
double maxY,
double ax,
double ay,
boolean ab,
double bx,
double by,
boolean bc,
double cx,
double cy,
boolean ca) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
containsPoint, disjoint, pointInTriangle, relateTriangle, within, withinTriangle
public double getMinX()
getMinX
in interface Component2D
public double getMaxX()
getMaxX
in interface Component2D
public double getMinY()
getMinY
in interface Component2D
public double getMaxY()
getMaxY
in interface Component2D
public boolean contains(double x, double y)
contains
in interface Component2D
public PointValues.Relation relate(double minX, double maxX, double minY, double maxY)
relate
in interface Component2D
public PointValues.Relation relateTriangle(double minX, double maxX, double minY, double maxY, double ax, double ay, double bx, double by, double cx, double cy)
relateTriangle
in interface Component2D
public Component2D.WithinRelation withinTriangle(double minX, double maxX, double minY, double maxY, double ax, double ay, boolean ab, double bx, double by, boolean bc, double cx, double cy, boolean ca)
withinTriangle
in interface Component2D
public static Component2D create(Line... lines)
public static Component2D create(XYLine... lines)
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.