|
||||||||||
| 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.ReflectionShader
public class ReflectionShader
A ReflectionShader object provides a shading method for reflective surfaces. The ReflectionShader class uses a shading algorithm based on Shlick's approximation to the Fresnel equations.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface net.sf.j3d.threeD.raytracer.util.Editable |
|---|
Editable.Selection |
| Field Summary | |
|---|---|
static int |
maxReflections
|
| Constructor Summary | |
|---|---|
ReflectionShader()
Constructs a new ReflectionShader object with a reflectivity of 0.0 and white as a reflective color. |
|
ReflectionShader(double reflectivity,
ColorProducer reflectiveColor)
Constructs a new ReflectionShader object with the specified reflectivity and reflective color. |
|
| Method Summary | |
|---|---|
RGB |
evaluate(Object[] args)
Produces a color using the specified arguments. |
double |
getBlur()
|
Texture |
getEnvironmentMap()
|
Producer[] |
getInputPropertyValues()
|
String[] |
getPropertyDescriptions()
Returns an array of String objects with descriptions for each editable property of this ReflectionShader object. |
String[] |
getPropertyNames()
Returns an array of String objects with names for each editable property of this ReflectionShader object. |
Class[] |
getPropertyTypes()
Returns an array of Class objects representing the class types of each editable property of this ReflectionShader object. |
Object[] |
getPropertyValues()
Returns the values of the properties of this ReflectionShader object as an Object array. |
ColorProducer |
getReflectiveColor()
Returns the reflective color used by this ReflectionShader object as ColorProducer object. |
double |
getReflectivity()
|
void |
setBlur(double blur)
Sets the blur factor used by this ReflectionShader object. |
void |
setEnvironmentMap(Texture map)
Sets the Texture object used as an environment map for this ReflectionShader object. |
void |
setInputPropertyValue(int index,
Producer p)
Sets the values of properties of this HighlightShader object to those specified. |
void |
setPropertyValue(Object value,
int index)
Sets the value of the property of this ReflectionShader object at the specified index to the specified value. |
void |
setPropertyValues(Object[] values)
Sets the values of editable properties of this ReflectionShader object to those specified. |
void |
setReflectiveColor(ColorProducer color)
Sets the reflective color used by this ReflectionShader object to the color represented by the specified ColorProducer object. |
void |
setReflectivity(double reflectivity)
Sets the reflectivity value used by this ReflectionShader object. |
RGB |
shade(ShaderParameters p)
Method specified by the Shader interface. |
String |
toString()
Returns "Reflection Shader". |
| 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 |
| Field Detail |
|---|
public static int maxReflections
| Constructor Detail |
|---|
public ReflectionShader()
public ReflectionShader(double reflectivity,
ColorProducer reflectiveColor)
| Method Detail |
|---|
public RGB shade(ShaderParameters p)
shade in interface Shadershade in class ShaderSetpublic RGB evaluate(Object[] args)
ColorProducer
evaluate in interface ColorProducerevaluate in class ShaderSetargs - Arguments.
IllegalArgumentException - If args[0] is not a ShaderParameters object.public void setReflectivity(double reflectivity)
public void setBlur(double blur)
blur - Blur factor to use.public void setReflectiveColor(ColorProducer color)
public void setEnvironmentMap(Texture map)
map - The Texture object to use.public double getReflectivity()
public double getBlur()
public ColorProducer getReflectiveColor()
public Texture getEnvironmentMap()
public String[] getPropertyNames()
getPropertyNames in interface Editablepublic String[] getPropertyDescriptions()
getPropertyDescriptions in interface Editablepublic Class[] getPropertyTypes()
getPropertyTypes in interface Editablepublic Object[] getPropertyValues()
getPropertyValues in interface Editable
public void setPropertyValue(Object value,
int index)
setPropertyValue in interface EditableIllegalArgumentException - If the object specified is not of the correct type.
IndexOutOfBoundsException - If the index specified does not correspond to an editable property of this
ReflectionShader object.public void setPropertyValues(Object[] values)
setPropertyValues in interface EditableIllegalArgumentException - If one of the objects specified is not of the correct type.
(Note: none of the values after the erroneous value will be set)
IndexOutOfBoundsException - If the length of the specified array is longer than permitted.public Producer[] getInputPropertyValues()
getInputPropertyValues in interface Editable
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.
IllegalArgumentException - If the Producer object specified is not of the correct type.
IndexOutOfBoundsException - If the lindex != 0;public String toString()
toString in class ShaderSet
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||