|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--raytracer.internal.Ray
Representation of a ray
Constructor Summary | |
Ray(Point p,
Vector v)
Creates a ray |
Method Summary | |
Ray |
advance(float t)
Returns a new ray with the same direction but an "advanced" starting point (to avoid numeric problems) |
Point |
pointAt(float t)
Returns the point which is t units away (in the ray direction) from the ray starting point |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Ray(Point p, Vector v)
p
- Point where the ray startsv
- Direction vector of the rayMethod Detail |
public Point pointAt(float t)
t
- Number of units
public Ray advance(float t)
t
- Number of units to shift
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |