All Implemented Interfaces:
ConstJoltPhysicsObject, AutoCloseable, Comparable<JoltPhysicsObject>

public class Skinned extends JoltPhysicsObject
A constraint that skins a soft-body vertex. (native type: SoftBodySharedSettings::Skinned)
  • Constructor Details

    • Skinned

      public Skinned()
      Instantiate a default constraint.
    • Skinned

      public Skinned(int vertexIndex, float maxDistance, float backstopDistance, float backstopRadius)
      Instantiate a backstopped constraint for the specified vertex.
      Parameters:
      vertexIndex - the index of the vertex to constrain (≥0)
      maxDistance - the maximum distance
      backstopDistance - the backstop distance
      backstopRadius - the backstop radius
  • Method Details

    • getWeight

      public SkinWeight getWeight(int index)
      Access the specified weight. (native attribute: mWeight)
      Parameters:
      index - an index into the weight array (≥0, <4)
      Returns:
      a new JVM object with the pre-existing native object assigned
    • normalizeWeights

      public void normalizeWeights()
      Normalize the weights so that they sum to one.
    • setWeight

      public void setWeight(int index, SkinWeight weight)
      Copy the specified weight into the array. (native attribute: mWeight)
      Parameters:
      index - an index into the weight array (≥0, <4)
      weight - the desired weight (alias created)