Purpose: A class that rasterizes three-dimensional objects
Modifications
Attributes:
ZBuffer
attribute.
The fill() Method:
/** * Fill the given object, "removing" any hidden lines/surfaces * * Note: This method assumes that the point, p, are in row-major * order. That is, each ROW corresponds to a point. * * @param colors The color to use for each face * @param vertices The vertices for each face * @param p The coordinates of the vertices */ public void fill(Color[] colors, int[][] vertices, double[][] p)
This method must:
fillFace()
method to draw the individual
faces.
The fillFace() Method:
/** * Fill a single face, "removing" any hidden lines/surfaces * * Note: This method assumes that the point, p, are in row-major * order. That is, each ROW corresponds to a point. * * @param color The color to use * @param vertices The vertices for this face * @param p The coordinates of the vertices */ public void fillFace(Color fcolor, int[] vertices, double[][] p)
This method must use the setPixel()
method in
the Raserizer2D
class to set the color of individual
pixels.
Copyright 2007