public class XyRay extends java.lang.Object implements Immutable
Rays begin at a point and extend infinitely far in a single direction. You can think of them as a "half" line, since you can place a point arbitrarily along a run and split it into two rays going in opposite directions.
Copyright 2007 Partner Software, Inc.
| Constructor and Description |
|---|
XyRay(XyPoint point,
XyDirection direction)
Construct a ray from the given point and direction.
|
| Modifier and Type | Method and Description |
|---|---|
XyDirection |
getDirection() |
XyLine |
getLine()
Returns the line this ray forms a portion of.
|
XyPoint |
getPoint() |
XyVector |
toUnitVector()
Returns a unit vector with the same direction as this ray.
|
XyRay |
withDirection(XyDirection newDirection) |
XyRay |
withPoint(XyPoint newPoint) |
public XyRay(XyPoint point, XyDirection direction)
public XyRay withDirection(XyDirection newDirection)
public XyVector toUnitVector()
public XyPoint getPoint()
public XyDirection getDirection()
public XyLine getLine()