- All Implemented Interfaces:
ConstJoltPhysicsObject,AutoCloseable,Comparable<JoltPhysicsObject>
A variable-length list (array) of hair strands. (native type:
Array<HairSettings::SStrand>)-
Constructor Summary
ConstructorsConstructorDescriptionInstantiate an empty list.SStrandList(SStrand... strands) Instantiate a list from a fixed-length array. -
Method Summary
Modifier and TypeMethodDescriptionintcapacity()Count how many strands the currently allocated storage can hold.voiderase(int startIndex, int stopIndex) Remove all strands in the specified range of indices.get(int elementIndex) Access the strand at the specified index.voidresize(int numStrands) Extend or truncate the list.voidPut the specified strand at the specified index.intsize()Count how many strands 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, toString, va
-
Constructor Details
-
SStrandList
public SStrandList()Instantiate an empty list. -
SStrandList
Instantiate a list from a fixed-length array.- Parameters:
strands- the strands to include in the list
-
-
Method Details
-
capacity
public int capacity()Count how many strands the currently allocated storage can hold. The list is unaffected. -
erase
public void erase(int startIndex, int stopIndex) Remove all strands in the specified range of indices. -
get
Access the strand at the specified index. -
resize
public void resize(int numStrands) Extend or truncate the list. -
set
Put the specified strand at the specified index. -
size
public int size()Count how many strands are in the list. The list is unaffected.
-