cz.cuni.jagrlib.piece
Class RenderDepthBuffer.GouraudShader

java.lang.Object
  extended by cz.cuni.jagrlib.piece.RenderDepthBuffer.GouraudShader
All Implemented Interfaces:
RenderDepthBuffer.HLineRenderer
Enclosing class:
RenderDepthBuffer

protected class RenderDepthBuffer.GouraudShader
extends Object
implements RenderDepthBuffer.HLineRenderer

Interpolating renderer - Gouraud color interpolation (with optional perspective-correct interpolation).


Field Summary
protected  Brep brep
           
protected  float[] colA
           
protected  float[] colL
           
protected  double[] color
          Accelerator: output color.
protected  int colorAttr
          Handle of vertex-color attribute in the brep.
protected  float[] colR
           
protected  RasterGraphics output
           
 
Constructor Summary
RenderDepthBuffer.GouraudShader(RasterGraphics out, Brep br, int attr)
           
 
Method Summary
 void renderHLine(int y, RenderDepthBuffer.PolyEdge e1, RenderDepthBuffer.PolyEdge e2)
          Render horizontal segment (H-line) from [ e1.x, y ] to [ e2.x, y ].
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

output

protected final RasterGraphics output

brep

protected final Brep brep

colorAttr

protected final int colorAttr
Handle of vertex-color attribute in the brep.


colL

protected final float[] colL

colR

protected final float[] colR

colA

protected final float[] colA

color

protected final double[] color
Accelerator: output color.

Constructor Detail

RenderDepthBuffer.GouraudShader

public RenderDepthBuffer.GouraudShader(RasterGraphics out,
                                       Brep br,
                                       int attr)
Method Detail

renderHLine

public void renderHLine(int y,
                        RenderDepthBuffer.PolyEdge e1,
                        RenderDepthBuffer.PolyEdge e2)
Render horizontal segment (H-line) from [ e1.x, y ] to [ e2.x, y ].

Specified by:
renderHLine in interface RenderDepthBuffer.HLineRenderer