RavEngine
Loading...
Searching...
No Matches
physx::Sq::CompoundPruner Class Referenceabstract

#include <SqPruner.h>

Inheritance diagram for physx::Sq::CompoundPruner:
[legend]
Collaboration diagram for physx::Sq::CompoundPruner:
[legend]

Public Member Functions

virtual bool addCompound (Gu::PrunerHandle *results, const Gu::BVH &bvh, PrunerCompoundId compoundId, const PxTransform &transform, bool isDynamic, const Gu::PrunerPayload *data, const PxTransform *transforms)=0
 Adds compound to the pruner.
 
virtual bool removeCompound (PrunerCompoundId compoundId, Gu::PrunerPayloadRemovalCallback *removalCallback)=0
 
virtual bool updateCompound (PrunerCompoundId compoundId, const PxTransform &transform)=0
 
virtual void updateObjectAfterManualBoundsUpdates (PrunerCompoundId compoundId, const Gu::PrunerHandle handle)=0
 
virtual void removeObject (PrunerCompoundId compoundId, const Gu::PrunerHandle handle, Gu::PrunerPayloadRemovalCallback *removalCallback)=0
 
virtual bool addObject (PrunerCompoundId compoundId, Gu::PrunerHandle &result, const PxBounds3 &bounds, const Gu::PrunerPayload userData, const PxTransform &transform)=0
 Adds object to the pruner.
 
virtual bool raycast (const PxVec3 &origin, const PxVec3 &unitDir, PxReal &inOutDistance, CompoundPrunerRaycastCallback &, PxCompoundPrunerQueryFlags flags) const =0
 
virtual bool overlap (const Gu::ShapeData &queryVolume, CompoundPrunerOverlapCallback &, PxCompoundPrunerQueryFlags flags) const =0
 
virtual bool sweep (const Gu::ShapeData &queryVolume, const PxVec3 &unitDir, PxReal &inOutDistance, CompoundPrunerRaycastCallback &, PxCompoundPrunerQueryFlags flags) const =0
 
virtual const Gu::PrunerPayload & getPayloadData (Gu::PrunerHandle handle, PrunerCompoundId compoundId, Gu::PrunerPayloadData *data) const =0
 Retrieves the object's payload and data associated with the handle.
 
virtual void preallocate (PxU32 nbEntries)=0
 Preallocate space.
 
virtual bool setTransform (Gu::PrunerHandle handle, PrunerCompoundId compoundId, const PxTransform &transform)=0
 
virtual const PxTransform & getTransform (PrunerCompoundId compoundId) const =0
 
virtual void visualizeEx (PxRenderOutput &out, PxU32 color, bool drawStatic, bool drawDynamic) const =0
 
- Public Member Functions inherited from physx::Gu::BasePruner
virtual void shiftOrigin (const PxVec3 &shift)=0
 
virtual void visualize (PxRenderOutput &, PxU32, PxU32) const
 
- 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)
 

Detailed Description

Pruner holding compound objects

Member Function Documentation

◆ addCompound()

virtual bool physx::Sq::CompoundPruner::addCompound ( Gu::PrunerHandle *  results,
const Gu::BVH &  bvh,
PrunerCompoundId  compoundId,
const PxTransform &  transform,
bool  isDynamic,
const Gu::PrunerPayload *  data,
const PxTransform *  transforms 
)
pure virtual

Adds compound to the pruner.

Parameters
results[out] an array for resulting handles
bvh[in] BVH
compoundId[in] compound id
transform[in] compound transform
data[in] an array of object data
Returns
true if success, false if internal allocation failed. The first failing add results in a INVALID_PRUNERHANDLE.

Handles are usable as indices. Each handle is either be a recycled handle returned by the client via removeObjects(), or a fresh handle that is either zero, or one greater than the last fresh handle returned.

Implemented in physx::Sq::BVHCompoundPruner.

◆ addObject()

virtual bool physx::Sq::CompoundPruner::addObject ( PrunerCompoundId  compoundId,
Gu::PrunerHandle &  result,
const PxBounds3 &  bounds,
const Gu::PrunerPayload  userData,
const PxTransform &  transform 
)
pure virtual

Adds object to the pruner.

Parameters
compoundId[in] compound that the object belongs to
result[out] an array for resulting handles
bounds[in] an array of bounds. These bounds are used as-is so they should be pre-inflated if inflation is needed.
userData[in] an array of object data
Returns
true if success, false if internal allocation failed. The first failing add results in a INVALID_PRUNERHANDLE.

Implemented in physx::Sq::BVHCompoundPruner.

◆ getPayloadData()

virtual const Gu::PrunerPayload & physx::Sq::CompoundPruner::getPayloadData ( Gu::PrunerHandle  handle,
PrunerCompoundId  compoundId,
Gu::PrunerPayloadData *  data 
) const
pure virtual

Retrieves the object's payload and data associated with the handle.

This function returns the payload associated with a given handle. Additionally it can return the destination addresses for the object's bounds & transform. The user can then write the new bounds and transform there, before eventually calling updateObjects().

Parameters
[in]handleObject handle (initially returned by addObjects())
[in]compoundIdThe compound id
[out]dataOptional location where to store the internal data associated with the payload.
Returns
The payload associated with the given handle.

Implemented in physx::Sq::BVHCompoundPruner.

◆ preallocate()

virtual void physx::Sq::CompoundPruner::preallocate ( PxU32  nbEntries)
pure virtual

Preallocate space.

Parameters
[in]nbEntriesThe number of entries to preallocate space for

Implemented in physx::Sq::BVHCompoundPruner.

◆ raycast()

virtual bool physx::Sq::CompoundPruner::raycast ( const PxVec3 &  origin,
const PxVec3 &  unitDir,
PxReal &  inOutDistance,
CompoundPrunerRaycastCallback &  ,
PxCompoundPrunerQueryFlags  flags 
) const
pure virtual

Query functions

Note: return value may disappear if PrunerCallback contains the necessary information currently it is still used for the dynamic pruner internally (to decide if added objects must be queried)

Implemented in physx::Sq::BVHCompoundPruner.

◆ removeCompound()

virtual bool physx::Sq::CompoundPruner::removeCompound ( PrunerCompoundId  compoundId,
Gu::PrunerPayloadRemovalCallback *  removalCallback 
)
pure virtual

Removes compound from the pruner.

Parameters
compoundId[in] compound to remove

Implemented in physx::Sq::BVHCompoundPruner.

◆ removeObject()

virtual void physx::Sq::CompoundPruner::removeObject ( PrunerCompoundId  compoundId,
const Gu::PrunerHandle  handle,
Gu::PrunerPayloadRemovalCallback *  removalCallback 
)
pure virtual

Removes object from compound pruner.

Parameters
compoundId[in] compound that the object belongs to
handle[in] the object to remove

Implemented in physx::Sq::BVHCompoundPruner.

◆ updateCompound()

virtual bool physx::Sq::CompoundPruner::updateCompound ( PrunerCompoundId  compoundId,
const PxTransform &  transform 
)
pure virtual

Updates compound object

Parameters
compoundId[in] compound to update
transform[in] compound transformation

Implemented in physx::Sq::BVHCompoundPruner.

◆ updateObjectAfterManualBoundsUpdates()

virtual void physx::Sq::CompoundPruner::updateObjectAfterManualBoundsUpdates ( PrunerCompoundId  compoundId,
const Gu::PrunerHandle  handle 
)
pure virtual

Updates object after manually updating their bounds via "getPayload" calls.

Parameters
compoundId[in] compound that the object belongs to
handle[in] the object to update

Implemented in physx::Sq::BVHCompoundPruner.


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