Class PxDiffuseParticleParams

java.lang.Object
physx.NativeObject
physx.particles.PxDiffuseParticleParams

public class PxDiffuseParticleParams extends NativeObject
Parameters to configure the behavior of diffuse particles
  • Field Details

    • SIZEOF

      public static final int SIZEOF
    • ALIGNOF

      public static final int ALIGNOF
      See Also:
  • Constructor Details

    • PxDiffuseParticleParams

      protected PxDiffuseParticleParams(long address)
    • PxDiffuseParticleParams

      public PxDiffuseParticleParams()
      Construct parameters with default values.
  • Method Details

    • wrapPointer

      public static PxDiffuseParticleParams wrapPointer(long address)
    • arrayGet

      public static PxDiffuseParticleParams arrayGet(long baseAddress, int index)
    • createAt

      public static PxDiffuseParticleParams createAt(long address)
      Parameters:
      address - Pre-allocated memory, where the object is created.
      Returns:
      Stack allocated object of PxDiffuseParticleParams
    • createAt

      public static <T> PxDiffuseParticleParams createAt(T allocator, NativeObject.Allocator<T> allocate)
      Type Parameters:
      T - Allocator class, e.g. LWJGL's MemoryStack.
      Parameters:
      allocator - Object to use for allocation, e.g. an instance of LWJGL's MemoryStack.
      allocate - Method to call on allocator to obtain the target address, e.g. MemoryStack::nmalloc.
      Returns:
      Stack allocated object of PxDiffuseParticleParams
    • destroy

      public void destroy()
    • getThreshold

      public float getThreshold()
      Particles with potential value greater than the threshold will spawn diffuse particles
    • setThreshold

      public void setThreshold(float value)
      Particles with potential value greater than the threshold will spawn diffuse particles
    • getLifetime

      public float getLifetime()
      Diffuse particle will be removed after the specified lifetime
    • setLifetime

      public void setLifetime(float value)
      Diffuse particle will be removed after the specified lifetime
    • getAirDrag

      public float getAirDrag()
      Air drag force factor for spray particles
    • setAirDrag

      public void setAirDrag(float value)
      Air drag force factor for spray particles
    • getBubbleDrag

      public float getBubbleDrag()
      Fluid drag force factor for bubble particles
    • setBubbleDrag

      public void setBubbleDrag(float value)
      Fluid drag force factor for bubble particles
    • getBuoyancy

      public float getBuoyancy()
      Buoyancy force factor for bubble particles
    • setBuoyancy

      public void setBuoyancy(float value)
      Buoyancy force factor for bubble particles
    • getKineticEnergyWeight

      public float getKineticEnergyWeight()
      Contribution from kinetic energy when deciding diffuse particle creation.
    • setKineticEnergyWeight

      public void setKineticEnergyWeight(float value)
      Contribution from kinetic energy when deciding diffuse particle creation.
    • getPressureWeight

      public float getPressureWeight()
      Contribution from pressure when deciding diffuse particle creation.
    • setPressureWeight

      public void setPressureWeight(float value)
      Contribution from pressure when deciding diffuse particle creation.
    • getDivergenceWeight

      public float getDivergenceWeight()
      Contribution from divergence when deciding diffuse particle creation.
    • setDivergenceWeight

      public void setDivergenceWeight(float value)
      Contribution from divergence when deciding diffuse particle creation.
    • getCollisionDecay

      public float getCollisionDecay()
      Decay factor of diffuse particles' lifetime after they collide with shapes.
    • setCollisionDecay

      public void setCollisionDecay(float value)
      Decay factor of diffuse particles' lifetime after they collide with shapes.
    • getUseAccurateVelocity

      public boolean getUseAccurateVelocity()
      If true, enables accurate velocity estimation when using PBD solver.
    • setUseAccurateVelocity

      public void setUseAccurateVelocity(boolean value)
      If true, enables accurate velocity estimation when using PBD solver.
    • setToDefault

      public void setToDefault()
      (re)sets the structure to the default.