RavEngine
Loading...
Searching...
No Matches
physx::PxRefCounted Class Referenceabstract

Base class for ref-counted objects. More...

#include <PxBase.h>

Inheritance diagram for physx::PxRefCounted:
[legend]
Collaboration diagram for physx::PxRefCounted:
[legend]

Public Member Functions

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.
 
virtual void acquireReference ()=0
 Acquires a counted reference to this object.
 
- Public Member Functions inherited from physx::PxBase
virtual const char * getConcreteTypeName () const =0
 Returns string name of dynamic type.
 
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.
 

Protected Member Functions

virtual void onRefCountZero ()
 
PX_INLINE PxRefCounted (PxType concreteType, PxBaseFlags baseFlags)
 
PX_INLINE PxRefCounted (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::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
 

Additional Inherited Members

- Protected Attributes inherited from physx::PxBase
PxType mConcreteType
 
PxBaseFlags mBaseFlags
 
PxU32 mBuiltInRefCount
 

Detailed Description

Base class for ref-counted objects.

Member Function Documentation

◆ acquireReference()

virtual void physx::PxRefCounted::acquireReference ( )
pure 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()

Implemented in physx::Gu::ConvexMesh, physx::Gu::HeightField, physx::Gu::SoftBodyAuxData, physx::Gu::TetrahedronMesh, physx::Gu::SoftBodyMesh, physx::Gu::TriangleMesh, physx::NpFEMSoftBodyMaterial, physx::NpMaterial, physx::NpPBDMaterial, and physx::NpShape.

◆ getReferenceCount()

virtual PxU32 physx::PxRefCounted::getReferenceCount ( ) const
pure 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.

Implemented in physx::Gu::ConvexMesh, physx::Gu::HeightField, physx::Gu::SoftBodyAuxData, physx::Gu::TetrahedronMesh, physx::Gu::SoftBodyMesh, physx::Gu::TriangleMesh, physx::NpFEMSoftBodyMaterial, physx::NpMaterial, physx::NpPBDMaterial, and physx::NpShape.

◆ isKindOf()

◆ release()


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