protected static class VerticalDecomposition.DecompositionPoint
extends java.awt.geom.Point2D
Modifier and Type | Field and Description |
---|---|
private java.awt.geom.Point2D |
point
The point of this structure.
|
private java.util.List<VerticalDecomposition.Line> |
segments
The segments that this point bounds.
|
Constructor and Description |
---|
DecompositionPoint(double x,
double y)
Constructs a new decomposition point
on the given coordinates.
|
DecompositionPoint(java.awt.geom.Point2D point)
Constructs a new decomposition point
on the given point in space.
|
Modifier and Type | Method and Description |
---|---|
void |
addSegment(VerticalDecomposition.Line seg)
Adds a segment to the list of segments that this point is part of.
|
boolean |
equals(java.lang.Object other) |
VerticalDecomposition.Trapezoid |
getIntersectedTrapezoidToTheLeft(java.awt.geom.Line2D seg)
Gets the trapezoid to the left that contains the given segment.
|
VerticalDecomposition.Trapezoid |
getIntersectedTrapezoidToTheRight(java.awt.geom.Line2D seg)
Gets the trapezoid to the right that contains the given segment.
|
java.awt.geom.Point2D |
getPoint()
Gets the point of this structure.
|
java.util.List<VerticalDecomposition.Line> |
getSegments()
Gets the list of segments that this point is part of.
|
double |
getX() |
double |
getY() |
int |
hashCode() |
void |
removeSegment(VerticalDecomposition.Line seg)
Removes a segment from the list of segments that this point is part of.
|
void |
setLocation(double x,
double y) |
private java.awt.geom.Point2D point
private java.util.List<VerticalDecomposition.Line> segments
public DecompositionPoint(double x, double y)
x
- The x coordinate.y
- The y coordinate.public DecompositionPoint(java.awt.geom.Point2D point)
point
- The point this structure represents.public boolean equals(java.lang.Object other)
equals
in class java.awt.geom.Point2D
public int hashCode()
hashCode
in class java.awt.geom.Point2D
public java.awt.geom.Point2D getPoint()
public java.util.List<VerticalDecomposition.Line> getSegments()
public void addSegment(VerticalDecomposition.Line seg)
seg
- The segment to add to the list of segments that this point is part of.public void removeSegment(VerticalDecomposition.Line seg)
seg
- The segment to remove from the list of segments.public VerticalDecomposition.Trapezoid getIntersectedTrapezoidToTheRight(java.awt.geom.Line2D seg)
seg
- The query segment.null
if this point is not the left point of the
segment or the segment is vertical.public VerticalDecomposition.Trapezoid getIntersectedTrapezoidToTheLeft(java.awt.geom.Line2D seg)
seg
- The query segment.null
if this point is right point of the segment
or the segment is vertical.public double getX()
getX
in class java.awt.geom.Point2D
public double getY()
getY
in class java.awt.geom.Point2D
public void setLocation(double x, double y)
setLocation
in class java.awt.geom.Point2D