com.jme.scene
Interface MorphingGeometry

All Superinterfaces:
ListenableStringFloatMap.FloatListener
All Known Implementing Classes:
MorphingTriMesh

public interface MorphingGeometry
extends ListenableStringFloatMap.FloatListener

A derived Geometry that generates its data from a set of component Geometries (morphs) which are not attached to any scene.

Each morph Geometry must have the same quantity of vertexes (and normals and vertex colors). Most other data, including the vertex indexes, are taken from the Base Morph, ignoring these data from the other morphs.

Data which is not morphed comes directly from the first (base) morph Geometry.

The base skin is modified by each additional skin morph in order.

Author:
Blaine Simpson (blaine dot simpson at admc dot com)

Method Summary
 void addMorph(java.lang.String morphKey, Geometry mesh)
          Add a component Geometry morph with same quantity of vertexes as the base morph.
 boolean delegateInfluences()
          If we have an influences map before you invoke this method (either local or remote), it will be retained unless we successfully find delegate to another (in which case 'yes' will be returned).
 void forceMorph()
          Unconditionally merges the relevant floats from FloabBuffers of the component morphs.
 ListenableStringFloatMap getMorphInfluencesMap()
           
 SkinNode getSkinNode()
           
 void morph()
          Morphs (verb) if any of the morphs (noun) or any of the morph influence values have changed.
 void setAutoMorph(boolean autoMorph)
          Causes morph merges to automatically occur as needed during update loops.
 void setMorphInfluences(java.util.Map<? extends java.lang.String,? extends java.lang.Float> m)
          Assign morph influence values.
 void setMorphInfluencesMap(ListenableStringFloatMap m)
          Set a local morph influences map.
 void setSingleMorphInfluence(java.lang.String morphKey, float influence)
          Use setMorphInfluences if you want to change multiple floats, to avoid unnecessary listener callbacks.
 
Methods inherited from interface com.jme.util.export.ListenableStringFloatMap.FloatListener
floatChanged
 

Method Detail

addMorph

void addMorph(java.lang.String morphKey,
              Geometry mesh)
Add a component Geometry morph with same quantity of vertexes as the base morph. Do not use this method to set the base morph.

Parameters:
morphKey - Key in the influences map for the influence for this morph.

setSingleMorphInfluence

void setSingleMorphInfluence(java.lang.String morphKey,
                             float influence)
Use setMorphInfluences if you want to change multiple floats, to avoid unnecessary listener callbacks.

See Also:
#setMorphInfluences(Map

setMorphInfluences

void setMorphInfluences(java.util.Map<? extends java.lang.String,? extends java.lang.Float> m)
Assign morph influence values.


delegateInfluences

boolean delegateInfluences()
If we have an influences map before you invoke this method (either local or remote), it will be retained unless we successfully find delegate to another (in which case 'yes' will be returned).

Returns:
true if we successfully fetched a new influences map from a provider.

setMorphInfluencesMap

void setMorphInfluencesMap(ListenableStringFloatMap m)
Set a local morph influences map. If there were an influences map in use before (local or remote), it will be removed or disassociated-from first.


getMorphInfluencesMap

ListenableStringFloatMap getMorphInfluencesMap()
Returns:
The morph influences map controlling the MorphingGeometry. It may be a non-local (delegated) influences map.

morph

void morph()
Morphs (verb) if any of the morphs (noun) or any of the morph influence values have changed. This method should only be called from an update thread.


forceMorph

void forceMorph()
Unconditionally merges the relevant floats from FloabBuffers of the component morphs. This method should only be called from an update thread.


setAutoMorph

void setAutoMorph(boolean autoMorph)
Causes morph merges to automatically occur as needed during update loops.


getSkinNode

SkinNode getSkinNode()
Returns:
Grandparent SkinNode IFF this MorphingGeometry is a currently- attached Skin geometry.


Copyright 2003-2009 jMonkeyEngine