|
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
The base class for Shaders.
Field Summary | |
protected float |
alpha
|
protected Matrix4f |
trans
|
protected World |
world
|
Constructor Summary | |
Shader(World world)
|
Method Summary | |
protected float |
clamp(float a)
utility method to allow a value to be clamped between 0 and 1. |
protected void |
processObject(java.lang.Object obj)
apply default handling to the given object as part of shader construction. |
protected void |
processParameters(ParametersMap params)
apply the default parameters for a shader, from the passed in parameters table. |
protected void |
readObject(RMLReader in)
initialise a shader from a RMLReader. |
void |
setAlpha(double alpha)
set the alpha value (coverage value) for this object. |
abstract void |
shade(Hit hit,
Pixel p)
|
void |
toShaderSpace(Point3f p)
transform the given point into shader space |
void |
toShaderSpace(Vector3f v)
transform the given vector into shader space |
void |
transform(Matrix4f trans)
apply the given 4x4 transform to the shader space. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected float alpha
protected Matrix4f trans
protected World world
Constructor Detail |
public Shader(World world)
Method Detail |
protected void readObject(RMLReader in) throws java.io.IOException
protected void processParameters(ParametersMap params)
protected void processObject(java.lang.Object obj)
public void setAlpha(double alpha)
public void transform(Matrix4f trans)
This has the effect that when a shader is bound to a group of objects, the shader space will move with the objects when we apply the same transform as we do to the objects. It also means that to make a texture smaller we scale down rather than up, which works for this author...
public void toShaderSpace(Vector3f v)
public void toShaderSpace(Point3f p)
protected float clamp(float a)
public abstract void shade(Hit hit, Pixel p)
|
Bouncy Castle Rendering Toolkit 1.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |