public class PointLight extends AbstractLight
Modifier and Type | Field and Description |
---|---|
private double |
lightX
The light position, in user space
|
private double |
lightY
The light position, in user space
|
private double |
lightZ
The light position, in user space
|
Constructor and Description |
---|
PointLight(double lightX,
double lightY,
double lightZ,
java.awt.Color lightColor) |
Modifier and Type | Method and Description |
---|---|
void |
getLight(double x,
double y,
double z,
double[] L)
Computes the light vector in (x, y, z)
|
double |
getLightX() |
double |
getLightY() |
double |
getLightZ() |
boolean |
isConstant() |
getColor, getLightMap, getLightRow, setColor, sRGBToLsRGB
private double lightX
private double lightY
private double lightZ
public PointLight(double lightX, double lightY, double lightZ, java.awt.Color lightColor)
public double getLightX()
public double getLightY()
public double getLightZ()
public boolean isConstant()
isConstant
in interface Light
isConstant
in class AbstractLight
public final void getLight(double x, double y, double z, double[] L)
x
- x-axis coordinate where the light should be computedy
- y-axis coordinate where the light should be computedz
- z-axis coordinate where the light should be computedL
- array of length 3 where the result is stored