cz.cuni.jagrlib.iface
Interface BSSRDF

All Superinterfaces:
Property
All Known Implementing Classes:
CookTorranceModel, LambertianModel, OrenNayarModel, PhongModel, SpecularReflection, SpecularTransmission

public interface BSSRDF
extends Property

Abstract BSSRDF (Bidirectional Surface Scattering Distribution Function).

See Also:
BSSRDF.java, 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_GLOSSY
          Component mask: Glossy reflection 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 java.lang.String MATERIAL_COLOR
          Common material property: color.
static java.lang.String MATERIAL_H
          Common material property: specular exponent.
static java.lang.String MATERIAL_KA
          Common material property: ambient coefficient.
static java.lang.String MATERIAL_KD
          Common material property: diffuse coefficient.
static java.lang.String MATERIAL_KS
          Common material property: specular coefficient.
static java.lang.String MATERIAL_KT
          Common material property: transparency.
static java.lang.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[] colorBSSRDF(boolean worldCoords, double[] in, double[] out, double[] normal, double[] tangent, int mask, double[] result)
          Returns the requested BSSRDF sample (BSSRDF is treated as band-color).
 double[] colorBSSRDF(boolean worldCoords, MicroFacet mf, double[] in, double[] out, int mask, double[] result)
          Returns the requested BSSRDF sample (BSSRDF is treated as band-color).
 double[] getOrigColor(double[] color)
          Retrieves the original color (defining surface color).
 double[] localToWorld(double[] normal, double[] tangent, double[] src, double[] dest)
          Transform local coordinates to world coordinates.
 double monoBSSRDF(boolean worldCoords, double[] in, double[] out, double[] normal, double[] tangent, int mask)
          Returns the requested BSSRDF sample (BSSRDF is treated as monochrome).
 double monoBSSRDF(boolean worldCoords, MicroFacet mf, double[] in, double[] out, int mask)
          Returns the requested BSSRDF sample (BSSRDF is treated as monochrome).
 double pdf(boolean worldCoords, MicroFacet mf, double[] in, double[] out)
          Returns the probability density function.
 double scatter(MicroFacet mf, double[] in, double u, double v, int mask, double[] out, double[] brdf)
          Scatter ray according to the light model.
 void setColor(double[] color)
          Sets the actual color (for the given BSSRDF data).
 int type()
          Returns the type of BRDF.
 double[] worldToLocal(double[] normal, double[] tangent, double[] src, double[] dest)
          Transform world coordinates to local coordinates.
 
Methods inherited from interface cz.cuni.jagrlib.iface.Property
commit, get, set
 

Field Detail

MATERIAL_COLOR

static final java.lang.String MATERIAL_COLOR
Common material property: color.

See Also:
Constant Field Values

MATERIAL_KA

static final java.lang.String MATERIAL_KA
Common material property: ambient coefficient.

See Also:
Constant Field Values

MATERIAL_KD

static final java.lang.String MATERIAL_KD
Common material property: diffuse coefficient.

See Also:
Constant Field Values

MATERIAL_KS

static final java.lang.String MATERIAL_KS
Common material property: specular coefficient.

See Also:
Constant Field Values

MATERIAL_H

static final java.lang.String MATERIAL_H
Common material property: specular exponent.

See Also:
Constant Field Values

MATERIAL_KT

static final java.lang.String MATERIAL_KT
Common material property: transparency.

See Also:
Constant Field Values

MATERIAL_N

static final java.lang.String MATERIAL_N
Common material property: index of refraction.

See Also:
Constant Field Values

COMP_DIFFUSE

static final int COMP_DIFFUSE
Component mask: Diffuse component.

See Also:
Constant Field Values

COMP_SPEC_REFLECTION

static final int COMP_SPEC_REFLECTION
Component mask: Specular reflection component.

See Also:
Constant Field Values

COMP_SPEC_REFRACTION

static final int COMP_SPEC_REFRACTION
Component mask: Specular reflection component.

See Also:
Constant Field Values

COMP_GLOSSY

static final int COMP_GLOSSY
Component mask: Glossy reflection component.

See Also:
Constant Field Values

COMP_SPECULAR

static final int COMP_SPECULAR
Component mask: both specular components (used in ray-tracing).

See Also:
Constant Field Values

COMP_ALL

static final int COMP_ALL
Component mask: all components (used with light sources).

See Also:
Constant Field Values
Method Detail

monoBSSRDF

double monoBSSRDF(boolean worldCoords,
                  double[] in,
                  double[] out,
                  double[] normal,
                  double[] tangent,
                  int mask)
Returns the requested BSSRDF sample (BSSRDF is treated as monochrome).

Parameters:
worldCoords - Should be set to true if vectors in and out are in world coordinates and to false if vectors in and out are in local coordinates.
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.
tangent - Tangent vector of a surface.
mask - Which light components are to be computed?
Returns:
BSSRDF coefficient f(in->out).
See Also:
#monoBSSRDF(MicroFacet,double[],double[],int), #colorBSSRDF(double[],double[],double[],int,double[])

monoBSSRDF

double monoBSSRDF(boolean worldCoords,
                  MicroFacet mf,
                  double[] in,
                  double[] out,
                  int mask)
Returns the requested BSSRDF sample (BSSRDF is treated as monochrome). Computations are done relatively to the given MicroFacet (point on surface of some solid).

Parameters:
worldCoords - Should be set to true if vectors in and out are in world coordinates and to false if vectors in and out are in local coordinates.
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?
Returns:
BSSRDF coefficient f(in->mf->out).
See Also:
#monoBSSRDF(double[],double[],double[],int), #colorBSSRDF(MicroFacet,double[],double[],int,double[])

colorBSSRDF

double[] colorBSSRDF(boolean worldCoords,
                     double[] in,
                     double[] out,
                     double[] normal,
                     double[] tangent,
                     int mask,
                     double[] result)
Returns the requested BSSRDF sample (BSSRDF is treated as band-color).

Parameters:
worldCoords - Should be set to true if vectors in and out are in world coordinates and to false if vectors in and out are in local coordinates.
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.
tangent - Tangent vector of a surface.
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.
Returns:
Output BSSRDF spectral coefficients.
See Also:
#monoBSSRDF(double[],double[],double[],int), #colorBSSRDF(MicroFacet,double[],double[],int,double[])

colorBSSRDF

double[] colorBSSRDF(boolean worldCoords,
                     MicroFacet mf,
                     double[] in,
                     double[] out,
                     int mask,
                     double[] result)
Returns the requested BSSRDF sample (BSSRDF is treated as band-color). Computations are done relatively to the given MicroFacet (point on surface of some solid).

Parameters:
worldCoords - Should be set to true if vectors in and out are in world coordinates and to false if vectors in and out are in local coordinates.
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.
Returns:
Output BSSRDF spectral coefficients.
See Also:
#monoBSSRDF(MicroFacet,double[],double[],int), #colorBSSRDF(double[],double[],double[],int,double[])

getOrigColor

double[] getOrigColor(double[] color)
Retrieves the original color (defining surface color).

Parameters:
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.
Returns:
Array containing copy of original color (can be altered).

setColor

void setColor(double[] color)
Sets the actual color (for the given BSSRDF data). This color will be used in subsequent BSSRDF calculations. The color array won't be altered.

Parameters:
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/).

scatter

double scatter(MicroFacet mf,
               double[] in,
               double u,
               double v,
               int mask,
               double[] out,
               double[] brdf)
Scatter ray according to the light model.

Parameters:
mf - The MicroFacet (point on surface of some solid).
in - Input direction (should look from the hit point)..
u - Random uniform number.
v - Random uniform number.
mask - Which light components are to be computed?
out - Output direction in world coordinates.
brdf - 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/).
Returns:
Probability density function.

pdf

double pdf(boolean worldCoords,
           MicroFacet mf,
           double[] in,
           double[] out)
Returns the probability density function.

Parameters:
worldCoords - Should be set to true if vectors in and out are in world coordinates and to false if vectors in and out are in local coordinates.
mf - The MicroFacet (point on surface of some solid).
in - Input direction.
out - Output direction.

type

int type()
Returns the type of BRDF.


localToWorld

double[] localToWorld(double[] normal,
                      double[] tangent,
                      double[] src,
                      double[] dest)
Transform local coordinates to world coordinates.


worldToLocal

double[] worldToLocal(double[] normal,
                      double[] tangent,
                      double[] src,
                      double[] dest)
Transform world coordinates to local coordinates.