Defined in include/cooking/PxBVHDesc.h

class PxBVHDesc

Descriptor class for PxBVH.

See also


Public Functions

inline PxBVHDesc()
inline void setToDefault()

Initialize the BVH descriptor.

inline bool isValid() const

Returns true if the descriptor is valid.


true if the current settings are valid.

Public Members

PxBoundedData bounds

Pointer to first bounding box.

float enlargement

Bounds enlargement.

Passed bounds are slightly enlarged before creating the BVH. This is done to avoid numerical issues when e.g. raycasts just graze the bounds. The performed operation is:

extents = (bounds.maximum - bounds.minimum)/2 enlagedBounds.minimum = passedBounds.minium - extents * enlargement enlagedBounds.maximum = passedBounds.maxium + extents * enlargement

Users can pass pre-enlarged bounds to the BVH builder, in which case just set the enlargement value to zero.

Default value: 0.01

PxU32 numPrimsPerLeaf

Max primitives per leaf limit.

Range: [0, 16)Default value: 4

PxBVHBuildStrategy::Enum buildStrategy

Desired build strategy for the BVH.

Default value: eDEFAULT