|
Bouncy Castle Rendering Toolkit 1.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.bouncycastle.graphics.rt.Shader | +--org.bouncycastle.graphics.rt.shaders.CookTorranceShader | +--org.bouncycastle.graphics.rt.shaders.ct.Plastic
A plastic surface shader.
Example:
<Plastic diffuse="0.2" specular="0.2" roughness="0.14" reflectance="0.8"/>
Document Type Definition:
<!ENTITY %Float "CDATA">
<!ENTITY %Color3f "CDATA">
<!ELEMENT Plastic>
<!ATTLIST Plastic
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"
reflectionRoughness %Float "0">
Field Summary | |
protected Color3f |
diffuse
|
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 | |
Plastic(World world)
|
Method Summary | |
static Shader |
getInstance(World world,
RMLReader in)
|
boolean |
isReflecting()
return whether, or not, the surface is reflecting. |
boolean |
isSpecular()
return whether, or not, the surface is specular. |
protected void |
processParameters(ParametersMap params)
apply the default parameters for a shader, from the passed in parameters table. |
void |
setDiffuse(Color3f c)
set the diffuse components for this object |
void |
setDiffuse(double kD)
set the diffuse components for this object |
void |
setDiffuse(double r,
double g,
double b)
set the diffuse components for this object |
void |
setReflectance(Color3f c)
set the reflective component for this surface. |
void |
setReflectance(double r,
double g,
double b)
set the reflective component for this surface. |
void |
setReflectionRoughness(double reflectionRoughness)
|
void |
setRoughness(double roughness)
set the roughness of the surface, the smaller we are the more refined the specular highlights. |
void |
setSpecular(Color3f c)
set the specular components for this object |
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 |
protected Color3f diffuse
protected Color3f specular
protected Color3f reflectance
protected float roughness
protected float reflectionRoughness
protected boolean reflectingSurface
protected int maxLevel
Constructor Detail |
public Plastic(World world)
Method Detail |
public static Shader getInstance(World world, RMLReader in) throws java.io.IOException
protected void processParameters(ParametersMap params)
processParameters
in class CookTorranceShader
public void setDiffuse(double kD)
public void setDiffuse(double r, double g, double b)
public void setDiffuse(Color3f c)
public void setSpecular(Color3f c)
public void setRoughness(double roughness)
public boolean isSpecular()
public void setReflectance(double r, double g, double b)
public void setReflectance(Color3f c)
public boolean isReflecting()
public void setReflectionRoughness(double reflectionRoughness)
public void shade(Hit hit, Pixel p)
shade
in class CookTorranceShader
|
Bouncy Castle Rendering Toolkit 1.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |