cz.cuni.jagrlib.iface
Interface ImageFunction

All Superinterfaces:
Property, TimeDependent
All Known Implementing Classes:
DefaultImageFunction, DefaultRenderer, DirectLightMapVisualizer, FinalGathering, PathTracing, RayCasting, RayCastingNew, RayTracing, RayTracingNew, TestImageFunctions, TextureFunctions

public interface ImageFunction
extends TimeDependent

Abstract image function (R2 -> RN mapping).

Since:
0.11
See Also:
ImageFunction.java, ImageSynthesizer

Field Summary
static java.lang.String BACKGROUND_COLOR
          Property name: background-color (double[3]).
 
Fields inherited from interface cz.cuni.jagrlib.iface.Property
LOGGING, STATISTICS, TEXT_DESCRIPTION
 
Method Summary
 double[] getBounds(double[] pre)
          Returns actual bounds for [ x, y ] (projection-plane coordinates).
 long getSample(double x, double y, double[] color)
          Computes one image sample.
 long getSample(double x, double y, int order, int total, double[] color)
          Computes one image sample.
 void setBounds(double Xmin, double Xmax, double Ymin, double Ymax)
          Sets bounds (scaling factors) for the image function (e.g. projection-plane mapping).
 
Methods inherited from interface cz.cuni.jagrlib.iface.TimeDependent
getTime, getTimeInterval, setTime
 
Methods inherited from interface cz.cuni.jagrlib.iface.Property
commit, get, set
 

Field Detail

BACKGROUND_COLOR

static final java.lang.String BACKGROUND_COLOR
Property name: background-color (double[3]).

See Also:
Constant Field Values
Method Detail

setBounds

void setBounds(double Xmin,
               double Xmax,
               double Ymin,
               double Ymax)
Sets bounds (scaling factors) for the image function (e.g. projection-plane mapping).

Parameters:
Xmin - Minimum X coordinate.
Xmax - Maximum X coordinate.
Ymin - Minimum Y coordinate.
Ymax - Maximum Y coordinate.
See Also:
getBounds(double[])

getBounds

double[] getBounds(double[] pre)
Returns actual bounds for [ x, y ] (projection-plane coordinates).

Parameters:
pre - Pre-allocated (non-mandatory) double[4] array to hold results: pre[0] .. Xmin, pre[1] .. Xmax, pre[2] .. Ymin, pre[3] .. Ymax.
Returns:
Array with all 4 return values.
See Also:
setBounds(double, double, double, double), TimeDependent.getTimeInterval(double[])

getSample

long getSample(double x,
               double y,
               double[] color)
Computes one image sample.

Parameters:
x - X coordinate of the sample.
y - Y coordinate of the sample.
color - Pre-allocated array to hold result color vector (double[1] for monochrome images, double[3] for RGB images, larger arrays can be used for more complex spectral sampling).
Returns:
Hash-value (sample signature) used for adaptive subsampling.
See Also:
getSample(double,double,int,int,double[]), getBounds(double[])

getSample

long getSample(double x,
               double y,
               int order,
               int total,
               double[] color)
Computes one image sample. Passes parameters for hidden sampling.

Parameters:
x - X coordinate of the sample.
y - Y coordinate of the sample.
order - Order of this sample inside the actual pixel.
total - Total number of samples in the actual pixel.
color - Pre-allocated array to hold result color vector (double[1] for monochrome images, double[3] for RGB images, larger arrays can be used for more complex spectral sampling).
Returns:
Hash-value (sample signature) used for adaptive subsampling.
See Also:
getSample(double,double,double[]), getBounds(double[])