|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--FlatRenderer.EdgeTable
The global Edge Table for each polygon.
| Field Summary | |
protected FlatRenderer.EdgeBucket[] |
buckets
The entries in the edge table. |
protected int |
ymax
The maximum value of the scan lines. |
protected int |
ymin
The minimum value of the scan lines. |
| Constructor Summary | |
protected |
FlatRenderer.EdgeTable()
Constructs a null edge table. |
|
FlatRenderer.EdgeTable(int ymin,
int ymax)
Constructs an empty edge table. |
|
FlatRenderer.EdgeTable(Mesh.Polygon p)
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 yComp)
Adds an edge to the edge table, ignoring horizontal edges. |
void |
addMesh(Mesh mesh)
Adds a mesh into the edge table. |
protected void |
addPolygon(Mesh.Polygon poly)
Adds a polygon into the edge table. |
FlatRenderer.EdgeBucket |
getBucket(int y)
Returns the bucket with the specified y coordinate. |
protected int |
getIndex(int y)
Calculates the index in the bucket array, given a y coordinate. |
protected void |
initBucket(int ymin,
int ymax)
Initializes the bucket. |
boolean |
inside(int y)
Returns true if the specified coordinate is within the bounds of the edge table. |
FlatRenderer.EdgeBucket |
removeBucket(int y)
Returns the bucket with the specified y coordinate, and removes it from the edge table. |
void |
setBucket(int y,
FlatRenderer.EdgeBucket b)
Sets the bucket at the specified y coordinate. |
String |
toString()
Creates a human-readable String that displays the contents of this object, for debugging purposes. |
protected static int |
yNext(int k,
Point3D[] vertices,
int[] indexes)
Given an index, returns the next y value of the first nonhorizontal polygon. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
protected int ymin
protected int ymax
protected FlatRenderer.EdgeBucket[] buckets
| Constructor Detail |
protected FlatRenderer.EdgeTable()
public FlatRenderer.EdgeTable(Mesh.Polygon p)
p - the polygon from which to extract edges.
public FlatRenderer.EdgeTable(int ymin,
int ymax)
ymin - the minimum value of the scan lines.ymax - the maximum value of the scan lines.| Method Detail |
protected void initBucket(int ymin,
int ymax)
ymin - the minimum value of the scan lines.ymax - the maximum value of the scan lines.public void addMesh(Mesh mesh)
mesh - the mesh to add.public boolean inside(int y)
protected void addPolygon(Mesh.Polygon poly)
poly - the polygon to add.
protected static int yNext(int k,
Point3D[] vertices,
int[] indexes)
k - the current index.vertices - the vertices to search.indexes - an array to index vertices.
protected void addEdge(Mesh.Polygon owner,
int xlow,
int ylow,
int xhigh,
int yhigh,
int yComp)
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.yComp - the next nonhorizontal ypublic FlatRenderer.EdgeBucket removeBucket(int y)
y - the y coordinate of the bucket.public FlatRenderer.EdgeBucket getBucket(int y)
y - the y coordinate of the bucket.
public void setBucket(int y,
FlatRenderer.EdgeBucket b)
y - the y coordinate of the bucket.b - the bucket to set to the table.public String toString()
protected int getIndex(int y)
y - the y coordinate
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||