|
||||||||||
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.testing.Test3DScene
public class Test3DScene
Creates sample 3D scene (Brep
) for testing of rendering algorithms.
So far implemented: graph of R2 to R function (provided externally via the RealFunction
module).
Field Summary | |
---|---|
protected static double |
ADD_RADIUS
Additional triangle radius in world space. |
protected static double |
BLADE_THICKNESS
Relative blade thickness (thickness / width ratio). |
protected static double |
BLADE_WIDTH
Blade width in world space. |
protected static java.lang.String |
CATEGORY
Object category. |
static java.lang.String |
CELLS_X
|
static java.lang.String |
CELLS_Y
|
protected int |
cellsX
Number of cells in X direction. |
protected int |
cellsY
Number of cells in Y direction. |
static java.lang.String |
COLOR_MUL
|
protected double |
colorMul
Color multiplier for vertex colors. |
protected static double |
FAN_MAXZ
Fan maximum vertical position. |
protected static double |
FAN_MINZ
Fan minimum vertical position. |
protected int |
fans
Number of fans to be drawn. |
static java.lang.String |
FANS
|
protected static int |
MAX_BLADES
Maximum number of fan double-blades. |
static java.lang.String |
MAX_X
|
static java.lang.String |
MAX_Y
|
protected double |
maxRadius
Maximal radius for fan generation. |
protected double |
maxX
|
protected double |
maxY
|
static java.lang.String |
MIN_X
|
static java.lang.String |
MIN_Y
|
protected double |
minX
|
protected double |
minY
|
protected boolean |
painter
Non-penetrating faces? |
static java.lang.String |
PAINTER
|
static java.lang.String |
RADIUS
|
static RegPiece |
reg
Static registration instance for this class. |
protected RandomJames |
rnd
Global random generator. |
protected int |
seed
Set negative value for randomize. |
static java.lang.String |
SEED
|
protected static java.lang.String |
TEMPLATE_NAME
Object template identifier. |
protected boolean |
transparent
Generate transparent colors? |
static java.lang.String |
TRANSPARENT
|
Fields inherited from class cz.cuni.jagrlib.Piece |
---|
channels, info, pl, plugs, TEMPLATE_TYPE, userBreak |
Fields inherited from interface cz.cuni.jagrlib.iface.Property |
---|
LOGGING, STATISTICS, TEXT_DESCRIPTION |
Constructor Summary | |
---|---|
Test3DScene()
|
Method Summary | |
---|---|
protected void |
fan(Brep data,
int ctx,
int vertexColor,
int faceColor,
int vertexNormal,
int vertexTex)
Generates one random fan. |
boolean |
fire(int type)
Prepares 3D scene (attached Brep object). |
java.lang.Object |
get(java.lang.String key)
Gets the given property. |
int |
init(int phase)
Module initialization - called before any Runnable.run() . |
protected void |
permuteColor(float[] color)
Permutate the given color vector, sets non-transparent result color. |
protected void |
randomColor(float[] color,
boolean tran)
Generate random (optionally transparent) color. |
void |
set(java.lang.String key,
java.lang.Object value)
Sets the given property. |
static int |
setTemplate(Template t,
int ord)
General-purpose registration routine. |
Methods inherited from class cz.cuni.jagrlib.Piece |
---|
className, connect, findPlug, findPlug, getInfo, getInterface, getInterface, getPlug, getReg, 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, commit, 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.iface.Property |
---|
commit |
Methods inherited from interface cz.cuni.jagrlib.Breakable |
---|
setProgressListener, stop |
Field Detail |
---|
protected int cellsX
protected int cellsY
protected double minX
protected double maxX
protected double minY
protected double maxY
protected int fans
protected double maxRadius
protected int seed
protected RandomJames rnd
protected boolean painter
protected boolean transparent
protected double colorMul
protected static final double FAN_MINZ
protected static final double FAN_MAXZ
protected static final double BLADE_THICKNESS
protected static final double BLADE_WIDTH
protected static final double ADD_RADIUS
protected static final int MAX_BLADES
public static final java.lang.String CELLS_X
public static final java.lang.String CELLS_Y
public static final java.lang.String MIN_X
public static final java.lang.String MAX_X
public static final java.lang.String MIN_Y
public static final java.lang.String MAX_Y
public static final java.lang.String COLOR_MUL
public static final java.lang.String FANS
public static final java.lang.String RADIUS
public static final java.lang.String SEED
public static final java.lang.String PAINTER
public static final java.lang.String TRANSPARENT
protected static final java.lang.String TEMPLATE_NAME
protected static final java.lang.String CATEGORY
public static final RegPiece reg
Constructor Detail |
---|
public Test3DScene()
Method Detail |
---|
protected void randomColor(float[] color, boolean tran)
protected void permuteColor(float[] color)
protected void fan(Brep data, int ctx, int vertexColor, int faceColor, int vertexNormal, int vertexTex)
public boolean fire(int type)
Brep
object).
fire
in interface Trigger
type
- The action type (whatever it means..).
true
if the action was successful.public int init(int phase)
Runnable.run()
.
Individual phases (starting at 0
) will be called until maximum
requested phase number is reached.
init
in class Piece
phase
- Current phase number.
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 static int setTemplate(Template t, int ord)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |