22 #ifndef __ND_SHAPE_COMPOUND_H__
23 #define __ND_SHAPE_COMPOUND_H__
25 #include "ndCollisionStdafx.h"
30 #define D_COMPOUND_STACK_DEPTH 256
42 class ndTreeArray :
public ndTree<ndNodeBase*, ndInt32, ndContainersFreeListAlloc<ndNodeBase*>>
58 D_COLLISION_API
virtual void BeginAddRemove();
59 D_COLLISION_API
virtual ndTreeArray::ndNode* AddCollision(
ndShapeInstance*
const part);
60 D_COLLISION_API
virtual void EndAddRemove();
70 virtual ndFloat32 GetVolume()
const;
71 virtual ndFloat32 GetBoxMinRadius()
const;
72 virtual ndFloat32 GetBoxMaxRadius()
const;
75 virtual ndVector SupportVertex(
const ndVector& dir, ndInt32*
const vertexIndex)
const;
76 virtual ndVector SupportVertexSpecial(
const ndVector& dir, ndFloat32 skinMargin, ndInt32*
const vertexIndex)
const;
78 virtual ndInt32 CalculatePlaneIntersection(
const ndVector& normal,
const ndVector& point,
ndVector*
const contactsOut)
const;
84 virtual void MassProperties();
85 void ApplyScale(
const ndVector& scale);
87 void ImproveNodeFitness(
ndNodeBase*
const node)
const;
88 ndFloat64 CalculateEntropy(ndInt32 count,
ndNodeBase** array);
96 ndFloat64 m_treeEntropy;
97 ndFloat32 m_boxMinRadius;
98 ndFloat32 m_boxMaxRadius;
113 inline void ndShapeCompound::SetOwner(
const ndShapeInstance*
const instance)
115 m_myInstance = instance;
131 void CalculateAABB();
143 ndTreeArray::ndNode* m_myNode;