|
XJRT Rendering Toolkit 1.0b06 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.autochthonous.graphics.rt.Shader
org.autochthonous.graphics.rt.shaders.CookTorranceShader
org.autochthonous.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"
refractiveIndex %Float "1"
transparency (%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 |
refractiveIndex
|
protected float |
roughness
|
protected Color3f |
specular
|
protected Color3f |
transparency
|
protected boolean |
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 | |
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. |
boolean |
isTransparent()
return whether, or not, the surface is transparent. |
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 |
setRefractiveIndex(double refractiveIndex)
set the refractive index for the surface. |
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 |
setTransparency(Color3f c)
set the transparent component for this surface. |
void |
setTransparency(double r,
double g,
double b)
set the transparent component for this surface. |
void |
shade(Hit hit,
Pixel p)
the shade routine. |
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 |
Field Detail |
protected Color3f diffuse
protected Color3f specular
protected Color3f reflectance
protected Color3f transparency
protected float roughness
protected float reflectionRoughness
protected float refractiveIndex
protected boolean reflectingSurface
protected boolean transparentSurface
protected int maxLevel
Constructor Detail |
public Plastic(World world)
Method Detail |
public static Shader getInstance(World world, RMLReader in) throws java.io.IOException
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 setRefractiveIndex(double refractiveIndex)
public void setTransparency(double r, double g, double b)
public void setTransparency(Color3f c)
public boolean isTransparent()
public void setReflectionRoughness(double reflectionRoughness)
public void shade(Hit hit, Pixel p)
shade
in class CookTorranceShader
|
XJRT Rendering Toolkit 1.0b06 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |