|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface LightSource
Abstract light source in 3D scene.
BSSRDF
,
RTScene
Field Summary | |
---|---|
static java.lang.String |
COLOR
Property - [primary] surface [diffuse] color. |
Fields inherited from interface cz.cuni.jagrlib.iface.Property |
---|
LOGGING, STATISTICS, TEXT_DESCRIPTION |
Method Summary | |
---|---|
boolean |
getDirection(MicroFacet mf,
double[] dir)
Returns light direction between the source and the given MicroFacet . |
boolean |
getDirection(MicroFacet mf,
int order,
int total,
double[] dir)
Returns light direction between the source and the given MicroFacet . |
boolean |
getIntensity(MicroFacet mf,
double[] color)
Returns light intensity coming from the source to the given MicroFacet . |
boolean |
getIntensity(MicroFacet mf,
int order,
int total,
double[] color)
Returns light intensity coming from the source to the given MicroFacet . |
boolean |
isDeltaLight()
Is delta light? |
boolean |
lights(MicroFacet mf)
Lighting test from the source to the given MicroFacet . |
boolean |
lights(MicroFacet mf,
int order,
int total)
Lighting test from the source to the given MicroFacet . |
double |
pdf(double[] point,
double[] normal,
double[] dir)
Return probability density function. |
double |
sample(double u1,
double v1,
double u2,
double v2,
double[] pos,
double[] dir,
double[] power)
Generates one photon leaving this light source. |
boolean |
sample(MicroFacet mf,
double u,
double v,
double[] color,
double[] dir,
double[] pdf,
boolean testVisibility)
Sample the light by one shadow ray. |
Intersectable |
setIntersectable(Intersectable inter)
Sets intersectable object (for light-source of visibility: lights(MicroFacet) , ..). |
Methods inherited from interface cz.cuni.jagrlib.iface.Property |
---|
commit, get, set |
Field Detail |
---|
static final java.lang.String COLOR
Method Detail |
---|
Intersectable setIntersectable(Intersectable inter)
lights(MicroFacet)
, ..).
boolean lights(MicroFacet mf)
MicroFacet
.
mf
- The checked MicroFacet
(point on surface of some solid).
true
if the light source lights on the given point.getIntensity(cz.cuni.jagrlib.MicroFacet, double[])
,
getDirection(cz.cuni.jagrlib.MicroFacet, double[])
boolean lights(MicroFacet mf, int order, int total)
MicroFacet
.
Super-sampling variant.
mf
- The checked MicroFacet
(point on surface of some solid).order
- Order of this sample inside the actual pixel.total
- Total number of samples in the actual pixel.
true
if the light source lights on the given point.getIntensity(cz.cuni.jagrlib.MicroFacet, double[])
,
getDirection(cz.cuni.jagrlib.MicroFacet, double[])
boolean getIntensity(MicroFacet mf, double[] color)
MicroFacet
.
mf
- The MicroFacet
(point on surface of some solid).color
- Pre-allocated double[C]
array to hold result - light intensity
coming from the source to the given point (C
can be either 1
/for monochrome computing/, 3 /for RGB color system/ or greater /for more
complex spectral color sampling/).
true
if the light source can light on the given point (cannot
replace the lights()
call!).lights(cz.cuni.jagrlib.MicroFacet)
,
getDirection(cz.cuni.jagrlib.MicroFacet, double[])
boolean getIntensity(MicroFacet mf, int order, int total, double[] color)
MicroFacet
.
Super-sampling variant.
mf
- The MicroFacet
(point on surface of some solid).order
- Order of this sample inside the actual pixel.total
- Total number of samples in the actual pixel.color
- Pre-allocated double[C]
array to hold result - light intensity
coming from the source to the given point (C
can be either 1
/for monochrome computing/, 3 /for RGB color system/ or greater /for more
complex spectral color sampling/).
true
if the light source can light on the given point (cannot
replace the lights()
call!).lights(cz.cuni.jagrlib.MicroFacet)
,
getDirection(cz.cuni.jagrlib.MicroFacet, double[])
boolean getDirection(MicroFacet mf, double[] dir)
MicroFacet
.
mf
- The MicroFacet
(point on surface of some solid).dir
- Pre-allocated array to hold the result - normalised direction vector
from the MicroFacet
to the light source.
false
if the light source is not directional (thus dir
is irrelevant).lights(cz.cuni.jagrlib.MicroFacet)
,
getIntensity(cz.cuni.jagrlib.MicroFacet, double[])
boolean getDirection(MicroFacet mf, int order, int total, double[] dir)
MicroFacet
.
Super-sampling variant.
mf
- The MicroFacet
(point on surface of some solid).order
- Order of this sample inside the actual pixel.total
- Total number of samples in the actual pixel.dir
- Pre-allocated array to hold the result - normalised direction vector
from the MicroFacet
to the light source.
false
if the light source is not directional (thus dir
is irrelevant).lights(cz.cuni.jagrlib.MicroFacet)
,
getIntensity(cz.cuni.jagrlib.MicroFacet, double[])
boolean sample(MicroFacet mf, double u, double v, double[] color, double[] dir, double[] pdf, boolean testVisibility)
mf
- The MicroFacet
(point on surface of some solid).ksi1
- Uniform random number.ksi1
- Uniform random number.color
- Pre-allocated double[C] array to hold result - light intensity
coming from the source to the given point (C can be either 1
/for monochrome computing/, 3 /for RGB color system/ or greater /for more
complex spectral color sampling/).dir
- Pre-allocated array to hold the result - normalised direction vector
from the MicroFacet
to the light source.pdf
- Probability density function.
True
if the light is visible.double sample(double u1, double v1, double u2, double v2, double[] pos, double[] dir, double[] power)
u1
- Uniform random number.v1
- Uniform random number.u2
- Uniform random number.v2
- Uniform random number.pos
- Pre-allocated array which holds a point on the light source
(an origin of direction).dir
- Output direction in world coordinates. Pre-allocated array.power
- Power of given light source (if you wanna get power
of this photon, you have to divide this power by number
of photons). Pre-allocated array.
double pdf(double[] point, double[] normal, double[] dir)
point
- Point on the surface.normal
- Normal at this point.dir
- Direction from the point.boolean isDeltaLight()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |