Class com.oroinc.yaray.World
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.oroinc.yaray.World

java.lang.Object
   |
   +----com.oroinc.yaray.World

public class World
extends Object
The world through which rays are traced to generate a picture.

Copyright © 1996, 1997 Original Reusable Objects, Inc. All rights reserved.

Author:
Daniel F. Savarese

Variable Index

 o currentDepth
 o EPSILON
 o eye
 o lights
 o MAX_DEPTH
Maximum recursion depth.
 o objects

Constructor Index

 o World()

Method Index

 o raytrace(IntersectionRay, Color)
Trace the ray, checking for intersection with each object in the world.

Variables

 o MAX_DEPTH
  public final static int MAX_DEPTH
Maximum recursion depth. Limits the number of reflections.
 o EPSILON
  public final static float EPSILON
 o currentDepth
  public int currentDepth
 o eye
  public Point eye
 o objects
  public WorldObject objects[]
 o lights
  public Light lights[]

Constructors

 o World
  public World()

Methods

 o raytrace
  public void raytrace(IntersectionRay ray,
                       Color color)
Trace the ray, checking for intersection with each object in the world. If there is an intersection, compute the color at the point of intersection, otherwise return black. The color is returned via the color reference parameter. This method can only be called recursively a maximum of MAX_DEPTH times for any instance of a World object.

All Packages  Class Hierarchy  This Package  Previous  Next  Index