public class StraightLine2D extends Object
| Constructor and Description |
|---|
StraightLine2D(Point2D source,
Point2D target)
Creates a new straight line from two points belonging to the line
|
StraightLine2D(Point2D origin,
Vector2D direction)
Creates a new straight line from an origin and a direction vector.
|
| Modifier and Type | Method and Description |
|---|---|
double |
distance(Point2D point)
Computes the distance between this line and a query point.
|
Vector2D |
getDirection() |
Point2D |
getOrigin() |
public StraightLine2D(Point2D origin, Vector2D direction)
origin - the origin of the linedirection - the direction vector of the linepublic Point2D getOrigin()
public Vector2D getDirection()
public double distance(Point2D point)
point - the query pointCopyright © 2014–2023 INRA-IJPB Modeling and Digital Imaging lab. All rights reserved.