<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_26) on Sun Sep 18 18:13:13 EDT 2011 -->
<TITLE>
KeyframedModel (libgdx API)
</TITLE>
<META NAME="date" CONTENT="2011-09-18">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="KeyframedModel (libgdx API)";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview
</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package
</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class
</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/KeyframedModel.html"><FONT CLASS="NavBarFont1"><B>Use
</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree
</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated
</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index
</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help
</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
libgdx API
<style>
body, td, th { font-family:Helvetica, Tahoma, Arial, sans-serif; font-size:10pt }
pre, code, tt { font-size:9pt; font-family:Lucida Console, Courier New, sans-serif }
h1, h2, h3, .FrameTitleFont, .FrameHeadingFont, .TableHeadingColor font { font-size:105%; font-weight:bold }
.TableHeadingColor { background:#EEEEFF; }
a { text-decoration:none }
a:hover { text-decoration:underline }
a:link, a:visited { color:blue }
table { border:0px }
.TableRowColor td:first-child { border-left:1px solid black }
.TableRowColor td { border:0px; border-bottom:1px solid black; border-right:1px solid black }
hr { border:0px; border-bottom:1px solid #333366; }
</style>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../com/badlogic/gdx/graphics/g3d/keyframed/KeyframeAnimator.html" title="class in com.badlogic.gdx.graphics.g3d.keyframed"><B>PREV CLASS
</B></A>
NEXT CLASS
</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../index.html?com/badlogic/gdx/graphics/g3d/keyframed/KeyframedModel.html" target="_top"><B>FRAMES
</B></A>
<A HREF="KeyframedModel.html" target="_top"><B>NO FRAMES
</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes
</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:
NESTED
|
FIELD
|
<A HREF="#constructor_summary">CONSTR
</A> |
<A HREF="#method_summary">METHOD
</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:
FIELD
|
<A HREF="#constructor_detail">CONSTR
</A> |
<A HREF="#method_detail">METHOD
</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
com.badlogic.gdx.graphics.g3d.keyframed
</FONT>
<BR>
Class KeyframedModel
</H2>
<PRE>
java.lang.Object
<IMG SRC="../../../../../../resources/inherit.gif" ALT="extended by "><B>com.badlogic.gdx.graphics.g3d.keyframed.KeyframedModel
</B>
</PRE>
<HR>
<DL>
<DT><PRE>public class
<B>KeyframedModel
</B><DT>extends java.lang.Object
</DL>
</PRE>
<P>
An animated model with
<A HREF="../../../../../../com/badlogic/gdx/graphics/g3d/keyframed/KeyframeAnimation.html" title="class in com.badlogic.gdx.graphics.g3d.keyframed"><CODE>KeyframeAnimation
</CODE></A>s. Currently the animations can only be instanced from an
<A HREF="../../../../../../com/badlogic/gdx/graphics/g3d/loaders/md5/MD5Animation.html" title="class in com.badlogic.gdx.graphics.g3d.loaders.md5"><CODE>MD5Animation
</CODE></A>.
Support for binary serialization may be included in loadFuture development.
<P>
<P>
<DL>
<DT><B>Author:
</B></DT>
<DD>Dave Clayton
<contact@redskyforge.com></DD>
</DL>
<HR>
<P>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary
</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../../com/badlogic/gdx/graphics/g3d/keyframed/KeyframedModel.html#KeyframedModel()">KeyframedModel
</A></B>()
</CODE>
<BR>
</TD>
</TR>
</TABLE>
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary
</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../com/badlogic/gdx/graphics/g3d/keyframed/KeyframedModel.html#dispose()">dispose
</A></B>()
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../../../com/badlogic/gdx/graphics/g3d/keyframed/KeyframeAnimation.html" title="class in com.badlogic.gdx.graphics.g3d.keyframed">KeyframeAnimation
</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../com/badlogic/gdx/graphics/g3d/keyframed/KeyframedModel.html#getAnimation(java.lang.String)">getAnimation
</A></B>(java.lang.String
animKey)
</CODE>
<BR>
Gets the specified
<A HREF="../../../../../../com/badlogic/gdx/graphics/g3d/keyframed/KeyframeAnimation.html" title="class in com.badlogic.gdx.graphics.g3d.keyframed"><CODE>KeyframeAnimation
</CODE></A> from the animation map.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../../../com/badlogic/gdx/graphics/g3d/Animator.html" title="class in com.badlogic.gdx.graphics.g3d">Animator
</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../com/badlogic/gdx/graphics/g3d/keyframed/KeyframedModel.html#getAnimator()">getAnimator
</A></B>()
</CODE>
<BR>
Gets the
<A HREF="../../../../../../com/badlogic/gdx/graphics/g3d/keyframed/KeyframeAnimator.html" title="class in com.badlogic.gdx.graphics.g3d.keyframed"><CODE>KeyframeAnimator
</CODE></A> for this model.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../com/badlogic/gdx/graphics/g3d/keyframed/KeyframedModel.html#getJointData(int, com.badlogic.gdx.math.Vector3, com.badlogic.gdx.math.Quaternion)">getJointData
</A></B>(int
tagIndex,
<A HREF="../../../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3
</A> pos,
<A HREF="../../../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion
</A> orient)
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../com/badlogic/gdx/graphics/g3d/keyframed/KeyframedModel.html#render()">render
</A></B>()
</CODE>
<BR>
Draws the model using the current interpolated animation frame and the material list set by
<A HREF="../../../../../../com/badlogic/gdx/graphics/g3d/keyframed/KeyframedModel.html#setMaterials(com.badlogic.gdx.graphics.g3d.Material[])"><CODE>setMaterials(com.badlogic.gdx.graphics.g3d.Material[])
</CODE></A>.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../../../com/badlogic/gdx/graphics/g3d/keyframed/KeyframeAnimation.html" title="class in com.badlogic.gdx.graphics.g3d.keyframed">KeyframeAnimation
</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../com/badlogic/gdx/graphics/g3d/keyframed/KeyframedModel.html#sampleAnimationFromMD5(com.badlogic.gdx.graphics.g3d.loaders.md5.MD5Model, com.badlogic.gdx.graphics.g3d.loaders.md5.MD5Renderer, com.badlogic.gdx.graphics.g3d.loaders.md5.MD5Animator, com.badlogic.gdx.graphics.g3d.loaders.md5.MD5Animation, float, java.lang.String, java.lang.String)">sampleAnimationFromMD5
</A></B>(
<A HREF="../../../../../../com/badlogic/gdx/graphics/g3d/loaders/md5/MD5Model.html" title="class in com.badlogic.gdx.graphics.g3d.loaders.md5">MD5Model
</A> md5model,
<A HREF="../../../../../../com/badlogic/gdx/graphics/g3d/loaders/md5/MD5Renderer.html" title="class in com.badlogic.gdx.graphics.g3d.loaders.md5">MD5Renderer
</A> md5renderer,
<A HREF="../../../../../../com/badlogic/gdx/graphics/g3d/loaders/md5/MD5Animator.html" title="class in com.badlogic.gdx.graphics.g3d.loaders.md5">MD5Animator
</A> md5animator,
<A HREF="../../../../../../com/badlogic/gdx/graphics/g3d/loaders/md5/MD5Animation.html" title="class in com.badlogic.gdx.graphics.g3d.loaders.md5">MD5Animation
</A> md5animation,
float
sampleRate,
java.lang.String
modelAsset,
java.lang.String
animKey)
</CODE>
<BR>
Loads a single
<A HREF="../../../../../../com/badlogic/gdx/graphics/g3d/keyframed/KeyframeAnimation.html" title="class in com.badlogic.gdx.graphics.g3d.keyframed"><CODE>KeyframeAnimation
</CODE></A> from an
<A HREF="../../../../../../com/badlogic/gdx/graphics/g3d/loaders/md5/MD5Animation.html" title="class in com.badlogic.gdx.graphics.g3d.loaders.md5"><CODE>MD5Animation
</CODE></A>, then stores it in the animation dictionary for
runtime playback.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../com/badlogic/gdx/graphics/g3d/keyframed/KeyframedModel.html#setAnimation(java.lang.String, com.badlogic.gdx.graphics.g3d.Animator.WrapMode)">setAnimation
</A></B>(java.lang.String
animKey,
<A HREF="../../../../../../com/badlogic/gdx/graphics/g3d/Animator.WrapMode.html" title="enum in com.badlogic.gdx.graphics.g3d">Animator.WrapMode
</A> wrapMode)
</CODE>
<BR>
Set the current playing animation.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../com/badlogic/gdx/graphics/g3d/keyframed/KeyframedModel.html#setMaterials(com.badlogic.gdx.graphics.g3d.Material[])">setMaterials
</A></B>(
<A HREF="../../../../../../com/badlogic/gdx/graphics/g3d/Material.html" title="class in com.badlogic.gdx.graphics.g3d">Material
</A>[]
mats)
</CODE>
<BR>
Sets the
<A HREF="../../../../../../com/badlogic/gdx/graphics/g3d/Material.html" title="class in com.badlogic.gdx.graphics.g3d"><CODE>Material
</CODE></A> list for this model, one for each mesh, in mesh order.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../com/badlogic/gdx/graphics/g3d/keyframed/KeyframedModel.html#setMeshVisible(int, boolean)">setMeshVisible
</A></B>(int
idx,
boolean
visible)
</CODE>
<BR>
Sets the specified mesh's visibility (MD5 models typically consist of a number of meshes).
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../com/badlogic/gdx/graphics/g3d/keyframed/KeyframedModel.html#setTaggedJoints(java.util.ArrayList)">setTaggedJoints
</A></B>(java.util.ArrayList
<java.lang.String
> joints)
</CODE>
<BR>
Sets the tagged joints for this model's animations.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../com/badlogic/gdx/graphics/g3d/keyframed/KeyframedModel.html#update(float)">update
</A></B>(float
dt)
</CODE>
<BR>
Updates the model, causing the model's
<A HREF="../../../../../../com/badlogic/gdx/graphics/g3d/keyframed/KeyframeAnimator.html" title="class in com.badlogic.gdx.graphics.g3d.keyframed"><CODE>KeyframeAnimator
</CODE></A> to interpolate the animation and update the render geometry.
</TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object
</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
</CODE></TD>
</TR>
</TABLE>
<P>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail
</B></FONT></TH>
</TR>
</TABLE>
<A NAME="KeyframedModel()"><!-- --></A><H3>
KeyframedModel
</H3>
<PRE>
public
<B>KeyframedModel
</B>()
</PRE>
<DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail
</B></FONT></TH>
</TR>
</TABLE>
<A NAME="getAnimator()"><!-- --></A><H3>
getAnimator
</H3>
<PRE>
public
<A HREF="../../../../../../com/badlogic/gdx/graphics/g3d/Animator.html" title="class in com.badlogic.gdx.graphics.g3d">Animator
</A> <B>getAnimator
</B>()
</PRE>
<DL>
<DD>Gets the
<A HREF="../../../../../../com/badlogic/gdx/graphics/g3d/keyframed/KeyframeAnimator.html" title="class in com.badlogic.gdx.graphics.g3d.keyframed"><CODE>KeyframeAnimator
</CODE></A> for this model.
<P>
<DD><DL>
<DT><B>Returns:
</B><DD>the animator.
</DL>
</DD>
</DL>
<HR>
<A NAME="setMaterials(com.badlogic.gdx.graphics.g3d.Material[])"><!-- --></A><H3>
setMaterials
</H3>
<PRE>
public void
<B>setMaterials
</B>(
<A HREF="../../../../../../com/badlogic/gdx/graphics/g3d/Material.html" title="class in com.badlogic.gdx.graphics.g3d">Material
</A>[]
mats)
</PRE>
<DL>
<DD>Sets the
<A HREF="../../../../../../com/badlogic/gdx/graphics/g3d/Material.html" title="class in com.badlogic.gdx.graphics.g3d"><CODE>Material
</CODE></A> list for this model, one for each mesh, in mesh order.
<P>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>mats
</CODE> - An array of materials.
</DL>
</DD>
</DL>
<HR>
<A NAME="setTaggedJoints(java.util.ArrayList)"><!-- --></A><H3>
setTaggedJoints
</H3>
<PRE>
public void
<B>setTaggedJoints
</B>(java.util.ArrayList
<java.lang.String
> joints)
</PRE>
<DL>
<DD>Sets the tagged joints for this model's animations. Tagged joints have their data preserved post-sampling.
<P>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>joints
</CODE> - An array of joint names.
</DL>
</DD>
</DL>
<HR>
<A NAME="sampleAnimationFromMD5(com.badlogic.gdx.graphics.g3d.loaders.md5.MD5Model, com.badlogic.gdx.graphics.g3d.loaders.md5.MD5Renderer, com.badlogic.gdx.graphics.g3d.loaders.md5.MD5Animator, com.badlogic.gdx.graphics.g3d.loaders.md5.MD5Animation, float, java.lang.String, java.lang.String)"><!-- --></A><H3>
sampleAnimationFromMD5
</H3>
<PRE>
public
<A HREF="../../../../../../com/badlogic/gdx/graphics/g3d/keyframed/KeyframeAnimation.html" title="class in com.badlogic.gdx.graphics.g3d.keyframed">KeyframeAnimation
</A> <B>sampleAnimationFromMD5
</B>(
<A HREF="../../../../../../com/badlogic/gdx/graphics/g3d/loaders/md5/MD5Model.html" title="class in com.badlogic.gdx.graphics.g3d.loaders.md5">MD5Model
</A> md5model,
<A HREF="../../../../../../com/badlogic/gdx/graphics/g3d/loaders/md5/MD5Renderer.html" title="class in com.badlogic.gdx.graphics.g3d.loaders.md5">MD5Renderer
</A> md5renderer,
<A HREF="../../../../../../com/badlogic/gdx/graphics/g3d/loaders/md5/MD5Animator.html" title="class in com.badlogic.gdx.graphics.g3d.loaders.md5">MD5Animator
</A> md5animator,
<A HREF="../../../../../../com/badlogic/gdx/graphics/g3d/loaders/md5/MD5Animation.html" title="class in com.badlogic.gdx.graphics.g3d.loaders.md5">MD5Animation
</A> md5animation,
float
sampleRate,
java.lang.String
modelAsset,
java.lang.String
animKey)
</PRE>
<DL>
<DD>Loads a single
<A HREF="../../../../../../com/badlogic/gdx/graphics/g3d/keyframed/KeyframeAnimation.html" title="class in com.badlogic.gdx.graphics.g3d.keyframed"><CODE>KeyframeAnimation
</CODE></A> from an
<A HREF="../../../../../../com/badlogic/gdx/graphics/g3d/loaders/md5/MD5Animation.html" title="class in com.badlogic.gdx.graphics.g3d.loaders.md5"><CODE>MD5Animation
</CODE></A>, then stores it in the animation dictionary for
runtime playback. The dictionary manages ref counted animations so you do not have multiple copies of 100k animations in
memory when you only need one per unique MD5 model. You must call dispose() when finished with this class.
<P>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>md5model
</CODE> - The source
<A HREF="../../../../../../com/badlogic/gdx/graphics/g3d/loaders/md5/MD5Model.html" title="class in com.badlogic.gdx.graphics.g3d.loaders.md5"><CODE>MD5Model
</CODE></A>.
<DD><CODE>md5renderer
</CODE> - An
<A HREF="../../../../../../com/badlogic/gdx/graphics/g3d/loaders/md5/MD5Renderer.html" title="class in com.badlogic.gdx.graphics.g3d.loaders.md5"><CODE>MD5Renderer
</CODE></A> instance, used to calculate the skinned geometry.
<DD><CODE>md5animator
</CODE> - An
<A HREF="../../../../../../com/badlogic/gdx/graphics/g3d/loaders/md5/MD5Animator.html" title="class in com.badlogic.gdx.graphics.g3d.loaders.md5"><CODE>MD5Animator
</CODE></A> instance to control the MD5 animation cycle the keyframing samples from.
<DD><CODE>md5animation
</CODE> - The
<A HREF="../../../../../../com/badlogic/gdx/graphics/g3d/loaders/md5/MD5Animation.html" title="class in com.badlogic.gdx.graphics.g3d.loaders.md5"><CODE>MD5Animation
</CODE></A> to sample.
<DD><CODE>sampleRate
</CODE> - The sample rate (use smaller values for smoother animation but greater memory usage). Recommended value:
0.3
<DD><CODE>modelAsset
</CODE> - The name of the model asset. Must be unique to the model. Using its path is recommended
<DD><CODE>animKey
</CODE> - The name used to store the animation in the mode's animation map.
</DL>
</DD>
</DL>
<HR>
<A NAME="getJointData(int, com.badlogic.gdx.math.Vector3, com.badlogic.gdx.math.Quaternion)"><!-- --></A><H3>
getJointData
</H3>
<PRE>
public void
<B>getJointData
</B>(int
tagIndex,
<A HREF="../../../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3
</A> pos,
<A HREF="../../../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion
</A> orient)
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setAnimation(java.lang.String, com.badlogic.gdx.graphics.g3d.Animator.WrapMode)"><!-- --></A><H3>
setAnimation
</H3>
<PRE>
public void
<B>setAnimation
</B>(java.lang.String
animKey,
<A HREF="../../../../../../com/badlogic/gdx/graphics/g3d/Animator.WrapMode.html" title="enum in com.badlogic.gdx.graphics.g3d">Animator.WrapMode
</A> wrapMode)
</PRE>
<DL>
<DD>Set the current playing animation.
<P>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>animKey
</CODE> - The name of the animation.
<DD><CODE>wrapMode
</CODE> - The animation
<A HREF="../../../../../../com/badlogic/gdx/graphics/g3d/Animator.WrapMode.html" title="enum in com.badlogic.gdx.graphics.g3d"><CODE>Animator.WrapMode
</CODE></A>.
</DL>
</DD>
</DL>
<HR>
<A NAME="getAnimation(java.lang.String)"><!-- --></A><H3>
getAnimation
</H3>
<PRE>
public
<A HREF="../../../../../../com/badlogic/gdx/graphics/g3d/keyframed/KeyframeAnimation.html" title="class in com.badlogic.gdx.graphics.g3d.keyframed">KeyframeAnimation
</A> <B>getAnimation
</B>(java.lang.String
animKey)
</PRE>
<DL>
<DD>Gets the specified
<A HREF="../../../../../../com/badlogic/gdx/graphics/g3d/keyframed/KeyframeAnimation.html" title="class in com.badlogic.gdx.graphics.g3d.keyframed"><CODE>KeyframeAnimation
</CODE></A> from the animation map.
<P>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>animKey
</CODE> - The name of the animation.
<DT><B>Returns:
</B><DD>The animation.
</DL>
</DD>
</DL>
<HR>
<A NAME="update(float)"><!-- --></A><H3>
update
</H3>
<PRE>
public void
<B>update
</B>(float
dt)
</PRE>
<DL>
<DD>Updates the model, causing the model's
<A HREF="../../../../../../com/badlogic/gdx/graphics/g3d/keyframed/KeyframeAnimator.html" title="class in com.badlogic.gdx.graphics.g3d.keyframed"><CODE>KeyframeAnimator
</CODE></A> to interpolate the animation and update the render geometry.
<P>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>dt
</CODE> - Delta time since last frame.
</DL>
</DD>
</DL>
<HR>
<A NAME="render()"><!-- --></A><H3>
render
</H3>
<PRE>
public void
<B>render
</B>()
</PRE>
<DL>
<DD>Draws the model using the current interpolated animation frame and the material list set by
<A HREF="../../../../../../com/badlogic/gdx/graphics/g3d/keyframed/KeyframedModel.html#setMaterials(com.badlogic.gdx.graphics.g3d.Material[])"><CODE>setMaterials(com.badlogic.gdx.graphics.g3d.Material[])
</CODE></A>.
<A HREF="../../../../../../com/badlogic/gdx/graphics/g3d/keyframed/KeyframedModel.html#update(float)"><CODE>update(float)
</CODE></A> must be called prior to this.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setMeshVisible(int, boolean)"><!-- --></A><H3>
setMeshVisible
</H3>
<PRE>
public void
<B>setMeshVisible
</B>(int
idx,
boolean
visible)
</PRE>
<DL>
<DD>Sets the specified mesh's visibility (MD5 models typically consist of a number of meshes).
<P>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>idx
</CODE> - the mesh's index (same order as found in the .md5mesh file)
<DD><CODE>visible
</CODE> - whether the mesh should be drawn or not
</DL>
</DD>
</DL>
<HR>
<A NAME="dispose()"><!-- --></A><H3>
dispose
</H3>
<PRE>
public void
<B>dispose
</B>()
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview
</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package
</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class
</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/KeyframedModel.html"><FONT CLASS="NavBarFont1"><B>Use
</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree
</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated
</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index
</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help
</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
libgdx API
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../com/badlogic/gdx/graphics/g3d/keyframed/KeyframeAnimator.html" title="class in com.badlogic.gdx.graphics.g3d.keyframed"><B>PREV CLASS
</B></A>
NEXT CLASS
</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../index.html?com/badlogic/gdx/graphics/g3d/keyframed/KeyframedModel.html" target="_top"><B>FRAMES
</B></A>
<A HREF="KeyframedModel.html" target="_top"><B>NO FRAMES
</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes
</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:
NESTED
|
FIELD
|
<A HREF="#constructor_summary">CONSTR
</A> |
<A HREF="#method_summary">METHOD
</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:
FIELD
|
<A HREF="#constructor_detail">CONSTR
</A> |
<A HREF="#method_detail">METHOD
</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
<div style="font-size:9pt"><i>
Copyright 2010 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)
</i></div>
</BODY>
</HTML>