Package com.jme3.anim
Class ArmatureMask
java.lang.Object
com.jme3.anim.ArmatureMask
- All Implemented Interfaces:
AnimationMask
- Direct Known Subclasses:
SingleLayerInfluenceMask
An AnimationMask to select joints from a single Armature.
-
Constructor Summary
ConstructorDescriptionInstantiate a mask that affects no joints.ArmatureMask
(Armature armature) Instantiate a mask that affects all joints in the specified Armature. -
Method Summary
Modifier and TypeMethodDescriptionaddAncestors
(Joint start) Add the specified Joint and all its ancestors.void
Add joints to be influenced by this animation mask.void
addFromJoint
(Armature armature, String jointName) Add a joint and all its sub armature joints to be influenced by this animation mask.boolean
Test whether the animation should be applied to the specified element.static ArmatureMask
createMask
(Armature armature, String fromJoint) Create an ArmatureMask that selects the named Joint and all its descendants.static ArmatureMask
createMask
(Armature armature, String... joints) Create an ArmatureMask that selects the named joints.remove
(ArmatureMask removeMask) Remove all joints affected by the specified ArmatureMask.removeAncestors
(Joint start) Remove the specified Joint and all its ancestors.removeJoints
(Armature armature, String... jointNames) Remove the named joints.
-
Constructor Details
-
ArmatureMask
public ArmatureMask()Instantiate a mask that affects no joints. -
ArmatureMask
Instantiate a mask that affects all joints in the specified Armature.- Parameters:
armature
- the Armature containing the joints (not null, unaffected)
-
-
Method Details
-
remove
Remove all joints affected by the specified ArmatureMask.- Parameters:
removeMask
- the set of joints to remove (not null, unaffected)- Returns:
- this
-
removeJoints
Remove the named joints.- Parameters:
armature
- the Armature containing the joints (not null, unaffected)jointNames
- the names of the joints to be removed- Returns:
- this
- Throws:
IllegalArgumentException
- if it can not find the joint with the specified name on the provided armature
-
contains
Description copied from interface:AnimationMask
Test whether the animation should be applied to the specified element.- Specified by:
contains
in interfaceAnimationMask
- Parameters:
target
- the target element- Returns:
- true if animation should be applied, otherwise false
-
createMask
Create an ArmatureMask that selects the named Joint and all its descendants.- Parameters:
armature
- the Armature containing the joints (not null)fromJoint
- the name of the ancestor joint- Returns:
- a new mask
- Throws:
IllegalArgumentException
- if it can not find the joint with the specified name on the provided armature
-
createMask
Create an ArmatureMask that selects the named joints.- Parameters:
armature
- the Armature containing the joints (not null)joints
- the names of the joints to be included- Returns:
- a new mask
- Throws:
IllegalArgumentException
- if it can not find the joint with the specified name on the provided armature
-
addBones
Add joints to be influenced by this animation mask.- Parameters:
armature
- the Armature containing the jointsjointNames
- the names of the joints to be influenced- Throws:
IllegalArgumentException
- if it can not find the joint with the specified name on the provided armature
-
addFromJoint
Add a joint and all its sub armature joints to be influenced by this animation mask.- Parameters:
armature
- the Armature containing the ancestor jointjointName
- the names of the ancestor joint- Throws:
IllegalArgumentException
- if it can not find the joint with the specified name on the provided armature
-
addAncestors
Add the specified Joint and all its ancestors.- Parameters:
start
- the starting point (may be null, unaffected)- Returns:
- this
-
removeAncestors
Remove the specified Joint and all its ancestors.- Parameters:
start
- the starting point (may be null, unaffected)- Returns:
- this
-