Class PxPBDParticleSystem


public class PxPBDParticleSystem extends PxParticleSystem
A particle system that uses the position based dynamics(PBD) solver.

The position based dynamics solver for particle systems supports behaviors like fluid, cloth, inflatables etc.

  • Field Details

    • SIZEOF

      public static final int SIZEOF
    • ALIGNOF

      public static final int ALIGNOF
      See Also:
  • Constructor Details

    • PxPBDParticleSystem

      protected PxPBDParticleSystem()
    • PxPBDParticleSystem

      protected PxPBDParticleSystem(long address)
  • Method Details

    • wrapPointer

      public static PxPBDParticleSystem wrapPointer(long address)
    • arrayGet

      public static PxPBDParticleSystem arrayGet(long baseAddress, int index)
    • destroy

      public void destroy()
    • setWind

      public void setWind(PxVec3 wind)
      Set wind direction and intensity
      Parameters:
      wind - The wind direction and intensity
    • getWind

      public PxVec3 getWind()
      Retrieves the wind direction and intensity.
      Returns:
      The wind direction and intensity
    • setFluidBoundaryDensityScale

      public void setFluidBoundaryDensityScale(float fluidBoundaryDensityScale)
      Set the fluid boundary density scale

      Defines how strong of a contribution the boundary (typically a rigid surface) should have on a fluid particle's density.

      Parameters:
      fluidBoundaryDensityScale - Range: (0.0, 1.0)
    • getFluidBoundaryDensityScale

      public float getFluidBoundaryDensityScale()
      Return the fluid boundary density scale
      Returns:
      the fluid boundary density scale

      See #setFluidBoundaryDensityScale()

    • setFluidRestOffset

      public void setFluidRestOffset(float fluidRestOffset)
      Set the fluid rest offset

      Two fluid particles will come to rest at a distance equal to twice the fluidRestOffset value.

      Parameters:
      fluidRestOffset - Range: (0, particleContactOffset)
    • getFluidRestOffset

      public float getFluidRestOffset()
      Return the fluid rest offset
      Returns:
      the fluid rest offset

      See #setFluidRestOffset()

    • setGridSizeX

      public void setGridSizeX(int gridSizeX)
      Set the particle system grid size x dimension
      Parameters:
      gridSizeX - x dimension in the particle grid
    • setGridSizeY

      public void setGridSizeY(int gridSizeY)
      Set the particle system grid size y dimension
      Parameters:
      gridSizeY - y dimension in the particle grid
    • setGridSizeZ

      public void setGridSizeZ(int gridSizeZ)
      Set the particle system grid size z dimension
      Parameters:
      gridSizeZ - z dimension in the particle grid
    • getConcreteTypeName

      public String getConcreteTypeName()
      Description copied from class: PxBase
      Returns string name of dynamic type.
      Overrides:
      getConcreteTypeName in class PxBase
      Returns:
      WebIDL type: DOMString