|
Rings Version 0.3 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractCollection
java.util.AbstractSet
java.util.HashSet
threeD.raytracer.shaders.ShaderSet
threeD.raytracer.shaders.HighlightShader
A HighlightShader object provides a shading method for highlights on surfaces. The HighlightShader class uses a phong shading algorithm.
| Nested Class Summary |
| Nested classes inherited from class threeD.raytracer.util.Editable |
Editable.Selection |
| Constructor Summary | |
HighlightShader()
Constructs a new HighlightShader object using white as a highlight color and 0.0 as a highlight exponent. |
|
HighlightShader(ColorProducer color,
double exponent)
Constructs a new HighlightShader object using the specified highlight color and highlight exponent. |
|
| Method Summary | |
RGB |
evaluate(java.lang.Object[] args)
Produces a color using the specified arguments. |
ColorProducer |
getHighlightColor()
Returns the color used for the highlight shaded by this HighlightShader object as an ColorProducer object. |
double |
getHighlightExponent()
Returns the highlight exponent (phong exponent) used by this HighlightShader object. |
Producer[] |
getInputPropertyValues()
|
java.lang.String[] |
getPropertyDescriptions()
Returns an array of String objects with descriptions for each editable property of this HighlightShader object. |
java.lang.String[] |
getPropertyNames()
Returns an array of String objects with names for each editable property of this HighlightShader object. |
java.lang.Class[] |
getPropertyTypes()
Returns an array of Class objects representing the class types of each editable property of this HighlightShader object. |
java.lang.Object[] |
getPropertyValues()
Returns the values of the properties of this HighlightShader object as an Object array. |
void |
setHighlightColor(ColorProducer color)
Sets the color used for the highlight shaded by this HighlightShader object to the color represented by the specifed RGB object. |
void |
setHighlightExponent(double exp)
Sets the highlight exponent (phong exponent) used by this HighlightShader object. |
void |
setInputPropertyValue(int index,
Producer p)
Sets the values of properties of this HighlightShader object to those specified. |
void |
setPropertyValue(java.lang.Object value,
int index)
Sets the value of the property of this HighlightShader object at the specified index to the specified value. |
void |
setPropertyValues(java.lang.Object[] values)
Sets the values of properties of this HighlightShader object to those specified. |
RGB |
shade(ShaderParameters p)
Method specified by the Shader interface. |
java.lang.String |
toString()
Returns "Highlight Shader". |
| Methods inherited from class threeD.raytracer.shaders.ShaderSet |
add, addAll |
| Methods inherited from class java.util.HashSet |
clear, clone, contains, isEmpty, iterator, remove, size |
| Methods inherited from class java.util.AbstractSet |
equals, hashCode, removeAll |
| Methods inherited from class java.util.AbstractCollection |
containsAll, retainAll, toArray, toArray |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Set |
containsAll, equals, hashCode, removeAll, retainAll, toArray, toArray |
| Constructor Detail |
public HighlightShader()
public HighlightShader(ColorProducer color,
double exponent)
| Method Detail |
public RGB shade(ShaderParameters p)
shade in interface Shadershade in class ShaderSetpublic RGB evaluate(java.lang.Object[] args)
ColorProducer
evaluate in interface ColorProducerevaluate in class ShaderSetjava.lang.IllegalArgumentException - If args[0] is not a ShaderParameters object.public void setHighlightColor(ColorProducer color)
public void setHighlightExponent(double exp)
public ColorProducer getHighlightColor()
public double getHighlightExponent()
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 HighlightShader object.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 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.
java.lang.IllegalArgumentException - If the Producer object specified is not of the correct type.
java.lang.IndexOutOfBoundsException - If the lindex != 0;public java.lang.String toString()
toString in class ShaderSet
|
Rings Version 0.3 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||