Light.Type| Modifier and Type | Field and Description |
|---|---|
private float |
x |
private float |
y |
private float |
z |
| Constructor and Description |
|---|
PointLight()
Constructs a new
PointLight with default position (0,0,0)
and color (Color4f.WHITE). |
PointLight(float x,
float y,
float z,
Color4f color)
Constructs a new
PointLight with the given position and color. |
PointLight(Light.Type type,
float x,
float y,
float z,
Color4f color)
Package-private constructor.
|
| Modifier and Type | Method and Description |
|---|---|
float[] |
getNormalizedLightPosition()
Returns a float array containing the normalized
(x,y,z)
position of this light source. |
float |
getX()
Returns the x coordinate of the light position.
|
float |
getY()
Returns the y coordinate of the light position.
|
float |
getZ()
Returns the z coordinate of the light position.
|
void |
setX(float x)
Sets the x coordinate of the light position.
|
void |
setY(float y)
Sets the y coordinate of the light position.
|
void |
setZ(float z)
Sets the z coordinate of the light position.
|
public PointLight()
PointLight with default position (0,0,0)
and color (Color4f.WHITE).public PointLight(float x,
float y,
float z,
Color4f color)
PointLight with the given position and color.x - the x coordinate of the light positiony - the y coordinate of the light positionz - the z coordinate of the light positioncolor - the color of the lightjava.lang.IllegalArgumentException - if color is nullPointLight(Light.Type type, float x, float y, float z, Color4f color)
type - the type of the light (either POINT or SPOT)x - the x coordinate of the light positiony - the y coordinate of the light positionz - the z coordinate of the light positioncolor - the color of the lightjava.lang.IllegalArgumentException - if color is nullpublic float getX()
public void setX(float x)
Min: n/a
Max: n/a
Default: 0.0
Identity: n/a
x - the x coordinate of the light positionpublic float getY()
public void setY(float y)
Min: n/a
Max: n/a
Default: 0.0
Identity: n/a
y - the y coordinate of the light positionpublic float getZ()
public void setZ(float z)
Min: n/a
Max: n/a
Default: 0.0
Identity: n/a
z - the z coordinate of the light positionpublic float[] getNormalizedLightPosition()
Light(x,y,z)
position of this light source.getNormalizedLightPosition in class Light