|
|
void | release () |
| |
|
void | init (PxU32 nbPrimitives, PxU32 limit) |
| |
|
AABBTreeBuildNode * | getBiNode () |
| |
|
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) |
| |
For complete trees we can predict the final number of nodes and preallocate them. For incomplete trees we can't. But we don't want to allocate nodes one by one (which would be quite slow), so we use this helper class to allocate N nodes at once, while minimizing the amount of nodes allocated for nothing. An initial amount of nodes is estimated using the max number for a complete tree, and the user-defined number of primitives per leaf. In ideal cases this estimated number will be quite close to the final number of nodes. When that number is not enough though, slabs of N=1024 extra nodes are allocated until the build is complete.