#include <PxMaterial.h>
Public Member Functions | |
virtual void | release ()=0 |
Decrements the reference count of a material and releases it if the new reference count is zero. | |
virtual PxU32 | getReferenceCount () const =0 |
Returns the reference count of the material. | |
virtual void | acquireReference ()=0 |
Acquires a counted reference to a material. | |
virtual void | setDynamicFriction (PxReal coef)=0 |
Sets the coefficient of dynamic friction. | |
virtual PxReal | getDynamicFriction () const =0 |
Retrieves the DynamicFriction value. | |
virtual void | setStaticFriction (PxReal coef)=0 |
Sets the coefficient of static friction. | |
virtual PxReal | getStaticFriction () const =0 |
Retrieves the coefficient of static friction. | |
virtual void | setRestitution (PxReal rest)=0 |
Sets the coefficient of restitution. | |
virtual PxReal | getRestitution () const =0 |
Retrieves the coefficient of restitution. | |
virtual void | setFlag (PxMaterialFlag::Enum flag, bool)=0 |
Raises or clears a particular material flag. | |
virtual void | setFlags (PxMaterialFlags inFlags)=0 |
sets all the material flags. | |
virtual PxMaterialFlags | getFlags () const =0 |
Retrieves the flags. See PxMaterialFlag. | |
virtual void | setFrictionCombineMode (PxCombineMode::Enum combMode)=0 |
Sets the friction combine mode. | |
virtual PxCombineMode::Enum | getFrictionCombineMode () const =0 |
Retrieves the friction combine mode. | |
virtual void | setRestitutionCombineMode (PxCombineMode::Enum combMode)=0 |
Sets the restitution combine mode. | |
virtual PxCombineMode::Enum | getRestitutionCombineMode () const =0 |
Retrieves the restitution combine mode. | |
virtual const char * | getConcreteTypeName () const |
Returns string name of dynamic type. | |
Public Attributes | |
void * | userData |
user can assign this to whatever, usually to create a 1:1 relationship with a user object. | |
Protected Member Functions | |
PX_INLINE | PxMaterial (PxType concreteType, PxBaseFlags baseFlags) |
PX_INLINE | PxMaterial (PxBaseFlags baseFlags) |
virtual | ~PxMaterial () |
virtual bool | isKindOf (const char *name) const |
Returns whether a given type name matches with the type of this instance. |
PX_INLINE PxMaterial::PxMaterial | ( | PxType | concreteType, | |
PxBaseFlags | baseFlags | |||
) | [inline, protected] |
PX_INLINE PxMaterial::PxMaterial | ( | PxBaseFlags | baseFlags | ) | [inline, protected] |
virtual PxMaterial::~PxMaterial | ( | ) | [inline, protected, virtual] |
virtual void PxMaterial::acquireReference | ( | ) | [pure virtual] |
Acquires a counted reference to a material.
This method increases the reference count of the material by 1. Decrement the reference count by calling release()
virtual const char* PxMaterial::getConcreteTypeName | ( | ) | const [inline, virtual] |
Returns string name of dynamic type.
Implements PxBase.
virtual PxReal PxMaterial::getDynamicFriction | ( | ) | const [pure virtual] |
Retrieves the DynamicFriction value.
virtual PxMaterialFlags PxMaterial::getFlags | ( | ) | const [pure virtual] |
Retrieves the flags. See PxMaterialFlag.
virtual PxCombineMode::Enum PxMaterial::getFrictionCombineMode | ( | ) | const [pure virtual] |
Retrieves the friction combine mode.
virtual PxU32 PxMaterial::getReferenceCount | ( | ) | const [pure virtual] |
Returns the reference count of the material.
At creation, the reference count of the material is 1. Every shape referencing this material increments the count by 1. When the reference count reaches 0, and only then, the material gets destroyed automatically.
virtual PxReal PxMaterial::getRestitution | ( | ) | const [pure virtual] |
Retrieves the coefficient of restitution.
See setRestitution.
virtual PxCombineMode::Enum PxMaterial::getRestitutionCombineMode | ( | ) | const [pure virtual] |
Retrieves the restitution combine mode.
See setRestitutionCombineMode.
virtual PxReal PxMaterial::getStaticFriction | ( | ) | const [pure virtual] |
Retrieves the coefficient of static friction.
virtual bool PxMaterial::isKindOf | ( | const char * | superClass | ) | const [inline, protected, virtual] |
Returns whether a given type name matches with the type of this instance.
Reimplemented from PxBase.
References PxBase::isKindOf().
virtual void PxMaterial::release | ( | ) | [pure virtual] |
Decrements the reference count of a material and releases it if the new reference count is zero.
Implements PxBase.
virtual void PxMaterial::setDynamicFriction | ( | PxReal | coef | ) | [pure 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.
[in] | coef | Coefficient of dynamic friction. Range: [0, PX_MAX_F32) |
virtual void PxMaterial::setFlag | ( | PxMaterialFlag::Enum | flag, | |
bool | ||||
) | [pure virtual] |
Raises or clears a particular material flag.
See the list of flags PxMaterialFlag
Sleeping: Does NOT wake any actors which may be affected.
[in] | flag | The PxMaterial flag to raise(set) or clear. |
virtual void PxMaterial::setFlags | ( | PxMaterialFlags | inFlags | ) | [pure virtual] |
sets all the material flags.
See the list of flags PxMaterialFlag
Sleeping: Does NOT wake any actors which may be affected.
virtual void PxMaterial::setFrictionCombineMode | ( | PxCombineMode::Enum | combMode | ) | [pure virtual] |
Sets the friction combine mode.
See the enum PxCombineMode .
Sleeping: Does NOT wake any actors which may be affected.
[in] | combMode | Friction combine mode to set for this material. See PxCombineMode. |
virtual void PxMaterial::setRestitution | ( | PxReal | rest | ) | [pure 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.
Sleeping: Does NOT wake any actors which may be affected.
[in] | rest | Coefficient of restitution. Range: [0,1] |
virtual void PxMaterial::setRestitutionCombineMode | ( | PxCombineMode::Enum | combMode | ) | [pure virtual] |
Sets the restitution combine mode.
See the enum PxCombineMode .
Sleeping: Does NOT wake any actors which may be affected.
[in] | combMode | Restitution combine mode for this material. See PxCombineMode. |
virtual void PxMaterial::setStaticFriction | ( | PxReal | coef | ) | [pure 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.
[in] | coef | Coefficient of static friction. Range: [0, PX_MAX_F32) |
void* PxMaterial::userData |
user can assign this to whatever, usually to create a 1:1 relationship with a user object.