java.lang.Object
physx.NativeObject
physx.particles.PxDiffuseParticleParams
Parameters to configure the behavior of diffuse particles
-
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
ConstructorsModifierConstructorDescriptionConstruct parameters with default values.protectedPxDiffuseParticleParams(long address) -
Method Summary
Modifier and TypeMethodDescriptionstatic PxDiffuseParticleParamsarrayGet(long baseAddress, int index) static PxDiffuseParticleParamscreateAt(long address) static <T> PxDiffuseParticleParamscreateAt(T allocator, NativeObject.Allocator<T> allocate) voiddestroy()floatAir drag force factor for spray particlesfloatFluid drag force factor for bubble particlesfloatBuoyancy force factor for bubble particlesfloatDecay factor of diffuse particles' lifetime after they collide with shapes.floatContribution from divergence when deciding diffuse particle creation.floatContribution from kinetic energy when deciding diffuse particle creation.floatDiffuse particle will be removed after the specified lifetimefloatContribution from pressure when deciding diffuse particle creation.floatParticles with potential value greater than the threshold will spawn diffuse particlesbooleanIf true, enables accurate velocity estimation when using PBD solver.voidsetAirDrag(float value) Air drag force factor for spray particlesvoidsetBubbleDrag(float value) Fluid drag force factor for bubble particlesvoidsetBuoyancy(float value) Buoyancy force factor for bubble particlesvoidsetCollisionDecay(float value) Decay factor of diffuse particles' lifetime after they collide with shapes.voidsetDivergenceWeight(float value) Contribution from divergence when deciding diffuse particle creation.voidsetKineticEnergyWeight(float value) Contribution from kinetic energy when deciding diffuse particle creation.voidsetLifetime(float value) Diffuse particle will be removed after the specified lifetimevoidsetPressureWeight(float value) Contribution from pressure when deciding diffuse particle creation.voidsetThreshold(float value) Particles with potential value greater than the threshold will spawn diffuse particlesvoid(re)sets the structure to the default.voidsetUseAccurateVelocity(boolean value) If true, enables accurate velocity estimation when using PBD solver.static PxDiffuseParticleParamswrapPointer(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
-
PxDiffuseParticleParams
protected PxDiffuseParticleParams(long address) -
PxDiffuseParticleParams
public PxDiffuseParticleParams()Construct parameters with default values.
-
-
Method Details
-
wrapPointer
-
arrayGet
-
createAt
- Parameters:
address- Pre-allocated memory, where the object is created.- Returns:
- Stack allocated object of PxDiffuseParticleParams
-
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 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.
-