|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcz.cuni.jagrlib.DefaultProperty
cz.cuni.jagrlib.Piece
cz.cuni.jagrlib.DefaultImageSynthesizer
cz.cuni.jagrlib.piece.SimpleSynthesizer
public class SimpleSynthesizer
Simple image synthesizer with progressive rendering.
Field Summary | |
---|---|
protected double |
addX
Horizontal translation (for RealFunction ). |
protected double |
addY
Vertical translation (for RealFunction ). |
protected static java.lang.String |
CATEGORY
Object category. |
protected double |
gamma
Gamma-correction for frame-buffer efficiency. |
protected static int |
INIT_CELL
Initial image cell size in pixels. |
protected double |
mulX
Horizontal scaling coefficient (for RealFunction ). |
protected double |
mulY
Vertical scaling coefficient (for RealFunction ). |
static RegPiece |
reg
Static registration instance for this class. |
protected int |
setHeight
|
protected int |
setWidth
|
protected static java.lang.String |
TEMPLATE_NAME
Object template identifier. |
static java.lang.String |
USE_GRAY
|
static java.lang.String |
USE_TIME
|
protected boolean |
useGray
Use gray palette (for RealFunction ). |
protected boolean |
useTime
Use time variable (for RealFunction ). |
Fields inherited from class cz.cuni.jagrlib.DefaultImageSynthesizer |
---|
actTime, imageHeight, imageWidth |
Fields inherited from class cz.cuni.jagrlib.Piece |
---|
channels, info, pl, plugs, TEMPLATE_TYPE, userBreak |
Fields inherited from interface cz.cuni.jagrlib.iface.ImageSynthesizer |
---|
GAMMA, HEIGHT, SUPERSAMPLING, WIDTH |
Fields inherited from interface cz.cuni.jagrlib.iface.Property |
---|
LOGGING, STATISTICS, TEXT_DESCRIPTION |
Constructor Summary | |
---|---|
SimpleSynthesizer()
|
Method Summary | |
---|---|
void |
commit()
Commits all previous changes to the internal object state. |
java.lang.Object |
get(java.lang.String key)
Gets the given property. |
double |
getTime()
Returns the actual time value for the object (used in animations). |
double[] |
getTimeInterval(double[] pre)
Retrieve the valid bounds for time variable. |
protected void |
imageBounds()
Transfers image size from associated RasterGraphics if necessary. |
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 |
set(java.lang.String key,
java.lang.Object value)
Sets the given property. |
void |
setBounds(int width,
int height)
Sets resolution of an output raster image. |
static int |
setTemplate(Template t,
int ord)
General-purpose registration routine. |
void |
setTime(double time)
Sets the actual time value for the object (used in animations). |
Methods inherited from class cz.cuni.jagrlib.DefaultImageSynthesizer |
---|
renderAll |
Methods inherited from class cz.cuni.jagrlib.Piece |
---|
className, connect, findPlug, findPlug, getInfo, getInterface, getInterface, getPlug, getReg, init, isCompatible, isCompatible, isConnected, logError, logWarning, myInterface, newInputPlug, newOptOutputPlug, newOutputPlug, newPlug, noTemplates, propBegin, propBounds, propDefault, propEnd, propEnum, propManipulator, propManipulator, setProgressListener, setRegStrings, setTemplateDynamic, stop |
Methods inherited from class cz.cuni.jagrlib.DefaultProperty |
---|
booleanProperty, booleanProperty, colorDoubleProperty, colorProperty, doubleProperty, doubleProperty, doubleProperty, enumProperty, floatProperty, floatProperty, floatProperty, intProperty, intProperty, intProperty, longProperty, longProperty, longProperty, set, stringProperty |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface cz.cuni.jagrlib.Breakable |
---|
setProgressListener, stop |
Field Detail |
---|
protected static final int INIT_CELL
protected boolean useGray
RealFunction
).
protected boolean useTime
RealFunction
).
protected double mulX
RealFunction
).
protected double addX
RealFunction
).
protected double mulY
RealFunction
).
protected double addY
RealFunction
).
protected double gamma
0.0
to turn off gamma-correction and color clamping.
public static final java.lang.String USE_GRAY
public static final java.lang.String USE_TIME
protected int setWidth
protected int setHeight
protected static final java.lang.String TEMPLATE_NAME
protected static final java.lang.String CATEGORY
public static final RegPiece reg
Constructor Detail |
---|
public SimpleSynthesizer()
Method Detail |
---|
protected void imageBounds()
RasterGraphics
if necessary.
public double[] getTimeInterval(double[] pre)
getTimeInterval
in interface TimeDependent
getTimeInterval
in class DefaultImageSynthesizer
pre
- Pre-allocated double[2]
array to hold the result (can be
null
).
result[0]
.. minimum time value, result[1]
.. maximum
time value.getTime()
,
setTime(double)
public double getTime()
getTime
in interface TimeDependent
getTime
in class DefaultImageSynthesizer
setTime(double)
public void setTime(double time)
setTime
in interface TimeDependent
setTime
in class DefaultImageSynthesizer
time
- New scene time (in seconds).getTime()
,
getTimeInterval(double[])
public void setBounds(int width, int height)
setBounds
in interface ImageSynthesizer
setBounds
in class DefaultImageSynthesizer
width
- Horizontal image size in pixels.height
- Vertical image size in pixels.public double[] renderPixel(int x, int y, double[] pre)
renderPixel
in interface ImageSynthesizer
renderPixel
in class DefaultImageSynthesizer
x
- X coordinate of the pixel.y
- Y coordinate of the pixel.pre
- Pre-allocated double[3]
array to hold results (can be
null
).
renderRectangle(int, int, int, int)
,
DefaultImageSynthesizer.renderAll()
public void renderRectangle(int x1, int y1, int x2, int y2)
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).renderPixel(int, int, double[])
,
DefaultImageSynthesizer.renderAll()
public void set(java.lang.String key, java.lang.Object value)
set
in interface Property
set
in class DefaultProperty
key
- Key string.value
- The new value.Property.commit()
public java.lang.Object get(java.lang.String key)
get
in interface Property
get
in class DefaultProperty
key
- Key string.
null
.public void commit()
commit
in interface Property
commit
in class DefaultProperty
public static int setTemplate(Template t, int ord)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |