Package com.jme3.anim

Class ArmatureMask

java.lang.Object
com.jme3.anim.ArmatureMask
All Implemented Interfaces:
AnimationMask

public class ArmatureMask extends Object implements AnimationMask
An AnimationMask to select joints from a single Armature.
  • Constructor Details

    • ArmatureMask

      public ArmatureMask()
      Instantiate a mask that affects no joints.
    • ArmatureMask

      public ArmatureMask(Armature armature)
      Instantiate a mask that affects all joints in the specified Armature.
      Parameters:
      armature - the Armature containing the joints (not null, unaffected)
  • Method Details

    • remove

      public ArmatureMask remove(ArmatureMask removeMask)
      Remove all joints affected by the specified ArmatureMask.
      Parameters:
      removeMask - the set of joints to remove (not null, unaffected)
      Returns:
      this
    • removeJoints

      public ArmatureMask removeJoints(Armature armature, String... jointNames)
      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
    • contains

      public boolean contains(Object target)
      Description copied from interface: AnimationMask
      Test whether the animation should be applied to the specified element.
      Specified by:
      contains in interface AnimationMask
      Parameters:
      target - the target element
      Returns:
      true if animation should be applied, otherwise false
    • createMask

      public static ArmatureMask createMask(Armature armature, String fromJoint)
      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
    • createMask

      public static ArmatureMask createMask(Armature armature, String... joints)
      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
    • addBones

      public void addBones(Armature armature, String... jointNames)
      Add joints to be influenced by this animation mask.
      Parameters:
      armature - the Armature containing the joints
      jointNames - the names of the joints to be influenced
    • addFromJoint

      public void addFromJoint(Armature armature, String jointName)
      Add a joint and all its sub armature joints to be influenced by this animation mask.
      Parameters:
      armature - the Armature containing the ancestor joint
      jointName - the names of the ancestor joint
    • addAncestors

      public ArmatureMask addAncestors(Joint start)
      Add the specified Joint and all its ancestors.
      Parameters:
      start - the starting point (may be null, unaffected)
      Returns:
      this
    • removeAncestors

      public ArmatureMask removeAncestors(Joint start)
      Remove the specified Joint and all its ancestors.
      Parameters:
      start - the starting point (may be null, unaffected)
      Returns:
      this