|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.brackeen.javagamebook.graphics3D.ScanConverter
com.brackeen.javagamebook.graphics3D.SortedScanConverter
A ScanConverter used to draw sorted polygons from front-to-back with no overdraw. Polygons are added and clipped to a list of what's in the view window. Call clear() before drawing every frame.
Nested Class Summary |
Nested classes inherited from class com.brackeen.javagamebook.graphics3D.ScanConverter |
ScanConverter.Scan |
Constructor Summary | |
SortedScanConverter(ViewWindow view)
Creates a new SortedScanConverter for the specified ViewWindow. |
Method Summary | |
void |
clear()
Clears the current view scan. |
boolean |
convert(Polygon3D polygon)
Scan-converts a polygon, and if sortedMode is on, adds and clips it to a list of what's in the view window. |
int |
getNumScans(int y)
Gets the number of scans for the specified row. |
ScanConverter.Scan |
getScan(int y,
int index)
Gets the nth scan for the specified row. |
boolean |
isFilled()
Checks if the view is filled. |
void |
setSortedMode(boolean b)
Sets sorted mode, so this scan converter can assume the polygons are drawn front-to-back, and should be clipped against polygons already scanned for this view. |
Methods inherited from class com.brackeen.javagamebook.graphics3D.ScanConverter |
getBottomBoundary, getScan, getTopBoundary |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SortedScanConverter(ViewWindow view)
Method Detail |
public void clear()
public void setSortedMode(boolean b)
public ScanConverter.Scan getScan(int y, int index)
public int getNumScans(int y)
public boolean isFilled()
public boolean convert(Polygon3D polygon)
convert
in class ScanConverter
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |