cz.cuni.jagrlib.piece
Class RenderDepthBuffer.PolyEdge

java.lang.Object
  extended by cz.cuni.jagrlib.piece.RenderDepthBuffer.PolyEdge
All Implemented Interfaces:
Comparable<RenderDepthBuffer.PolyEdge>
Enclosing class:
RenderDepthBuffer

protected static class RenderDepthBuffer.PolyEdge
extends Object
implements Comparable<RenderDepthBuffer.PolyEdge>

Polygon edge.


Field Summary
 int bottomV
          Handle of the bottom vertex.
 int count
          Number of hlines to draw.
 double du
          U difference between two adjacent hlines.
 double dv
          V difference between two adjacent hlines.
 double dx
          X difference between two adjacent hlines.
 double dz
          Z difference between two adjacent hlines.
 int topV
          Handle of the top vertex.
 double u
          Texture U-coordinate of the edge-hline intersection.
 double v
          Texture V-coordinate of the edge-hline intersection.
 double x
          X-coordinate of the edge-hline intersection.
 int y0
          Starting Y-coordinate.
 double z
          Z-coordinate of the edge-hline intersection.
 
Constructor Summary
RenderDepthBuffer.PolyEdge(double[] p1, double[] tex1, double[] p2, double[] tex2, boolean correctInterpolation)
          Common constructor for flat shader and texture shader.
RenderDepthBuffer.PolyEdge(double[] p1, int h1, double[] p2, int h2, boolean correctInterpolation)
          Common constructor for Gouraud/Phong shader and every other interpolating shader.
 
Method Summary
 int compareTo(RenderDepthBuffer.PolyEdge o)
          Natural ordering: [ y0, x ].
 void next()
          Prepare the edge record for the next line.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

y0

public int y0
Starting Y-coordinate.


x

public double x
X-coordinate of the edge-hline intersection.


dx

public double dx
X difference between two adjacent hlines.


z

public double z
Z-coordinate of the edge-hline intersection.


dz

public double dz
Z difference between two adjacent hlines.


u

public double u
Texture U-coordinate of the edge-hline intersection.


du

public double du
U difference between two adjacent hlines.


v

public double v
Texture V-coordinate of the edge-hline intersection.


dv

public double dv
V difference between two adjacent hlines.


count

public int count
Number of hlines to draw.


topV

public int topV
Handle of the top vertex.


bottomV

public int bottomV
Handle of the bottom vertex.

Constructor Detail

RenderDepthBuffer.PolyEdge

public RenderDepthBuffer.PolyEdge(double[] p1,
                                  double[] tex1,
                                  double[] p2,
                                  double[] tex2,
                                  boolean correctInterpolation)
Common constructor for flat shader and texture shader.


RenderDepthBuffer.PolyEdge

public RenderDepthBuffer.PolyEdge(double[] p1,
                                  int h1,
                                  double[] p2,
                                  int h2,
                                  boolean correctInterpolation)
Common constructor for Gouraud/Phong shader and every other interpolating shader.

Method Detail

next

public void next()
Prepare the edge record for the next line.


compareTo

public int compareTo(RenderDepthBuffer.PolyEdge o)
Natural ordering: [ y0, x ].

Specified by:
compareTo in interface Comparable<RenderDepthBuffer.PolyEdge>