Bouncy Castle Rendering Toolkit 1.0

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

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

public abstract class TurbulenceShader
extends Plastic

a general shader with turbulence support


Field Summary
protected  Color3f base
           
protected  float blend
           
protected  Color3f blendColor
           
protected  ColorMap colorMap
           
protected  NoiseGenerator generator
           
protected  int octaves
           
protected  float percentageTurbulence
           
protected  float squeeze
           
 
Fields inherited from class org.bouncycastle.graphics.rt.shaders.ct.Plastic
diffuse, maxLevel, reflectance, reflectingSurface, reflectionRoughness, roughness, 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
TurbulenceShader(World world)
           
 
Method Summary
protected  void processObject(java.lang.Object obj)
          process the object passed in if we can use it, or pass it up to our super class.
protected  void processParameters(ParametersMap params)
          process the parameters we want before handing them to our super class.
 void setBlendColor(Color3f blendColor)
          set the percentage of turbulence to incorporate
 void setPercentageTurbulence(float percentage)
          set the percentage of turbulence to incorporate
 void setSqueeze(float squeeze)
          set the squeeze on the texture lines
abstract  void shade(Hit hit, Pixel p)
          the shade routine.
protected  float turbulence(Tuple3f pos, int octaves)
          Accumulate a 3D noise function over octaves octaves, scaling each by 1 / f
 
Methods inherited from class org.bouncycastle.graphics.rt.shaders.ct.Plastic
getInstance, isReflecting, isSpecular, setDiffuse, setDiffuse, setDiffuse, setReflectance, setReflectance, setReflectionRoughness, setRoughness, setSpecular
 
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, 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

base

protected Color3f base

blendColor

protected Color3f blendColor

colorMap

protected ColorMap colorMap

blend

protected float blend

squeeze

protected float squeeze

percentageTurbulence

protected float percentageTurbulence

octaves

protected int octaves

generator

protected NoiseGenerator generator
Constructor Detail

TurbulenceShader

public TurbulenceShader(World world)
Method Detail

processParameters

protected void processParameters(ParametersMap params)
process the parameters we want before handing them to our super class.
Overrides:
processParameters in class Plastic

processObject

protected void processObject(java.lang.Object obj)
process the object passed in if we can use it, or pass it up to our super class.
Overrides:
processObject in class Shader

setPercentageTurbulence

public void setPercentageTurbulence(float percentage)
set the percentage of turbulence to incorporate

setSqueeze

public void setSqueeze(float squeeze)
set the squeeze on the texture lines

setBlendColor

public void setBlendColor(Color3f blendColor)
set the percentage of turbulence to incorporate

turbulence

protected float turbulence(Tuple3f pos,
                           int octaves)
Accumulate a 3D noise function over octaves octaves, scaling each by 1 / f

shade

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

Bouncy Castle Rendering Toolkit 1.0