Package com.jme3.scene.plugins.bvh
Class BoneMapping
java.lang.Object
com.jme3.scene.plugins.bvh.BoneMapping
- All Implemented Interfaces:
com.jme3.export.Savable
A mapping to convert a bone transform from one skeleton to another.
-
Constructor Summary
ConstructorsConstructorDescriptionNo-argument constructor for serialization purposes only.BoneMapping(String targetBone, String sourceBone) Instantiate a mapping to the named bone in the target skeleton from the named bone in the source skeleton.BoneMapping(String targetBone, String sourceBone, float twistAngle, com.jme3.math.Vector3f twistAxis) Instantiate a mapping to the named bone in the target skeleton from the named bone in the source skeleton.BoneMapping(String targetBone, String sourceBone, com.jme3.math.Quaternion twist) Instantiate a mapping to the named bone in the target skeleton from the named bone in the source skeleton. -
Method Summary
Modifier and TypeMethodDescriptionRead the name of the bone in the source skeleton.Read the name of the bone in the target skeleton.com.jme3.math.QuaterniongetTwist()Access the rotation to apply.voidread(com.jme3.export.JmeImporter im) De-serialize this mapping.voidsetSourceName(String sourceName) Alter the name of the bone in the source skeleton.voidsetTargetName(String targetName) Alter the name of the bone in the target skeleton.voidsetTwist(com.jme3.math.Quaternion twist) Alter the rotation to apply.voidwrite(com.jme3.export.JmeExporter ex) Serialize this mapping.
-
Constructor Details
-
BoneMapping
public BoneMapping()No-argument constructor for serialization purposes only. Do not invoke directly! -
BoneMapping
Instantiate a mapping to the named bone in the target skeleton from the named bone in the source skeleton.- Parameters:
targetBone- the name of the bone in the target skeleton.sourceBone- the name of the bone in the source skeleton.
-
BoneMapping
Instantiate a mapping to the named bone in the target skeleton from the named bone in the source skeleton. Apply the specified twist to the animation data.- Parameters:
targetBone- the name of the bone in the target skeleton.sourceBone- the name of the bone in the source skeleton.twist- the twist rotation to apply to the animation data
-
BoneMapping
public BoneMapping(String targetBone, String sourceBone, float twistAngle, com.jme3.math.Vector3f twistAxis) Instantiate a mapping to the named bone in the target skeleton from the named bone in the source skeleton. Apply the given twist to the animation data.- Parameters:
targetBone- the name of the bone in the target skeleton.sourceBone- the name of the bone in the source skeleton.twistAngle- the twist rotation angle to apply to the animation datatwistAxis- the twist rotation axis to apply to the animation data
-
-
Method Details
-
getSourceName
Read the name of the bone in the source skeleton.- Returns:
- the name
-
getTargetName
Read the name of the bone in the target skeleton.- Returns:
- the name
-
getTwist
public com.jme3.math.Quaternion getTwist()Access the rotation to apply.- Returns:
- the pre-existing instance
-
setSourceName
Alter the name of the bone in the source skeleton.- Parameters:
sourceName- name of the source bone
-
setTargetName
Alter the name of the bone in the target skeleton.- Parameters:
targetName- name of the target bone
-
setTwist
public void setTwist(com.jme3.math.Quaternion twist) Alter the rotation to apply.- Parameters:
twist- (alias created)
-
read
De-serialize this mapping.- Specified by:
readin interfacecom.jme3.export.Savable- Parameters:
im- importer to use (not null)- Throws:
IOException- from importer
-
write
Serialize this mapping.- Specified by:
writein interfacecom.jme3.export.Savable- Parameters:
ex- exporter to use (not null)- Throws:
IOException- from exporter
-