XJRT Rendering Toolkit 1.0b06

Class Bumpy

java.lang.Object
  extended byorg.autochthonous.graphics.rt.Shader
      extended byorg.autochthonous.graphics.rt.shaders.CookTorranceShader
          extended byorg.autochthonous.graphics.rt.shaders.ct.Plastic
              extended byBumpy

public class Bumpy
extends Plastic

A bumpy shader - an extension of the Plastic one.

Example:

 <Bumpy diffuse="0.1" specular="0.3" roughness="0.02"
      transparency="0.9" refractiveIndex="1.2" scaleFactors="0.5, 0.5, 0.5">
      <Transform>
          <Scale value="0.05, 0.05, 0.05"/>
      </Transform>
 </Bumpy>
 

Document Type Definition:

     <!ENTITY %Float    "CDATA">
     <!ENTITY %Color3f  "CDATA">
     <!ENTITY %Vector3f "CDATA">

     <!ELEMENT Bumpy (Transform)>
     <!ATTLIST Bumpy
         ambient              (%Color3f; | %Float;) "0, 0, 0"
         diffuse              (%Color3f; | %Float;) "1, 1, 1"
         specular             (%Color3f; | %Float;) "0, 0, 0"
         roughness            %Float                "0"
         reflectance          (%Color3f; | %Float;) "0, 0, 0"
         refractiveIndex      %Float                "1"
         transparency          (%Color3f; | %Float;) "0, 0, 0"
         reflectionRoughness  %Float                 "0">
         scaleFactors         %Vector3f;             "1, 1, 1">
 


Field Summary
 
Fields inherited from class org.autochthonous.graphics.rt.shaders.ct.Plastic
diffuse, maxLevel, reflectance, reflectingSurface, reflectionRoughness, refractiveIndex, roughness, specular, transparency, transparentSurface
 
Fields inherited from class org.autochthonous.graphics.rt.shaders.CookTorranceShader
ambient
 
Fields inherited from class org.autochthonous.graphics.rt.Shader
alpha, name, trans, world
 
Constructor Summary
Bumpy(World world)
           
 
Method Summary
static Shader getInstance(World world, RMLReader in)
           
protected  void processParameters(ParametersMap params)
          handle the parameters we want, passing the extras to our super class for processing.
 void setScaleFactors(float xFact, float yFact, float zFact)
          set the scale factors for the bumpyness.
 void shade(Hit hit, Pixel p)
          the shade routine.
 
Methods inherited from class org.autochthonous.graphics.rt.shaders.ct.Plastic
isReflecting, isSpecular, isTransparent, setDiffuse, setDiffuse, setDiffuse, setReflectance, setReflectance, setReflectionRoughness, setRefractiveIndex, setRoughness, setSpecular, setTransparency, setTransparency
 
Methods inherited from class org.autochthonous.graphics.rt.shaders.CookTorranceShader
ambientContribution, diffuseContribution, setAmbient, setAmbient, specularContribution
 
Methods inherited from class org.autochthonous.graphics.rt.Shader
clamp, getName, processObject, readObject, setAlpha, toShaderSpace, toShaderSpace, transform
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Bumpy

public Bumpy(World world)
Method Detail

getInstance

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

processParameters

protected void processParameters(ParametersMap params)
handle the parameters we want, passing the extras to our super class for processing.

Overrides:
processParameters in class Plastic

setScaleFactors

public void setScaleFactors(float xFact,
                            float yFact,
                            float zFact)
set the scale factors for the bumpyness.


shade

public void shade(Hit hit,
                  Pixel p)
the shade routine. We do the normal pertubation and then pass the result back to the superclass for processing.

Overrides:
shade in class Plastic

XJRT Rendering Toolkit 1.0b06