Class Ray3D

java.lang.Object
  extended by Ray3D

public class Ray3D
extends java.lang.Object

This class contains methods to handle Ray3D objects.


Constructor Summary
Ray3D()
          Constructor to create a Ray3D.
Ray3D(Vector4 p, Vector4 d)
          Constructor to create a Ray3D.
 
Method Summary
 Vector4 getDirection()
          Returns the direction of the Ray3D.
 Vector4 getPoint()
          Returns the starting point of the Ray3D.
 Vector4 getPosition(float t)
          Returns a position along a Ray3D
 void setDirection(Vector4 d)
          Sets a new direction to the Ray3D.
 void setPoint(Vector4 p)
          Sets a new starting point to the Ray3D.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Ray3D

public Ray3D(Vector4 p,
             Vector4 d)
Constructor to create a Ray3D.

Parameters:
p - a Vector4 containing the startposition of the ray.
d - a Vector4 containing the direction of the ray.

Ray3D

public Ray3D()
Constructor to create a Ray3D.

Method Detail

setDirection

public void setDirection(Vector4 d)
Sets a new direction to the Ray3D.

Parameters:
d - a Vector4 containing the new direction.

setPoint

public void setPoint(Vector4 p)
Sets a new starting point to the Ray3D.

Parameters:
p - a Vector4 containing the new startpoint.

getDirection

public Vector4 getDirection()
Returns the direction of the Ray3D.

Returns:
a Vector4 containing the direction.

getPoint

public Vector4 getPoint()
Returns the starting point of the Ray3D.

Returns:
a Vector4 containing the point.

getPosition

public Vector4 getPosition(float t)
Returns a position along a Ray3D

Parameters:
t - the parameter
Returns:
a Vector4 containing the position.