cz.cuni.jagrlib.iface
Interface ImageSynthesizer

All Superinterfaces:
Breakable, Property, TimeDependent
All Known Implementing Classes:
DefaultImageSynthesizer, FractalCircles, JitteringSynthesizer, SimpleSynthesizer, TestGamma, TestImageLaser

public interface ImageSynthesizer
extends TimeDependent, Breakable

Abstract interface for image-synthesizing algorithms.

Since:
0.11
See Also:
ImageSynthesizer.java

Field Summary
static java.lang.String GAMMA
          Property name: gamma-correction (or 0.0 for no correction and no clamping - for HDRI).
static java.lang.String HEIGHT
          Property name: image height in pixels.
static java.lang.String SUPERSAMPLING
          Property name: number of samples (rays) for supersampling.
static java.lang.String WIDTH
          Property name: image width in pixels.
 
Fields inherited from interface cz.cuni.jagrlib.iface.Property
LOGGING, STATISTICS, TEXT_DESCRIPTION
 
Method Summary
 void renderAll()
          Render the whole image.
 double[] renderPixel(int x, int y, double[] pre)
          Render the given pixel of the image.
 void renderRectangle(int x1, int y1, int x2, int y2)
          Render the given rectangle.
 void setBounds(int width, int height)
          Sets resolution of an output raster image.
 
Methods inherited from interface cz.cuni.jagrlib.iface.TimeDependent
getTime, getTimeInterval, setTime
 
Methods inherited from interface cz.cuni.jagrlib.iface.Property
commit, get, set
 
Methods inherited from interface cz.cuni.jagrlib.Breakable
setProgressListener, stop
 

Field Detail

WIDTH

static final java.lang.String WIDTH
Property name: image width in pixels.

See Also:
Constant Field Values

HEIGHT

static final java.lang.String HEIGHT
Property name: image height in pixels.

See Also:
Constant Field Values

SUPERSAMPLING

static final java.lang.String SUPERSAMPLING
Property name: number of samples (rays) for supersampling.

See Also:
Constant Field Values

GAMMA

static final java.lang.String GAMMA
Property name: gamma-correction (or 0.0 for no correction and no clamping - for HDRI).

See Also:
Constant Field Values
Method Detail

setBounds

void setBounds(int width,
               int height)
Sets resolution of an output raster image.

Parameters:
width - Horizontal image size in pixels.
height - Vertical image size in pixels.

renderPixel

double[] renderPixel(int x,
                     int y,
                     double[] pre)
Render the given pixel of the image.

Parameters:
x - X coordinate of the pixel.
y - Y coordinate of the pixel.
pre - Pre-allocated double[3] array to hold results (can be null).
Returns:
Color of the pixel (in RGB color space).
See Also:
renderRectangle(int, int, int, int), renderAll()

renderRectangle

void renderRectangle(int x1,
                     int y1,
                     int x2,
                     int y2)
Render the given rectangle. Output is written to some connected raster device (not defined in this interface).

Parameters:
x1 - X coordinate of the upper left corner.
y1 - Y coordinate of the upper left corner.
x2 - X coordinate of the lower right corner (outside pixel).
y2 - Y coordinate of the upper left corner (outside pixel).
See Also:
renderPixel(int, int, double[]), renderAll()

renderAll

void renderAll()
Render the whole image. Output is written to some connected raster device (not defined in this interface).

See Also:
renderPixel(int, int, double[]), renderRectangle(int, int, int, int)