JPBRT 0.5

org.jpbrt.core
Class Ray

java.lang.Object
  extended by org.jpbrt.core.Ray
Direct Known Subclasses:
RayDifferential

public class Ray
extends java.lang.Object

Ray.

References:
M. Pharr, G. Humphreys. (2004). Physically Based Rendering. Morgan Kaufmann.
Page 57.

Version:
1.0 2010-09-09 Created.
Author:
Werner Randelshofer

Field Summary
 Vector d
          Direction of the ray.
 int depth
          ??.
 float maxt
          Ray segment maximum along the infinite extent of the ray.
 float mint
          Ray segment minimum along the infinite extent of the ray.
 Point o
          Origin of the ray.
static float RAY_EPSILON
           
 float time
          Time of the ray for motion blur simulation.
 
Constructor Summary
Ray()
           
Ray(Point origin, Vector direction, float start)
           
Ray(Point origin, Vector direction, float start, float end)
           
Ray(Point origin, Vector direction, float start, float end, float time)
           
Ray(Point origin, Vector direction, float start, float end, float time, int depth)
           
Ray(Point origin, Vector direction, Ray parent, float start, float end, float t)
           
Ray(Ray that)
           
 
Method Summary
 boolean hasNaNs()
           
 void setTo(Point origin, Vector direction, float start, float end)
           
 void setTo(Point origin, Vector direction, float start, float end, float time)
           
 void setTo(Point origin, Vector direction, float start, float end, float time, int depth)
           
 void setTo(Point origin, Vector direction, Ray parent, float start, float end, float t)
           
 java.lang.String toString()
           
 Point transform(float t)
          Returns the location of the point at Distance t on the ray.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RAY_EPSILON

public static final float RAY_EPSILON
See Also:
Constant Field Values

o

public Point o
Origin of the ray.


d

public Vector d
Direction of the ray.


mint

public float mint
Ray segment minimum along the infinite extent of the ray. Initialize this with RAY_EPSILON instead with 0 to avoid self-intersections of the ray with a shape at its origin.


maxt

public float maxt
Ray segment maximum along the infinite extent of the ray.


time

public float time
Time of the ray for motion blur simulation.


depth

public int depth
??.

Constructor Detail

Ray

public Ray()

Ray

public Ray(Point origin,
           Vector direction,
           float start)

Ray

public Ray(Point origin,
           Vector direction,
           float start,
           float end)

Ray

public Ray(Point origin,
           Vector direction,
           float start,
           float end,
           float time)

Ray

public Ray(Point origin,
           Vector direction,
           float start,
           float end,
           float time,
           int depth)

Ray

public Ray(Point origin,
           Vector direction,
           Ray parent,
           float start,
           float end,
           float t)

Ray

public Ray(Ray that)
Method Detail

setTo

public void setTo(Point origin,
                  Vector direction,
                  Ray parent,
                  float start,
                  float end,
                  float t)

setTo

public void setTo(Point origin,
                  Vector direction,
                  float start,
                  float end)

setTo

public void setTo(Point origin,
                  Vector direction,
                  float start,
                  float end,
                  float time)

setTo

public void setTo(Point origin,
                  Vector direction,
                  float start,
                  float end,
                  float time,
                  int depth)

transform

public Point transform(float t)
Returns the location of the point at Distance t on the ray.


hasNaNs

public boolean hasNaNs()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Copyright 2010 © by the authors and contributors of the JPBRT project.
Some rights reserved.