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)

Inner classes inherited from class jdsl.geomobj.api.GeomObject2D
GeomObject2D.NoneGeomObject2D
 
Fields inherited from interface jdsl.geomobj.api.GeomObject2D
NONE
 
Method Summary
 Point2D bottomPoint()
           
 Point2D leftPoint()
           
 Point2D rightPoint()
           
 Line2D supportingLine()
           
 Point2D topPoint()
           
 
Methods inherited from interface jdsl.geomobj.api.LinearCurve2D
direction, isDecreasing, isHorizontal, isIncreasing, isVertical
 
Methods inherited from interface jdsl.geomobj.api.OpenCurve2D
points
 
Methods inherited from interface jdsl.geomobj.api.GeomObject
arithmeticType, dim
 

Method Detail

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