Class SoftBodyConfig

java.lang.Object
com.jme3.bullet.objects.infos.SoftBodyConfig

public class SoftBodyConfig extends Object
Provide access to fields of the native btSoftBody::Config struct. Soft bodies are one-to-one with config instances.
  • Field Summary

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

    Constructors
    Constructor
    Description
    Instantiate a config with the default properties.
  • Method Summary

    Modifier and Type
    Method
    Description
    Return the aerodynamics model.
    int
    Return the number of cluster-solver iterations (native field: citerations).
    int
    Return the collisions flags (native field: collisions).
    void
    Copy all parameter values from the specified config.
    int
    Return the number of drift-solver iterations (native field: diterations).
    float
    get(Sbcp parameter)
    Return the value of the specified parameter.
    int
    Return the number of position-solver iterations (native field: piterations).
    void
    set(Sbcp parameter, float desiredValue)
    Alter the specified parameter.
    void
    Alter the aerodynamics model.
    void
    setClusterIterations(int numIterations)
    Alter the number of cluster-solver iterations (native field: citerations).
    void
    setCollisionFlags(int flag, int... additionalFlags)
    Alter the collision flags (default=SDF_RS).
    void
    setDriftIterations(int numIterations)
    Alter the number of drift-solver iterations (native field: diterations).
    void
    setPositionIterations(int numIterations)
    Alter the number of position-solver iterations (native field: piterations).
    void
    setVelocityIterations(int numIterations)
    Alter the number of velocity-solver iterations (native field: viterations).
    int
    Return the number of velocity-solver iterations (native field: viterations).

    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

    • SoftBodyConfig

      public SoftBodyConfig(PhysicsSoftBody body)
      Instantiate a config with the default properties.
      Parameters:
      body - the corresponding soft body (not null)
  • Method Details

    • aerodynamics

      public Aero aerodynamics()
      Return the aerodynamics model.
      Returns:
      an enum value (not null)
    • clusterIterations

      public int clusterIterations()
      Return the number of cluster-solver iterations (native field: citerations).
      Returns:
      the iteration count (≥0)
    • collisionFlags

      public int collisionFlags()
      Return the collisions flags (native field: collisions). Flags are defined in ConfigFlag.
      Returns:
      the flags that are set, ORed together
    • copyAll

      public void copyAll(SoftBodyConfig source)
      Copy all parameter values from the specified config.
      Parameters:
      source - the config to copy from (not null, unaffected)
    • driftIterations

      public int driftIterations()
      Return the number of drift-solver iterations (native field: diterations).
      Returns:
      the iteration count (≥0)
    • get

      public float get(Sbcp parameter)
      Return the value of the specified parameter.
      Parameters:
      parameter - which parameter to read (not null)
      Returns:
      the parameter value
    • positionIterations

      public int positionIterations()
      Return the number of position-solver iterations (native field: piterations).
      Returns:
      the iteration count (≥0)
    • set

      public void set(Sbcp parameter, float desiredValue)
      Alter the specified parameter.
      Parameters:
      parameter - which parameter to set (not null)
      desiredValue - the desired parameter value
    • setAerodynamics

      public void setAerodynamics(Aero model)
      Alter the aerodynamics model.
      Parameters:
      model - the desired aerodynamics model (not null, default=V_Point)
    • setClusterIterations

      public void setClusterIterations(int numIterations)
      Alter the number of cluster-solver iterations (native field: citerations).
      Parameters:
      numIterations - the desired number of iterations (≥0, default=4)
    • setCollisionFlags

      public void setCollisionFlags(int flag, int... additionalFlags)
      Alter the collision flags (default=SDF_RS). Flag values are defined in ConfigFlag.
      Parameters:
      flag - the first flag to set, or 0x0 to clear all flags
      additionalFlags - ... additional flags to set. Flags are ORed together.
    • setDriftIterations

      public void setDriftIterations(int numIterations)
      Alter the number of drift-solver iterations (native field: diterations).
      Parameters:
      numIterations - the desired number of iterations (≥0, default=0)
    • setPositionIterations

      public void setPositionIterations(int numIterations)
      Alter the number of position-solver iterations (native field: piterations).
      Parameters:
      numIterations - the desired number of iterations (≥0, default=1)
    • setVelocityIterations

      public void setVelocityIterations(int numIterations)
      Alter the number of velocity-solver iterations (native field: viterations).
      Parameters:
      numIterations - the desired number of iterations (≥0, default=0)
    • velocityIterations

      public int velocityIterations()
      Return the number of velocity-solver iterations (native field: viterations).
      Returns:
      the iteration count (≥0)