org.apache.lucene.spatial.geometry.shape
Class LineSegment
java.lang.Object
org.apache.lucene.spatial.geometry.shape.LineSegment
public class LineSegment
- extends Object
2d line segment.
NOTE: This API is still in
flux and might change in incompatible ways in the next
release.
Method Summary |
double |
distance(Point2D P,
Point2D closestPt)
Finds the distance of a specified point from the line segment and the
closest point on the segment to the specified point. |
boolean |
equals(Object obj)
|
int |
hashCode()
|
A
public final Point2D A
B
public final Point2D B
LineSegment
public LineSegment()
LineSegment
public LineSegment(Point2D p1,
Point2D p2)
distance
public double distance(Point2D P,
Point2D closestPt)
- Finds the distance of a specified point from the line segment and the
closest point on the segment to the specified point.
- Parameters:
P
- Test point.closestPt
- (Return) Closest point on the segment to c.
- Returns:
- Returns the distance from P to the closest point on the segment.
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
equals
public boolean equals(Object obj)
- Overrides:
equals
in class Object
Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.