From 5d8e6dc3f3bc937d2369fc1822cc5b1d83e6a0b6 Mon Sep 17 00:00:00 2001 From: "erwin.coumans" Date: Sun, 24 Jan 2010 16:48:14 +0000 Subject: [PATCH] improved btTriangleMeshShape/btBvhTriangleMeshShape serialization --- Demos/OpenGL/RenderTexture.cpp | 2 +- .../BulletFileLoader/autogenerated/bullet.h | 3 + .../autogenerated/bullet_Common.h | 3 + .../autogenerated/bullet_btMeshPartData.h | 6 +- .../bullet_btShortIntIndexData.h | 40 ++++ .../bullet_btVector3DoubleData.h | 39 ++++ .../autogenerated/bullet_btVector3FloatData.h | 39 ++++ .../BulletFileLoader/btBulletFileLoader.cpp | 28 ++- .../btStridingMeshInterface.cpp | 168 +++++++-------- .../CollisionShapes/btStridingMeshInterface.h | 12 +- src/LinearMath/btSerializer.cpp | 204 +++++++++--------- src/LinearMath/btVector3.h | 10 + 12 files changed, 358 insertions(+), 196 deletions(-) create mode 100644 Extras/Serialize/BulletFileLoader/autogenerated/bullet_btShortIntIndexData.h create mode 100644 Extras/Serialize/BulletFileLoader/autogenerated/bullet_btVector3DoubleData.h create mode 100644 Extras/Serialize/BulletFileLoader/autogenerated/bullet_btVector3FloatData.h diff --git a/Demos/OpenGL/RenderTexture.cpp b/Demos/OpenGL/RenderTexture.cpp index b91db7110..2c8b88b82 100644 --- a/Demos/OpenGL/RenderTexture.cpp +++ b/Demos/OpenGL/RenderTexture.cpp @@ -60,7 +60,7 @@ void renderTexture::grapicalPrintf(char* str, void* fontData, int rasterposx,int { unsigned char packedColor = (fontPtr[i*3+255*256*3-(256*j)*3]); //float colorf = packedColor ? 0.f : 1.f; - float colorf = packedColor/255.;// ? 0.f : 1.f; + float colorf = packedColor/255.f;// ? 0.f : 1.f; btVector4 rgba(colorf,colorf,colorf,1.f); //if (colorf) { diff --git a/Extras/Serialize/BulletFileLoader/autogenerated/bullet.h b/Extras/Serialize/BulletFileLoader/autogenerated/bullet.h index 6cd0756d0..421c6ffd0 100644 --- a/Extras/Serialize/BulletFileLoader/autogenerated/bullet.h +++ b/Extras/Serialize/BulletFileLoader/autogenerated/bullet.h @@ -23,6 +23,8 @@ #include "bullet_btPhysicsSystem.h" #include "bullet_ListBase.h" #include "bullet_btVector3Data.h" +#include "bullet_btVector3FloatData.h" +#include "bullet_btVector3DoubleData.h" #include "bullet_btMatrix3x3Data.h" #include "bullet_btTransformData.h" #include "bullet_btCollisionShapeData.h" @@ -30,6 +32,7 @@ #include "bullet_btPositionAndRadius.h" #include "bullet_btMultiSphereShapeData.h" #include "bullet_btIntIndexData.h" +#include "bullet_btShortIntIndexData.h" #include "bullet_btMeshPartData.h" #include "bullet_btStridingMeshInterfaceData.h" #include "bullet_btTriangleMeshShapeData.h" diff --git a/Extras/Serialize/BulletFileLoader/autogenerated/bullet_Common.h b/Extras/Serialize/BulletFileLoader/autogenerated/bullet_Common.h index 5e42b868d..8cc49ac45 100644 --- a/Extras/Serialize/BulletFileLoader/autogenerated/bullet_Common.h +++ b/Extras/Serialize/BulletFileLoader/autogenerated/bullet_Common.h @@ -30,6 +30,8 @@ namespace Bullet { class btPhysicsSystem; class ListBase; class btVector3Data; + class btVector3FloatData; + class btVector3DoubleData; class btMatrix3x3Data; class btTransformData; class btCollisionShapeData; @@ -37,6 +39,7 @@ namespace Bullet { class btPositionAndRadius; class btMultiSphereShapeData; class btIntIndexData; + class btShortIntIndexData; class btMeshPartData; class btStridingMeshInterfaceData; class btTriangleMeshShapeData; diff --git a/Extras/Serialize/BulletFileLoader/autogenerated/bullet_btMeshPartData.h b/Extras/Serialize/BulletFileLoader/autogenerated/bullet_btMeshPartData.h index 31ce67977..d98de47f5 100644 --- a/Extras/Serialize/BulletFileLoader/autogenerated/bullet_btMeshPartData.h +++ b/Extras/Serialize/BulletFileLoader/autogenerated/bullet_btMeshPartData.h @@ -31,8 +31,10 @@ namespace Bullet { class btMeshPartData { public: - btVector3Data *m_vertices; - btIntIndexData *m_indices; + btVector3FloatData *m_vertices3f; + btVector3DoubleData *m_vertices3d; + btIntIndexData *m_indices32; + btShortIntIndexData *m_indices16; int m_numTriangles; int m_numVertices; }; diff --git a/Extras/Serialize/BulletFileLoader/autogenerated/bullet_btShortIntIndexData.h b/Extras/Serialize/BulletFileLoader/autogenerated/bullet_btShortIntIndexData.h new file mode 100644 index 000000000..3a7ad2447 --- /dev/null +++ b/Extras/Serialize/BulletFileLoader/autogenerated/bullet_btShortIntIndexData.h @@ -0,0 +1,40 @@ +/* Copyright (C) 2006-2009 Erwin Coumans & Charlie C +* +* This software is provided 'as-is', without any express or implied +* warranty. In no event will the authors be held liable for any damages +* arising from the use of this software. +* +* Permission is granted to anyone to use this software for any purpose, +* including commercial applications, and to alter it and redistribute it +* freely, subject to the following restrictions: +* +* 1. The origin of this software must not be misrepresented; you must not +* claim that you wrote the original software. If you use this software +* in a product, an acknowledgment in the product documentation would be +* appreciated but is not required. +* 2. Altered source versions must be plainly marked as such, and must not be +* misrepresented as being the original software. +* 3. This notice may not be removed or altered from any source distribution. +*/ +// Auto generated from makesdna dna.c +#ifndef __BULLET_BTSHORTINTINDEXDATA__H__ +#define __BULLET_BTSHORTINTINDEXDATA__H__ + + +// -------------------------------------------------- // +#include "bullet_Common.h" + +namespace Bullet { + + + // ---------------------------------------------- // + class btShortIntIndexData + { + public: + short int; + short m_value; + }; +} + + +#endif//__BULLET_BTSHORTINTINDEXDATA__H__ diff --git a/Extras/Serialize/BulletFileLoader/autogenerated/bullet_btVector3DoubleData.h b/Extras/Serialize/BulletFileLoader/autogenerated/bullet_btVector3DoubleData.h new file mode 100644 index 000000000..7fb2088fc --- /dev/null +++ b/Extras/Serialize/BulletFileLoader/autogenerated/bullet_btVector3DoubleData.h @@ -0,0 +1,39 @@ +/* Copyright (C) 2006-2009 Erwin Coumans & Charlie C +* +* This software is provided 'as-is', without any express or implied +* warranty. In no event will the authors be held liable for any damages +* arising from the use of this software. +* +* Permission is granted to anyone to use this software for any purpose, +* including commercial applications, and to alter it and redistribute it +* freely, subject to the following restrictions: +* +* 1. The origin of this software must not be misrepresented; you must not +* claim that you wrote the original software. If you use this software +* in a product, an acknowledgment in the product documentation would be +* appreciated but is not required. +* 2. Altered source versions must be plainly marked as such, and must not be +* misrepresented as being the original software. +* 3. This notice may not be removed or altered from any source distribution. +*/ +// Auto generated from makesdna dna.c +#ifndef __BULLET_BTVECTOR3DOUBLEDATA__H__ +#define __BULLET_BTVECTOR3DOUBLEDATA__H__ + + +// -------------------------------------------------- // +#include "bullet_Common.h" + +namespace Bullet { + + + // ---------------------------------------------- // + class btVector3DoubleData + { + public: + double m_floats[4]; + }; +} + + +#endif//__BULLET_BTVECTOR3DOUBLEDATA__H__ diff --git a/Extras/Serialize/BulletFileLoader/autogenerated/bullet_btVector3FloatData.h b/Extras/Serialize/BulletFileLoader/autogenerated/bullet_btVector3FloatData.h new file mode 100644 index 000000000..9b0309c2a --- /dev/null +++ b/Extras/Serialize/BulletFileLoader/autogenerated/bullet_btVector3FloatData.h @@ -0,0 +1,39 @@ +/* Copyright (C) 2006-2009 Erwin Coumans & Charlie C +* +* This software is provided 'as-is', without any express or implied +* warranty. In no event will the authors be held liable for any damages +* arising from the use of this software. +* +* Permission is granted to anyone to use this software for any purpose, +* including commercial applications, and to alter it and redistribute it +* freely, subject to the following restrictions: +* +* 1. The origin of this software must not be misrepresented; you must not +* claim that you wrote the original software. If you use this software +* in a product, an acknowledgment in the product documentation would be +* appreciated but is not required. +* 2. Altered source versions must be plainly marked as such, and must not be +* misrepresented as being the original software. +* 3. This notice may not be removed or altered from any source distribution. +*/ +// Auto generated from makesdna dna.c +#ifndef __BULLET_BTVECTOR3FLOATDATA__H__ +#define __BULLET_BTVECTOR3FLOATDATA__H__ + + +// -------------------------------------------------- // +#include "bullet_Common.h" + +namespace Bullet { + + + // ---------------------------------------------- // + class btVector3FloatData + { + public: + float m_floats[4]; + }; +} + + +#endif//__BULLET_BTVECTOR3FLOATDATA__H__ diff --git a/Extras/Serialize/BulletFileLoader/btBulletFileLoader.cpp b/Extras/Serialize/BulletFileLoader/btBulletFileLoader.cpp index 29faae6ea..1fde7c434 100644 --- a/Extras/Serialize/BulletFileLoader/btBulletFileLoader.cpp +++ b/Extras/Serialize/BulletFileLoader/btBulletFileLoader.cpp @@ -151,12 +151,32 @@ bool btBulletFileLoader::loadFileFromMemory( bParse::btBulletFile* bulletFile2) for (int i=0;im_meshInterface.m_numMeshParts;i++) { btIndexedMesh meshPart; - meshPart.m_triangleIndexStride = 3*sizeof(int); - meshPart.m_vertexStride = sizeof(btVector3Data); + if (trimesh->m_meshInterface.m_meshPartsPtr[i].m_indices32) + { + meshPart.m_indexType = PHY_INTEGER; + meshPart.m_triangleIndexStride = 3*sizeof(int); + meshPart.m_triangleIndexBase = (const unsigned char*)trimesh->m_meshInterface.m_meshPartsPtr[i].m_indices32; + } else + { + meshPart.m_indexType = PHY_SHORT; + meshPart.m_triangleIndexStride = 3*sizeof(short int); + meshPart.m_triangleIndexBase = (const unsigned char*)trimesh->m_meshInterface.m_meshPartsPtr[i].m_indices16; + } + + if (trimesh->m_meshInterface.m_meshPartsPtr[i].m_vertices3f) + { + meshPart.m_vertexType = PHY_FLOAT; + meshPart.m_vertexStride = sizeof(btVector3FloatData); + meshPart.m_vertexBase = (const unsigned char*)trimesh->m_meshInterface.m_meshPartsPtr[i].m_vertices3f; + } else + { + meshPart.m_vertexType = PHY_DOUBLE; + meshPart.m_vertexStride = sizeof(btVector3DoubleData); + meshPart.m_vertexBase = (const unsigned char*)trimesh->m_meshInterface.m_meshPartsPtr[i].m_vertices3d; + } meshPart.m_numTriangles = trimesh->m_meshInterface.m_meshPartsPtr[i].m_numTriangles; meshPart.m_numVertices = trimesh->m_meshInterface.m_meshPartsPtr[i].m_numVertices; - meshPart.m_triangleIndexBase = (const unsigned char*)trimesh->m_meshInterface.m_meshPartsPtr[i].m_indices; - meshPart.m_vertexBase = (const unsigned char*)trimesh->m_meshInterface.m_meshPartsPtr[i].m_vertices; + meshInterface->addIndexedMesh(meshPart); } btVector3 scaling; scaling.deSerialize(trimesh->m_meshInterface.m_scaling); diff --git a/src/BulletCollision/CollisionShapes/btStridingMeshInterface.cpp b/src/BulletCollision/CollisionShapes/btStridingMeshInterface.cpp index 95c87568d..9f7295f14 100644 --- a/src/BulletCollision/CollisionShapes/btStridingMeshInterface.cpp +++ b/src/BulletCollision/CollisionShapes/btStridingMeshInterface.cpp @@ -193,13 +193,13 @@ const char* btStridingMeshInterface::serialize(void* dataBuffer, btSerializer* s void* uniquePtr = 0; trimeshData->m_meshPartsPtr = 0; - + if (trimeshData->m_numMeshParts) { btChunk* chunk = serializer->allocate(sizeof(btMeshPartData),trimeshData->m_numMeshParts); btMeshPartData* memPtr = (btMeshPartData*)chunk->m_oldPtr; trimeshData->m_meshPartsPtr = memPtr; - + int numtotalphysicsverts = 0; int part,graphicssubparts = getNumSubParts(); @@ -220,110 +220,102 @@ const char* btStridingMeshInterface::serialize(void* dataBuffer, btSerializer* s getLockedReadOnlyVertexIndexBase(&vertexbase,numverts,type,stride,&indexbase,indexstride,numtriangles,gfxindextype,part); memPtr->m_numTriangles = numtriangles;//indices = 3*numtriangles memPtr->m_numVertices = numverts; + memPtr->m_indices32 = 0; + memPtr->m_indices16 = 0; + memPtr->m_vertices3f = 0; + memPtr->m_vertices3d = 0; + + switch (gfxindextype) + { + case PHY_INTEGER: + { + int numindices = numtriangles*3; + + if (numindices) + { + btChunk* chunk = serializer->allocate(sizeof(btIntIndexData),numindices); + btIntIndexData* tmpIndices = (btIntIndexData*)chunk->m_oldPtr; + memPtr->m_indices32 = tmpIndices; + for (gfxindex=0;gfxindexfinalizeChunk(chunk,"btIntIndexData",BT_ARRAY_CODE,(void*)chunk->m_oldPtr); + } + break; + } + case PHY_SHORT: + { + int numindices = numtriangles*3; + if (numindices) + { + btChunk* chunk = serializer->allocate(sizeof(btIntIndexData),numindices); + btShortIntIndexData* tmpIndices = (btShortIntIndexData*)chunk->m_oldPtr; + memPtr->m_indices16 = tmpIndices; + for (gfxindex=0;gfxindexfinalizeChunk(chunk,"btShortIntIndexData",BT_ARRAY_CODE,(void*)chunk->m_oldPtr); + } + break; + + } + default: + { + btAssert(0); + //unknown index type + } + } switch (type) { case PHY_FLOAT: { float* graphicsbase; - switch (gfxindextype) + + if (numverts) { - case PHY_INTEGER: + btChunk* chunk = serializer->allocate(sizeof(btVector3FloatData),numverts); + btVector3FloatData* tmpVertices = (btVector3FloatData*) chunk->m_oldPtr; + memPtr->m_vertices3f = tmpVertices; + for (int i=0;im_indices = 0; - if (numindices) - { - btChunk* chunk = serializer->allocate(sizeof(btIntIndexData),numindices); - btIntIndexData* tmpIndices = (btIntIndexData*)chunk->m_oldPtr; - memPtr->m_indices = tmpIndices; - for (gfxindex=0;gfxindexfinalizeChunk(chunk,"btIntIndexData",BT_ARRAY_CODE,(void*)chunk->m_oldPtr); - } - memPtr->m_vertices = 0; - if (numverts) - { - btChunk* chunk = serializer->allocate(sizeof(btVector3Data),numverts); - btVector3Data* tmpVertices = (btVector3Data*) chunk->m_oldPtr; - memPtr->m_vertices = tmpVertices; - for (int i=0;ifinalizeChunk(chunk,"btVector3Data",BT_ARRAY_CODE,(void*)chunk->m_oldPtr); - } - break; + graphicsbase = (float*)(vertexbase+i*stride); + tmpVertices[i].m_floats[0] = graphicsbase[0]; + tmpVertices[i].m_floats[1] = graphicsbase[1]; + tmpVertices[i].m_floats[2] = graphicsbase[2]; } - case PHY_SHORT: - { - for (gfxindex=0;gfxindexfinalizeChunk(chunk,"btVector3FloatData",BT_ARRAY_CODE,(void*)chunk->m_oldPtr); } break; - } + } case PHY_DOUBLE: { - double* graphicsbase; - - switch (gfxindextype) + if (numverts) { - case PHY_INTEGER: - { - for (gfxindex=0;gfxindexallocate(sizeof(btVector3DoubleData),numverts); + btVector3DoubleData* tmpVertices = (btVector3DoubleData*) chunk->m_oldPtr; + memPtr->m_vertices3d = tmpVertices; + for (int i=0;ifinalizeChunk(chunk,"btVector3DoubleData",BT_ARRAY_CODE,(void*)chunk->m_oldPtr); } break; } + default: btAssert((type == PHY_FLOAT) || (type == PHY_DOUBLE)); } diff --git a/src/BulletCollision/CollisionShapes/btStridingMeshInterface.h b/src/BulletCollision/CollisionShapes/btStridingMeshInterface.h index 4f2d25e40..4ae08b748 100644 --- a/src/BulletCollision/CollisionShapes/btStridingMeshInterface.h +++ b/src/BulletCollision/CollisionShapes/btStridingMeshInterface.h @@ -102,10 +102,18 @@ struct btIntIndexData int m_value; }; +struct btShortIntIndexData +{ + short int m_value; +}; + struct btMeshPartData { - btVector3Data *m_vertices; - btIntIndexData *m_indices; + btVector3FloatData *m_vertices3f; + btVector3DoubleData *m_vertices3d; + + btIntIndexData *m_indices32; + btShortIntIndexData *m_indices16; int m_numTriangles;//length of m_indices = 3*m_numTriangles int m_numVertices; }; diff --git a/src/LinearMath/btSerializer.cpp b/src/LinearMath/btSerializer.cpp index cbef74b04..162cb3d15 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,80,0,0,0,109,95,115,105,122,101,0,109, +83,68,78,65,78,65,77,69,83,0,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, @@ -16,105 +16,111 @@ unsigned char sBulletDNAstr[]= { 101,120,73,110,116,101,114,110,97,108,83,104,97,112,101,68,97,116,97,0, 42,109,95,108,111,99,97,108,80,111,115,105,116,105,111,110,65,114,114,97, 121,80,116,114,0,109,95,108,111,99,97,108,80,111,115,105,116,105,111,110, -65,114,114,97,121,83,105,122,101,0,109,95,118,97,108,117,101,0,42,109, -95,118,101,114,116,105,99,101,115,0,42,109,95,105,110,100,105,99,101,115, -0,109,95,110,117,109,84,114,105,97,110,103,108,101,115,0,109,95,110,117, -109,86,101,114,116,105,99,101,115,0,42,109,95,109,101,115,104,80,97,114, -116,115,80,116,114,0,109,95,110,117,109,77,101,115,104,80,97,114,116,115, -0,109,95,115,99,97,108,105,110,103,0,98,116,67,111,108,108,105,115,105, -111,110,83,104,97,112,101,68,97,116,97,0,109,95,109,101,115,104,73,110, -116,101,114,102,97,99,101,0,42,109,95,117,110,115,99,97,108,101,100,80, -111,105,110,116,115,80,116,114,0,109,95,110,117,109,85,110,115,99,97,108, -101,100,80,111,105,110,116,115,0,109,95,119,111,114,108,100,84,114,97,110, -115,102,111,114,109,0,109,95,105,110,116,101,114,112,111,108,97,116,105,111, -110,87,111,114,108,100,84,114,97,110,115,102,111,114,109,0,109,95,105,110, -116,101,114,112,111,108,97,116,105,111,110,76,105,110,101,97,114,86,101,108, -111,99,105,116,121,0,109,95,105,110,116,101,114,112,111,108,97,116,105,111, -110,65,110,103,117,108,97,114,86,101,108,111,99,105,116,121,0,109,95,97, +65,114,114,97,121,83,105,122,101,0,109,95,118,97,108,117,101,0,105,110, +116,0,42,109,95,118,101,114,116,105,99,101,115,51,102,0,42,109,95,118, +101,114,116,105,99,101,115,51,100,0,42,109,95,105,110,100,105,99,101,115, +51,50,0,42,109,95,105,110,100,105,99,101,115,49,54,0,109,95,110,117, +109,84,114,105,97,110,103,108,101,115,0,109,95,110,117,109,86,101,114,116, +105,99,101,115,0,42,109,95,109,101,115,104,80,97,114,116,115,80,116,114, +0,109,95,110,117,109,77,101,115,104,80,97,114,116,115,0,109,95,115,99, +97,108,105,110,103,0,98,116,67,111,108,108,105,115,105,111,110,83,104,97, +112,101,68,97,116,97,0,109,95,109,101,115,104,73,110,116,101,114,102,97, +99,101,0,42,109,95,117,110,115,99,97,108,101,100,80,111,105,110,116,115, +80,116,114,0,109,95,110,117,109,85,110,115,99,97,108,101,100,80,111,105, +110,116,115,0,109,95,119,111,114,108,100,84,114,97,110,115,102,111,114,109, +0,109,95,105,110,116,101,114,112,111,108,97,116,105,111,110,87,111,114,108, +100,84,114,97,110,115,102,111,114,109,0,109,95,105,110,116,101,114,112,111, +108,97,116,105,111,110,76,105,110,101,97,114,86,101,108,111,99,105,116,121, +0,109,95,105,110,116,101,114,112,111,108,97,116,105,111,110,65,110,103,117, +108,97,114,86,101,108,111,99,105,116,121,0,109,95,97,110,105,115,111,116, +114,111,112,105,99,70,114,105,99,116,105,111,110,0,109,95,104,97,115,65, 110,105,115,111,116,114,111,112,105,99,70,114,105,99,116,105,111,110,0,109, -95,104,97,115,65,110,105,115,111,116,114,111,112,105,99,70,114,105,99,116, -105,111,110,0,109,95,99,111,110,116,97,99,116,80,114,111,99,101,115,115, -105,110,103,84,104,114,101,115,104,111,108,100,0,42,109,95,98,114,111,97, -100,112,104,97,115,101,72,97,110,100,108,101,0,42,109,95,99,111,108,108, -105,115,105,111,110,83,104,97,112,101,0,42,109,95,114,111,111,116,67,111, -108,108,105,115,105,111,110,83,104,97,112,101,0,109,95,99,111,108,108,105, -115,105,111,110,70,108,97,103,115,0,109,95,105,115,108,97,110,100,84,97, -103,49,0,109,95,99,111,109,112,97,110,105,111,110,73,100,0,109,95,97, -99,116,105,118,97,116,105,111,110,83,116,97,116,101,49,0,109,95,100,101, -97,99,116,105,118,97,116,105,111,110,84,105,109,101,0,109,95,102,114,105, -99,116,105,111,110,0,109,95,114,101,115,116,105,116,117,116,105,111,110,0, -109,95,105,110,116,101,114,110,97,108,84,121,112,101,0,42,109,95,117,115, -101,114,79,98,106,101,99,116,80,111,105,110,116,101,114,0,109,95,104,105, -116,70,114,97,99,116,105,111,110,0,109,95,99,99,100,83,119,101,112,116, -83,112,104,101,114,101,82,97,100,105,117,115,0,109,95,99,99,100,77,111, -116,105,111,110,84,104,114,101,115,104,111,108,100,0,109,95,99,104,101,99, -107,67,111,108,108,105,100,101,87,105,116,104,0,109,95,99,111,108,108,105, -115,105,111,110,79,98,106,101,99,116,68,97,116,97,0,109,95,105,110,118, -73,110,101,114,116,105,97,84,101,110,115,111,114,87,111,114,108,100,0,109, -95,108,105,110,101,97,114,86,101,108,111,99,105,116,121,0,109,95,97,110, -103,117,108,97,114,86,101,108,111,99,105,116,121,0,109,95,105,110,118,101, -114,115,101,77,97,115,115,0,109,95,97,110,103,117,108,97,114,70,97,99, -116,111,114,0,109,95,108,105,110,101,97,114,70,97,99,116,111,114,0,109, -95,103,114,97,118,105,116,121,0,109,95,103,114,97,118,105,116,121,95,97, -99,99,101,108,101,114,97,116,105,111,110,0,109,95,105,110,118,73,110,101, -114,116,105,97,76,111,99,97,108,0,109,95,116,111,116,97,108,70,111,114, -99,101,0,109,95,116,111,116,97,108,84,111,114,113,117,101,0,109,95,108, -105,110,101,97,114,68,97,109,112,105,110,103,0,109,95,97,110,103,117,108, -97,114,68,97,109,112,105,110,103,0,109,95,97,100,100,105,116,105,111,110, -97,108,68,97,109,112,105,110,103,0,109,95,97,100,100,105,116,105,111,110, -97,108,68,97,109,112,105,110,103,70,97,99,116,111,114,0,109,95,97,100, -100,105,116,105,111,110,97,108,76,105,110,101,97,114,68,97,109,112,105,110, -103,84,104,114,101,115,104,111,108,100,83,113,114,0,109,95,97,100,100,105, -116,105,111,110,97,108,65,110,103,117,108,97,114,68,97,109,112,105,110,103, -84,104,114,101,115,104,111,108,100,83,113,114,0,109,95,97,100,100,105,116, -105,111,110,97,108,65,110,103,117,108,97,114,68,97,109,112,105,110,103,70, -97,99,116,111,114,0,109,95,108,105,110,101,97,114,83,108,101,101,112,105, -110,103,84,104,114,101,115,104,111,108,100,0,109,95,97,110,103,117,108,97, -114,83,108,101,101,112,105,110,103,84,104,114,101,115,104,111,108,100,0,0, -84,89,80,69,29,0,0,0,99,104,97,114,0,117,99,104,97,114,0,115, -104,111,114,116,0,117,115,104,111,114,116,0,105,110,116,0,108,111,110,103, -0,117,108,111,110,103,0,102,108,111,97,116,0,100,111,117,98,108,101,0, -118,111,105,100,0,98,116,83,99,97,108,97,114,0,80,111,105,110,116,101, -114,65,114,114,97,121,0,98,116,80,104,121,115,105,99,115,83,121,115,116, -101,109,0,76,105,115,116,66,97,115,101,0,98,116,86,101,99,116,111,114, -51,68,97,116,97,0,98,116,77,97,116,114,105,120,51,120,51,68,97,116, -97,0,98,116,84,114,97,110,115,102,111,114,109,68,97,116,97,0,98,116, -67,111,108,108,105,115,105,111,110,83,104,97,112,101,68,97,116,97,0,98, -116,67,111,110,118,101,120,73,110,116,101,114,110,97,108,83,104,97,112,101, -68,97,116,97,0,98,116,80,111,115,105,116,105,111,110,65,110,100,82,97, -100,105,117,115,0,98,116,77,117,108,116,105,83,112,104,101,114,101,83,104, -97,112,101,68,97,116,97,0,98,116,73,110,116,73,110,100,101,120,68,97, -116,97,0,98,116,77,101,115,104,80,97,114,116,68,97,116,97,0,98,116, -83,116,114,105,100,105,110,103,77,101,115,104,73,110,116,101,114,102,97,99, -101,68,97,116,97,0,98,116,84,114,105,97,110,103,108,101,77,101,115,104, -83,104,97,112,101,68,97,116,97,0,109,95,99,111,110,99,97,118,101,83, -104,97,112,101,68,97,116,97,59,0,98,116,67,111,110,118,101,120,72,117, -108,108,83,104,97,112,101,68,97,116,97,0,98,116,67,111,108,108,105,115, -105,111,110,79,98,106,101,99,116,68,97,116,97,0,98,116,82,105,103,105, -100,66,111,100,121,68,97,116,97,0,0,0,84,76,69,78,1,0,1,0, -2,0,2,0,4,0,4,0,4,0,4,0,8,0,0,0,4,0,12,0, -36,0,8,0,16,0,48,0,64,0,12,0,52,0,20,0,64,0,4,0, -16,0,28,0,0,0,0,0,64,0,-8,0,-32,1,0,0,83,84,82,67, -17,0,0,0,11,0,3,0,4,0,0,0,4,0,1,0,9,0,2,0, +95,99,111,110,116,97,99,116,80,114,111,99,101,115,115,105,110,103,84,104, +114,101,115,104,111,108,100,0,42,109,95,98,114,111,97,100,112,104,97,115, +101,72,97,110,100,108,101,0,42,109,95,99,111,108,108,105,115,105,111,110, +83,104,97,112,101,0,42,109,95,114,111,111,116,67,111,108,108,105,115,105, +111,110,83,104,97,112,101,0,109,95,99,111,108,108,105,115,105,111,110,70, +108,97,103,115,0,109,95,105,115,108,97,110,100,84,97,103,49,0,109,95, +99,111,109,112,97,110,105,111,110,73,100,0,109,95,97,99,116,105,118,97, +116,105,111,110,83,116,97,116,101,49,0,109,95,100,101,97,99,116,105,118, +97,116,105,111,110,84,105,109,101,0,109,95,102,114,105,99,116,105,111,110, +0,109,95,114,101,115,116,105,116,117,116,105,111,110,0,109,95,105,110,116, +101,114,110,97,108,84,121,112,101,0,42,109,95,117,115,101,114,79,98,106, +101,99,116,80,111,105,110,116,101,114,0,109,95,104,105,116,70,114,97,99, +116,105,111,110,0,109,95,99,99,100,83,119,101,112,116,83,112,104,101,114, +101,82,97,100,105,117,115,0,109,95,99,99,100,77,111,116,105,111,110,84, +104,114,101,115,104,111,108,100,0,109,95,99,104,101,99,107,67,111,108,108, +105,100,101,87,105,116,104,0,109,95,99,111,108,108,105,115,105,111,110,79, +98,106,101,99,116,68,97,116,97,0,109,95,105,110,118,73,110,101,114,116, +105,97,84,101,110,115,111,114,87,111,114,108,100,0,109,95,108,105,110,101, +97,114,86,101,108,111,99,105,116,121,0,109,95,97,110,103,117,108,97,114, +86,101,108,111,99,105,116,121,0,109,95,105,110,118,101,114,115,101,77,97, +115,115,0,109,95,97,110,103,117,108,97,114,70,97,99,116,111,114,0,109, +95,108,105,110,101,97,114,70,97,99,116,111,114,0,109,95,103,114,97,118, +105,116,121,0,109,95,103,114,97,118,105,116,121,95,97,99,99,101,108,101, +114,97,116,105,111,110,0,109,95,105,110,118,73,110,101,114,116,105,97,76, +111,99,97,108,0,109,95,116,111,116,97,108,70,111,114,99,101,0,109,95, +116,111,116,97,108,84,111,114,113,117,101,0,109,95,108,105,110,101,97,114, +68,97,109,112,105,110,103,0,109,95,97,110,103,117,108,97,114,68,97,109, +112,105,110,103,0,109,95,97,100,100,105,116,105,111,110,97,108,68,97,109, +112,105,110,103,0,109,95,97,100,100,105,116,105,111,110,97,108,68,97,109, +112,105,110,103,70,97,99,116,111,114,0,109,95,97,100,100,105,116,105,111, +110,97,108,76,105,110,101,97,114,68,97,109,112,105,110,103,84,104,114,101, +115,104,111,108,100,83,113,114,0,109,95,97,100,100,105,116,105,111,110,97, +108,65,110,103,117,108,97,114,68,97,109,112,105,110,103,84,104,114,101,115, +104,111,108,100,83,113,114,0,109,95,97,100,100,105,116,105,111,110,97,108, +65,110,103,117,108,97,114,68,97,109,112,105,110,103,70,97,99,116,111,114, +0,109,95,108,105,110,101,97,114,83,108,101,101,112,105,110,103,84,104,114, +101,115,104,111,108,100,0,109,95,97,110,103,117,108,97,114,83,108,101,101, +112,105,110,103,84,104,114,101,115,104,111,108,100,0,0,0,84,89,80,69, +32,0,0,0,99,104,97,114,0,117,99,104,97,114,0,115,104,111,114,116, +0,117,115,104,111,114,116,0,105,110,116,0,108,111,110,103,0,117,108,111, +110,103,0,102,108,111,97,116,0,100,111,117,98,108,101,0,118,111,105,100, +0,98,116,83,99,97,108,97,114,0,80,111,105,110,116,101,114,65,114,114, +97,121,0,98,116,80,104,121,115,105,99,115,83,121,115,116,101,109,0,76, +105,115,116,66,97,115,101,0,98,116,86,101,99,116,111,114,51,68,97,116, +97,0,98,116,86,101,99,116,111,114,51,70,108,111,97,116,68,97,116,97, +0,98,116,86,101,99,116,111,114,51,68,111,117,98,108,101,68,97,116,97, +0,98,116,77,97,116,114,105,120,51,120,51,68,97,116,97,0,98,116,84, +114,97,110,115,102,111,114,109,68,97,116,97,0,98,116,67,111,108,108,105, +115,105,111,110,83,104,97,112,101,68,97,116,97,0,98,116,67,111,110,118, +101,120,73,110,116,101,114,110,97,108,83,104,97,112,101,68,97,116,97,0, +98,116,80,111,115,105,116,105,111,110,65,110,100,82,97,100,105,117,115,0, +98,116,77,117,108,116,105,83,112,104,101,114,101,83,104,97,112,101,68,97, +116,97,0,98,116,73,110,116,73,110,100,101,120,68,97,116,97,0,98,116, +83,104,111,114,116,73,110,116,73,110,100,101,120,68,97,116,97,0,98,116, +77,101,115,104,80,97,114,116,68,97,116,97,0,98,116,83,116,114,105,100, +105,110,103,77,101,115,104,73,110,116,101,114,102,97,99,101,68,97,116,97, +0,98,116,84,114,105,97,110,103,108,101,77,101,115,104,83,104,97,112,101, +68,97,116,97,0,109,95,99,111,110,99,97,118,101,83,104,97,112,101,68, +97,116,97,59,0,98,116,67,111,110,118,101,120,72,117,108,108,83,104,97, +112,101,68,97,116,97,0,98,116,67,111,108,108,105,115,105,111,110,79,98, +106,101,99,116,68,97,116,97,0,98,116,82,105,103,105,100,66,111,100,121, +68,97,116,97,0,0,0,0,84,76,69,78,1,0,1,0,2,0,2,0, +4,0,4,0,4,0,4,0,8,0,0,0,4,0,12,0,36,0,8,0, +16,0,16,0,32,0,48,0,64,0,12,0,52,0,20,0,64,0,4,0, +4,0,24,0,28,0,0,0,0,0,64,0,-8,0,-32,1,83,84,82,67, +20,0,0,0,11,0,3,0,4,0,0,0,4,0,1,0,9,0,2,0, 12,0,3,0,11,0,3,0,11,0,4,0,11,0,5,0,13,0,2,0, 9,0,6,0,9,0,7,0,14,0,1,0,10,0,8,0,15,0,1,0, -14,0,9,0,16,0,2,0,15,0,10,0,14,0,11,0,17,0,3,0, -9,0,12,0,4,0,13,0,0,0,14,0,18,0,5,0,17,0,15,0, -14,0,16,0,14,0,17,0,10,0,18,0,0,0,14,0,19,0,2,0, -14,0,19,0,10,0,20,0,20,0,4,0,18,0,21,0,19,0,22,0, -4,0,23,0,0,0,14,0,21,0,1,0,4,0,24,0,22,0,4,0, -14,0,25,0,21,0,26,0,4,0,27,0,4,0,28,0,23,0,4,0, -22,0,29,0,4,0,30,0,14,0,31,0,0,0,14,0,24,0,4,0, -25,0,32,0,25,0,15,0,23,0,33,0,10,0,18,0,26,0,4,0, -18,0,21,0,14,0,34,0,4,0,35,0,0,0,14,0,27,0,23,0, -16,0,36,0,16,0,37,0,14,0,38,0,14,0,39,0,14,0,40,0, -4,0,41,0,10,0,42,0,9,0,43,0,9,0,44,0,17,0,45,0, -4,0,46,0,4,0,47,0,4,0,48,0,4,0,49,0,10,0,50,0, -10,0,51,0,10,0,52,0,4,0,53,0,9,0,54,0,10,0,55,0, -10,0,56,0,10,0,57,0,4,0,58,0,28,0,21,0,27,0,59,0, -15,0,60,0,14,0,61,0,14,0,62,0,10,0,63,0,14,0,64,0, -14,0,65,0,14,0,66,0,14,0,67,0,14,0,68,0,14,0,69,0, -14,0,70,0,10,0,71,0,10,0,72,0,4,0,73,0,10,0,74,0, -10,0,75,0,10,0,76,0,10,0,77,0,10,0,78,0,10,0,79,0, -}; +7,0,8,0,16,0,1,0,8,0,8,0,17,0,1,0,14,0,9,0, +18,0,2,0,17,0,10,0,14,0,11,0,19,0,3,0,9,0,12,0, +4,0,13,0,0,0,14,0,20,0,5,0,19,0,15,0,14,0,16,0, +14,0,17,0,10,0,18,0,0,0,14,0,21,0,2,0,14,0,19,0, +10,0,20,0,22,0,4,0,20,0,21,0,21,0,22,0,4,0,23,0, +0,0,14,0,23,0,1,0,4,0,24,0,24,0,2,0,2,0,25,0, +2,0,24,0,25,0,6,0,15,0,26,0,16,0,27,0,23,0,28,0, +24,0,29,0,4,0,30,0,4,0,31,0,26,0,4,0,25,0,32,0, +4,0,33,0,14,0,34,0,0,0,14,0,27,0,4,0,28,0,35,0, +28,0,15,0,26,0,36,0,10,0,18,0,29,0,4,0,20,0,21,0, +14,0,37,0,4,0,38,0,0,0,14,0,30,0,23,0,18,0,39,0, +18,0,40,0,14,0,41,0,14,0,42,0,14,0,43,0,4,0,44,0, +10,0,45,0,9,0,46,0,9,0,47,0,19,0,48,0,4,0,49,0, +4,0,50,0,4,0,51,0,4,0,52,0,10,0,53,0,10,0,54,0, +10,0,55,0,4,0,56,0,9,0,57,0,10,0,58,0,10,0,59,0, +10,0,60,0,4,0,61,0,31,0,21,0,30,0,62,0,17,0,63,0, +14,0,64,0,14,0,65,0,10,0,66,0,14,0,67,0,14,0,68,0, +14,0,69,0,14,0,70,0,14,0,71,0,14,0,72,0,14,0,73,0, +10,0,74,0,10,0,75,0,4,0,76,0,10,0,77,0,10,0,78,0, +10,0,79,0,10,0,80,0,10,0,81,0,10,0,82,0,}; int sBulletDNAlen= sizeof(sBulletDNAstr); diff --git a/src/LinearMath/btVector3.h b/src/LinearMath/btVector3.h index 7689f1de5..c1c40aa22 100644 --- a/src/LinearMath/btVector3.h +++ b/src/LinearMath/btVector3.h @@ -676,6 +676,16 @@ struct btVector3Data btScalar m_floats[4]; }; +struct btVector3FloatData +{ + float m_floats[4]; +}; + +struct btVector3DoubleData +{ + double m_floats[4]; +}; + SIMD_FORCE_INLINE void btVector3::serialize(struct btVector3Data& dataOut) const { ///could also do a memcpy, check if it is worth it