| Modifier and Type | Field and Description |
|---|---|
static int |
RELATIVE_OFFSET_DATA
The relative offset of the Data parameter in the
float array. |
static int |
RELATIVE_OFFSET_HEIGHT
The relative offset of the Height parameter in the
float array. |
static int |
RELATIVE_OFFSET_RADIANS_COS
The relative offset of the Radians Cos parameter in the
float array. |
static int |
RELATIVE_OFFSET_RADIANS_SIN
The relative offset of the Radians Sin parameter in the
float array. |
static int |
RELATIVE_OFFSET_SCALE_U
The relative offset of the Scale U parameter in the
float array. |
static int |
RELATIVE_OFFSET_SCALE_V
The relative offset of the Scale V parameter in the
float array. |
static int |
RELATIVE_OFFSET_WIDTH
The relative offset of the Width parameter in the
float array. |
static int |
TYPE
The type number associated with a
ImageTexture. |
RELATIVE_OFFSET_SIZE, RELATIVE_OFFSET_TYPE| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object object)
Compares
object to this ImageTexture instance for equality. |
int[] |
getData()
Returns the data of the image as an
int array. |
int |
getDataLength()
Returns the length of the data in this
ImageTexture instance. |
float |
getDegrees()
Returns the angle in degrees that this
ImageTexture instance should be rotated. |
float |
getHeight()
Returns the height of this
ImageTexture instance. |
float |
getScaleU()
Returns the scale factor in the U-direction assigned to this
ImageTexture instance. |
float |
getScaleV()
Returns the scale factor in the V-direction assigned to this
ImageTexture instance. |
int |
getSize()
Returns the size of this
ImageTexture instance. |
int |
getType()
Returns the type of this
ImageTexture instance. |
float |
getWidth()
Returns the width of this
ImageTexture instance. |
int |
hashCode()
Returns a hash code for this
ImageTexture instance. |
boolean |
isEmissive()
Returns
true if, and only if, this ImageTexture instance is emissive, false otherwise. |
static ImageTexture |
load(java.io.File file)
Loads an
ImageTexture from a file. |
static ImageTexture |
load(java.io.File file,
float degrees)
Loads an
ImageTexture from a file given an angle in degrees to rotate it. |
static ImageTexture |
load(java.io.File file,
float degrees,
float scaleU,
float scaleV)
Loads an
ImageTexture from a file given an angle in degrees to rotate it and the scale factors in the U- and V-directions. |
static ImageTexture |
random(int width,
int height,
float degrees,
float scaleU,
float scaleV)
Returns a randomly generated
ImageTexture based on its width and height. |
ImageTexture |
redoGammaCorrection()
Performs a Gamma Correction redo operation.
|
float[] |
toArray()
Returns a
float array representation of this ImageTexture instance. |
java.lang.String |
toString()
Returns a
String representation of this ImageTexture instance. |
ImageTexture |
undoGammaCorrection()
Performs a Gamma Correction undo operation.
|
public static final int RELATIVE_OFFSET_DATA
float array. The value is 8.public static final int RELATIVE_OFFSET_HEIGHT
float array. The value is 5.public static final int RELATIVE_OFFSET_RADIANS_COS
float array. The value is 2.public static final int RELATIVE_OFFSET_RADIANS_SIN
float array. The value is 3.public static final int RELATIVE_OFFSET_SCALE_U
float array. The value is 6.public static final int RELATIVE_OFFSET_SCALE_V
float array. The value is 7.public static final int RELATIVE_OFFSET_WIDTH
float array. The value is 4.public static final int TYPE
ImageTexture. The number is 5.public ImageTexture redoGammaCorrection()
Returns this ImageTexture instance.
ImageTexture instancepublic ImageTexture undoGammaCorrection()
Returns this ImageTexture instance.
ImageTexture instancepublic java.lang.String toString()
String representation of this ImageTexture instance.toString in class java.lang.ObjectString representation of this ImageTexture instancepublic boolean equals(java.lang.Object object)
object to this ImageTexture instance for equality.
Returns true if, and only if, object is an instance of ImageTexture, and their respective values are equal, false otherwise.
equals in class java.lang.Objectobject - the Object to compare to this ImageTexture instance for equalitytrue if, and only if, object is an instance of ImageTexture, and their respective values are equal, false otherwisepublic boolean isEmissive()
true if, and only if, this ImageTexture instance is emissive, false otherwise.isEmissive in interface Texturetrue if, and only if, this ImageTexture instance is emissive, false otherwisepublic float getDegrees()
ImageTexture instance should be rotated.ImageTexture instance should be rotatedpublic float getHeight()
ImageTexture instance.ImageTexture instancepublic float getScaleU()
ImageTexture instance.ImageTexture instancepublic float getScaleV()
ImageTexture instance.ImageTexture instancepublic float getWidth()
ImageTexture instance.ImageTexture instancepublic float[] toArray()
float array representation of this ImageTexture instance.public int getDataLength()
ImageTexture instance.ImageTexture instancepublic int getSize()
ImageTexture instance.public int getType()
ImageTexture instance.public int hashCode()
ImageTexture instance.hashCode in class java.lang.ObjectImageTexture instancepublic int[] getData()
int array.
Modifying the array will not affect this ImageTexture instance.
int arraypublic static ImageTexture load(java.io.File file)
ImageTexture from a file.
Returns an ImageTexture instance.
Calling this method is equivalent to calling ImageTexture.load(file, 0.0F).
If file is null, a NullPointerException will be thrown.
If an I/O-error occurs when loading the image, an UncheckedIOException will be thrown.
file - a File denoting a file to load fromImageTexture instancejava.lang.NullPointerException - thrown if, and only if, file is nulljava.io.UncheckedIOException - thrown if, and only if, an I/O-error occurs when loading the imagepublic static ImageTexture load(java.io.File file, float degrees)
ImageTexture from a file given an angle in degrees to rotate it.
Returns an ImageTexture instance.
Calling this method is equivalent to calling ImageTexture.load(file, degrees, 1.0F, 1.0F).
If file is null, a NullPointerException will be thrown.
If an I/O-error occurs when loading the image, an UncheckedIOException will be thrown.
file - a File denoting a file to load fromdegrees - an angle in degrees to rotate the ImageTextureImageTexture instancejava.lang.NullPointerException - thrown if, and only if, file is nulljava.io.UncheckedIOException - thrown if, and only if, an I/O-error occurs when loading the imagepublic static ImageTexture load(java.io.File file, float degrees, float scaleU, float scaleV)
ImageTexture from a file given an angle in degrees to rotate it and the scale factors in the U- and V-directions.
Returns an ImageTexture instance.
If file is null, a NullPointerException will be thrown.
If an I/O-error occurs when loading the image, an UncheckedIOException will be thrown.
file - a File denoting a file to load fromdegrees - an angle in degrees to rotate the ImageTexturescaleU - the scale factor in the U-directionscaleV - the scale factor in the V-directionImageTexture instancejava.lang.NullPointerException - thrown if, and only if, file is nulljava.io.UncheckedIOException - thrown if, and only if, an I/O-error occurs when loading the imagepublic static ImageTexture random(int width, int height, float degrees, float scaleU, float scaleV)
ImageTexture based on its width and height.width - the width of the ImageTextureheight - the height of the ImageTexturedegrees - an angle in degrees to rotate the ImageTexturescaleU - the scale factor in the U-directionscaleV - the scale factor in the V-directionImageTexture based on its width and height