Class Renderer

java.lang.Object
  extended by Renderer

public class Renderer
extends java.lang.Object

Object for drawing a view of the scene onto pixels.


Constructor Summary
Renderer()
          Constructs an empty renderer.
 
Method Summary
 void render(Scene scene)
          Renders the scene into the current destination array.
 void setFrustum(double left, double right, double top, double bottom, double near, double far)
          Sets the coordinates of the view frustum.
 void setPixels(int[] pixels, int width, int height)
          Sets the destination array where pixels should be stored once computed.
 void setView(Point lookFrom, Point lookAt, Vector up)
          Sets the location and orientation of the viewer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Renderer

public Renderer()
Constructs an empty renderer. Note that the pixels array, the frustum, and the view location should all be set before this becomes useful.

Method Detail

setPixels

public void setPixels(int[] pixels,
                      int width,
                      int height)
Sets the destination array where pixels should be stored once computed.


setFrustum

public void setFrustum(double left,
                       double right,
                       double top,
                       double bottom,
                       double near,
                       double far)
Sets the coordinates of the view frustum.


setView

public void setView(Point lookFrom,
                    Point lookAt,
                    Vector up)
Sets the location and orientation of the viewer.


render

public void render(Scene scene)
Renders the scene into the current destination array.