Class IKController

java.lang.Object
com.jme3.bullet.animation.IKController
All Implemented Interfaces:
com.jme3.export.Savable, com.jme3.util.clone.JmeCloneable, Cloneable

public abstract class IKController extends Object implements com.jme3.util.clone.JmeCloneable, com.jme3.export.Savable
An abstract inverse kinematics (IK) controller for a PhysicsLink in dynamic mode.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Logger
    message logger for this class
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    No-argument constructor needed by SavableClassUtil.
    protected
    IKController(PhysicsLink controlledLink)
    Instantiate an enabled controller.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    cloneFields(com.jme3.util.clone.Cloner cloner, Object original)
    Callback from Cloner to convert this shallow-cloned controller into a deep-cloned one, using the specified Cloner and original to resolve copied fields.
    Access the controlled link.
    boolean
    Test whether this controller is enabled.
    Create a shallow clone for the JME cloner.
    abstract void
    preTick(float timeStep)
    Apply forces, impulses, and torques to the rigid body.
    void
    read(com.jme3.export.JmeImporter importer)
    De-serialize this controller from the specified importer, for example when loading from a J3O file.
    void
    setEnabled(boolean desiredSetting)
    Enable or disable this controller.
    void
    Immediately put this controller into ragdoll mode.
    void
    write(com.jme3.export.JmeExporter exporter)
    Serialize this controller to the specified exporter, for example when saving to a J3O file.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • logger

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

    • IKController

      protected IKController()
      No-argument constructor needed by SavableClassUtil.
    • IKController

      protected IKController(PhysicsLink controlledLink)
      Instantiate an enabled controller.
      Parameters:
      controlledLink - the link to be controlled (not null)
  • Method Details

    • getLink

      public PhysicsLink getLink()
      Access the controlled link.
      Returns:
      the pre-existing instance (not null)
    • isEnabled

      public boolean isEnabled()
      Test whether this controller is enabled.
      Returns:
      the pre-existing instance (not null)
    • preTick

      public abstract void preTick(float timeStep)
      Apply forces, impulses, and torques to the rigid body. Invoked just before the physics is stepped.
      Parameters:
      timeStep - the duration of the simulation step (in seconds, ≥0)
    • setEnabled

      public void setEnabled(boolean desiredSetting)
      Enable or disable this controller.
      Parameters:
      desiredSetting - true to enable, false to disable
    • setRagdollMode

      public void setRagdollMode()
      Immediately put this controller into ragdoll mode. Unless overridden, this method simply disables the controller.
    • cloneFields

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

      public IKController jmeClone()
      Create a shallow clone for the JME cloner.
      Specified by:
      jmeClone in interface com.jme3.util.clone.JmeCloneable
      Returns:
      a new instance
    • read

      public void read(com.jme3.export.JmeImporter importer) throws IOException
      De-serialize this controller from the specified importer, for example when loading from a J3O file.
      Specified by:
      read in interface com.jme3.export.Savable
      Parameters:
      importer - (not null)
      Throws:
      IOException - from the importer
    • write

      public void write(com.jme3.export.JmeExporter exporter) throws IOException
      Serialize this controller to the specified exporter, for example when saving to a J3O file.
      Specified by:
      write in interface com.jme3.export.Savable
      Parameters:
      exporter - (not null)
      Throws:
      IOException - from the exporter