|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectartofillusion.image.ImageOrValue
public class ImageOrValue
ImageOrValue represents a float value between 0 and 1, which can potentially vary with position. It provides a Widget with which the user can edit it. They can choose either a single value, or a component of an ImageMap which can be multiplied by a user specified value.
Constructor Summary | |
---|---|
ImageOrValue(java.io.DataInputStream in,
Scene theScene)
The following two methods are used for reading and writing files. |
|
ImageOrValue(float val)
|
|
ImageOrValue(float scale,
ImageMap theMap,
int whichComponent)
|
Method Summary | |
---|---|
void |
copy(ImageOrValue obj)
Make this object identical to another one. |
ImageOrValue |
duplicate()
Create a duplicate of this object. |
float |
getAverageValue()
Return the average value over the entire image. |
int |
getComponent()
Get which component of the image to use. |
Widget |
getEditingPanel(BFrame parent,
Scene theScene)
Get a Widget with which the user can edit the value. |
void |
getGradient(Vec2 grad,
boolean wrapx,
boolean wrapy,
double x,
double y,
double xsize,
double ysize)
Given a texture coordinate, get the gradient of the image. |
ImageMap |
getImage()
Get the image, or null if it is a single value. |
float |
getValue()
Get the value by which the image is scaled. |
float |
getValue(boolean wrapx,
boolean wrapy,
double x,
double y,
double xsize,
double ysize)
Given a texture coordinate (x and y each between 0 and 1), return the average value of a region of width (xsize, ysize) centered at that location. |
void |
writeToFile(java.io.DataOutputStream out,
Scene theScene)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ImageOrValue(float val)
public ImageOrValue(float scale, ImageMap theMap, int whichComponent)
public ImageOrValue(java.io.DataInputStream in, Scene theScene) throws java.io.IOException
java.io.IOException
Method Detail |
---|
public ImageMap getImage()
public int getComponent()
public float getValue()
public float getValue(boolean wrapx, boolean wrapy, double x, double y, double xsize, double ysize)
public void getGradient(Vec2 grad, boolean wrapx, boolean wrapy, double x, double y, double xsize, double ysize)
public float getAverageValue()
public ImageOrValue duplicate()
public void copy(ImageOrValue obj)
public void writeToFile(java.io.DataOutputStream out, Scene theScene) throws java.io.IOException
java.io.IOException
public Widget getEditingPanel(BFrame parent, Scene theScene)
parent
- a parent BFrame which can be used for displaying dialogstheScene
- the Scene from which to get images
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |