|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttracer.Ray
public class Ray
Represents a ray: a ray can `trace' itself, calculating a color.
Field Summary | |
---|---|
Vec3 |
direction
|
Vec3 |
origin
|
Constructor Summary | |
---|---|
Ray(Vec3 o,
Vec3 d)
|
Method Summary | |
---|---|
boolean |
hit(Traceable ignoreObject)
Checks if the ray (origin + t*direction) hits the scene with 0 <= t <= 1. |
Vec3 |
localLight(IntersectionInfo info,
Light light,
Vec3 color)
Calculates the local light term, given an IntersectionInfo and a Light. |
float |
omega(float t)
produceert de waarde van kleine omega in de perlin noise bereking |
int |
phi(int t,
int n,
Material mat)
|
Vec3 |
textureMap(IntersectionInfo info)
|
Vec3 |
trace(Traceable currentObject,
int maxReflectionsLeft)
Does the actual `raytracing'. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public Vec3 origin
public Vec3 direction
Constructor Detail |
---|
public Ray(Vec3 o, Vec3 d)
Method Detail |
---|
public float omega(float t)
t
- de waarde waarvoor de kleine omega moet worden berekend
public int phi(int t, int n, Material mat)
public Vec3 localLight(IntersectionInfo info, Light light, Vec3 color)
public Vec3 trace(Traceable currentObject, int maxReflectionsLeft)
currentObject
- This object is ignored in the intersection tests; in
effect, this object is `invisible' to the ray. This is useful for
reflection rays and shadow feelers: it avoids precision-errors by just
ignoring the object you've just bounced off of. If all objects are
convex (which they are in this tracer) this is actually not a hack but
completely correct.maxReflectionsLeft
- Maximum recursion depth for reflection
calculations .public Vec3 textureMap(IntersectionInfo info)
public boolean hit(Traceable ignoreObject)
ignoreObject
- Similar to trace's currentObject parameter.trace.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |