jdsl.geomobj.api
Interface Segment2D
- All Superinterfaces:
- Curve2D, GeomObject, GeomObject2D, LinearCurve2D, OpenCurve2D
- All Known Implementing Classes:
- IntSegment2D, RealSegment2D, RatSegment2D
- public interface Segment2D
- extends LinearCurve2D
This interface describes a two-dimensional segment. It only
provides methods that return the endpoints of the segment.
Geometric tests should be performed through methods of
GeomTester2D.
- Version:
- $Id: Segment2D.java,v 1.1 2000/03/06 21:30:44 lv Exp $
- Author:
- Luca Vismara (lv)
bottomPoint
public Point2D bottomPoint()
- Returns:
- the bottom endpoint of this; any endpoint if this is
horizontal
topPoint
public Point2D topPoint()
- Returns:
- the top endpoint of this; any endpoint if this is
horizontal
leftPoint
public Point2D leftPoint()
- Returns:
- the leftmost endpoint of this; any endpoint if this is
vertical
rightPoint
public Point2D rightPoint()
- Returns:
- the rightmost endpoint of this; any endpoint if this is
vertical
supportingLine
public Line2D supportingLine()
- Returns:
- the line passing through the endpoints and with the same
direction of this