java.lang.Object
physx.NativeObject
physx.particles.PxParticleCloth
Particle cloth structure. Holds information about a single piece of cloth that is part of a #PxParticleClothBuffer.
-
Nested Class Summary
Nested classes/interfaces inherited from class physx.NativeObject
NativeObject.Allocator<T> -
Field Summary
FieldsFields inherited from class physx.NativeObject
address, isExternallyAllocated, SIZEOF_BYTE, SIZEOF_DOUBLE, SIZEOF_FLOAT, SIZEOF_INT, SIZEOF_LONG, SIZEOF_POINTER, SIZEOF_SHORT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PxParticleClotharrayGet(long baseAddress, int index) static PxParticleClothcreateAt(long address) static <T> PxParticleClothcreateAt(T allocator, NativeObject.Allocator<T> allocate) voiddestroy()floatUsed internally.intThe number of triangles of this piece of cloth.intThe number of particles of this piece of clothfloatThe factor of the rest volume to specify the target volume for this piece of cloth, used for inflatable simulation.floatThe rest volume of this piece of cloth, used for inflatable simulation.intThe index of the first triangle of this piece of cloth in the triangle list.intIndex of the first particle of this cloth in the position/velocity buffers of the parent #PxParticleClothBuffervoidsetClothBlendScale(float value) Used internally.voidsetNumTriangles(int value) The number of triangles of this piece of cloth.voidsetNumVertices(int value) The number of particles of this piece of clothvoidsetPressure(float value) The factor of the rest volume to specify the target volume for this piece of cloth, used for inflatable simulation.voidsetRestVolume(float value) The rest volume of this piece of cloth, used for inflatable simulation.voidsetStartTriangleIndex(int value) The index of the first triangle of this piece of cloth in the triangle list.voidsetStartVertexIndex(int value) Index of the first particle of this cloth in the position/velocity buffers of the parent #PxParticleClothBufferstatic PxParticleClothwrapPointer(long address) Methods inherited from class physx.NativeObject
checkNotNull, equals, getAddress, hashCode
-
Field Details
-
SIZEOF
public static final int SIZEOF -
ALIGNOF
public static final int ALIGNOF- See Also:
-
-
Constructor Details
-
PxParticleCloth
protected PxParticleCloth(long address) -
PxParticleCloth
public PxParticleCloth()
-
-
Method Details
-
wrapPointer
-
arrayGet
-
createAt
- Parameters:
address- Pre-allocated memory, where the object is created.- Returns:
- Stack allocated object of PxParticleCloth
-
createAt
- 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 PxParticleCloth
-
destroy
public void destroy() -
getStartVertexIndex
public int getStartVertexIndex()Index of the first particle of this cloth in the position/velocity buffers of the parent #PxParticleClothBuffer -
setStartVertexIndex
public void setStartVertexIndex(int value) Index of the first particle of this cloth in the position/velocity buffers of the parent #PxParticleClothBuffer -
getNumVertices
public int getNumVertices()The number of particles of this piece of cloth -
setNumVertices
public void setNumVertices(int value) The number of particles of this piece of cloth -
getClothBlendScale
public float getClothBlendScale()Used internally. -
setClothBlendScale
public void setClothBlendScale(float value) Used internally. -
getRestVolume
public float getRestVolume()The rest volume of this piece of cloth, used for inflatable simulation. -
setRestVolume
public void setRestVolume(float value) The rest volume of this piece of cloth, used for inflatable simulation. -
getPressure
public float getPressure()The factor of the rest volume to specify the target volume for this piece of cloth, used for inflatable simulation. -
setPressure
public void setPressure(float value) The factor of the rest volume to specify the target volume for this piece of cloth, used for inflatable simulation. -
getStartTriangleIndex
public int getStartTriangleIndex()The index of the first triangle of this piece of cloth in the triangle list. -
setStartTriangleIndex
public void setStartTriangleIndex(int value) The index of the first triangle of this piece of cloth in the triangle list. -
getNumTriangles
public int getNumTriangles()The number of triangles of this piece of cloth. -
setNumTriangles
public void setNumTriangles(int value) The number of triangles of this piece of cloth.
-