es.ucm.look.ar.math.geom
Class Ray

java.lang.Object
  extended by es.ucm.look.ar.math.geom.Ray

public class Ray
extends java.lang.Object

Represents a geometric ray, compound of a Point3 and a Vector3


Constructor Summary
Ray(Point3 p, Vector3 v)
          Constructs a ray from a point and a vector
 
Method Summary
 Point3 getPoint()
          Returns the starting point for this ray
 Point3 getPoint(float t)
          Returns the point in the ray that corresponds to the given t parameter
 Vector3 getVector()
          Returns the vector defining the ray
static Ray getVolatileRay(Point3 p, Vector3 v)
           
 void setVector(float x, float y, float z)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Ray

public Ray(Point3 p,
           Vector3 v)
Constructs a ray from a point and a vector

Parameters:
p - the point
v - the vector
Method Detail

getPoint

public Point3 getPoint()
Returns the starting point for this ray

Returns:
the starting point for this ray

getPoint

public Point3 getPoint(float t)
Returns the point in the ray that corresponds to the given t parameter

Parameters:
t - t parameter
Returns:
the corresponding point

getVector

public Vector3 getVector()
Returns the vector defining the ray

Returns:
the vector defining the ray

getVolatileRay

public static Ray getVolatileRay(Point3 p,
                                 Vector3 v)

setVector

public void setVector(float x,
                      float y,
                      float z)