|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.j3d.threeD.raytracer.shaders.RefractionShader
public class RefractionShader
A RefractionShader object provides a shading method for dielectric surfaces.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface net.sf.j3d.threeD.raytracer.util.Editable |
|---|
Editable.Selection |
| Field Summary | |
|---|---|
static Vector |
lastRay
|
static boolean |
produceOutput
|
| Constructor Summary | |
|---|---|
RefractionShader()
Constructs a new RefractionShader object. |
|
| Method Summary | |
|---|---|
boolean |
checkEntering(Vector d,
Vector n)
|
RGB |
evaluate(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()
|
String[] |
getPropertyDescriptions()
Returns an array of String objects with descriptions for each editable property of this RefractionShader object. |
String[] |
getPropertyNames()
Returns an array of String objects with names for each editable property of this RefractionShader object. |
Class[] |
getPropertyTypes()
Returns an array of Class objects representing the class types of each editable property of this RefractionShader object. |
Object[] |
getPropertyValues()
Returns the values of the properties of this ReflectionShader object as an Object array. |
Vector |
refract(Vector n,
Vector d,
double rindex,
double eindex)
|
double |
sampleDensity(AbstractSurface s,
Vector p,
Vector n,
double sd,
int samples,
boolean entering)
|
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(Object value,
int index)
Sets the value of the property of this RefractionShader 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. |
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,
ShaderParameters p)
|
String |
toString()
Returns "Refraction Shader". |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static Vector lastRay
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,
ShaderParameters p)
public double sampleDensity(AbstractSurface s,
Vector p,
Vector n,
double sd,
int samples,
boolean entering)
public boolean checkEntering(Vector d,
Vector n)
public Vector refract(Vector n,
Vector d,
double rindex,
double eindex)
public RGB evaluate(Object[] args)
ColorProducer
evaluate in interface ColorProducerargs - Arguments.
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 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
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(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 String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||