Class FlatRenderer.ActiveEdgeTable

java.lang.Object
  |
  +--FlatRenderer.ActiveEdgeTable
Enclosing class:
FlatRenderer

protected static class FlatRenderer.ActiveEdgeTable
extends Object

The current edge table for the scan line.


Field Summary
protected  List edges
          The edges in the AET, instances of EdgeEntry.
protected static Comparator xIntersectCmp
          Comparator to sort EdgeEntries by the x intersection value.
 
Constructor Summary
FlatRenderer.ActiveEdgeTable()
          Creates an empty AET.
 
Method Summary
 void add(List newEdges)
          Adds edges into the AET.
 Iterator iterator()
          Returns an iterator to the edges.
 void nextX()
          Calculates the next x intersection values for each nonvertical edges.
 void removeYMax(int y)
          Removes the AET entries which ymax == y.
 int size()
          Returns the number of edges in the AET.
 void sort()
          Sorts the AET entries by the x intersection values of each entry.
 String toString()
          Creates a human-readable String that displays the contents of this object, for debugging purposes.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

xIntersectCmp

protected static final Comparator xIntersectCmp
Comparator to sort EdgeEntries by the x intersection value.
See Also:
sort()

edges

protected List edges
The edges in the AET, instances of EdgeEntry.
Constructor Detail

FlatRenderer.ActiveEdgeTable

public FlatRenderer.ActiveEdgeTable()
Creates an empty AET.
Method Detail

add

public void add(List newEdges)
Adds edges into the AET.
Parameters:
newEdges - the edges to add, instances of EdgeEntry

sort

public void sort()
Sorts the AET entries by the x intersection values of each entry. #see xIntersectCmp

toString

public String toString()
Creates a human-readable String that displays the contents of this object, for debugging purposes. It returns a string in the following format:
AET [ EdgeEntry values ... ]
Overrides:
toString in class Object

removeYMax

public void removeYMax(int y)
Removes the AET entries which ymax == y.
Parameters:
y - the ymax values of the entries to remove.

nextX

public void nextX()
Calculates the next x intersection values for each nonvertical edges.

size

public int size()
Returns the number of edges in the AET.

iterator

public Iterator iterator()
Returns an iterator to the edges.