Package com.jme3.anim
Class MorphControl
java.lang.Object
com.jme3.scene.control.AbstractControl
com.jme3.anim.MorphControl
- All Implemented Interfaces:
- Savable,- Control,- JmeCloneable,- Cloneable
A control that handle morph animation for Position, Normal and Tangent buffers.
 All stock shaders only support morphing these 3 buffers, but note that MorphTargets can have any type of buffers.
 If you want to use other types of buffers you will need a custom MorphControl and a custom shader.
 Note that if morphed children are attached to or detached from the sub graph after the MorphControl is added to
 spatial, you must detach and attach the control again for the changes to get reflected.
- 
Field SummaryFields inherited from class com.jme3.scene.control.AbstractControlenabled, spatial
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidcloneFields(Cloner cloner, Object original) Callback fromClonerto convert this shallow-cloned Control into a deep-cloned one, using the specified Cloner and original to resolve copied fields.protected voidcontrolRender(RenderManager rm, ViewPort vp) To be implemented in subclass.protected voidcontrolUpdate(float tpf) To be implemented in subclass.booleanTest whether this Control approximates tangents.jmeClone()Create a shallow clone for the JME cloner.voidread(JmeImporter importer) De-serialize this Control from the specified importer, for example when loading from a J3O file.voidsetApproximateTangents(boolean approximateTangents) Alter whether this Control approximates tangents.voidsetSpatial(Spatial spatial) voidwrite(JmeExporter exporter) Serialize this Control to the specified exporter, for example when saving to a J3O file.Methods inherited from class com.jme3.scene.control.AbstractControlcloneForSpatial, getSpatial, isEnabled, render, setEnabled, update
- 
Constructor Details- 
MorphControlpublic MorphControl()
 
- 
- 
Method Details- 
setSpatial- Specified by:
- setSpatialin interface- Control
- Overrides:
- setSpatialin class- AbstractControl
- Parameters:
- spatial- the spatial to be controlled. This should not be called from user code.
 
- 
controlUpdateprotected void controlUpdate(float tpf) Description copied from class:AbstractControlTo be implemented in subclass.- Specified by:
- controlUpdatein class- AbstractControl
- Parameters:
- tpf- time per frame (in seconds)
 
- 
controlRenderDescription copied from class:AbstractControlTo be implemented in subclass.- Specified by:
- controlRenderin class- AbstractControl
- Parameters:
- rm- the RenderManager rendering the controlled Spatial (not null)
- vp- the ViewPort being rendered (not null)
 
- 
setApproximateTangentspublic void setApproximateTangents(boolean approximateTangents) Alter whether this Control approximates tangents.- Parameters:
- approximateTangents- true to approximate tangents, false to get them from a VertexBuffer
 
- 
isApproximateTangentspublic boolean isApproximateTangents()Test whether this Control approximates tangents.- Returns:
- true if approximating tangents, false if getting them from a VertexBuffer
 
- 
cloneFieldsCallback fromClonerto convert this shallow-cloned Control into a deep-cloned one, using the specified Cloner and original to resolve copied fields.- Specified by:
- cloneFieldsin interface- JmeCloneable
- Overrides:
- cloneFieldsin class- AbstractControl
- Parameters:
- cloner- the Cloner that's cloning this Control (not null, modified)
- original- the instance from which this Control was shallow-cloned (not null, unaffected)
 
- 
jmeCloneCreate a shallow clone for the JME cloner.- Specified by:
- jmeClonein interface- JmeCloneable
- Overrides:
- jmeClonein class- AbstractControl
- Returns:
- a new instance
 
- 
readDe-serialize this Control from the specified importer, for example when loading from a J3O file.- Specified by:
- readin interface- Savable
- Overrides:
- readin class- AbstractControl
- Parameters:
- importer- (not null)
- Throws:
- IOException- from the importer
 
- 
writeSerialize this Control to the specified exporter, for example when saving to a J3O file.- Specified by:
- writein interface- Savable
- Overrides:
- writein class- AbstractControl
- Parameters:
- exporter- (not null)
- Throws:
- IOException- from the exporter
 
 
-