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

A precomputed pruning structure to accelerate scene queries against newly added actors. More...

#include <PxPruningStructure.h>

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

Public Member Functions

virtual void release ()=0
 Release this object.
 
virtual PxU32 getRigidActors (PxRigidActor **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const =0
 Retrieve rigid actors in the pruning structure.
 
virtual PxU32 getNbRigidActors () const =0
 Returns the number of rigid actors in the pruning structure.
 
virtual const void * getStaticMergeData () const =0
 Gets the merge data for static actors.
 
virtual const void * getDynamicMergeData () const =0
 Gets the merge data for dynamic actors.
 
virtual const char * getConcreteTypeName () const
 Returns string name of dynamic type.
 
- 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.
 

Protected Member Functions

PX_INLINE PxPruningStructure (PxType concreteType, PxBaseFlags baseFlags)
 
PX_INLINE PxPruningStructure (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

A precomputed pruning structure to accelerate scene queries against newly added actors.

The pruning structure can be provided to #PxScene:: addActors() in which case it will get merged directly into the scene query optimization AABB tree, thus leading to improved performance when doing queries against the newly added actors. This applies to both static and dynamic actors.

Note
PxPruningStructure objects can be added to a collection and get serialized.
Adding a PxPruningStructure object to a collection will also add the actors that were used to build the pruning structure.
PxPruningStructure must be released before its rigid actors.
PxRigidBody objects can be in one PxPruningStructure only.
Changing the bounds of PxRigidBody objects assigned to a pruning structure that has not been added to a scene yet will invalidate the pruning structure. Same happens if shape scene query flags change or shape gets removed from an actor.
See also
PxScene::addActors PxCollection

Member Function Documentation

◆ getConcreteTypeName()

virtual const char * physx::PxPruningStructure::getConcreteTypeName ( ) const
inlinevirtual

Returns string name of dynamic type.

Returns
Class name of most derived type of this object.

Implements physx::PxBase.

◆ getDynamicMergeData()

virtual const void * physx::PxPruningStructure::getDynamicMergeData ( ) const
pure virtual

Gets the merge data for dynamic actors.

This is mainly called by the PxSceneQuerySystem::merge() function to merge a PxPruningStructure with the internal data-structures of the scene-query system.

Returns
Implementation-dependent merge data for dynamic actors.
See also
PxSceneQuerySystem::merge()

Implemented in physx::Sq::PruningStructure.

◆ getNbRigidActors()

virtual PxU32 physx::PxPruningStructure::getNbRigidActors ( ) const
pure virtual

Returns the number of rigid actors in the pruning structure.

You can use getRigidActors() to retrieve the rigid actor pointers.

Returns
Number of rigid actors in the pruning structure.
See also
PxRigidActor

Implemented in physx::Sq::PruningStructure.

◆ getRigidActors()

virtual PxU32 physx::PxPruningStructure::getRigidActors ( PxRigidActor **  userBuffer,
PxU32  bufferSize,
PxU32  startIndex = 0 
) const
pure virtual

Retrieve rigid actors in the pruning structure.

You can retrieve the number of rigid actor pointers by calling getNbRigidActors()

Parameters
[out]userBufferThe buffer to store the actor pointers.
[in]bufferSizeSize of provided user buffer.
[in]startIndexIndex of first actor pointer to be retrieved
Returns
Number of rigid actor pointers written to the buffer.
See also
PxRigidActor

Implemented in physx::Sq::PruningStructure.

◆ getStaticMergeData()

virtual const void * physx::PxPruningStructure::getStaticMergeData ( ) const
pure virtual

Gets the merge data for static actors.

This is mainly called by the PxSceneQuerySystem::merge() function to merge a PxPruningStructure with the internal data-structures of the scene-query system.

Returns
Implementation-dependent merge data for static actors.
See also
PxSceneQuerySystem::merge()

Implemented in physx::Sq::PruningStructure.

◆ isKindOf()

virtual bool physx::PxPruningStructure::isKindOf ( const char *  superClass) const
inlineprotectedvirtual

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

Reimplemented from physx::PxBase.

◆ release()

virtual void physx::PxPruningStructure::release ( )
pure virtual

Release this object.

Implements physx::PxBase.

Implemented in physx::Sq::PruningStructure.


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