|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractSet<E>
java.util.HashSet
net.sf.j3d.threeD.raytracer.shaders.ShaderSet
net.sf.j3d.threeD.raytracer.shaders.TextureShader
public class TextureShader
A TextureShader object uses a Texture object as a filter for shader output. The object allows you to set up Shader objects as input properties for Texture objects and takes care of evaluating the shader values with each call of the shade method.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface net.sf.j3d.threeD.raytracer.util.Editable |
|---|
Editable.Selection |
| Constructor Summary | |
|---|---|
TextureShader()
Constructs a new Texture shader object. |
|
TextureShader(Texture t,
ShaderFactory factory)
Constructs a new TextureShader object using the specified Texture and ShaderFactory objects. |
|
| Method Summary | |
|---|---|
RGB |
evaluate(Object[] args)
Produces a color using the specified arguments. |
ShaderFactory |
getFactory()
|
Producer[] |
getInputPropertyValues()
|
String[] |
getPropertyDescriptions()
Returns an array of String objects with descriptions for each editable property of this Editable object. |
String[] |
getPropertyNames()
Returns an array of String objects with names for each editable property of this Editable object. |
Class[] |
getPropertyTypes()
Returns an array of Class objects representing the class types of each editable property of this Editable object. |
Object[] |
getPropertyValues()
Returns the values of the properties of this Editable object as an Object array. |
Texture |
getTexture()
|
void |
setFactory(ShaderFactory factory)
Sets the ShaderFactory object used by this TextureShader object. |
void |
setInputPropertyValue(int index,
Producer p)
|
void |
setPropertyValue(Object value,
int index)
Sets the value of the property of this Editable object at the specified index to the specified value. |
void |
setPropertyValues(Object[] values)
Sets the values of properties of this Editable object to those specified. |
void |
setTexture(Texture t)
Sets the Texture object used by this TextureShader object. |
RGB |
shade(ShaderParameters p)
Returns an RGB object that represents the shaded color calculated using the values of the specified ShaderParameters object. |
String |
toString()
|
| Methods inherited from class net.sf.j3d.threeD.raytracer.shaders.ShaderSet |
|---|
add, addAll, equals |
| Methods inherited from class java.util.HashSet |
|---|
clear, clone, contains, isEmpty, iterator, remove, size |
| Methods inherited from class java.util.AbstractSet |
|---|
hashCode, removeAll |
| Methods inherited from class java.util.AbstractCollection |
|---|
containsAll, retainAll, toArray, toArray |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Set |
|---|
containsAll, hashCode, removeAll, retainAll, toArray, toArray |
| Constructor Detail |
|---|
public TextureShader()
public TextureShader(Texture t,
ShaderFactory factory)
t - The Texture object to use as a filter.factory - The ShaderFactory that can be used to create Shader objects as parameters.| Method Detail |
|---|
public void setTexture(Texture t)
t - The Texture object to be used.public void setFactory(ShaderFactory factory)
factory - The ShaderFactory object to use.public Texture getTexture()
public ShaderFactory getFactory()
public String[] getPropertyNames()
Editable
getPropertyNames in interface EditableEditable.getPropertyNames()public String[] getPropertyDescriptions()
Editable
getPropertyDescriptions in interface EditableEditable.getPropertyDescriptions()public Class[] getPropertyTypes()
Editable
getPropertyTypes in interface EditableEditable.getPropertyTypes()public Object[] getPropertyValues()
Editable
getPropertyValues in interface EditableEditable.getPropertyValues()
public void setPropertyValue(Object value,
int index)
Editable
setPropertyValue in interface EditableEditable.setPropertyValue(java.lang.Object, int)public void setPropertyValues(Object[] values)
Editable
setPropertyValues in interface EditableEditable.setPropertyValues(java.lang.Object[])public Producer[] getInputPropertyValues()
getInputPropertyValues in interface EditableEditable.getInputPropertyValues()
public void setInputPropertyValue(int index,
Producer p)
setInputPropertyValue in interface Editableindex - Index of input property (array index from this.getInputPropertyValue).p - Producer object to use for input property.Editable.setInputPropertyValue(int, net.sf.j3d.threeD.raytracer.util.Producer)public RGB shade(ShaderParameters p)
Shader
shade in interface Shadershade in class ShaderSetnet.sf.j3d.threeD.raytracer.shaders.Shader#shade(net.sf.j3d.threeD.raytracer.engine.ShaderParameters)public RGB evaluate(Object[] args)
ColorProducer
evaluate in interface ColorProducerevaluate in class ShaderSetargs - Arguments.
ColorProducer.evaluate(java.lang.Object[])public String toString()
toString in class ShaderSet
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||