Modifier and Type | Field and Description |
---|---|
static int |
RELATIVE_OFFSET_COLOR
The relative offset of the Color parameter in the
float array. |
static int |
SIZE
The size of a
ConstantTexture in the float array. |
static int |
TYPE
The type number associated with a
ConstantTexture . |
RELATIVE_OFFSET_SIZE, RELATIVE_OFFSET_TYPE
Constructor and Description |
---|
ConstantTexture()
Constructs a new
ConstantTexture instance. |
ConstantTexture(Color color)
Constructs a new
ConstantTexture instance given a Color as its color. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object object)
Compares
object to this ConstantTexture instance for equality. |
Color |
getColor()
Returns the
Color assigned to this ConstantTexture instance. |
int |
getSize()
Returns the size of this
ConstantTexture instance. |
int |
getType()
Returns the type of this
ConstantTexture instance. |
int |
hashCode()
Returns a hash code for this
ConstantTexture instance. |
boolean |
isEmissive()
Returns
true if, and only if, this ConstantTexture instance is emissive, false otherwise. |
float[] |
toArray()
Returns a
float array representation of this ConstantTexture instance. |
java.lang.String |
toString()
Returns a
String representation of this ConstantTexture instance. |
public static final int RELATIVE_OFFSET_COLOR
float
array. The value is 2
.public static final int SIZE
ConstantTexture
in the float
array. The size is 3
.public static final int TYPE
ConstantTexture
. The number is 3
.public ConstantTexture()
ConstantTexture
instance.
Calling this constructor is equivalent to calling new ConstantTexture(Color.GREEN)
.
public Color getColor()
Color
assigned to this ConstantTexture
instance.Color
assigned to this ConstantTexture
instancepublic java.lang.String toString()
String
representation of this ConstantTexture
instance.toString
in class java.lang.Object
String
representation of this ConstantTexture
instancepublic boolean equals(java.lang.Object object)
object
to this ConstantTexture
instance for equality.
Returns true
if, and only if, object
is an instance of ConstantTexture
, and their respective values are equal, false
otherwise.
equals
in class java.lang.Object
object
- the Object
to compare to this ConstantTexture
instance for equalitytrue
if, and only if, object
is an instance of ConstantTexture
, and their respective values are equal, false
otherwisepublic boolean isEmissive()
true
if, and only if, this ConstantTexture
instance is emissive, false
otherwise.isEmissive
in interface Texture
true
if, and only if, this ConstantTexture
instance is emissive, false
otherwisepublic float[] toArray()
float
array representation of this ConstantTexture
instance.public int getSize()
ConstantTexture
instance.public int getType()
ConstantTexture
instance.public int hashCode()
ConstantTexture
instance.hashCode
in class java.lang.Object
ConstantTexture
instance