- All Implemented Interfaces:
ConstJoltPhysicsObject,AutoCloseable,Comparable<JoltPhysicsObject>
A variable-length list (array) of triangles. (native type:
Array<Triangle>)-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcapacity()Count how many triangles the currently allocated storage can hold.voiderase(int startIndex, int stopIndex) Remove all triangles in the specified range of indices.get(int elementIndex) Access the triangle at the specified index.voidresize(int numTriangles) Extend or truncate the list.voidPut the specified triangle at the specified index.intsize()Count how many triangles are in the list.Methods inherited from class com.github.stephengold.joltjni.template.Array
clear, empty, erase, pushBack, toListMethods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, getContainingObject, hasAssignedNativeObject, hashCode, isCleanerStarted, ownsNativeObject, setVirtualAddress, setVirtualAddress, startCleaner, targetVa, targetVaOrZero, toString, va
-
Constructor Details
-
TriangleList
public TriangleList()Instantiate an empty list.
-
-
Method Details
-
capacity
public int capacity()Count how many triangles the currently allocated storage can hold. The list is unaffected. -
erase
public void erase(int startIndex, int stopIndex) Remove all triangles in the specified range of indices. -
get
Access the triangle at the specified index. -
resize
public void resize(int numTriangles) Extend or truncate the list. -
set
Put the specified triangle at the specified index. -
size
public int size()Count how many triangles are in the list. The list is unaffected.
-