|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface LightModel
Abstract light model (BRDF function).
LightSource
Field Summary | |
---|---|
static int |
COMP_ALL
Component mask: all components (used with light sources). |
static int |
COMP_DIFFUSE
Component mask: Diffuse component. |
static int |
COMP_SPEC_REFLECTION
Component mask: Specular reflection component. |
static int |
COMP_SPEC_REFRACTION
Component mask: Specular reflection component. |
static int |
COMP_SPECULAR
Component mask: both specular components (used in ray-tracing). |
static String |
MATERIAL_COLOR
Common material property: color. |
static String |
MATERIAL_H
Common material property: specular exponent. |
static String |
MATERIAL_KA
Common material property: ambient coefficient. |
static String |
MATERIAL_KD
Common material property: diffuse coefficient. |
static String |
MATERIAL_KS
Common material property: specular coefficient. |
static String |
MATERIAL_KT
Common material property: transparency. |
static String |
MATERIAL_N
Common material property: index of refraction. |
Fields inherited from interface cz.cuni.jagrlib.iface.Property |
---|
LOGGING, STATISTICS, TEXT_DESCRIPTION |
Method Summary | |
---|---|
double[] |
colorBRDF(double[] in,
double[] out,
double[] normal,
Property data,
int mask,
double[] result)
Returns the requested BRDF sample (BRDF is treated as band-color). |
double[] |
colorBRDF(MicroFacet mf,
double[] in,
double[] out,
int mask,
double[] result)
Returns the requested BRDF sample (BRDF is treated as band-color). |
Property |
createMaterial()
Create material object for the shading model. |
double[] |
getOrigColor(double[] color,
Property data)
Retrieves the original color (defining surface color). |
double[] |
lightSum(MicroFacet mf,
int order,
int total,
LightSource[] lights,
double[] out,
double[] result)
Accumulates light contributions from set of light sources through the given MicroFacet (point on surface of some solid) to the viewing direction. |
double |
monoBRDF(double[] in,
double[] out,
double[] normal,
Property data,
int mask)
Returns the requested BRDF sample (BRDF is treated as monochrome). |
double |
monoBRDF(MicroFacet mf,
double[] in,
double[] out,
int mask)
Returns the requested BRDF sample (BRDF is treated as monochrome). |
void |
setColor(double[] color,
Property data)
Sets the actual color (for the given BRDF data). |
Methods inherited from interface cz.cuni.jagrlib.iface.Property |
---|
commit, get, set |
Field Detail |
---|
static final String MATERIAL_COLOR
static final String MATERIAL_KA
static final String MATERIAL_KD
static final String MATERIAL_KS
static final String MATERIAL_H
static final String MATERIAL_KT
static final String MATERIAL_N
static final int COMP_DIFFUSE
static final int COMP_SPEC_REFLECTION
static final int COMP_SPEC_REFRACTION
static final int COMP_SPECULAR
static final int COMP_ALL
Method Detail |
---|
Property createMaterial()
double monoBRDF(double[] in, double[] out, double[] normal, Property data, int mask)
in
- Input ray direction (double[3]
or double[4]
).out
- Output (viewing) ray direction (double[3]
or
double[4]
).normal
- Normal vector of a surface.data
- Non-mandatory data object to hold BRDF state information.mask
- Which light components are to be computed?
monoBRDF(MicroFacet,double[],double[],int)
,
colorBRDF(double[],double[],double[],Property,int,double[])
double monoBRDF(MicroFacet mf, double[] in, double[] out, int mask)
MicroFacet
(point on surface of some solid).
mf
- The MicroFacet
(point on surface of some solid).in
- Input ray direction (double[3]
or double[4]
).out
- Output (viewing) ray direction (double[3]
or
double[4]
).mask
- Which light components are to be computed?
monoBRDF(double[],double[],double[],Property,int)
,
colorBRDF(MicroFacet,double[],double[],int,double[])
,
MicroFacet.material
double[] colorBRDF(double[] in, double[] out, double[] normal, Property data, int mask, double[] result)
in
- Input ray direction (double[3]
or double[4]
).out
- Output (viewing) ray direction (double[3]
or
double[4]
).normal
- Normal vector of a surface.data
- Non-mandatory data object to hold BRDF state information.mask
- Which light components are to be computed?result
- Pre-allocated double[C]
array to hold BRDF coefficients
f(in->out) (C
can be either 1
/for monochrome computing/, 3 /for RGB color system/ or greater /for more
complex spectral color sampling/). Can be null
.
monoBRDF(double[],double[],double[],Property,int)
,
colorBRDF(MicroFacet,double[],double[],int,double[])
double[] colorBRDF(MicroFacet mf, double[] in, double[] out, int mask, double[] result)
MicroFacet
(point on surface of some solid).
mf
- The MicroFacet
(point on surface of some solid).in
- Input ray direction (double[3]
or double[4]
).out
- Output (viewing) ray direction (double[3]
or
double[4]
).mask
- Which light components are to be computed?result
- Pre-allocated double[C]
array to hold BRDF coefficients
f(in->mf->out) (C
can be either 1
/for monochrome computing/, 3 /for RGB color system/ or greater /for more
complex spectral color sampling/). Can be null
.
monoBRDF(MicroFacet,double[],double[],int)
,
colorBRDF(double[],double[],double[],Property,int,double[])
,
MicroFacet.material
double[] lightSum(MicroFacet mf, int order, int total, LightSource[] lights, double[] out, double[] result)
MicroFacet
(point on surface of some solid) to the viewing direction.
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.lights
- Set of light sources that can light the point.out
- Output (viewing) ray direction (double[3]
or
double[4]
).result
- Pre-allocated double[C]
array to hold BRDF coefficients
f(in->mf->out) (C
can be either 1
/for monochrome computing/, 3 /for RGB color system/ or greater /for more
complex spectral color sampling/). Can be null
, otherwise the
initial value will be preseved.
colorBRDF(MicroFacet,double[],double[],int,double[])
,
MicroFacet.material
double[] getOrigColor(double[] color, Property data)
color
- Pre-allocated double[C]
array to hold the color
(C
can be either 1 /for monochrome computing/, 3 /for RGB
color system/ or greater /for more complex spectral color sampling/). Can
be null
.data
- Data object with BRDF state information (optional).
void setColor(double[] color, Property data)
color
- Color definition - double[C]
array
(C
can be either 1 /for monochrome computing/, 3 /for RGB
color system/ or greater /for more complex spectral color sampling/).data
- Data object with BRDF state information.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |