public final class AnimationContext
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
Animation |
getAnimation() |
double |
getAnimationContextTime() |
Timeline |
getAnimationTimeline() |
AnimGraph |
getAnimGraph() |
boolean |
isAnimated() |
void |
setAnimation(Animation animation)
Set an
Animation to be used for keyframe, skeletal and morph animation. |
void |
setAnimationTime(float trackTime)
Helper to set the
Animation time. |
void |
setAnimGraph(AnimGraph animGraph) |
void |
setTracks(AnimationTrack[] tracks,
Animation[] animations,
double duration)
Animations and tracks array must be the same size
|
boolean |
update(long timePassedMs)
Update
AnimationTrack time |
public final void setAnimation(Animation animation)
Animation to be used for keyframe, skeletal and morph animation.AnimGraph will be internally created with a single AnimNode.Animation has loop, the duration will be set to -1 (infinite
duration). If not, the duration will be set to the Animation duration,and will therefore
stops at end.animation - an Animationpublic final Animation getAnimation()
Animation set with setAnimation(Animation).public final Timeline getAnimationTimeline()
public final double getAnimationContextTime()
public final void setAnimationTime(float trackTime)
Animation time.AnimNode
of the AnimGraph created from setAnimation(Animation).AnimGraph api directly.trackTime - seek to the specified timesetAnimation(Animation),
getAnimation(),
AnimGraph.setKeyFrameTime(float),
AnimNodepublic final void setTracks(AnimationTrack[] tracks, Animation[] animations, double duration)
tracks - animation tracksanimations - animations listsduration - duration of the timelinepublic final void setAnimGraph(AnimGraph animGraph)
public final AnimGraph getAnimGraph()
AnimGraph, or null if isAnimated() returns falsepublic final boolean isAnimated()
Animation, an AnimGraph or AnimationTrack has been set.public final boolean update(long timePassedMs)
AnimationTrack timetimePassedMs - time passed in millisecond since the last update(long)AnimationContext was changedBonzai Engine 1.3.4 11/12/2015 - A Java OpenGL engine and tools for Windows/Mac/Linux/Android
Copyright © 2007-2015 Jérôme Jouvie bonzaiengine.com contact@bonzaiengine.com