java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.HairShaders
- All Implemented Interfaces:
ConstJoltPhysicsObject,RefTarget,AutoCloseable,Comparable<JoltPhysicsObject>
A collection of compute shaders for hair simulation.
-
Constructor Summary
ConstructorsConstructorDescriptionInstantiate default shaders.HairShaders(HairShaders original) Instantiate a copy of the specified shaders. -
Method Summary
Modifier and TypeMethodDescriptionintCount the active references to the nativeHairShaders.voidinit(ComputeSystem computeSystem) Loads all shaders for the specified compute system.voidMark the nativeHairShadersas embedded.toRef()Create a counted reference to the nativeHairShaders.Methods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, getContainingObject, hasAssignedNativeObject, hashCode, isCleanerStarted, ownsNativeObject, setVirtualAddress, setVirtualAddress, startCleaner, targetVa, toString, va
-
Constructor Details
-
HairShaders
public HairShaders()Instantiate default shaders. -
HairShaders
Instantiate a copy of the specified shaders.- Parameters:
original- the shaders to copy (notnull, unaffected)
-
-
Method Details
-
init
Loads all shaders for the specified compute system. Note that if you want to simulate on the CPU you must invokehairRegisterShaders()first.- Parameters:
computeSystem- the compute system to use (notnull)
-
getRefCount
public int getRefCount()Count the active references to the nativeHairShaders. The shaders are unaffected.- Specified by:
getRefCountin interfaceRefTarget- Returns:
- the count (≥0)
-
setEmbedded
public void setEmbedded()Mark the nativeHairShadersas embedded.- Specified by:
setEmbeddedin interfaceRefTarget
-
toRef
Create a counted reference to the nativeHairShaders.
-