public class SpotLight extends AbstractLight
Constructor and Description |
---|
SpotLight(double lightX,
double lightY,
double lightZ,
double pointAtX,
double pointAtY,
double pointAtZ,
double specularExponent,
double limitingConeAngle,
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)
|
void |
getLight4(double x,
double y,
double z,
double[] L)
computes light vector in (x, y, z).
|
double |
getLightBase(double x,
double y,
double z,
double[] L)
Computes the light vector in (x, y, z)
|
double[][] |
getLightRow4(double x,
double y,
double dx,
int width,
double[][] z,
double[][] lightRow) |
double |
getLightX() |
double |
getLightY() |
double |
getLightZ() |
double |
getLimitingConeAngle() |
double |
getPointAtX() |
double |
getPointAtY() |
double |
getPointAtZ() |
double |
getSpecularExponent() |
boolean |
isConstant() |
getColor, getLightMap, getLightRow, setColor, sRGBToLsRGB
public SpotLight(double lightX, double lightY, double lightZ, double pointAtX, double pointAtY, double pointAtZ, double specularExponent, double limitingConeAngle, java.awt.Color lightColor)
public double getLightX()
public double getLightY()
public double getLightZ()
public double getPointAtX()
public double getPointAtY()
public double getPointAtZ()
public double getSpecularExponent()
public double getLimitingConeAngle()
public boolean isConstant()
isConstant
in interface Light
isConstant
in class AbstractLight
public final double getLightBase(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 storedpublic 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,
x,y,z are scaled by light intensity.public final void getLight4(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 4 where result is stored.
0,1,2 are x,y,z respectively of light vector (normalized).
3 is the intensity of the light at this point.public double[][] getLightRow4(double x, double y, double dx, int width, double[][] z, double[][] lightRow)
Copyright © 2022 Apache Software Foundation. All Rights Reserved.