Bouncy Castle Rendering Toolkit 1.0

org.bouncycastle.graphics.rt.shaders.ct
Class Metal

java.lang.Object
  |
  +--org.bouncycastle.graphics.rt.Shader
        |
        +--org.bouncycastle.graphics.rt.shaders.CookTorranceShader
              |
              +--org.bouncycastle.graphics.rt.shaders.ct.Metal

public class Metal
extends CookTorranceShader

a metal surface shader.


Field Summary
protected  int maxLevel
           
protected  Color3f reflectance
           
protected  boolean reflectingSurface
           
protected  float reflectionRoughness
           
protected  float roughness
           
protected  Color3f specular
           
 
Fields inherited from class org.bouncycastle.graphics.rt.shaders.CookTorranceShader
ambient
 
Fields inherited from class org.bouncycastle.graphics.rt.Shader
alpha, trans, world
 
Constructor Summary
Metal(World world)
           
 
Method Summary
static Shader getInstance(World world, RMLReader in)
           
 boolean isReflecting()
          return whether, or not, the surface is reflecting.
 void processParameters(ParametersMap params)
          process our parameter set, handing the extras back to the super class.
 void setReflectance(double r, double g, double b)
          set the reflective component for this surface.
 void setRoughFinishFactor(double reflectionRoughness)
          set a roughness value to perturb the reflectance ray by.
 void shade(Hit hit, Pixel p)
          the shade routine.
 
Methods inherited from class org.bouncycastle.graphics.rt.shaders.CookTorranceShader
ambientContribution, diffuseContribution, setAmbient, setAmbient, specularContribution
 
Methods inherited from class org.bouncycastle.graphics.rt.Shader
clamp, processObject, readObject, setAlpha, toShaderSpace, toShaderSpace, transform
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

maxLevel

protected int maxLevel

roughness

protected float roughness

reflectionRoughness

protected float reflectionRoughness

reflectingSurface

protected boolean reflectingSurface

reflectance

protected Color3f reflectance

specular

protected Color3f specular
Constructor Detail

Metal

public Metal(World world)
Method Detail

getInstance

public static Shader getInstance(World world,
                                 RMLReader in)
                          throws java.io.IOException

processParameters

public void processParameters(ParametersMap params)
process our parameter set, handing the extras back to the super class.
Overrides:
processParameters in class CookTorranceShader

setReflectance

public void setReflectance(double r,
                           double g,
                           double b)
set the reflective component for this surface.

isReflecting

public boolean isReflecting()
return whether, or not, the surface is reflecting.

setRoughFinishFactor

public void setRoughFinishFactor(double reflectionRoughness)
set a roughness value to perturb the reflectance ray by. The value must be between 0 and 1, with a value of 0 giving the sharpest reflections.

shade

public void shade(Hit hit,
                  Pixel p)
the shade routine. If you want more than the below, this is the method to override.
Overrides:
shade in class CookTorranceShader

Bouncy Castle Rendering Toolkit 1.0