com.jme3.scene.plugins.blender.animations
Class BoneContext

java.lang.Object
  extended by com.jme3.scene.plugins.blender.animations.BoneContext

public class BoneContext
extends java.lang.Object

This class holds the basic data that describes a bone.


Constructor Summary
BoneContext(Structure boneStructure, Matrix4f objectToArmatureMatrix, java.util.Map<java.lang.Long,Structure> bonesPoseChannels, BlenderContext blenderContext)
          Constructor.
 
Method Summary
 Bone buildBone(java.util.List<Bone> bones, java.util.Map<Bone,java.lang.Long> boneOMAs, BlenderContext blenderContext)
          This method builds the bone.
 Bone getBone()
           
 Transform getPoseTransform()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BoneContext

public BoneContext(Structure boneStructure,
                   Matrix4f objectToArmatureMatrix,
                   java.util.Map<java.lang.Long,Structure> bonesPoseChannels,
                   BlenderContext blenderContext)
            throws BlenderFileException
Constructor. Creates the basic set of bone's data.

Parameters:
boneStructure - the bone's structure
objectToArmatureMatrix - object-to-armature transformation matrix
bonesPoseChannels - a map of pose channels for each bone OMA
blenderContext - the blender context
Throws:
BlenderFileException - an exception is thrown when problem with blender data reading occurs
Method Detail

buildBone

public Bone buildBone(java.util.List<Bone> bones,
                      java.util.Map<Bone,java.lang.Long> boneOMAs,
                      BlenderContext blenderContext)
This method builds the bone. It recursively builds the bone's children.

Parameters:
bones - a list of bones where the newly created bone will be added
boneOMAs - the map between bone and its old memory address
blenderContext - the blender context
Returns:
newly created bone

getPoseTransform

public Transform getPoseTransform()
Returns:
bone's pose transformation

getBone

public Bone getBone()
Returns:
built bone (available after calling 'buildBone' method)