Class View

java.lang.Object
  extended by View

public class View
extends java.lang.Object

Holds the method for computing the user's first-person view.


Method Summary
static void fillPixels(User user, int[] pixels, int width, int height)
          Computes the user's first-person view.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

fillPixels

public static void fillPixels(User user,
                              int[] pixels,
                              int width,
                              int height)
Computes the user's first-person view.

Parameters:
user - holds information about the user, including the user's position and the world where the user is located.
pixels - an array with one int for each pixel to be drawn for the user. Entry 0 is the upper left corner of the image, while entry width is the pixel just below that, and entry height * width - 1 is the lower right pixel. Each int holds four 8-bit values packed together representing that pixel's color, with the upper byte being the pixel's opaqueness, the next byte being its red value, then its green value, then its blue value.
width - the width of the user's view.
height - the height of the user's view.