com.jme3.animation
Class SkeletonControl

java.lang.Object
  extended by com.jme3.scene.control.AbstractControl
      extended by com.jme3.animation.SkeletonControl
All Implemented Interfaces:
Savable, Control, java.lang.Cloneable

public class SkeletonControl
extends AbstractControl
implements java.lang.Cloneable

The Skeleton control deforms a model according to a skeleton, It handles the computation of the deformation matrices and performs the transformations on the mesh


Field Summary
 
Fields inherited from class com.jme3.scene.control.AbstractControl
enabled, spatial
 
Constructor Summary
SkeletonControl()
          Serialization only.
SkeletonControl(Skeleton skeleton)
          Creates a skeleton control.
 
Method Summary
 Control cloneForSpatial(Spatial spatial)
          Creates a clone of the Control, the given Spatial is the cloned version of the spatial to which this control is attached to.
protected  void controlRender(RenderManager rm, ViewPort vp)
          To be implemented in subclass.
protected  void controlUpdate(float tpf)
          To be implemented in subclass.
 Node getAttachmentsNode(java.lang.String boneName)
           
 Skeleton getSkeleton()
          returns the skeleton of this control
 Mesh[] getTargets()
          returns the targets meshes of this control
 void read(JmeImporter im)
           
 void setSpatial(Spatial spatial)
           
 void write(JmeExporter ex)
           
 
Methods inherited from class com.jme3.scene.control.AbstractControl
getSpatial, isEnabled, render, setEnabled, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SkeletonControl

public SkeletonControl()
Serialization only. Do not use.


SkeletonControl

public SkeletonControl(Skeleton skeleton)
Creates a skeleton control. The list of targets will be acquired automatically when the control is attached to a node.

Parameters:
skeleton - the skeleton
Method Detail

setSpatial

public void setSpatial(Spatial spatial)
Specified by:
setSpatial in interface Control
Overrides:
setSpatial in class AbstractControl
Parameters:
spatial - the spatial to be controlled. This should not be called from user code.

controlRender

protected void controlRender(RenderManager rm,
                             ViewPort vp)
Description copied from class: AbstractControl
To be implemented in subclass.

Specified by:
controlRender in class AbstractControl

controlUpdate

protected void controlUpdate(float tpf)
Description copied from class: AbstractControl
To be implemented in subclass.

Specified by:
controlUpdate in class AbstractControl

cloneForSpatial

public Control cloneForSpatial(Spatial spatial)
Description copied from interface: Control
Creates a clone of the Control, the given Spatial is the cloned version of the spatial to which this control is attached to.

Specified by:
cloneForSpatial in interface Control
Returns:
A clone of this control for the spatial

getAttachmentsNode

public Node getAttachmentsNode(java.lang.String boneName)
Parameters:
boneName - the name of the bone
Returns:
the node attached to this bone

getSkeleton

public Skeleton getSkeleton()
returns the skeleton of this control

Returns:

getTargets

public Mesh[] getTargets()
returns the targets meshes of this control

Returns:

write

public void write(JmeExporter ex)
           throws java.io.IOException
Specified by:
write in interface Savable
Overrides:
write in class AbstractControl
Throws:
java.io.IOException

read

public void read(JmeImporter im)
          throws java.io.IOException
Specified by:
read in interface Savable
Overrides:
read in class AbstractControl
Throws:
java.io.IOException