public abstract class AbstractLight extends Object implements Light
| Constructor and Description |
|---|
AbstractLight(Color color) |
| Modifier and Type | Method and Description |
|---|---|
double[] |
getColor(boolean linear) |
double[][][] |
getLightMap(double x,
double y,
double dx,
double dy,
int width,
int height,
double[][][] z)
Returns a light map, starting in (x, y) with dx, dy increments, a given
width and height, and z elevations stored in the fourth component on the
N array.
|
double[][] |
getLightRow(double x,
double y,
double dx,
int width,
double[][] z,
double[][] lightRow)
Returns a row of the light map, starting at (x, y) with dx
increments, a given width, and z elevations stored in the
fourth component on the N array.
|
boolean |
isConstant() |
void |
setColor(Color newColor)
Sets the new light color,
newColor should be in sRGB. |
static double |
sRGBToLsRGB(double value)
Conversion function for light values.
|
public AbstractLight(Color color)
public static final double sRGBToLsRGB(double value)
public double[] getColor(boolean linear)
public void setColor(Color newColor)
newColor should be in sRGB.public boolean isConstant()
isConstant in interface Lightpublic double[][][] getLightMap(double x,
double y,
double dx,
double dy,
int width,
int height,
double[][][] z)
getLightMap in interface Lightx - x-axis coordinate where the light should be computedy - y-axis coordinate where the light should be computeddx - delta x for computing light vectors in user spacedy - delta y for computing light vectors in user spacewidth - number of samples to compute on the x axisheight - number of samples to compute on the y axisz - array containing the z elevation for all the pointspublic double[][] getLightRow(double x,
double y,
double dx,
int width,
double[][] z,
double[][] lightRow)
getLightRow in interface Lightx - x-axis coordinate where the light should be computedy - y-axis coordinate where the light should be computeddx - delta x for computing light vectors in user spacewidth - number of samples to compute on the x axisz - array containing the z elevation for all the pointslightRow - array to store the light info to, if null it will
be allocated for you and returned.Copyright © 2000–2017 Apache Software Foundation. All rights reserved.