math
Class Ray

java.lang.Object
  extended by math.Ray

public class Ray
extends java.lang.Object

a ray


Field Summary
 Vector3D direction
           
 Point3D start
           
 
Constructor Summary
Ray()
          standard constructor
Ray(Point3D start, Vector3D direction)
          constructor
Ray(Ray ray)
          copy constructor
 
Method Summary
 void advance(double t)
          advances the start point of the ray by t*direction
 Point3D getPoint(double t)
          returns the point start+t*direction
 void set(Point3D start, Vector3D direction)
          sets the ray
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

start

public Point3D start

direction

public Vector3D direction
Constructor Detail

Ray

public Ray()
standard constructor


Ray

public Ray(Ray ray)
copy constructor

Parameters:
ray - [in] the ray to copy

Ray

public Ray(Point3D start,
           Vector3D direction)
constructor

Parameters:
start - [in] start point
direction - [in] vector of direction
Method Detail

set

public void set(Point3D start,
                Vector3D direction)
sets the ray

Parameters:
start - [in] start point
direction - [in] vector of direction

getPoint

public Point3D getPoint(double t)
returns the point start+t*direction

Parameters:
t - [in] distance
Returns:
start+t*direction

advance

public void advance(double t)
advances the start point of the ray by t*direction

Parameters:
t - [in] distance to advance the ray