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

public final class SVertexList extends Array<SVertex>
A variable-length list (array) of strand vertices. (native type: Array<HairSettings::SVertex>)
  • Constructor Details

    • SVertexList

      public SVertexList()
      Instantiate an empty list.
    • SVertexList

      public SVertexList(SVertex... vertices)
      Instantiate a list from a fixed-length array.
      Parameters:
      vertices - the vertices to include in the list
  • Method Details

    • capacity

      public int capacity()
      Count how many vertices the currently allocated storage can hold. The list is unaffected.
      Specified by:
      capacity in class Array<SVertex>
      Returns:
      the number of vertices (≥size)
    • erase

      public void erase(int startIndex, int stopIndex)
      Remove all vertices in the specified range of indices.
      Specified by:
      erase in class Array<SVertex>
      Parameters:
      startIndex - the index of the first vertex to remove (≥0)
      stopIndex - one plus the index of the last vertex to remove (≥0)
    • get

      public SVertex get(int elementIndex)
      Access the vertex at the specified index.
      Specified by:
      get in class Array<SVertex>
      Parameters:
      elementIndex - the index from which to get the vertex (≥0)
      Returns:
      a new JVM object with the pre-existing native object assigned
    • resize

      public void resize(int numVertices)
      Extend or truncate the list.
      Specified by:
      resize in class Array<SVertex>
      Parameters:
      numVertices - the desired size (number of vertices, ≥0)
    • set

      public void set(int elementIndex, SVertex vertex)
      Put the specified vertex at the specified index.
      Specified by:
      set in class Array<SVertex>
      Parameters:
      elementIndex - the index at which to put the vertex (≥0)
      vertex - the vertex to put (not null)
    • size

      public int size()
      Count how many vertices are in the list. The list is unaffected.
      Specified by:
      size in class Array<SVertex>
      Returns:
      the number of vertices (≥0, ≤capacity)