|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--kinetic.KineticProperty
basic class used for storing animatable values in the engine. Stores a continous value with bounding information. Contains a raw unprocessed value with is used at the initial state of each frame. Contains an end)value which contains the process value used to actualyl render the data to the screen.
| Field Summary | |
protected boolean |
changed
indicates if the value shas changed |
protected double |
endValue
processed value used to render frame |
protected double |
initialValue
raw unprocessed value |
protected double |
lower_bound
lower bound |
protected kinetic.KineticObject |
owner
the owner of this property |
protected double |
upper_bound
upper bound |
| Constructor Summary | |
KineticProperty()
construct s anew instance of a KineticPropert |
|
KineticProperty(double new_val)
create new instance with an initial value |
|
KineticProperty(double new_val,
double l_bound,
double u_bound)
create new instance with an initial value and bounds |
|
| Method Summary | |
void |
addBehavior(kinetic.Behavior b)
add a behavior to this property |
void |
applyBehavior(kinetic.Behavior b,
double time)
run the behavior on this property with this value of time |
void |
clear()
clears all animation data this property knows about |
void |
clipValue()
clips the internal value to the bounds |
java.util.ArrayList |
getBehaviorList()
gets the list of behaviors attached to this property |
double |
getEndValue()
gets the processed value of this property |
double |
getInitialValue()
get the unprocessed initial value of the property |
void |
handleMouseEvent(java.awt.event.MouseEvent e)
used to support interactivity |
boolean |
hasChanged()
queries if the value changed during last update |
static double |
limit(double test_value,
double upper,
double lower)
static utility routine to clip values to given range |
void |
reset()
reset internal variables in the property |
void |
resetEndValue()
restore the raw value into the end value |
void |
setMaxValue()
sets the raw value to the upper bound |
void |
setMinValue()
sets the raw value to the lower bound |
void |
setOwner(kinetic.KineticObject obj)
sets the own of this property |
void |
setValue(double val)
sets the value of this property |
void |
setValue(long val)
sets the values of this property with a long |
void |
update(double time)
calculate the value for this property given the value of time |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected double upper_bound
protected double lower_bound
protected double initialValue
protected double endValue
protected boolean changed
protected kinetic.KineticObject owner
| Constructor Detail |
public KineticProperty()
public KineticProperty(double new_val)
new_val - property value
public KineticProperty(double new_val,
double l_bound,
double u_bound)
new_val - property valuel_bound - lower boundu_bound - upper bound| Method Detail |
public static double limit(double test_value,
double upper,
double lower)
test_value - value to clipupper - upper boundlower - lower bound
public void clipValue()
public void setValue(long val)
val - new property valuepublic void setValue(double val)
val - new property valuepublic double getInitialValue()
public double getEndValue()
public boolean hasChanged()
public void setMaxValue()
public void setMinValue()
public void setOwner(kinetic.KineticObject obj)
obj - new ownerpublic void addBehavior(kinetic.Behavior b)
b - instance of a behaviorpublic void update(double time)
time - value of time - mspublic void handleMouseEvent(java.awt.event.MouseEvent e)
e - mouse event objectpublic void resetEndValue()
public void reset()
public void clear()
public void applyBehavior(kinetic.Behavior b,
double time)
b - instance of a behaviortime - value of time - mspublic java.util.ArrayList getBehaviorList()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||