22 #ifndef __DG_CONVEXHULL_3D__ 23 #define __DG_CONVEXHULL_3D__ 31 #include "dgQuaternion.h" 34 class dgAABBPointTree3d;
45 mutable dgInt32 m_mark;
54 dgConvexHull3d(
dgMemoryAllocator *
const allocator,
const dgFloat64 *
const vertexCloud, dgInt32 strideInBytes, dgInt32 count, dgFloat64 distTol, dgInt32 maxVertexCount = 0x7fffffff);
57 dgInt32 GetVertexCount()
const;
61 dgFloat64 GetDiagonal()
const;
65 void CalculateVolumeAndSurfaceArea(dgFloat64 &volume, dgFloat64 &surcafeArea)
const;
70 void BuildHull(
const dgFloat64 *
const vertexCloud, dgInt32 strideInBytes, dgInt32 count, dgFloat64 distTol, dgInt32 maxVertexCount);
75 virtual dgListNode *AddFace(dgInt32 i0, dgInt32 i1, dgInt32 i2);
76 virtual void DeleteFace(dgListNode *
const node) ;
77 virtual dgInt32 InitVertexArray(dgHullVertex *
const points,
const dgFloat64 *
const vertexCloud, dgInt32 strideInBytes, dgInt32 count,
void *memoryPool, dgInt32 maxMemSize);
79 void CalculateConvexHull(dgAABBPointTree3d *vertexTree, dgHullVertex *
const points, dgInt32 count, dgFloat64 distTol, dgInt32 maxVertexCount);
80 dgInt32 BuildNormalList(
dgBigVector *
const normalArray)
const;
81 dgInt32 SupportVertex(dgAABBPointTree3d **
const tree,
const dgHullVertex *
const points,
const dgBigVector &dir)
const;
85 dgAABBPointTree3d *BuildTree(dgAABBPointTree3d *
const parent, dgHullVertex *
const points, dgInt32 count, dgInt32 baseIndex, dgInt8 **
const memoryPool, dgInt32 &maxMemSize)
const;
86 static dgInt32 ConvexCompareVertex(
const dgHullVertex *
const A,
const dgHullVertex *
const B,
void *
const context);
89 mutable dgInt32 m_mark;
96 inline dgInt32 dgConvexHull3d::GetVertexCount()
const {
100 inline const dgBigVector *dgConvexHull3d::GetVertexPool()
const {
104 inline const dgBigVector &dgConvexHull3d::GetVertex(dgInt32 index)
const {
105 return m_points[index];
108 inline dgFloat64 dgConvexHull3d::GetDiagonal()
const {
Definition: dgConvexHull3d.h:36
Definition: dgVector.h:86
Definition: dgConvexHull3d.h:52
Definition: dgMemory.h:80
Definition: dgVector.h:104