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

public final class HairShaders extends JoltPhysicsObject implements RefTarget
A collection of compute shaders for hair simulation.
  • Constructor Details

    • HairShaders

      public HairShaders()
      Instantiate default shaders.
    • HairShaders

      public HairShaders(HairShaders original)
      Instantiate a copy of the specified shaders.
      Parameters:
      original - the shaders to copy (not null, unaffected)
  • Method Details

    • init

      public void init(ComputeSystem computeSystem)
      Loads all shaders for the specified compute system. Note that if you want to simulate on the CPU you must invoke hairRegisterShaders() first.
      Parameters:
      computeSystem - the compute system to use (not null)
    • getRefCount

      public int getRefCount()
      Count the active references to the native HairShaders. The shaders are unaffected.
      Specified by:
      getRefCount in interface RefTarget
      Returns:
      the count (≥0)
    • setEmbedded

      public void setEmbedded()
      Mark the native HairShaders as embedded.
      Specified by:
      setEmbedded in interface RefTarget
    • toRef

      public HairShadersRef toRef()
      Create a counted reference to the native HairShaders.
      Specified by:
      toRef in interface RefTarget
      Returns:
      a new JVM object with a new native object assigned