org.jagatoo.loaders.models.collada.stax
Class XMLAnimation

java.lang.Object
  extended by org.jagatoo.loaders.models.collada.stax.XMLAnimation

public class XMLAnimation
extends java.lang.Object

A COLLADA animation. Child of LibraryAnimations.


Field Summary
 XMLAsset asset
           
 java.util.ArrayList<XMLChannel> channels
           
 java.lang.String id
           
 java.lang.String name
           
 java.util.ArrayList<XMLSampler> samplers
           
 java.util.ArrayList<XMLSource> sources
           
 
Constructor Summary
XMLAnimation()
           
 
Method Summary
 float[] getInput()
           
 float[] getOutput()
           
 KeyFrame.Axis getRotationAxis()
           
 XMLSource getSource(java.lang.String id)
          Search a source with the specified id
 java.lang.String getTargetBone()
           
 XMLChannel.ChannelType getType()
          Tells if the animation contains transformation key frames or rotation key frames
 void parse(javax.xml.stream.XMLStreamReader parser)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

public java.lang.String id

name

public java.lang.String name

asset

public XMLAsset asset

sources

public java.util.ArrayList<XMLSource> sources

samplers

public java.util.ArrayList<XMLSampler> samplers

channels

public java.util.ArrayList<XMLChannel> channels
Constructor Detail

XMLAnimation

public XMLAnimation()
Method Detail

getSource

public XMLSource getSource(java.lang.String id)
Search a source with the specified id

Parameters:
id -
Returns:
the XML source

getTargetBone

public java.lang.String getTargetBone()
Returns:
the target bone name for this animation

getInput

public float[] getInput()
Returns:
a float array with all the times of the key frames

getOutput

public float[] getOutput()
Returns:
a float array with the values of all the key frames

getType

public XMLChannel.ChannelType getType()
Tells if the animation contains transformation key frames or rotation key frames


getRotationAxis

public KeyFrame.Axis getRotationAxis()
Returns:
the rotation axis of the animation. It only works if the animation if for rotation

parse

public void parse(javax.xml.stream.XMLStreamReader parser)
           throws javax.xml.stream.XMLStreamException
Throws:
javax.xml.stream.XMLStreamException