Class Behavior
java.lang.Object
|
+--Behavior
- public class Behavior
- extends java.lang.Object
An image generator with state entirely parameterized by time and a
pixel function.
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
expression
ELExpression expression
currentValue
ELMatrix currentValue
dirty
boolean dirty
- True when currentValue is out of sync with expression.
lastEnvironmentHash
int lastEnvironmentHash
numMutations
int numMutations
numGenerations
int numGenerations
expressionCode
java.lang.String expressionCode
Behavior
public Behavior(GeneticParameters gp,
int width,
int height)
- Parameters:
gp
- The parameters that should be used to generate the
initial expression.
Behavior
public Behavior(ELExpression e,
int width,
int height,
int numGenerations)
setRandomExpression
public void setRandomExpression(GeneticParameters gp)
- Sets this behavior to a new, non-boring expression.
setExpression
public void setExpression(ELExpression e)
isBoring
public boolean isBoring()
- Returns true if this behavior is boring.
free
public Behavior free()
- Deallocates resources consumed by this behavior.
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
evaluate
public void evaluate()
evaluate
public void evaluate(ELEnvironment environment)
- Evaluates the expression.
sameExpression
public boolean sameExpression(Behavior b)
- Returns true if both behaviors share an expression.
environmentChanged
public void environmentChanged()
- Invoke to tell the behavior that its environment has been mutated
and it should redraw if necessary. This will automatically trigger
re-evaluation and redraw on the invoking thread.