RavEngine
Loading...
Searching...
No Matches
physx::PxBVHDesc Class Reference

Descriptor class for #PxBVH. More...

#include <PxBVHDesc.h>

Collaboration diagram for physx::PxBVHDesc:
[legend]

Public Member Functions

PX_INLINE void setToDefault ()
 Initialize the BVH descriptor.
 
PX_INLINE bool isValid () const
 Returns true if the descriptor is valid.
 

Public Attributes

PxBoundedData bounds
 Pointer to first bounding box.
 
float enlargement
 Bounds enlargement.
 
PxU32 numPrimsPerLeaf
 Max primitives per leaf limit.
 
PxBVHBuildStrategy::Enum buildStrategy
 Desired build strategy for the BVH.
 

Detailed Description

Descriptor class for #PxBVH.

See also
PxBVH

Member Function Documentation

◆ isValid()

PX_INLINE bool physx::PxBVHDesc::isValid ( ) const

Returns true if the descriptor is valid.

Returns
true if the current settings are valid.

Member Data Documentation

◆ buildStrategy

PxBVHBuildStrategy::Enum physx::PxBVHDesc::buildStrategy

Desired build strategy for the BVH.

Default value: eDEFAULT

◆ enlargement

float physx::PxBVHDesc::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

◆ numPrimsPerLeaf

PxU32 physx::PxBVHDesc::numPrimsPerLeaf

Max primitives per leaf limit.

Range: [0, 16)
Default value: 4


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