public class AmbientLight
extends java.lang.Object
AmbientLight
),
since for any given scene there should be only a
single value for ambient light (since ambient light is equal everywhere in
the scene).Modifier and Type | Method and Description |
---|---|
float |
getAlpha()
Returns the Alpha component of the
AmbientLight . |
static AmbientLight |
getAmbientLight()
This method provides access to the singleton instance of the ambient light.
|
float |
getBlue()
Returns the Blue component of the
AmbientLight . |
float |
getGreen()
Returns the Green component of the
AmbientLight . |
float |
getRed()
Returns the Red component of the
AmbientLight . |
float[] |
getValues()
Returns a float array containing the R,G,B,A values of the
AmbientLight . |
void |
setAlpha(float alpha)
Sets the Alpha component of the
AmbientLight to the specified value. |
void |
setBlue(float blue)
Sets the Blue component of the
AmbientLight to the specified value. |
void |
setGreen(float green)
Sets the Green component of the
AmbientLight to the specified value. |
void |
setRed(float red)
Sets the Red component of the
AmbientLight to the specified value. |
void |
setValues(float[] newVals)
Sets the RGBA values of the
AmbientLight to the values in the
specified array, which must contain four values. |
public static AmbientLight getAmbientLight()
AmbientLight
with default values; subsequent calls return a reference to that same
singleton object.public float[] getValues()
AmbientLight
.
The returned array is a clone of the light values; subsequent changes to the
returned object have no effect on the light values.public float getRed()
AmbientLight
.public float getGreen()
AmbientLight
.public float getBlue()
AmbientLight
.public float getAlpha()
AmbientLight
.public void setValues(float[] newVals)
AmbientLight
to the values in the
specified array, which must contain four values.
The specified array is cloned; subsequent changes to the specified object
have no effect on the values of the light.public void setRed(float red)
AmbientLight
to the specified value.public void setGreen(float green)
AmbientLight
to the specified value.public void setBlue(float blue)
AmbientLight
to the specified value.public void setAlpha(float alpha)
AmbientLight
to the specified value.