public class SkinningControl extends AbstractControl implements java.lang.Cloneable, JmeCloneable
It can perform software skinning or Hardware skinning
enabled, spatial
Modifier | Constructor and Description |
---|---|
protected |
SkinningControl()
Serialization only.
|
|
SkinningControl(Armature armature)
Creates an armature control.
|
Modifier and Type | Method and Description |
---|---|
void |
cloneFields(Cloner cloner,
java.lang.Object original)
Implemented to perform deep cloning for this object, resolving
local cloned references using the specified cloner.
|
protected void |
controlRender(RenderManager rm,
ViewPort vp)
To be implemented in subclass.
|
protected void |
controlUpdate(float tpf)
To be implemented in subclass.
|
Armature |
getArmature()
returns the armature of this control
|
Node |
getAttachmentsNode(java.lang.String jointName)
Access the attachments node of the named bone.
|
Mesh[] |
getTargets()
Enumerate the target meshes of this control.
|
boolean |
isHardwareSkinningPreferred() |
boolean |
isHardwareSkinningUsed() |
java.lang.Object |
jmeClone()
Performs a regular shallow clone of the object.
|
void |
read(JmeImporter im)
De-serialize this Control from the specified importer, for example when
loading from a J3O file.
|
void |
setHardwareSkinningPreferred(boolean preferred)
Specifies if hardware skinning is preferred.
|
void |
setSpatial(Spatial spatial) |
void |
write(JmeExporter ex)
Serialize this Control to the specified exporter, for example when saving
to a J3O file.
|
cloneForSpatial, getSpatial, isEnabled, render, setEnabled, update
protected SkinningControl()
public SkinningControl(Armature armature)
armature
- the armaturepublic void setHardwareSkinningPreferred(boolean preferred)
preferred
- true to prefer hardware skinning, false to prefer
software skinning (default=true)isHardwareSkinningUsed()
public boolean isHardwareSkinningPreferred()
setHardwareSkinningPreferred(boolean)
public boolean isHardwareSkinningUsed()
public void setSpatial(Spatial spatial)
setSpatial
in interface Control
setSpatial
in class AbstractControl
spatial
- the spatial to be controlled. This should not be called
from user code.protected void controlRender(RenderManager rm, ViewPort vp)
AbstractControl
controlRender
in class AbstractControl
rm
- the RenderManager rendering the controlled Spatial (not null)vp
- the ViewPort being rendered (not null)protected void controlUpdate(float tpf)
AbstractControl
controlUpdate
in class AbstractControl
tpf
- time per frame (in seconds)public java.lang.Object jmeClone()
JmeCloneable
This method is separate from the regular clone() method so that objects might still maintain their own regular java clone() semantics (perhaps even using Cloner for those methods). However, because Java's clone() has specific features in the sense of Object's clone() implementation, it's usually best to have some path for subclasses to bypass the public clone() method that might be cloning fields and instead get at the superclass protected clone() methods. For example, through super.jmeClone() or another protected clone method that some base class eventually calls super.clone() in.
jmeClone
in interface JmeCloneable
jmeClone
in class AbstractControl
public void cloneFields(Cloner cloner, java.lang.Object original)
JmeCloneable
Note: during normal clone operations the original object will not be needed as the clone has already had all of the fields shallow copied.
cloneFields
in interface JmeCloneable
cloneFields
in class AbstractControl
cloner
- The cloner that is performing the cloning operation. The
cloneFields method can call back into the cloner to make
clones of its subordinate fields.original
- The original object from which this object was cloned.
This is provided for the very rare case that this object needs
to refer to its original for some reason. In general, all of
the relevant values should have been transferred during the
shallow clone and this object need merely clone what it wants.public Node getAttachmentsNode(java.lang.String jointName)
jointName
- the name of the jointpublic Armature getArmature()
public Mesh[] getTargets()
public void write(JmeExporter ex) throws java.io.IOException
write
in interface Savable
write
in class AbstractControl
ex
- the exporter to write to (not null)java.io.IOException
- from the exporterpublic void read(JmeImporter im) throws java.io.IOException
read
in interface Savable
read
in class AbstractControl
im
- the importer to read from (not null)java.io.IOException
- from the importer