public class Segment2D extends Object
Modifier and Type | Field and Description |
---|---|
protected Point2D.Float |
a
Endpoints.
|
protected Point2D.Float |
b
Endpoints.
|
Constructor and Description |
---|
Segment2D(float[] a,
float[] b)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
boundingBoxOverlapsBoundingBoxOf(Segment2D y)
Whether another segment meets the bounding box of this segment.
|
Point2D.Float |
getPtA() |
Point2D.Float |
getPtB() |
boolean |
intersects(Segment2D y)
Whether another segment intersects this one.
|
boolean |
straddles(Segment2D y)
Whether another segment crosses the line defined by this segment.
|
String |
toString() |
protected Point2D.Float a
protected Point2D.Float b
public Point2D.Float getPtA()
public Point2D.Float getPtB()
public boolean intersects(Segment2D y)
public boolean boundingBoxOverlapsBoundingBoxOf(Segment2D y)
public boolean straddles(Segment2D y)
Copyright © 2015–2022 SciJava. All rights reserved.