|
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.BlendingShader
A BlendingShader object provides a method for blending values from two different ColorProducer instances based on lighting. This is best for cool to warm shading or cartoon shading.
| Nested Class Summary |
| Nested classes inherited from class threeD.raytracer.util.Editable |
Editable.Selection |
| Constructor Summary | |
BlendingShader()
Constructs a new BlendingShader using white as a hot color and black as a cold color. |
|
BlendingShader(ColorProducer hot,
ColorProducer cold)
Constructs a new BlendingShader using the specified hot and cold colors. |
|
| Method Summary | |
RGB |
evaluate(java.lang.Object[] args)
Produces a color using the specified arguments. |
Producer[] |
getInputPropertyValues()
|
java.lang.String[] |
getPropertyDescriptions()
Returns an array of String objects with descriptions for each editable property of this Editable object. |
java.lang.String[] |
getPropertyNames()
Returns an array of String objects with names for each editable property of this Editable object. |
java.lang.Class[] |
getPropertyTypes()
Returns an array of Class objects representing the class types of each editable property of this Editable object. |
java.lang.Object[] |
getPropertyValues()
Returns the values of the properties of this Editable object as an Object array. |
void |
setInputPropertyValue(int index,
Producer p)
|
void |
setPropertyValue(java.lang.Object o,
int index)
Sets the value of the property of this Editable object at the specified index to the specified value. |
void |
setPropertyValues(java.lang.Object[] values)
Sets the values of properties of this Editable object to those specified. |
RGB |
shade(ShaderParameters p)
Returns an RGB object that represents the shaded color calculated using the values of the specified ShaderParameters object. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public BlendingShader()
public BlendingShader(ColorProducer hot,
ColorProducer cold)
hot - ColorProducer to use for hot color.cold - ColorProducer to use for cold color.| Method Detail |
public RGB shade(ShaderParameters p)
Shader
shade in interface ShaderShader.shade(threeD.raytracer.shaders.ShaderParameters)public java.lang.String[] getPropertyNames()
Editable
getPropertyNames in interface EditableEditable.getPropertyNames()public java.lang.String[] getPropertyDescriptions()
Editable
getPropertyDescriptions in interface EditableEditable.getPropertyDescriptions()public java.lang.Class[] getPropertyTypes()
Editable
getPropertyTypes in interface EditableEditable.getPropertyTypes()public java.lang.Object[] getPropertyValues()
Editable
getPropertyValues in interface EditableEditable.getPropertyValues()
public void setPropertyValue(java.lang.Object o,
int index)
Editable
setPropertyValue in interface EditableEditable.setPropertyValue(java.lang.Object, int)public void setPropertyValues(java.lang.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.
java.lang.IndexOutOfBoundsException - If the property index is out of bounds.Editable.setInputPropertyValue(int, threeD.raytracer.util.Producer)public RGB evaluate(java.lang.Object[] args)
ColorProducer
evaluate in interface ColorProducerargs - Arguments.
ColorProducer.evaluate(java.lang.Object[])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 | |||||||||