|
||||||||||
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.DefaultRealFunction
cz.cuni.jagrlib.piece.SimpleNoise
public class SimpleNoise
Noise function - simple implementations. Interpolation/approximation in uniform grid.
Nested Class Summary | |
---|---|
protected static class |
SimpleNoise.NoiseType
Implemented noise types. |
Field Summary | |
---|---|
protected double |
amplitude
Actual noise amplitude. |
protected static java.lang.String |
CATEGORY
Object category. |
protected int |
dim
Noise dimensionality. |
static java.lang.String |
DIMENSION
|
protected int |
frequency
Actual noise frequency (number of periods within 0.0 - 1.0 domain). |
protected double[] |
grid
Array holding randomly-generated knot points. |
protected HashFunction |
hash
Hash-function instance. |
static java.lang.String |
NOISE_TYPE
|
static RegPiece |
reg
Static registration instance for this class. |
protected static long |
RND_MASK
How many LS-bits from pseudo-random generator will be used. |
protected static java.lang.String |
TEMPLATE_NAME
Object template identifier. |
protected SimpleNoise.NoiseType |
type
Actual noise type. |
protected int |
variation
Hash-function variation. |
protected static int |
X0
X-coordinate increment for better hashing distribution. |
protected static int |
XM
X-coordinate multiplier for better hashing distribution. |
protected static int |
Y0
Y-coordinate increment for better hashing distribution. |
protected static int |
YM
Y-coordinate multiplier for better hashing distribution. |
protected static int |
Z0
Z-coordinate increment for better hashing distribution. |
protected static int |
ZM
Z-coordinate multiplier for better hashing distribution. |
Fields inherited from class cz.cuni.jagrlib.DefaultRealFunction |
---|
EPSILON |
Fields inherited from class cz.cuni.jagrlib.Piece |
---|
channels, info, pl, plugs, TEMPLATE_TYPE, userBreak |
Fields inherited from interface cz.cuni.jagrlib.iface.RealFunction |
---|
AMPLITUDE, FREQUENCY, FREQUENCY_X, FREQUENCY_Y, VARIATION |
Fields inherited from interface cz.cuni.jagrlib.iface.Property |
---|
LOGGING, STATISTICS, TEXT_DESCRIPTION |
Constructor Summary | |
---|---|
SimpleNoise()
|
Method Summary | |
---|---|
protected void |
assertGrid(int len)
|
protected double |
bSpline(int i0,
int di,
double t)
Cubic B-spline basis function blending. |
double |
f(double x,
double y)
Compute the mapping: f(x,y). |
double |
f(double x,
double y,
double z)
Compute the mapping: f(x,y,z). |
java.lang.Object |
get(java.lang.String key)
Gets the given property. |
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.DefaultRealFunction |
---|
df, df, df, df, f, f, f, f, f, f, getDomain, getDomain |
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, 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 |
Field Detail |
---|
protected SimpleNoise.NoiseType type
protected int dim
protected double amplitude
protected int frequency
protected int variation
protected HashFunction hash
protected double[] grid
protected static final int X0
protected static final int Y0
protected static final int Z0
protected static final int XM
protected static final int YM
protected static final int ZM
protected static final long RND_MASK
public static final java.lang.String NOISE_TYPE
public static final java.lang.String DIMENSION
protected static final java.lang.String TEMPLATE_NAME
protected static final java.lang.String CATEGORY
public static final RegPiece reg
Constructor Detail |
---|
public SimpleNoise()
Method Detail |
---|
protected final void assertGrid(int len)
protected final double bSpline(int i0, int di, double t)
public double f(double x, double y)
f
in interface RealFunction
f
in class DefaultRealFunction
x
- X coordinate (1st argument).y
- Y coordinate (2nd argument).public double f(double x, double y, double z)
f
in interface RealFunction
f
in class DefaultRealFunction
x
- X coordinate (1st argument).y
- Y coordinate (2nd argument).z
- Z coordinate (3rd argument).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 |