|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.batik.ext.awt.image.AbstractLight
public abstract class AbstractLight
An abstract implementation of the Light interface.
Constructor Summary | |
---|---|
AbstractLight(Color color)
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.batik.ext.awt.image.Light |
---|
getLight |
Constructor Detail |
---|
public AbstractLight(Color color)
Method Detail |
---|
public static final double sRGBToLsRGB(double value)
public double[] getColor(boolean linear)
getColor
in interface Light
linear
- if true the color is returned in the Linear sRGB
colorspace otherwise the color is in the gamma
corrected sRGB color space.
public void setColor(Color newColor)
setColor
in interface Light
public boolean isConstant()
isConstant
in interface Light
public double[][][] getLightMap(double x, double y, double dx, double dy, int width, int height, double[][][] z)
getLightMap
in interface Light
x
- 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 points
public double[][] getLightRow(double x, double y, double dx, int width, double[][] z, double[][] lightRow)
getLightRow
in interface Light
x
- 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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |