|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--kinetic.util.KTEngine
Utiltiy class that implements an animation thread that takes aniamtion sequence and will draw double buffered images to the screen. The animation can be stop, reset, or set to a specific time. This drawing thread also supports motion blur if the processing power if available in real time to support it.
Field Summary | |
boolean |
antialiasing
anti aliasing flag for drawing, can be turned off to boost performance |
Constructor Summary | |
KTEngine()
Creates a new instance of KTEngine |
Method Summary | |
void |
buildAnimation()
builds the animation with the sequence builder associated with the engine |
void |
draw(double time)
renders the animation at a specified time on the current canvas |
double |
getLastTime()
gets the position of the playback head the last time the animation thread was called. |
kinetic.Sequence |
getSequence()
returns the animation sequence associated with the engine |
boolean |
isRunning()
check to see if the animation is still running |
void |
resetAnimationTime()
reset the animation time to 0ms |
void |
run()
start the animation thread fro the last given animation time |
void |
setAnimationTime(double t)
sets the animation time of the engine |
void |
setKTEngineEventListener(kinetic.util.KTEngineEventListener newEventListener)
sets an event listener that can respond to event generated by the engine |
void |
setMotionBlur(int blur)
set the motion blur (assumes default values for other parameters) |
void |
setMotionBlur(int blur,
double shutterAngle,
double shutterPhase)
sets the motion blur value |
void |
setSequence(kinetic.Sequence seq)
sets the animation sequence associated with the engine |
void |
setSequenceBuilder(kinetic.util.SequenceBuilder b)
sets the sequence builder associated with the engine. |
void |
setStage(java.awt.Component newStage)
set the drawing canvas for the engine |
void |
start()
starts the animation thread from time 0ms |
void |
stop()
stops the animation thread |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public boolean antialiasing
Constructor Detail |
public KTEngine()
Method Detail |
public void setMotionBlur(int blur, double shutterAngle, double shutterPhase)
blur
- number of temporally super sampled images to render per frameshutterAngle
- portion of the time step to take the super sampled images from. 360 degrees means the shutter never closes.shutterPhase
- position of the portion of the timestep for taking the super sampled images. 0-360 degrees.public void setMotionBlur(int blur)
blur
- number of temporally super sampled images to render per framepublic void run()
run
in interface java.lang.Runnable
public void start()
public void stop()
public boolean isRunning()
public void setAnimationTime(double t)
t
- the desired aniamtione time (ms)public void resetAnimationTime()
public double getLastTime()
public void setStage(java.awt.Component newStage)
newStage
- a AWT component that will be used as the drawing canvas for the animationpublic void draw(double time)
time
- position of the play head in the animationpublic void setKTEngineEventListener(kinetic.util.KTEngineEventListener newEventListener)
newEventListener
- an engine event listenerpublic kinetic.Sequence getSequence()
public void setSequence(kinetic.Sequence seq)
seq
- animation sequencepublic void setSequenceBuilder(kinetic.util.SequenceBuilder b)
b
- sequence builderpublic void buildAnimation()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |