I'm passing the following data into the btShapeHull::buildHull:
Code: Select all
- (pointCloud).m_data,8 0x0ac52150 {mVec128={...} m_floats=0x0ac52150 } btVector3 *
- [0] {mVec128={...} m_floats=0x0ac52150 } btVector3
+ mVec128 {0, -0,360922, -1, 4,29651} __m128
- m_floats 0x0ac52150 float [4]
[0] 4.2965055 float
[1] -1.0000000 float
[2] -0.36092195 float
[3] 0.00000000 float
- [1] {mVec128={...} m_floats=0x0ac52160 } btVector3
+ mVec128 {0, 2,79581, -1, -2,51747} __m128
- m_floats 0x0ac52160 float [4]
[0] -2.5174723 float
[1] -1.0000000 float
[2] 2.7958112 float
[3] 0.00000000 float
- [2] {mVec128={...} m_floats=0x0ac52170 } btVector3
+ mVec128 {0, 0,269299, 1, -4,38952} __m128
- m_floats 0x0ac52170 float [4]
[0] -4.3895168 float
[1] 1.0000000 float
[2] 0.26929939 float
[3] 0.00000000 float
- [3] {mVec128={...} m_floats=0x0ac52180 } btVector3
+ mVec128 {0, -2,70419, 1, 2,61048} __m128
- m_floats 0x0ac52180 float [4]
[0] 2.6104834 float
[1] 1.0000000 float
[2] -2.7041886 float
[3] 0.00000000 float
- [4] {mVec128={...} m_floats=0x0ac52190 } btVector3
+ mVec128 {0, -2,70419, -1, 2,61048} __m128
- m_floats 0x0ac52190 float [4]
[0] 2.6104834 float
[1] -1.0000000 float
[2] -2.7041886 float
[3] 0.00000000 float
- [5] {mVec128={...} m_floats=0x0ac521a0 } btVector3
+ mVec128 {0, 2,79581, 1, -2,51747} __m128
- m_floats 0x0ac521a0 float [4]
[0] -2.5174723 float
[1] 1.0000000 float
[2] 2.7958112 float
[3] 0.00000000 float
- [6] {mVec128={...} m_floats=0x0ac521b0 } btVector3
+ mVec128 {0, -0,360922, 1, 4,29651} __m128
- m_floats 0x0ac521b0 float [4]
[0] 4.2965055 float
[1] 1.0000000 float
[2] -0.36092195 float
[3] 0.00000000 float
- [7] {mVec128={...} m_floats=0x0ac521c0 } btVector3
+ mVec128 {0, 0,269299, -1, -4,38952} __m128
- m_floats 0x0ac521c0 float [4]
[0] -4.3895168 float
[1] -1.0000000 float
[2] 0.26929939 float
[3] 0.00000000 float
Passing these vertices by the following code:
btConvexPointCloudShape cloud(&pointCloud[0], 8, btVector3(1.f, 1.f, 1.f), true);
btShapeHull hull(&cloud);
hull.buildHull(0.04f);
cloud.setUserPointer(&hull);
shape = new btConvexHullShape(&(hull.getVertexPointer()->m_floats[0]), hull.numVertices(), sizeof(btVector3));
Results in a shape with 144 indices and 26 vertices. I think that equals to 48 triangles. The vertices that are supplied are created from 8 triangles.
I'm not sure if this is intended, but it surely isn't very optimal. Is there anyway to fine-tune the hull-generation to generate less triangles?
P.S.
I'm sorry I haven't submitted my changes regarding the btCollider refactoring into the cd-pipeline. I'll see if I can get the time to do it during my christmas holidays.
/Simon