Class TransformedShapeArray

java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.TransformedShapeArray
All Implemented Interfaces:
ConstJoltPhysicsObject, AutoCloseable, Comparable<JoltPhysicsObject>

public class TransformedShapeArray extends JoltPhysicsObject
A fixed-length array of coordinate-transformed shapes. (native type: TransformedShape[])
  • Constructor Details

    • TransformedShapeArray

      public TransformedShapeArray(int length)
      Instantiate an array with the specified length.
      Parameters:
      length - the desired number of shapes (>0)
  • Method Details

    • get

      public TransformedShape get(int elementIndex)
      Access the shape at the specified index.
      Parameters:
      elementIndex - the index (≥0, <length)
      Returns:
      a new JVM object with the pre-existing native object assigned
    • length

      public int length()
      Return the length of the array.
      Returns:
      the length (in shapes, >0)
    • set

      public void set(int elementIndex, ConstTransformedShape shape)
      Store the specified shape at the specified index.
      Parameters:
      elementIndex - the index at which to store the shape (≥0, <length)
      shape - the shape to store (not null, unaffected)