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
ConstructorDescriptionSingleLayerInfluenceMask
(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 SingleLayerInfluenceMask
all
(String layer, AnimComposer anim, SkinningControl skin) Creates anSingleLayerInfluenceMask
for all joints.static SingleLayerInfluenceMask
Creates anSingleLayerInfluenceMask
for all joints.boolean
Test whether the animation should be applied to the specified element.Get theAnimComposer
this mask is for.Get theSkinningControl
this mask is for.Get the layer this mask is targeted for.boolean
Returns true if this mask is checking upper layers for joint use.void
Makes 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 (AnimComposer
andSkinningControl
)
-
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 theAnimComposer
this mask is for.- Returns:
- anim composer
-
getSkinningControl
Get theSkinningControl
this 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:AnimationMask
Test whether the animation should be applied to the specified element.- Specified by:
contains
in interfaceAnimationMask
- Overrides:
contains
in classArmatureMask
- Parameters:
target
- the target element- Returns:
- true if animation should be applied, otherwise false
-
all
Creates anSingleLayerInfluenceMask
for 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 anSingleLayerInfluenceMask
for all joints.- Parameters:
layer
- layer the returned mask is, or will be, assigned toanim
- anim composerskin
- skinning control- Returns:
- new mask
-