RavEngine
Loading...
Searching...
No Matches
physx::NpMaterial Class Reference
Inheritance diagram for physx::NpMaterial:
[legend]
Collaboration diagram for physx::NpMaterial:
[legend]

Public Member Functions

 NpMaterial (PxBaseFlags baseFlags)
 
virtual void resolveReferences (PxDeserializationContext &context)
 
void preExportDataReset ()
 
void exportExtraData (PxSerializationContext &)
 
void importExtraData (PxDeserializationContext &)
 
virtual void requiresObjects (PxProcessPxBaseCallback &)
 
 NpMaterial (const PxsMaterialCore &desc)
 
virtual void release () PX_OVERRIDE
 Decrements the reference count of the object and releases it if the new reference count is zero.

 
virtual void acquireReference () PX_OVERRIDE
 Acquires a counted reference to this object.
 
virtual PxU32 getReferenceCount () const PX_OVERRIDE
 Returns the reference count of the object.
 
virtual void onRefCountZero () PX_OVERRIDE
 
virtual void setDynamicFriction (PxReal) PX_OVERRIDE
 Sets the coefficient of dynamic friction.
 
virtual PxReal getDynamicFriction () const PX_OVERRIDE
 Retrieves the DynamicFriction value.
 
virtual void setStaticFriction (PxReal) PX_OVERRIDE
 Sets the coefficient of static friction.
 
virtual PxReal getStaticFriction () const PX_OVERRIDE
 Retrieves the coefficient of static friction.
 
virtual void setRestitution (PxReal) PX_OVERRIDE
 Sets the coefficient of restitution.
 
virtual PxReal getRestitution () const PX_OVERRIDE
 Retrieves the coefficient of restitution.

 
virtual void setDamping (PxReal) PX_OVERRIDE
 Sets the coefficient of damping.
 
virtual PxReal getDamping () const PX_OVERRIDE
 Retrieves the coefficient of damping.
 
virtual void setFlag (PxMaterialFlag::Enum flag, bool value) PX_OVERRIDE
 Raises or clears a particular material flag.
 
virtual void setFlags (PxMaterialFlags inFlags) PX_OVERRIDE
 sets all the material flags.
 
virtual PxMaterialFlags getFlags () const PX_OVERRIDE
 Retrieves the flags. See #PxMaterialFlag.
 
virtual void setFrictionCombineMode (PxCombineMode::Enum) PX_OVERRIDE
 Sets the friction combine mode.
 
virtual PxCombineMode::Enum getFrictionCombineMode () const PX_OVERRIDE
 Retrieves the friction combine mode.
 
virtual void setRestitutionCombineMode (PxCombineMode::Enum) PX_OVERRIDE
 Sets the restitution combine mode.
 
virtual PxCombineMode::Enum getRestitutionCombineMode () const PX_OVERRIDE
 Retrieves the restitution combine mode.
 
- Public Member Functions inherited from physx::PxMaterial
virtual const char * getConcreteTypeName () const PX_OVERRIDE
 Returns string name of dynamic type.
 
- Public Member Functions inherited from physx::PxBaseMaterial
PX_INLINE PxBaseMaterial (PxType concreteType, PxBaseFlags baseFlags)
 
PX_INLINE PxBaseMaterial (PxBaseFlags baseFlags)
 
- Public Member Functions inherited from physx::PxBase
template<class T >
T * is ()
 
template<class T >
const T * is () const
 
PX_FORCE_INLINE PxType getConcreteType () const
 Returns concrete type of object.
 
PX_FORCE_INLINE void setBaseFlag (PxBaseFlag::Enum flag, bool value)
 Set PxBaseFlag

 
PX_FORCE_INLINE void setBaseFlags (PxBaseFlags inFlags)
 Set PxBaseFlags

 
PX_FORCE_INLINE PxBaseFlags getBaseFlags () const
 Returns PxBaseFlags.
 
virtual bool isReleasable () const
 Whether the object is subordinate.
 
- Public Member Functions inherited from physx::PxUserAllocated
PX_INLINE void * operator new (size_t, void *address)
 
PX_INLINE void operator delete (void *, void *)
 
template<typename Alloc >
PX_INLINE void * operator new (size_t size, Alloc alloc, const char *fileName, int line)
 
template<typename Alloc >
PX_INLINE void * operator new (size_t size, size_t, Alloc alloc, const char *fileName, int line)
 
template<typename Alloc >
PX_INLINE void * operator new[] (size_t size, Alloc alloc, const char *fileName, int line)
 
template<typename Alloc >
PX_INLINE void * operator new[] (size_t size, size_t, Alloc alloc, const char *fileName, int line)
 
template<typename Alloc >
PX_INLINE void operator delete (void *ptr, Alloc alloc, const char *fileName, int line)
 
template<typename Alloc >
PX_INLINE void operator delete[] (void *ptr, Alloc alloc, const char *fileName, int line)
 
PX_INLINE void operator delete (void *ptr)
 
PX_INLINE void operator delete[] (void *ptr)
 

Static Public Member Functions

static NpMaterial * createObject (PxU8 *&address, PxDeserializationContext &context)
 
static void getBinaryMetaData (PxOutputStream &stream)
 
static PX_FORCE_INLINE void getMaterialIndices (PxMaterial *const *materials, PxU16 *materialIndices, PxU32 materialCount)
 

Public Attributes

PxsMaterialCore mMaterial
 
- Public Attributes inherited from physx::PxBaseMaterial
void * userData
 user can assign this to whatever, usually to create a 1:1 relationship with a user object.
 

Additional Inherited Members

- Protected Member Functions inherited from physx::PxMaterial
PX_INLINE PxMaterial (PxType concreteType, PxBaseFlags baseFlags)
 
PX_INLINE PxMaterial (PxBaseFlags baseFlags)
 
virtual bool isKindOf (const char *name) const
 Returns whether a given type name matches with the type of this instance.
 
- Protected Member Functions inherited from physx::PxRefCounted
PX_INLINE PxRefCounted (PxType concreteType, PxBaseFlags baseFlags)
 
PX_INLINE PxRefCounted (PxBaseFlags baseFlags)
 
- Protected Member Functions inherited from physx::PxBase
PX_INLINE PxBase (PxType concreteType, PxBaseFlags baseFlags)
 Constructor setting concrete type and base flags.
 
PX_INLINE PxBase (PxBaseFlags baseFlags)
 Deserialization constructor setting base flags.
 
virtual ~PxBase ()
 Destructor.
 
template<class T >
bool typeMatch () const
 
- Protected Attributes inherited from physx::PxBase
PxType mConcreteType
 
PxBaseFlags mBaseFlags
 
PxU32 mBuiltInRefCount
 

Member Function Documentation

◆ acquireReference()

void NpMaterial::acquireReference ( )
virtual

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()

Implements physx::PxRefCounted.

◆ getDamping()

PxReal NpMaterial::getDamping ( ) const
virtual

Retrieves the coefficient of damping.

See setDamping.

Returns
The coefficient of damping.
See also
setDamping()

Implements physx::PxMaterial.

◆ getDynamicFriction()

PxReal NpMaterial::getDynamicFriction ( ) const
virtual

Retrieves the DynamicFriction value.

Returns
The coefficient of dynamic friction.
See also
setDynamicFriction

Implements physx::PxMaterial.

◆ getFlags()

PxMaterialFlags NpMaterial::getFlags ( ) const
virtual

Retrieves the flags. See #PxMaterialFlag.

Returns
The material flags.
See also
PxMaterialFlag setFlags()

Implements physx::PxMaterial.

◆ getFrictionCombineMode()

PxCombineMode::Enum NpMaterial::getFrictionCombineMode ( ) const
virtual

Retrieves the friction combine mode.

See setFrictionCombineMode.

Returns
The friction combine mode for this material.
See also
PxCombineMode setFrictionCombineMode()

Implements physx::PxMaterial.

◆ getReferenceCount()

PxU32 NpMaterial::getReferenceCount ( ) const
virtual

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.

Implements physx::PxRefCounted.

◆ getRestitution()

PxReal NpMaterial::getRestitution ( ) const
virtual

Retrieves the coefficient of restitution.

See setRestitution.

Returns
The coefficient of restitution.
See also
setRestitution()

Implements physx::PxMaterial.

◆ getRestitutionCombineMode()

PxCombineMode::Enum NpMaterial::getRestitutionCombineMode ( ) const
virtual

Retrieves the restitution combine mode.

See setRestitutionCombineMode.

Returns
The coefficient of restitution combine mode for this material.
See also
PxCombineMode setRestitutionCombineMode getRestitution()

Implements physx::PxMaterial.

◆ getStaticFriction()

PxReal NpMaterial::getStaticFriction ( ) const
virtual

Retrieves the coefficient of static friction.

Returns
The coefficient of static friction.
See also
setStaticFriction

Implements physx::PxMaterial.

◆ onRefCountZero()

void NpMaterial::onRefCountZero ( )
virtual

Reimplemented from physx::PxRefCounted.

◆ release()

void NpMaterial::release ( )
virtual

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

Implements physx::PxRefCounted.

◆ setDamping()

void NpMaterial::setDamping ( PxReal  damping)
virtual

Sets the coefficient of damping.

This property only affects the simulation if PxMaterialFlag::eCOMPLIANT_CONTACT is raised. Damping works together with spring stiffness (set through a negative restitution value). Spring stiffness corrects positional error while damping resists relative velocity. Setting a high damping coefficient can produce spongy contacts.

Sleeping: Does NOT wake any actors which may be affected.

Parameters
[in]dampingCoefficient of damping. Range: [0,INF]
See also
getDamping()

Implements physx::PxMaterial.

◆ setDynamicFriction()

void NpMaterial::setDynamicFriction ( PxReal  coef)
virtual

Sets the coefficient of dynamic friction.

The coefficient of dynamic friction should be in [0, PX_MAX_F32). If set to greater than staticFriction, the effective value of staticFriction will be increased to match.

Sleeping: Does NOT wake any actors which may be affected.

Parameters
[in]coefCoefficient of dynamic friction. Range: [0, PX_MAX_F32)
See also
getDynamicFriction()

Implements physx::PxMaterial.

◆ setFlag()

void NpMaterial::setFlag ( PxMaterialFlag::Enum  flag,
bool  b 
)
virtual

Raises or clears a particular material flag.

See the list of flags #PxMaterialFlag

Default: eIMPROVED_PATCH_FRICTION

Sleeping: Does NOT wake any actors which may be affected.

Parameters
[in]flagThe PxMaterial flag to raise(set) or clear.
[in]bNew state of the flag
See also
getFlags() setFlags() PxMaterialFlag

Implements physx::PxMaterial.

◆ setFlags()

void NpMaterial::setFlags ( PxMaterialFlags  flags)
virtual

sets all the material flags.

See the list of flags #PxMaterialFlag

Default: eIMPROVED_PATCH_FRICTION

Sleeping: Does NOT wake any actors which may be affected.

Parameters
[in]flagsAll PxMaterial flags
See also
getFlags() setFlag() PxMaterialFlag

Implements physx::PxMaterial.

◆ setFrictionCombineMode()

void NpMaterial::setFrictionCombineMode ( PxCombineMode::Enum  combMode)
virtual

Sets the friction combine mode.

See the enum ::PxCombineMode .

Default: PxCombineMode::eAVERAGE

Sleeping: Does NOT wake any actors which may be affected.

Parameters
[in]combModeFriction combine mode to set for this material. See #PxCombineMode.
See also
PxCombineMode getFrictionCombineMode setStaticFriction() setDynamicFriction()

Implements physx::PxMaterial.

◆ setRestitution()

void NpMaterial::setRestitution ( PxReal  rest)
virtual

Sets the coefficient of restitution.

A coefficient of 0 makes the object bounce as little as possible, higher values up to 1.0 result in more bounce.

This property is overloaded when PxMaterialFlag::eCOMPLIANT_CONTACT flag is enabled. This permits negative values for restitution to be provided. The negative values are converted into spring stiffness terms for an implicit spring simulated at the contact site, with the spring positional error defined by the contact separation value. Higher stiffness terms produce stiffer springs that behave more like a rigid contact.

Sleeping: Does NOT wake any actors which may be affected.

Parameters
[in]restCoefficient of restitution. Range: [-INF,1]
See also
getRestitution()

Implements physx::PxMaterial.

◆ setRestitutionCombineMode()

void NpMaterial::setRestitutionCombineMode ( PxCombineMode::Enum  combMode)
virtual

Sets the restitution combine mode.

See the enum ::PxCombineMode .

Default: PxCombineMode::eAVERAGE

Sleeping: Does NOT wake any actors which may be affected.

Parameters
[in]combModeRestitution combine mode for this material. See #PxCombineMode.
See also
PxCombineMode getRestitutionCombineMode() setRestitution()

Implements physx::PxMaterial.

◆ setStaticFriction()

void NpMaterial::setStaticFriction ( PxReal  coef)
virtual

Sets the coefficient of static friction.

The coefficient of static friction should be in the range [0, PX_MAX_F32)

Sleeping: Does NOT wake any actors which may be affected.

Parameters
[in]coefCoefficient of static friction. Range: [0, PX_MAX_F32)
See also
getStaticFriction()

Implements physx::PxMaterial.


The documentation for this class was generated from the following files: