|
Rings Version 0.3 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectthreeD.raytracer.textures.ImageTexture
An ImageTexture object can be used to provide an image as the color data for a surface.
| Nested Class Summary |
| Nested classes inherited from class threeD.raytracer.util.Editable |
Editable.Selection |
| Field Summary | |
static int |
SPHERICAL_PROJECTION
|
static int |
XY_PLANAR_PROJECTION
|
static int |
XZ_PLANAR_PROJECTION
|
static int |
YZ_PLANAR_PROJECTION
|
| Constructor Summary | |
ImageTexture()
Constructs a new ImageTexture object. |
|
ImageTexture(int type,
java.net.URL url)
Constructs a new ImageTexture object of unit square size. |
|
ImageTexture(int type,
java.net.URL url,
double xScale,
double yScale,
double xOff,
double yOff)
Constrcts a new ImageTexture object with the specified scaling factors. |
|
| Method Summary | |
RGB |
evaluate(java.lang.Object[] args)
Produces a color using the specified arguments. |
RGB |
getColorAt(double u,
double v)
Returns the an RGB object representing the color of this ImageTexture object at the specified u, v coordinates. |
RGB |
getColorAt(double u,
double v,
double xScale,
double yScale,
double xOff,
double yOff)
Returns the an RGB object representing the color of this ImageTexture object at the specified u, v coordinates. |
RGB |
getColorAt(Vector point)
Returns the color of the texture represented by this Texture object at the specified point as an RGB object using the arguments stored by this Texture object. |
RGB |
getColorAt(Vector point,
java.lang.Object[] args)
Returns the color of the texture represented by this Texture object at the specified point as an RGB object 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)
Does nothing. |
void |
setPropertyValue(java.lang.Object value,
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. |
java.lang.String |
toString()
|
protected void |
update()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int SPHERICAL_PROJECTION
public static final int XY_PLANAR_PROJECTION
public static final int XZ_PLANAR_PROJECTION
public static final int YZ_PLANAR_PROJECTION
| Constructor Detail |
public ImageTexture()
public ImageTexture(int type,
java.net.URL url)
type - Integer code that specifies the method to use for "wrapping" the image on a surface.url - URL object pointing to image.
java.lang.IllegalArgumentException - If the value for type is not valid.
java.lang.RuntimeException - If image fails to load properly.
public ImageTexture(int type,
java.net.URL url,
double xScale,
double yScale,
double xOff,
double yOff)
type - Integer code that specified the method to use for "wrapping" the image on a surface.url - URL object pointing to image.xScale - X scale factor.yScale - Y scale factor.xOff - X offset.yOff - Y offset.
java.lang.IllegalArgumentException - If the value for type is not valid.
java.lang.RuntimeException - If image fails to load properly.| Method Detail |
protected void update()
public RGB getColorAt(double u,
double v)
u - u coordinate between 0.0 and 1.0v - v coordinate between 0.0 and 1.0
public RGB getColorAt(double u,
double v,
double xScale,
double yScale,
double xOff,
double yOff)
u - u coordinate between 0.0 and 1.0v - v coordinate between 0.0 and 1.0xScale - X scale factoryScale - Y scale factorxOff - X offsetyOff - Y offset
java.lang.NullPointerException - If pixel data is not loaded.public RGB getColorAt(Vector point)
Texture
getColorAt in interface Texturejava.lang.NullPointerException - If pixel data is not loaded.Texture.getColorAt(threeD.raytracer.util.Vector)
public RGB getColorAt(Vector point,
java.lang.Object[] args)
Texture
getColorAt in interface Texturejava.lang.IllegalArgumentException - If args does not contain the correct object types.
java.lang.NullPointerException - If pixel data is not loaded.Texture.getColorAt(threeD.raytracer.util.Vector, java.lang.Object[])public RGB evaluate(java.lang.Object[] args)
ColorProducer
evaluate in interface ColorProducerargs - Arguments.
java.lang.IllegalArgumentException - If args does not contain the correct object types.ColorProducer.evaluate(java.lang.Object[])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 value,
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 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 java.lang.String toString()
|
Rings Version 0.3 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||