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)

Inner classes inherited from class jdsl.geomobj.api.GeomObject2D
GeomObject2D.NoneGeomObject2D
 
Fields inherited from interface jdsl.geomobj.api.GeomObject2D
NONE
 
Method Summary
 boolean isDownward()
           
 boolean isLeftward()
           
 boolean isRightward()
           
 boolean isUpward()
           
 Point2D other()
           
 Point2D source()
           
 Line2D supportingLine()
           
 
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

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