Class PxParticleClothBuffer


public class PxParticleClothBuffer extends PxParticleBuffer
A particle buffer used to simulate particle cloth.

See #PxPhysics::createParticleClothBuffer.

  • Field Details

    • SIZEOF

      public static final int SIZEOF
    • ALIGNOF

      public static final int ALIGNOF
      See Also:
  • Constructor Details

    • PxParticleClothBuffer

      protected PxParticleClothBuffer()
    • PxParticleClothBuffer

      protected PxParticleClothBuffer(long address)
  • Method Details

    • wrapPointer

      public static PxParticleClothBuffer wrapPointer(long address)
    • arrayGet

      public static PxParticleClothBuffer arrayGet(long baseAddress, int index)
    • getRestPositions

      public PxVec4 getRestPositions()
      Get rest positions for this particle buffer.
      Returns:
      A pointer to a device buffer containing the rest positions packed as PxVec4(pos.x, pos.y, pos.z, 0.0f).
    • getTriangles

      public NativeObject getTriangles()
      Get the triangle indices for this particle buffer.
      Returns:
      A pointer to a device buffer containing the triangle indices for this cloth buffer.
    • setNbTriangles

      public void setNbTriangles(int nbTriangles)
      Set the number of triangles for this particle buffer.
      Parameters:
      nbTriangles - The number of triangles for this particle cloth buffer.
    • getNbTriangles

      public int getNbTriangles()
      Get the number of triangles for this particle buffer.
      Returns:
      The number triangles for this cloth buffer.
    • getNbSprings

      public int getNbSprings()
      Get the number of springs in this particle buffer.
      Returns:
      The number of springs in this cloth buffer.
    • getSprings

      public PxParticleSpring getSprings()
      Get the springs for this particle buffer.
      Returns:
      A pointer to a device buffer containing the springs for this cloth buffer.
    • setCloths

      public void setCloths(PxPartitionedParticleCloth cloths)
      Set cloths for this particle buffer.
      Parameters:
      cloths - A pointer to a PxPartitionedParticleCloth.

      See #PxPartitionedParticleCloth, #PxParticleClothPreProcessor