org.bouncycastle.graphics.rt.shaders
Class CookTorranceShader
java.lang.Object
|
+--org.bouncycastle.graphics.rt.Shader
|
+--org.bouncycastle.graphics.rt.shaders.CookTorranceShader
- Direct Known Subclasses:
- Ambient, Matte, Metal, Plastic
- public abstract class CookTorranceShader
- extends Shader
a general purpose Cook-Torrance shader. Contains all the standard attributes.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ambient
protected Color3f ambient
CookTorranceShader
public CookTorranceShader(World world)
processParameters
protected void processParameters(ParametersMap params)
- apply the default parameters for a shader,
from the passed in parameters table.
- Overrides:
processParameters
in class Shader
ambientContribution
protected Color3f ambientContribution(World world)
- return the ambient contribution of the given world to this
surface.
diffuseContribution
protected Color3f diffuseContribution(LightDataList contribs,
Hit hit)
- return the diffuse contribution of the given world to this
hit.
specularContribution
protected Color3f specularContribution(LightDataList contribs,
Hit hit,
float roughness)
- return the specular contribution of the given world to this
hit, calculated according to the given roughness.
setAmbient
public void setAmbient(double r,
double g,
double b)
- set the ambient color for this object (usually multiplied with
the base color).
setAmbient
public void setAmbient(Color3f c)
- set the ambient color for this object (usually multiplied with
the base color).
shade
public abstract void shade(Hit hit,
Pixel p)
- the shade routine.
- Overrides:
shade
in class Shader