Class BoneLink

java.lang.Object
com.jme3.bullet.animation.PhysicsLink
com.jme3.bullet.animation.BoneLink
All Implemented Interfaces:
Savable, JmeCloneable, Cloneable

public class BoneLink extends PhysicsLink
Link an animated bone in a skeleton to a jointed rigid body in a ragdoll.

This class is shared between JBullet and Native Bullet.

  • Field Details

    • logger2

      public static final Logger logger2
      message logger for this class
  • Constructor Details

    • BoneLink

      protected BoneLink()
      No-argument constructor needed by SavableClassUtil. Do not invoke directly!
  • Method Details

    • blendToKinematicMode

      public void blendToKinematicMode(KinematicSubmode submode, float blendInterval)
      Begin blending this link to a purely kinematic mode.
      Parameters:
      submode - enum value (not null)
      blendInterval - the duration of the blend interval (in seconds, ≥0)
    • cloneFields

      public void cloneFields(Cloner cloner, Object original)
      Callback from Cloner to convert this shallow-cloned link into a deep-cloned one, using the specified cloner and original to resolve copied fields.
      Specified by:
      cloneFields in interface JmeCloneable
      Overrides:
      cloneFields in class PhysicsLink
      Parameters:
      cloner - the cloner that's cloning this link (not null)
      original - the instance from which this link was shallow-cloned (unused)
    • dynamicUpdate

      protected void dynamicUpdate()
      Update this link in Dynamic mode, setting the linked bone's transform based on the transform of the rigid body.
      Specified by:
      dynamicUpdate in class PhysicsLink
    • jmeClone

      public BoneLink jmeClone()
      Create a shallow clone for the JME cloner.
      Specified by:
      jmeClone in interface JmeCloneable
      Overrides:
      jmeClone in class PhysicsLink
      Returns:
      a new instance
    • kinematicUpdate

      protected void kinematicUpdate(float tpf)
      Update this link in blended Kinematic mode.
      Overrides:
      kinematicUpdate in class PhysicsLink
      Parameters:
      tpf - the time interval between frames (in seconds, ≥0)
    • name

      public String name()
      Unambiguously identify this link by name, within its DynamicAnimControl.
      Specified by:
      name in class PhysicsLink
      Returns:
      a brief textual description (not null, not empty)
    • read

      public void read(JmeImporter im) throws IOException
      De-serialize this link, for example when loading from a J3O file.
      Specified by:
      read in interface Savable
      Overrides:
      read in class PhysicsLink
      Parameters:
      im - importer (not null)
      Throws:
      IOException - from importer
    • setDynamic

      public void setDynamic(Vector3f uniformAcceleration)
      Immediately put this link into dynamic mode and update the range of motion of its joint.
      Overrides:
      setDynamic in class PhysicsLink
      Parameters:
      uniformAcceleration - the uniform acceleration vector (in physics-space coordinates, not null, unaffected)
    • write

      public void write(JmeExporter ex) throws IOException
      Serialize this link, for example when saving to a J3O file.
      Specified by:
      write in interface Savable
      Overrides:
      write in class PhysicsLink
      Parameters:
      ex - exporter (not null)
      Throws:
      IOException - from exporter