Class Ray

java.lang.Object
  extended by Ray

public class Ray
extends java.lang.Object

Represents a ray in three-dimensional coordinates, including an originating point and a direction vector.


Method Summary
static Ray create(Point origin, Vector direction)
          Creates a ray with the given originating point and direction.
 Point extend(double multiplier)
          Returns the point along the ray where the direction, scaled by the given multiplier, has been added to the originating point.
 Vector getDirection()
          Returns the direction of this ray.
 Point getOrigin()
          Returns the originating point of this ray.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getOrigin

public Point getOrigin()
Returns the originating point of this ray.


getDirection

public Vector getDirection()
Returns the direction of this ray.


extend

public Point extend(double multiplier)
Returns the point along the ray where the direction, scaled by the given multiplier, has been added to the originating point.


create

public static Ray create(Point origin,
                         Vector direction)
Creates a ray with the given originating point and direction.