|
Rings Version 0.3 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectthreeD.raytracer.shaders.RefractionShader
A RefractionShader object provides a shading method for dielectric surfaces.
| Nested Class Summary |
| Nested classes inherited from class threeD.raytracer.util.Editable |
Editable.Selection |
| Field Summary | |
static boolean |
produceOutput
|
| Constructor Summary | |
RefractionShader()
Constructs a new RefractionShader object. |
|
| Method Summary | |
RGB |
evaluate(java.lang.Object[] args)
Produces a color using the specified arguments. |
double[] |
getAttenuationFactors()
Returns the 3 attenuation factors (RGB) used by this RefractionShader object. |
double |
getIndexOfRefraction()
Returns the index of refraction value used by this RefractionShader object. |
Producer[] |
getInputPropertyValues()
|
java.lang.String[] |
getPropertyDescriptions()
Returns an array of String objects with descriptions for each editable property of this RefractionShader object. |
java.lang.String[] |
getPropertyNames()
Returns an array of String objects with names for each editable property of this RefractionShader object. |
java.lang.Class[] |
getPropertyTypes()
Returns an array of Class objects representing the class types of each editable property of this RefractionShader object. |
java.lang.Object[] |
getPropertyValues()
Returns the values of the properties of this ReflectionShader object as an Object array. |
Vector |
refract(Vector n,
Vector d)
|
void |
setAttenuationFactors(double r,
double g,
double b)
Sets the attenuation factors used by this RefractionShader object. |
void |
setIndexOfRefraction(double n)
Sets the index of refraction value used by this RefractionShader object. |
void |
setInputPropertyValue(int index,
Producer p)
Does nothing. |
void |
setPropertyValue(java.lang.Object value,
int index)
Sets the value of the property of this RefractionShader object at the specified index to the specified value. |
void |
setPropertyValues(java.lang.Object[] values)
Sets the values of editable properties of this ReflectionShader object to those specified. |
RGB |
shade(ShaderParameters p)
Method specified by the Shader interface. |
RGB |
shade(Vector point,
Vector viewerDirection,
Vector lightDirection,
Light light,
Light[] otherLights,
Surface surface,
Surface[] otherSurfaces,
Vector n)
|
java.lang.String |
toString()
Returns "Refraction Shader". |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static boolean produceOutput
| Constructor Detail |
public RefractionShader()
| Method Detail |
public RGB shade(ShaderParameters p)
shade in interface Shader
public RGB shade(Vector point,
Vector viewerDirection,
Vector lightDirection,
Light light,
Light[] otherLights,
Surface surface,
Surface[] otherSurfaces,
Vector n)
public Vector refract(Vector n,
Vector d)
public RGB evaluate(java.lang.Object[] args)
ColorProducer
evaluate in interface ColorProducerargs - Arguments.
java.lang.IllegalArgumentException - If args[0] is not a ShaderParameters object.public void setIndexOfRefraction(double n)
public void setAttenuationFactors(double r,
double g,
double b)
public double getIndexOfRefraction()
public double[] getAttenuationFactors()
public java.lang.String[] getPropertyNames()
getPropertyNames in interface Editablepublic java.lang.String[] getPropertyDescriptions()
getPropertyDescriptions in interface Editablepublic java.lang.Class[] getPropertyTypes()
getPropertyTypes in interface Editablepublic java.lang.Object[] getPropertyValues()
getPropertyValues in interface Editable
public void setPropertyValue(java.lang.Object value,
int index)
setPropertyValue in interface Editablejava.lang.IllegalArgumentException - If the object specified is not of the correct type.
java.lang.IndexOutOfBoundsException - If the index specified does not correspond to an editable property of this
RefractionShader object.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.public void setPropertyValues(java.lang.Object[] values)
setPropertyValues in interface Editablejava.lang.IllegalArgumentException - If one of the objects specified is not of the correct type.
(Note: none of the values after the erroneous value will be set)
java.lang.IndexOutOfBoundsException - If the length of the specified array is longer than permitted.public java.lang.String toString()
|
Rings Version 0.3 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||