jdsl.geomobj.api
Interface Ray2D
- All Superinterfaces:
- Curve2D, GeomObject, GeomObject2D, LinearCurve2D, OpenCurve2D
- All Known Implementing Classes:
- IntRay2D, RatRay2D, RealRay2D
- public interface Ray2D
- extends LinearCurve2D
This interface describes a two-dimensional ray. It only provides
methods that return the source of the ray and its supporting line.
Geometric tests should be performed through methods of
GeomTester2D.
- Version:
- $Id: Ray2D.java,v 1.2 2000/03/13 19:39:11 lv Exp $
- Author:
- Luca Vismara (lv)
source
public Point2D source()
- Returns:
- the source point of this
other
public Point2D other()
- Returns:
- the non-source point of this
isDownward
public boolean isDownward()
- Returns:
- whether this is directed downward, i.e., whether the
source point is the topmost point of this
isUpward
public boolean isUpward()
- Returns:
- whether this is directed upward, i.e., whether the source
point is the bottommost point of this
isLeftward
public boolean isLeftward()
- Returns:
- whether this is directed leftward, i.e., whether the
source point is the rightmost point of this
isRightward
public boolean isRightward()
- Returns:
- whether this is directed rightward, i.e., whether the
source point is the leftmost point of this
supportingLine
public Line2D supportingLine()
- Returns:
- the line passing through the source point and with the
same direction of this