Class SoftBodyMaterial

java.lang.Object
com.jme3.bullet.NativePhysicsObject
com.jme3.bullet.objects.infos.SoftBodyMaterial
All Implemented Interfaces:
Comparable<NativePhysicsObject>

public class SoftBodyMaterial extends NativePhysicsObject
Provide access to 3 fields of the native btSoftBody::Material struct.
  • Field Details

    • logger

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

    • SoftBodyMaterial

      public SoftBodyMaterial(PhysicsSoftBody body)
      Instantiate a material with the default properties.
      Parameters:
      body - the body to which this material will apply (not null)
  • Method Details

    • angularStiffness

      public float angularStiffness()
      Read the angular-stiffness coefficient (native field: m_kAST).
      Returns:
      the coefficient (≥0, ≤1)
    • linearStiffness

      public float linearStiffness()
      Read the linear-stiffness coefficient (native field: m_kLST).
      Returns:
      the coefficient (≥0, ≤1)
    • setAngularStiffness

      public void setAngularStiffness(float coefficient)
      Alter the angular-stiffness coefficient (native field: m_kAST).
      Parameters:
      coefficient - the desired coefficient (≥0, ≤1, default=1)
    • setLinearStiffness

      public void setLinearStiffness(float coefficient)
      Alter the linear-stiffness coefficient (native field: m_kLST).
      Parameters:
      coefficient - the desired coefficient (≥0, ≤1, default=1)
    • setVolumeStiffness

      public void setVolumeStiffness(float coefficient)
      Alter the volume-stiffness coefficient (native field: m_kVST).
      Parameters:
      coefficient - the desired coefficient (≥0, ≤1, default=1)
    • volumeStiffness

      public float volumeStiffness()
      Read the volume-stiffness coefficient (native field: m_kVST).
      Returns:
      the coefficient (≥0, ≤1)