PxPBDMaterial

Defined in include/PxPBDMaterial.h

Inheritance Relationships

Base Type

class PxPBDMaterial : public PxParticleMaterial

Material class to represent a set of PBD particle material properties.

Public Functions

virtual void setViscosity(PxReal viscosity) = 0

Sets viscosity.

See also

getViscosity()

Parameters

viscosity[in] Viscosity. Range: [0, PX_MAX_F32)

virtual PxReal getViscosity() const = 0

Retrieves the viscosity value.

See also

setViscosity()

Returns

The viscosity value.

virtual void setVorticityConfinement(PxReal vorticityConfinement) = 0

Sets material vorticity confinement coefficient.

Parameters

vorticityConfinement[in] Material vorticity confinement coefficient. Range: [0, PX_MAX_F32)

virtual PxReal getVorticityConfinement() const = 0

Retrieves the vorticity confinement coefficient.

Returns

The vorticity confinement coefficient.

virtual void setSurfaceTension(PxReal surfaceTension) = 0

Sets material surface tension coefficient.

Parameters

surfaceTension[in] Material surface tension coefficient. Range: [0, PX_MAX_F32)

virtual PxReal getSurfaceTension() const = 0

Retrieves the surface tension coefficient.

Returns

The surface tension coefficient.

virtual void setCohesion(PxReal cohesion) = 0

Sets material cohesion coefficient.

See also

getCohesion()

Parameters

cohesion[in] Material cohesion coefficient. Range: [0, PX_MAX_F32)

virtual PxReal getCohesion() const = 0

Retrieves the cohesion coefficient.

See also

setCohesion()

Returns

The cohesion coefficient.

virtual void setLift(PxReal lift) = 0

Sets material lift coefficient.

See also

getLift()

Parameters

lift[in] Material lift coefficient. Range: [0, PX_MAX_F32)

virtual PxReal getLift() const = 0

Retrieves the lift coefficient.

See also

setLift()

Returns

The lift coefficient.

virtual void setDrag(PxReal drag) = 0

Sets material drag coefficient.

See also

getDrag()

Parameters

drag[in] Material drag coefficient. Range: [0, PX_MAX_F32)

virtual PxReal getDrag() const = 0

Retrieves the drag coefficient.

See also

setDrag()

Returns

The drag coefficient.

virtual void setCFLCoefficient(PxReal coefficient) = 0

Sets the CFL coefficient.

Parameters

coefficient[in] CFL coefficient. This coefficient scales the CFL term used to limit relative motion between fluid particles. Range: [1.f, PX_MAX_F32)

virtual PxReal getCFLCoefficient() const = 0

Retrieves the CFL coefficient.

Returns

The CFL coefficient.

virtual void setParticleFrictionScale(PxReal scale) = 0

Sets material particle friction scale.

This allows the application to scale up/down the frictional effect between particles independent of the friction coefficient, which also defines frictional behavior between the particle and rigid bodies/soft bodies/cloth etc.

Parameters

scale[in] particle friction scale. Range: [0, PX_MAX_F32)

virtual PxReal getParticleFrictionScale() const = 0

Retrieves the particle friction scale.

Returns

The particle friction scale.

virtual void setParticleAdhesionScale(PxReal adhesion) = 0

Sets material particle adhesion scale value.

This is the adhesive value between particles defined as a scaled multiple of the adhesion parameter.

Parameters

adhesion[in] particle adhesion scale value. Range: [0, PX_MAX_F32)

virtual PxReal getParticleAdhesionScale() const = 0

Retrieves the particle adhesion scale value.

Returns

The particle adhesion scale value.

inline virtual const char *getConcreteTypeName() const

Returns string name of dynamic type.

Returns

Class name of most derived type of this object.

virtual void setFriction(PxReal friction) = 0

Sets friction.

See also

getFriction()

Parameters

friction[in] Friction. Range: [0, PX_MAX_F32)

virtual PxReal getFriction() const = 0

Retrieves the friction value.

See also

setFriction()

Returns

The friction value.

virtual void setDamping(PxReal damping) = 0

Sets velocity damping term.

See also

getDamping

Parameters

damping[in] Velocity damping term. Range: [0, PX_MAX_F32)

virtual PxReal getDamping() const = 0

Retrieves the velocity damping term.

See also

setDamping()

Returns

The velocity damping term.

virtual void setAdhesion(PxReal adhesion) = 0

Sets adhesion term.

See also

getAdhesion

Parameters

adhesion[in] adhesion coefficient. Range: [0, PX_MAX_F32)

virtual PxReal getAdhesion() const = 0

Retrieves the adhesion term.

See also

setAdhesion()

Returns

The adhesion term.

virtual void setGravityScale(PxReal scale) = 0

Sets gravity scale term.

See also

getAdhesion

Parameters

scale[in] gravity scale coefficient. Range: (-PX_MAX_F32, PX_MAX_F32)

virtual PxReal getGravityScale() const = 0

Retrieves the gravity scale term.

See also

setAdhesion()

Returns

The gravity scale term.

virtual void setAdhesionRadiusScale(PxReal scale) = 0

Sets material adhesion radius scale.

This is multiplied by the particle rest offset to compute the fall-off distance at which point adhesion ceases to operate.

Parameters

scale[in] Material adhesion radius scale. Range: [0, PX_MAX_F32)

virtual PxReal getAdhesionRadiusScale() const = 0

Retrieves the adhesion radius scale.

Returns

The adhesion radius scale.

virtual void release() = 0

Decrements the reference count of the object and releases it if the new reference count is zero.

virtual PxU32 getReferenceCount() const = 0

Returns the reference count of the object.

At creation, the reference count of the object is 1. Every other object referencing this object increments the count by 1. When the reference count reaches 0, and only then, the object gets destroyed automatically.

Returns

the current reference count.

virtual void acquireReference() = 0

Acquires a counted reference to this object.

This method increases the reference count of the object by 1. Decrement the reference count by calling release()

template<class T>
inline T *is()
template<class T>
inline const T *is() const
inline PxType getConcreteType() const

Returns concrete type of object.

See also

PxConcreteType

Returns

PxConcreteType::Enum of serialized object

inline void setBaseFlag(PxBaseFlag::Enum flag, bool value)

Set PxBaseFlag

Parameters
  • flag[in] The flag to be set

  • value[in] The flags new value

inline void setBaseFlags(PxBaseFlags inFlags)

Set PxBaseFlags

See also

PxBaseFlags

Parameters

inFlags[in] The flags to be set

inline PxBaseFlags getBaseFlags() const

Returns PxBaseFlags.

See also

PxBaseFlags

Returns

PxBaseFlags

inline virtual bool isReleasable() const

Whether the object is subordinate.

A class is subordinate, if it can only be instantiated in the context of another class.

Returns

Whether the class is subordinate

Public Members

void *userData

user can assign this to whatever, usually to create a 1:1 relationship with a user object.

Protected Functions

inline PxPBDMaterial(PxType concreteType, PxBaseFlags baseFlags)
inline PxPBDMaterial(PxBaseFlags baseFlags)
inline virtual ~PxPBDMaterial()
inline virtual bool isKindOf(const char *name) const

Returns whether a given type name matches with the type of this instance.

inline virtual void onRefCountZero()
template<class T>
inline bool typeMatch() const

Protected Attributes

PxType mConcreteType
PxBaseFlags mBaseFlags
PxU32 mBuiltInRefCount