PxPruningStructure#
Defined in include/PxPruningStructure.h
-
class PxPruningStructure : public PxBase#
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.
See also
Note
PxPruningStructure objects can be added to a collection and get serialized.
Note
Adding a PxPruningStructure object to a collection will also add the actors that were used to build the pruning structure.
Note
PxPruningStructure must be released before its rigid actors.
Note
PxRigidBody objects can be in one PxPruningStructure only.
Note
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.
Public Functions
-
virtual void release() = 0#
Release this object.
- virtual PxU32 getRigidActors(
- PxRigidActor **userBuffer,
- PxU32 bufferSize,
- PxU32 startIndex = 0,
Retrieve rigid actors in the pruning structure.
You can retrieve the number of rigid actor pointers by calling getNbRigidActors()
See also
- Parameters:
userBuffer – [out] The buffer to store the actor pointers.
bufferSize – [in] Size of provided user buffer.
startIndex – [in] Index of first actor pointer to be retrieved
- Returns:
Number of rigid actor pointers written to the buffer.
-
virtual PxU32 getNbRigidActors() const = 0#
Returns the number of rigid actors in the pruning structure.
You can use getRigidActors() to retrieve the rigid actor pointers.
See also
- Returns:
Number of rigid actors in the pruning structure.
-
virtual const void *getStaticMergeData() const = 0#
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.
See also
- Returns:
Implementation-dependent merge data for static actors.
-
virtual const void *getDynamicMergeData() const = 0#
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.
See also
- Returns:
Implementation-dependent merge data for dynamic actors.
- inline virtual const char *getConcreteTypeName(
Returns string name of dynamic type.
- Returns:
Class name of most derived type of this object.
-
inline PxType getConcreteType() const#
Returns concrete type of object.
See also
- 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.
See also
- Returns:
Whether the class is subordinate
Protected Functions
- inline PxPruningStructure(
- PxType concreteType,
- PxBaseFlags baseFlags,
-
inline PxPruningStructure(PxBaseFlags baseFlags)#
-
inline virtual ~PxPruningStructure()#
-
inline virtual bool isKindOf(const char *name) const#
Returns whether a given type name matches with the type of this instance.
-
template<class T>
inline bool typeMatch() const#
-
virtual void release() = 0#