libgdx API

com.badlogic.gdx.graphics.g3d.model
Interface AnimatedModel

All Superinterfaces:
Model
All Known Implementing Classes:
KeyframedModel, SkeletonModel, SkeletonModelGpuSkinned

public interface AnimatedModel
extends Model


Method Summary
 Animation getAnimation(java.lang.String name)
          Get a specific named animation out of the model.
 Animation[] getAnimations()
          Get an array containing all of the animations in this model.
 void setAnimation(java.lang.String animation, float time, boolean loop)
          Start playing the given animation at the given time in the animation and specify wether or not the animation will loop.
 
Methods inherited from interface com.badlogic.gdx.graphics.g3d.model.Model
dispose, getBoundingBox, getSubMesh, getSubMeshes, getSubModel, render, render, setMaterial, setMaterials
 

Method Detail

setAnimation

void setAnimation(java.lang.String animation,
                  float time,
                  boolean loop)
Start playing the given animation at the given time in the animation and specify wether or not the animation will loop.

Parameters:
animation - The name of the animation in this Model that you should play.
time - The time, in seconds, of the section to start the animation.
loop - Whether or not the animation will loop if the time is after the end of the animation. (TODO what happens when you reach the end of the animation and this is not set?)

getAnimation

Animation getAnimation(java.lang.String name)
Get a specific named animation out of the model.

Parameters:
name - The name of the animation that you wish to get.
Returns:
The Animation that you requested; or, if the animation does not exist, null is returned.

getAnimations

Animation[] getAnimations()
Get an array containing all of the animations in this model.

Returns:
An array containing a list of all of the animations in this model.

libgdx API

Copyright 2010 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)