Package com.jme3.anim
Class SingleLayerInfluenceMask
java.lang.Object
com.jme3.anim.ArmatureMask
com.jme3.anim.SingleLayerInfluenceMask
- All Implemented Interfaces:
AnimationMask
Mask that excludes joints from participating in the layer
if a higher layer is using those joints in an animation.
-
Constructor Summary
ConstructorsConstructorDescriptionSingleLayerInfluenceMask(String layer, AnimComposer anim, SkinningControl skin) SingleLayerInfluenceMask(String layer, Spatial spatial) -
Method Summary
Modifier and TypeMethodDescriptionaddAll()Adds all joints to this mask.addFromJoint(String joint) Adds the given joint and all its children to this mask.Adds the given joints to this mask.static SingleLayerInfluenceMaskall(String layer, AnimComposer anim, SkinningControl skin) Creates anSingleLayerInfluenceMaskfor all joints.static SingleLayerInfluenceMaskCreates anSingleLayerInfluenceMaskfor all joints.booleanTest whether the animation should be applied to the specified element.Get theAnimComposerthis mask is for.Get theSkinningControlthis mask is for.Get the layer this mask is targeted for.booleanReturns true if this mask is checking upper layers for joint use.voidMakes a layer from this mask.setCheckUpperLayers(boolean check) Makes this mask check if each joint is being used by a higher layer before it uses them.Methods inherited from class com.jme3.anim.ArmatureMask
addAncestors, addBones, addFromJoint, createMask, createMask, remove, removeAncestors, removeJoints
-
Constructor Details
-
SingleLayerInfluenceMask
- Parameters:
layer- The layer this mask is targeted for. It is important that this match the name of the layer this mask is (or will be) part of. You can usemakeLayer()to ensure this.spatial- Spatial containing necessary controls (AnimComposerandSkinningControl)
-
SingleLayerInfluenceMask
- Parameters:
layer- The layer this mask is targeted for. It is important that this match the name of the layer this mask is (or will be) part of. You can usemakeLayer()to ensure this.anim- anim composer this mask is assigned toskin- skinning control complimenting the anim composer.
-
-
Method Details
-
makeLayer
public void makeLayer()Makes a layer from this mask. -
addAll
Adds all joints to this mask.- Returns:
- this.instance
-
addFromJoint
Adds the given joint and all its children to this mask.- Parameters:
joint-- Returns:
- this instance
-
addJoints
Adds the given joints to this mask.- Parameters:
joints-- Returns:
- this instance
-
setCheckUpperLayers
Makes this mask check if each joint is being used by a higher layer before it uses them.Not checking is more efficient, but checking can avoid some interpolation issues between layers. Default=true
- Parameters:
check-- Returns:
- this instance
-
getTargetLayer
Get the layer this mask is targeted for.It is extremely important that this value match the actual layer this is included in, because checking upper layers may not work if they are different.
- Returns:
- target layer
-
getAnimComposer
Get theAnimComposerthis mask is for.- Returns:
- anim composer
-
getSkinningControl
Get theSkinningControlthis mask is for.- Returns:
- skinning control
-
isCheckUpperLayers
public boolean isCheckUpperLayers()Returns true if this mask is checking upper layers for joint use.- Returns:
-
contains
Description copied from interface:AnimationMaskTest whether the animation should be applied to the specified element.- Specified by:
containsin interfaceAnimationMask- Overrides:
containsin classArmatureMask- Parameters:
target- the target element- Returns:
- true if animation should be applied, otherwise false
-
all
Creates anSingleLayerInfluenceMaskfor all joints.- Parameters:
layer- layer the returned mask is, or will be, be assigned tospatial- spatial containing anim composer and skinning control- Returns:
- new mask
-
all
Creates anSingleLayerInfluenceMaskfor all joints.- Parameters:
layer- layer the returned mask is, or will be, assigned toanim- anim composerskin- skinning control- Returns:
- new mask
-