* Fix some formatting issues in com.jme3.animation package.html
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7588 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
913d3ec963
commit
4079aeab5e
@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
@ -17,21 +17,21 @@ looped, combined, transitioned, etc.
|
|||||||
|
|
||||||
<p>
|
<p>
|
||||||
<code>
|
<code>
|
||||||
// Create or load a model with skeletal animation:<br/>
|
// Create or load a model with skeletal animation:<br>
|
||||||
Spatial model = assetManager.loadModel("...");<br/>
|
Spatial model = assetManager.loadModel("...");<br>
|
||||||
<br/>
|
<br>
|
||||||
// Retrieve the AnimControl.<br/>
|
// Retrieve the AnimControl.<br>
|
||||||
AnimControl animCtrl = model.getControl(AnimControl.class);<br/>
|
AnimControl animCtrl = model.getControl(AnimControl.class);<br>
|
||||||
<br/>
|
<br>
|
||||||
// Create an animation channel, by default assigned to all bones.<br/>
|
// Create an animation channel, by default assigned to all bones.<br>
|
||||||
AnimChannel animChan = animCtrl.createChannel();<br/>
|
AnimChannel animChan = animCtrl.createChannel();<br>
|
||||||
<br/>
|
<br>
|
||||||
// Play an animation<br/>
|
// Play an animation<br>
|
||||||
animChan.setAnim("MyAnim");<br/>
|
animChan.setAnim("MyAnim");<br>
|
||||||
</code>
|
</code>
|
||||||
<br/>
|
<br>
|
||||||
<h3>Skeletal Animation System</h3>
|
<h3>Skeletal Animation System</h3>
|
||||||
<br/>
|
<br>
|
||||||
<p>
|
<p>
|
||||||
jME3 uses a system of bone-weights: A vertex is assigned up to 4 bones by which
|
jME3 uses a system of bone-weights: A vertex is assigned up to 4 bones by which
|
||||||
it is influenced and 4 weights that describe how much the bone influences the
|
it is influenced and 4 weights that describe how much the bone influences the
|
||||||
@ -43,10 +43,10 @@ The BoneIndex buffer must be of the format <code>UnsignedByte</code>, thus
|
|||||||
placing the limit of up to 256 bones for a skeleton. The BoneWeight buffer
|
placing the limit of up to 256 bones for a skeleton. The BoneWeight buffer
|
||||||
should be of the format <code>Float</code>. Both buffers should reference 4
|
should be of the format <code>Float</code>. Both buffers should reference 4
|
||||||
bones, even if the maximum number of bones any vertex is influenced is less or more
|
bones, even if the maximum number of bones any vertex is influenced is less or more
|
||||||
than 4.<br/>
|
than 4.<br>
|
||||||
If a vertex is influenced by less than 4 bones, the indices following the last
|
If a vertex is influenced by less than 4 bones, the indices following the last
|
||||||
valid bone should be 0 and the weights following the last valid bone should be 0.0.
|
valid bone should be 0 and the weights following the last valid bone should be 0.0.
|
||||||
The buffers are designed in such a way so as to permit hardware skinning.<br/>
|
The buffers are designed in such a way so as to permit hardware skinning.<br>
|
||||||
<p>
|
<p>
|
||||||
The {@link com.jme3.animation.Skeleton} class describes a bone heirarchy with one
|
The {@link com.jme3.animation.Skeleton} class describes a bone heirarchy with one
|
||||||
or more root bones having children, thus containing all bones of the skeleton.
|
or more root bones having children, thus containing all bones of the skeleton.
|
||||||
@ -54,7 +54,7 @@ In addition to accessing the bones in the skeleton via the tree heirarchy, it
|
|||||||
is also possible to access bones via index. The index for any given bone is
|
is also possible to access bones via index. The index for any given bone is
|
||||||
arbitrary and does not depend on the bone's location in the tree hierarchy.
|
arbitrary and does not depend on the bone's location in the tree hierarchy.
|
||||||
It is this index that is specified in the BoneIndex VertexBuffer mentioned above
|
It is this index that is specified in the BoneIndex VertexBuffer mentioned above
|
||||||
, and is also used to apply transformations to the bones through the animations.<br/>
|
, and is also used to apply transformations to the bones through the animations.<br>
|
||||||
<p>
|
<p>
|
||||||
Every bone has a local and model space transformation. The local space
|
Every bone has a local and model space transformation. The local space
|
||||||
transformation is relative to its parent, if it has one, otherwise it is relative
|
transformation is relative to its parent, if it has one, otherwise it is relative
|
||||||
@ -66,12 +66,12 @@ animated. To set the bind pose for the skeleton, set the local (relative
|
|||||||
to parent) transformations for all the bones using the call
|
to parent) transformations for all the bones using the call
|
||||||
{@link com.jme3.animation.Bone#setBindTransforms(com.jme3.math.Vector3f, com.jme3.math.Quaternion) }.
|
{@link com.jme3.animation.Bone#setBindTransforms(com.jme3.math.Vector3f, com.jme3.math.Quaternion) }.
|
||||||
Then call {@link com.jme3.animation.Skeleton#updateWorldVectors() } followed by
|
Then call {@link com.jme3.animation.Skeleton#updateWorldVectors() } followed by
|
||||||
{@link com.jme3.animation.Skeleton#setBindingPose() }. <br/>
|
{@link com.jme3.animation.Skeleton#setBindingPose() }. <br>
|
||||||
<p>
|
<p>
|
||||||
Animations are stored in a HashMap object, accessed by name. An animation
|
Animations are stored in a HashMap object, accessed by name. An animation
|
||||||
is simply a list of tracks, each track describes a timeline with each keyframe
|
is simply a list of tracks, each track describes a timeline with each keyframe
|
||||||
having a transformation. For bone animations, every track is assigned to a bone,
|
having a transformation. For bone animations, every track is assigned to a bone,
|
||||||
while for morph animations, every track is assigned to a mesh.<br/>
|
while for morph animations, every track is assigned to a mesh.<br>
|
||||||
<p>
|
<p>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user