|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Top level interface to model a light element. A light is responsible for computing the light vector on a given point of a surface. A light is typically in a 3 dimensional space and the methods assumes the surface is at elevation 0.
Method Summary | |
double[] |
getColor(boolean linear)
|
void |
getLight(double x,
double y,
double z,
double[] L)
Computes the light vector in (x, y) |
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(java.awt.Color color)
Sets the light color to a new value |
Method Detail |
public boolean isConstant()
public 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 storedpublic double[][][] getLightMap(double x, double y, double dx, double dy, int width, int height, double[][][] z)
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 pointspublic double[][] getLightRow(double x, double y, double dx, int width, double[][] z, double[][] lightRow)
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 pointslightRwo
- array to store the light info to, if null it will
be allocated for you and returned.public double[] getColor(boolean linear)
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(java.awt.Color color)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |