|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmr3d.visualization.ZBufferRenderer
Renders an image of the 3D-scene using a scan-line based z-buffer algorithm.
| Nested Class Summary | |
private class |
ZBufferRenderer.Edge
Stores the information of an 2D-edge with additional information about the z-components. |
| Field Summary | |
(package private) java.util.Vector[] |
scanlines
Stores edges of the scanlines. |
| Fields inherited from interface mr3d.debug.Debugable |
ERROR_INT, ERROR_STRING |
| Constructor Summary | |
ZBufferRenderer()
Creates a new ZBufferRenderer. |
|
| Method Summary | |
private void |
addTriangle(int x1,
int y1,
int z1,
int x2,
int y2,
int z2,
int x3,
int y3,
int z3,
int colorCode)
Splits the triangle defined by the specified values into horizontal lines and creates Edge-objects with the calculated values. |
void |
render(Graphics g)
This method starts the render process. |
void |
toConsole()
Prints the contents of the object to the Java console. |
void |
toConsole(java.lang.String msgString)
Prints the contents of the object to the Java console together with an information string. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
java.util.Vector[] scanlines
| Constructor Detail |
public ZBufferRenderer()
| Method Detail |
private void addTriangle(int x1,
int y1,
int z1,
int x2,
int y2,
int z2,
int x3,
int y3,
int z3,
int colorCode)
x1 - x-coordinate of point 1y1 - y-coordinate of point 1x2 - x-coordinate of point 2y2 - y-coordinate of point 2x3 - x-coordinate of point 3y3 - y-coordinate of point 3colorCode - color the triangle should be drawn withpublic void render(Graphics g)
Renderer
render in interface Rendererg - Graphics object the image should be rendered topublic void toConsole()
Debugable
toConsole in interface Debugablepublic void toConsole(java.lang.String msgString)
Debugable
toConsole in interface Debugable
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||