Class PhongRenderer.EdgeTableEx

java.lang.Object
  |
  +--FlatRenderer.EdgeTable
        |
        +--GouraudRenderer.EdgeTableEx
              |
              +--PhongRenderer.EdgeTableEx
Enclosing class:
PhongRenderer

protected class PhongRenderer.EdgeTableEx
extends GouraudRenderer.EdgeTableEx

The Edge table for each polygon. Required to construct EdgeEntryEx instances.


Field Summary
protected  GouraudRenderer.MeshInfo meshInfo
          The current mesh info.
 
Fields inherited from class GouraudRenderer.EdgeTableEx
info
 
Fields inherited from class FlatRenderer.EdgeTable
buckets, ymax, ymin
 
Constructor Summary
PhongRenderer.EdgeTableEx(PhongRenderer.PolygonInfoEx info, GouraudRenderer.MeshInfo meshInfo)
          Constructs an edge table from a polygon object.
 
Method Summary
protected  void addEdge(Mesh.Polygon owner, int xlow, int ylow, int xhigh, int yhigh, int lowIndex, int highIndex, int yComp)
          Adds an edge to the edge table, ignoring horizontal edges.
 
Methods inherited from class GouraudRenderer.EdgeTableEx
addPolygon
 
Methods inherited from class FlatRenderer.EdgeTable
addEdge, addMesh, getBucket, getIndex, initBucket, inside, removeBucket, setBucket, toString, yNext
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

meshInfo

protected GouraudRenderer.MeshInfo meshInfo
The current mesh info.
Constructor Detail

PhongRenderer.EdgeTableEx

public PhongRenderer.EdgeTableEx(PhongRenderer.PolygonInfoEx info,
                                 GouraudRenderer.MeshInfo meshInfo)
Constructs an edge table from a polygon object.
Parameters:
p - the polygon from which to extract edges.
Method Detail

addEdge

protected void addEdge(Mesh.Polygon owner,
                       int xlow,
                       int ylow,
                       int xhigh,
                       int yhigh,
                       int lowIndex,
                       int highIndex,
                       int yComp)
Adds an edge to the edge table, ignoring horizontal edges.
Overrides:
addEdge in class GouraudRenderer.EdgeTableEx
Parameters:
owner - the owner of the edge.
xlow - the x coordinate of the lower point in the edge.
ylow - the y coordinate of the lower point in the edge.
xhigh - the x coordinate of the higher point in the edge.
yhigh - the y coordinate of the higher point in the edge.
lowIndex - the index of the (xlow,ylow) vertice in the polygon's verticesIndex[] array.
highIndex - the index of the (xhigh,yhigh) vertice in the polygon's verticesIndex[] array.
yComp - the next nonhorizontal y