diff --git a/src/BulletSoftBody/btSoftBody.cpp b/src/BulletSoftBody/btSoftBody.cpp index fe66d33ee..df50d2664 100644 --- a/src/BulletSoftBody/btSoftBody.cpp +++ b/src/BulletSoftBody/btSoftBody.cpp @@ -3368,11 +3368,8 @@ const char* btSoftBody::serialize(void* dataBuffer, class btSerializer* serializ for (int i=0;im_jointType = (int)m_joints[i]->Type(); - m_joints[i]->m_massmatrix.serializeFloat(memPtr->m_massmatrix); m_joints[i]->m_refs[0].serializeFloat(memPtr->m_refs[0]); m_joints[i]->m_refs[1].serializeFloat(memPtr->m_refs[1]); - m_joints[i]->m_drift.serializeFloat(memPtr->m_drift); - m_joints[i]->m_sdrift.serializeFloat(memPtr->m_sdrift); memPtr->m_cfm = m_joints[i]->m_cfm; memPtr->m_erp = m_joints[i]->m_erp; memPtr->m_split = m_joints[i]->m_split; @@ -3382,10 +3379,7 @@ const char* btSoftBody::serialize(void* dataBuffer, class btSerializer* serializ { memPtr->m_relPosition[0].m_floats[j] = 0.f; memPtr->m_relPosition[1].m_floats[j] = 0.f; - memPtr->m_axis[0].m_floats[j] = 0.f; - memPtr->m_axis[1].m_floats[j] = 0.f; } - memPtr->m_bodyA = 0; memPtr->m_bodyB = 0; if (m_joints[i]->m_bodies[0].m_soft) @@ -3419,27 +3413,6 @@ const char* btSoftBody::serialize(void* dataBuffer, class btSerializer* serializ memPtr->m_bodyBtype = BT_JOINT_RIGID_BODY; memPtr->m_bodyB = serializer->getUniquePointer((void*)m_joints[i]->m_bodies[1].m_rigid); } - - switch (m_joints[i]->Type()) - { - case btSoftBody::Joint::eType::Linear: - { - btSoftBody::LJoint* lj = (btSoftBody::LJoint*)m_joints[i]; - lj->m_rpos[0].serializeFloat(memPtr->m_relPosition[0]); - lj->m_rpos[1].serializeFloat(memPtr->m_relPosition[1]); - break; - } - case btSoftBody::Joint::eType::Angular: - { - btSoftBody::AJoint* aj = (btSoftBody::AJoint*) m_joints[i]; - aj->m_axis[0].serializeFloat(memPtr->m_axis[0]); - aj->m_axis[1].serializeFloat(memPtr->m_axis[1]); - break; - } - default: - { - } - }; } serializer->finalizeChunk(chunk,"btSoftBodyJointData",BT_ARRAY_CODE,(void*) &m_joints[0]); } diff --git a/src/BulletSoftBody/btSoftBodyData.h b/src/BulletSoftBody/btSoftBodyData.h index f1e9de9f5..a2fde77a6 100644 --- a/src/BulletSoftBody/btSoftBodyData.h +++ b/src/BulletSoftBody/btSoftBodyData.h @@ -173,18 +173,14 @@ enum btSoftJointBodyType struct btSoftBodyJointData { - btMatrix3x3FloatData m_massmatrix; void *m_bodyA; void *m_bodyB; btVector3FloatData m_refs[2]; - btVector3FloatData m_drift; - btVector3FloatData m_sdrift; float m_cfm; float m_erp; float m_split; int m_delete; btVector3FloatData m_relPosition[2];//linear - btVector3FloatData m_axis[2];//angular int m_bodyAtype; int m_bodyBtype; int m_jointType; diff --git a/src/LinearMath/btSerializer.cpp b/src/LinearMath/btSerializer.cpp index b833bf841..0bca9f3d8 100644 --- a/src/LinearMath/btSerializer.cpp +++ b/src/LinearMath/btSerializer.cpp @@ -1,5 +1,5 @@ unsigned char sBulletDNAstr[]= { -83,68,78,65,78,65,77,69,44,1,0,0,109,95,115,105,122,101,0,109, +83,68,78,65,78,65,77,69,40,1,0,0,109,95,115,105,122,101,0,109, 95,99,97,112,97,99,105,116,121,0,42,109,95,100,97,116,97,0,109,95, 99,111,108,108,105,115,105,111,110,83,104,97,112,101,115,0,109,95,99,111, 108,108,105,115,105,111,110,79,98,106,101,99,116,115,0,109,95,99,111,110, @@ -214,12 +214,10 @@ unsigned char sBulletDNAstr[]= { 102,67,111,108,108,105,115,105,111,110,73,109,112,117,108,115,101,70,97,99, 116,111,114,0,109,95,99,111,110,116,97,105,110,115,65,110,99,104,111,114, 0,109,95,99,111,108,108,105,100,101,0,109,95,99,108,117,115,116,101,114, -73,110,100,101,120,0,109,95,109,97,115,115,109,97,116,114,105,120,0,42, -109,95,98,111,100,121,65,0,42,109,95,98,111,100,121,66,0,109,95,114, -101,102,115,91,50,93,0,109,95,100,114,105,102,116,0,109,95,115,100,114, -105,102,116,0,109,95,99,102,109,0,109,95,101,114,112,0,109,95,115,112, -108,105,116,0,109,95,100,101,108,101,116,101,0,109,95,114,101,108,80,111, -115,105,116,105,111,110,91,50,93,0,109,95,97,120,105,115,91,50,93,0, +73,110,100,101,120,0,42,109,95,98,111,100,121,65,0,42,109,95,98,111, +100,121,66,0,109,95,114,101,102,115,91,50,93,0,109,95,99,102,109,0, +109,95,101,114,112,0,109,95,115,112,108,105,116,0,109,95,100,101,108,101, +116,101,0,109,95,114,101,108,80,111,115,105,116,105,111,110,91,50,93,0, 109,95,98,111,100,121,65,116,121,112,101,0,109,95,98,111,100,121,66,116, 121,112,101,0,109,95,106,111,105,110,116,84,121,112,101,0,42,109,95,112, 111,115,101,0,42,42,109,95,109,97,116,101,114,105,97,108,115,0,42,109, @@ -308,7 +306,7 @@ unsigned char sBulletDNAstr[]= { 24,0,60,0,60,0,16,0,64,0,68,0,-56,1,-8,0,-32,1,-104,3, 8,0,44,0,0,0,76,0,108,0,84,1,-44,0,-52,0,-12,0,84,1, -60,0,16,0,100,0,20,0,36,0,100,0,92,0,104,0,-64,0,92,1, --40,0,-92,1,83,84,82,67,59,0,0,0,10,0,3,0,4,0,0,0, +104,0,-92,1,83,84,82,67,59,0,0,0,10,0,3,0,4,0,0,0, 4,0,1,0,9,0,2,0,11,0,3,0,10,0,3,0,10,0,4,0, 10,0,5,0,12,0,2,0,9,0,6,0,9,0,7,0,13,0,1,0, 7,0,8,0,14,0,1,0,8,0,8,0,15,0,1,0,13,0,9,0, @@ -402,17 +400,17 @@ unsigned char sBulletDNAstr[]= { 7,0,-5,0,4,0,-4,0,4,0,-3,0,4,0,-2,0,7,0,-1,0, 7,0,0,1,4,0,1,1,4,0,2,1,7,0,3,1,7,0,4,1, 7,0,5,1,7,0,6,1,7,0,7,1,7,0,8,1,4,0,9,1, -4,0,10,1,4,0,11,1,68,0,16,0,15,0,12,1,9,0,13,1, -9,0,14,1,13,0,15,1,13,0,16,1,13,0,17,1,7,0,18,1, -7,0,19,1,7,0,20,1,4,0,21,1,13,0,22,1,13,0,23,1, -4,0,24,1,4,0,25,1,4,0,26,1,4,0,-63,0,69,0,19,0, -45,0,119,0,66,0,27,1,59,0,28,1,60,0,29,1,61,0,30,1, -62,0,31,1,63,0,32,1,64,0,33,1,67,0,34,1,68,0,35,1, -4,0,36,1,4,0,-3,0,4,0,37,1,4,0,38,1,4,0,39,1, -4,0,40,1,4,0,41,1,4,0,42,1,65,0,43,1,}; +4,0,10,1,4,0,11,1,68,0,12,0,9,0,12,1,9,0,13,1, +13,0,14,1,7,0,15,1,7,0,16,1,7,0,17,1,4,0,18,1, +13,0,19,1,4,0,20,1,4,0,21,1,4,0,22,1,4,0,-63,0, +69,0,19,0,45,0,119,0,66,0,23,1,59,0,24,1,60,0,25,1, +61,0,26,1,62,0,27,1,63,0,28,1,64,0,29,1,67,0,30,1, +68,0,31,1,4,0,32,1,4,0,-3,0,4,0,33,1,4,0,34,1, +4,0,35,1,4,0,36,1,4,0,37,1,4,0,38,1,65,0,39,1, +}; int sBulletDNAlen= sizeof(sBulletDNAstr); unsigned char sBulletDNAstr64[]= { -83,68,78,65,78,65,77,69,44,1,0,0,109,95,115,105,122,101,0,109, +83,68,78,65,78,65,77,69,40,1,0,0,109,95,115,105,122,101,0,109, 95,99,97,112,97,99,105,116,121,0,42,109,95,100,97,116,97,0,109,95, 99,111,108,108,105,115,105,111,110,83,104,97,112,101,115,0,109,95,99,111, 108,108,105,115,105,111,110,79,98,106,101,99,116,115,0,109,95,99,111,110, @@ -627,12 +625,10 @@ unsigned char sBulletDNAstr64[]= { 102,67,111,108,108,105,115,105,111,110,73,109,112,117,108,115,101,70,97,99, 116,111,114,0,109,95,99,111,110,116,97,105,110,115,65,110,99,104,111,114, 0,109,95,99,111,108,108,105,100,101,0,109,95,99,108,117,115,116,101,114, -73,110,100,101,120,0,109,95,109,97,115,115,109,97,116,114,105,120,0,42, -109,95,98,111,100,121,65,0,42,109,95,98,111,100,121,66,0,109,95,114, -101,102,115,91,50,93,0,109,95,100,114,105,102,116,0,109,95,115,100,114, -105,102,116,0,109,95,99,102,109,0,109,95,101,114,112,0,109,95,115,112, -108,105,116,0,109,95,100,101,108,101,116,101,0,109,95,114,101,108,80,111, -115,105,116,105,111,110,91,50,93,0,109,95,97,120,105,115,91,50,93,0, +73,110,100,101,120,0,42,109,95,98,111,100,121,65,0,42,109,95,98,111, +100,121,66,0,109,95,114,101,102,115,91,50,93,0,109,95,99,102,109,0, +109,95,101,114,112,0,109,95,115,112,108,105,116,0,109,95,100,101,108,101, +116,101,0,109,95,114,101,108,80,111,115,105,116,105,111,110,91,50,93,0, 109,95,98,111,100,121,65,116,121,112,101,0,109,95,98,111,100,121,66,116, 121,112,101,0,109,95,106,111,105,110,116,84,121,112,101,0,42,109,95,112, 111,115,101,0,42,42,109,95,109,97,116,101,114,105,97,108,115,0,42,109, @@ -721,7 +717,7 @@ unsigned char sBulletDNAstr64[]= { 32,0,64,0,64,0,16,0,72,0,80,0,-40,1,8,1,-16,1,-88,3, 8,0,56,0,0,0,88,0,120,0,96,1,-32,0,-40,0,0,1,96,1, -48,0,16,0,104,0,24,0,40,0,104,0,96,0,104,0,-56,0,104,1, --32,0,-40,1,83,84,82,67,59,0,0,0,10,0,3,0,4,0,0,0, +112,0,-40,1,83,84,82,67,59,0,0,0,10,0,3,0,4,0,0,0, 4,0,1,0,9,0,2,0,11,0,3,0,10,0,3,0,10,0,4,0, 10,0,5,0,12,0,2,0,9,0,6,0,9,0,7,0,13,0,1,0, 7,0,8,0,14,0,1,0,8,0,8,0,15,0,1,0,13,0,9,0, @@ -815,12 +811,12 @@ unsigned char sBulletDNAstr64[]= { 7,0,-5,0,4,0,-4,0,4,0,-3,0,4,0,-2,0,7,0,-1,0, 7,0,0,1,4,0,1,1,4,0,2,1,7,0,3,1,7,0,4,1, 7,0,5,1,7,0,6,1,7,0,7,1,7,0,8,1,4,0,9,1, -4,0,10,1,4,0,11,1,68,0,16,0,15,0,12,1,9,0,13,1, -9,0,14,1,13,0,15,1,13,0,16,1,13,0,17,1,7,0,18,1, -7,0,19,1,7,0,20,1,4,0,21,1,13,0,22,1,13,0,23,1, -4,0,24,1,4,0,25,1,4,0,26,1,4,0,-63,0,69,0,19,0, -45,0,119,0,66,0,27,1,59,0,28,1,60,0,29,1,61,0,30,1, -62,0,31,1,63,0,32,1,64,0,33,1,67,0,34,1,68,0,35,1, -4,0,36,1,4,0,-3,0,4,0,37,1,4,0,38,1,4,0,39,1, -4,0,40,1,4,0,41,1,4,0,42,1,65,0,43,1,}; +4,0,10,1,4,0,11,1,68,0,12,0,9,0,12,1,9,0,13,1, +13,0,14,1,7,0,15,1,7,0,16,1,7,0,17,1,4,0,18,1, +13,0,19,1,4,0,20,1,4,0,21,1,4,0,22,1,4,0,-63,0, +69,0,19,0,45,0,119,0,66,0,23,1,59,0,24,1,60,0,25,1, +61,0,26,1,62,0,27,1,63,0,28,1,64,0,29,1,67,0,30,1, +68,0,31,1,4,0,32,1,4,0,-3,0,4,0,33,1,4,0,34,1, +4,0,35,1,4,0,36,1,4,0,37,1,4,0,38,1,65,0,39,1, +}; int sBulletDNAlen64= sizeof(sBulletDNAstr64);