improved btTriangleMeshShape/btBvhTriangleMeshShape serialization

This commit is contained in:
erwin.coumans
2010-01-24 16:48:14 +00:00
parent 9d7d1c3983
commit 5d8e6dc3f3
12 changed files with 358 additions and 196 deletions

View File

@@ -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]); unsigned char packedColor = (fontPtr[i*3+255*256*3-(256*j)*3]);
//float colorf = packedColor ? 0.f : 1.f; //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); btVector4 rgba(colorf,colorf,colorf,1.f);
//if (colorf) //if (colorf)
{ {

View File

@@ -23,6 +23,8 @@
#include "bullet_btPhysicsSystem.h" #include "bullet_btPhysicsSystem.h"
#include "bullet_ListBase.h" #include "bullet_ListBase.h"
#include "bullet_btVector3Data.h" #include "bullet_btVector3Data.h"
#include "bullet_btVector3FloatData.h"
#include "bullet_btVector3DoubleData.h"
#include "bullet_btMatrix3x3Data.h" #include "bullet_btMatrix3x3Data.h"
#include "bullet_btTransformData.h" #include "bullet_btTransformData.h"
#include "bullet_btCollisionShapeData.h" #include "bullet_btCollisionShapeData.h"
@@ -30,6 +32,7 @@
#include "bullet_btPositionAndRadius.h" #include "bullet_btPositionAndRadius.h"
#include "bullet_btMultiSphereShapeData.h" #include "bullet_btMultiSphereShapeData.h"
#include "bullet_btIntIndexData.h" #include "bullet_btIntIndexData.h"
#include "bullet_btShortIntIndexData.h"
#include "bullet_btMeshPartData.h" #include "bullet_btMeshPartData.h"
#include "bullet_btStridingMeshInterfaceData.h" #include "bullet_btStridingMeshInterfaceData.h"
#include "bullet_btTriangleMeshShapeData.h" #include "bullet_btTriangleMeshShapeData.h"

View File

@@ -30,6 +30,8 @@ namespace Bullet {
class btPhysicsSystem; class btPhysicsSystem;
class ListBase; class ListBase;
class btVector3Data; class btVector3Data;
class btVector3FloatData;
class btVector3DoubleData;
class btMatrix3x3Data; class btMatrix3x3Data;
class btTransformData; class btTransformData;
class btCollisionShapeData; class btCollisionShapeData;
@@ -37,6 +39,7 @@ namespace Bullet {
class btPositionAndRadius; class btPositionAndRadius;
class btMultiSphereShapeData; class btMultiSphereShapeData;
class btIntIndexData; class btIntIndexData;
class btShortIntIndexData;
class btMeshPartData; class btMeshPartData;
class btStridingMeshInterfaceData; class btStridingMeshInterfaceData;
class btTriangleMeshShapeData; class btTriangleMeshShapeData;

View File

@@ -31,8 +31,10 @@ namespace Bullet {
class btMeshPartData class btMeshPartData
{ {
public: public:
btVector3Data *m_vertices; btVector3FloatData *m_vertices3f;
btIntIndexData *m_indices; btVector3DoubleData *m_vertices3d;
btIntIndexData *m_indices32;
btShortIntIndexData *m_indices16;
int m_numTriangles; int m_numTriangles;
int m_numVertices; int m_numVertices;
}; };

View File

@@ -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__

View File

@@ -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__

View File

@@ -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__

View File

@@ -151,12 +151,32 @@ bool btBulletFileLoader::loadFileFromMemory( bParse::btBulletFile* bulletFile2)
for (int i=0;i<trimesh->m_meshInterface.m_numMeshParts;i++) for (int i=0;i<trimesh->m_meshInterface.m_numMeshParts;i++)
{ {
btIndexedMesh meshPart; btIndexedMesh meshPart;
meshPart.m_triangleIndexStride = 3*sizeof(int); if (trimesh->m_meshInterface.m_meshPartsPtr[i].m_indices32)
meshPart.m_vertexStride = sizeof(btVector3Data); {
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_numTriangles = trimesh->m_meshInterface.m_meshPartsPtr[i].m_numTriangles;
meshPart.m_numVertices = trimesh->m_meshInterface.m_meshPartsPtr[i].m_numVertices; 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); meshInterface->addIndexedMesh(meshPart);
} }
btVector3 scaling; scaling.deSerialize(trimesh->m_meshInterface.m_scaling); btVector3 scaling; scaling.deSerialize(trimesh->m_meshInterface.m_scaling);

View File

@@ -193,13 +193,13 @@ const char* btStridingMeshInterface::serialize(void* dataBuffer, btSerializer* s
void* uniquePtr = 0; void* uniquePtr = 0;
trimeshData->m_meshPartsPtr = 0; trimeshData->m_meshPartsPtr = 0;
if (trimeshData->m_numMeshParts) if (trimeshData->m_numMeshParts)
{ {
btChunk* chunk = serializer->allocate(sizeof(btMeshPartData),trimeshData->m_numMeshParts); btChunk* chunk = serializer->allocate(sizeof(btMeshPartData),trimeshData->m_numMeshParts);
btMeshPartData* memPtr = (btMeshPartData*)chunk->m_oldPtr; btMeshPartData* memPtr = (btMeshPartData*)chunk->m_oldPtr;
trimeshData->m_meshPartsPtr = memPtr; trimeshData->m_meshPartsPtr = memPtr;
int numtotalphysicsverts = 0; int numtotalphysicsverts = 0;
int part,graphicssubparts = getNumSubParts(); 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); getLockedReadOnlyVertexIndexBase(&vertexbase,numverts,type,stride,&indexbase,indexstride,numtriangles,gfxindextype,part);
memPtr->m_numTriangles = numtriangles;//indices = 3*numtriangles memPtr->m_numTriangles = numtriangles;//indices = 3*numtriangles
memPtr->m_numVertices = numverts; 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;gfxindex<numtriangles;gfxindex++)
{
unsigned int* tri_indices= (unsigned int*)(indexbase+gfxindex*indexstride);
tmpIndices[gfxindex*3].m_value = tri_indices[0];
tmpIndices[gfxindex*3+1].m_value = tri_indices[1];
tmpIndices[gfxindex*3+2].m_value = tri_indices[2];
}
serializer->finalizeChunk(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;gfxindex<numtriangles;gfxindex++)
{
unsigned short int* tri_indices= (unsigned short int*)(indexbase+gfxindex*indexstride);
tmpIndices[gfxindex*3].m_value = tri_indices[0];
tmpIndices[gfxindex*3+1].m_value = tri_indices[1];
tmpIndices[gfxindex*3+2].m_value = tri_indices[2];
}
serializer->finalizeChunk(chunk,"btShortIntIndexData",BT_ARRAY_CODE,(void*)chunk->m_oldPtr);
}
break;
}
default:
{
btAssert(0);
//unknown index type
}
}
switch (type) switch (type)
{ {
case PHY_FLOAT: case PHY_FLOAT:
{ {
float* graphicsbase; 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;i<numverts;i++)
{ {
int numindices = numtriangles*3; graphicsbase = (float*)(vertexbase+i*stride);
memPtr->m_indices = 0; tmpVertices[i].m_floats[0] = graphicsbase[0];
if (numindices) tmpVertices[i].m_floats[1] = graphicsbase[1];
{ tmpVertices[i].m_floats[2] = graphicsbase[2];
btChunk* chunk = serializer->allocate(sizeof(btIntIndexData),numindices);
btIntIndexData* tmpIndices = (btIntIndexData*)chunk->m_oldPtr;
memPtr->m_indices = tmpIndices;
for (gfxindex=0;gfxindex<numtriangles;gfxindex++)
{
unsigned int* tri_indices= (unsigned int*)(indexbase+gfxindex*indexstride);
tmpIndices[gfxindex*3].m_value = tri_indices[0];
tmpIndices[gfxindex*3+1].m_value = tri_indices[1];
tmpIndices[gfxindex*3+2].m_value = tri_indices[2];
}
serializer->finalizeChunk(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;i<numverts;i++)
{
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];
}
serializer->finalizeChunk(chunk,"btVector3Data",BT_ARRAY_CODE,(void*)chunk->m_oldPtr);
}
break;
} }
case PHY_SHORT: serializer->finalizeChunk(chunk,"btVector3FloatData",BT_ARRAY_CODE,(void*)chunk->m_oldPtr);
{
for (gfxindex=0;gfxindex<numtriangles;gfxindex++)
{
unsigned short int* tri_indices= (unsigned short int*)(indexbase+gfxindex*indexstride);
graphicsbase = (float*)(vertexbase+tri_indices[0]*stride);
triangle[0].setValue(graphicsbase[0]*meshScaling.getX(),graphicsbase[1]*meshScaling.getY(),graphicsbase[2]*meshScaling.getZ());
graphicsbase = (float*)(vertexbase+tri_indices[1]*stride);
triangle[1].setValue(graphicsbase[0]*meshScaling.getX(),graphicsbase[1]*meshScaling.getY(), graphicsbase[2]*meshScaling.getZ());
graphicsbase = (float*)(vertexbase+tri_indices[2]*stride);
triangle[2].setValue(graphicsbase[0]*meshScaling.getX(),graphicsbase[1]*meshScaling.getY(), graphicsbase[2]*meshScaling.getZ());
}
break;
}
default:
btAssert((gfxindextype == PHY_INTEGER) || (gfxindextype == PHY_SHORT));
} }
break; break;
} }
case PHY_DOUBLE: case PHY_DOUBLE:
{ {
double* graphicsbase; if (numverts)
switch (gfxindextype)
{ {
case PHY_INTEGER: btChunk* chunk = serializer->allocate(sizeof(btVector3DoubleData),numverts);
{ btVector3DoubleData* tmpVertices = (btVector3DoubleData*) chunk->m_oldPtr;
for (gfxindex=0;gfxindex<numtriangles;gfxindex++) memPtr->m_vertices3d = tmpVertices;
{ for (int i=0;i<numverts;i++)
unsigned int* tri_indices= (unsigned int*)(indexbase+gfxindex*indexstride); {
graphicsbase = (double*)(vertexbase+tri_indices[0]*stride); double* graphicsbase = (double*)(vertexbase+i*stride);//for now convert to float, might leave it at double
triangle[0].setValue((btScalar)graphicsbase[0]*meshScaling.getX(),(btScalar)graphicsbase[1]*meshScaling.getY(),(btScalar)graphicsbase[2]*meshScaling.getZ()); tmpVertices[i].m_floats[0] = graphicsbase[0];
graphicsbase = (double*)(vertexbase+tri_indices[1]*stride); tmpVertices[i].m_floats[1] = graphicsbase[1];
triangle[1].setValue((btScalar)graphicsbase[0]*meshScaling.getX(),(btScalar)graphicsbase[1]*meshScaling.getY(), (btScalar)graphicsbase[2]*meshScaling.getZ()); tmpVertices[i].m_floats[2] = graphicsbase[2];
graphicsbase = (double*)(vertexbase+tri_indices[2]*stride); }
triangle[2].setValue((btScalar)graphicsbase[0]*meshScaling.getX(),(btScalar)graphicsbase[1]*meshScaling.getY(), (btScalar)graphicsbase[2]*meshScaling.getZ()); serializer->finalizeChunk(chunk,"btVector3DoubleData",BT_ARRAY_CODE,(void*)chunk->m_oldPtr);
}
break;
}
case PHY_SHORT:
{
for (gfxindex=0;gfxindex<numtriangles;gfxindex++)
{
unsigned short int* tri_indices= (unsigned short int*)(indexbase+gfxindex*indexstride);
graphicsbase = (double*)(vertexbase+tri_indices[0]*stride);
triangle[0].setValue((btScalar)graphicsbase[0]*meshScaling.getX(),(btScalar)graphicsbase[1]*meshScaling.getY(),(btScalar)graphicsbase[2]*meshScaling.getZ());
graphicsbase = (double*)(vertexbase+tri_indices[1]*stride);
triangle[1].setValue((btScalar)graphicsbase[0]*meshScaling.getX(),(btScalar)graphicsbase[1]*meshScaling.getY(), (btScalar)graphicsbase[2]*meshScaling.getZ());
graphicsbase = (double*)(vertexbase+tri_indices[2]*stride);
triangle[2].setValue((btScalar)graphicsbase[0]*meshScaling.getX(),(btScalar)graphicsbase[1]*meshScaling.getY(), (btScalar)graphicsbase[2]*meshScaling.getZ());
}
break;
}
default:
btAssert((gfxindextype == PHY_INTEGER) || (gfxindextype == PHY_SHORT));
} }
break; break;
} }
default: default:
btAssert((type == PHY_FLOAT) || (type == PHY_DOUBLE)); btAssert((type == PHY_FLOAT) || (type == PHY_DOUBLE));
} }

View File

@@ -102,10 +102,18 @@ struct btIntIndexData
int m_value; int m_value;
}; };
struct btShortIntIndexData
{
short int m_value;
};
struct btMeshPartData struct btMeshPartData
{ {
btVector3Data *m_vertices; btVector3FloatData *m_vertices3f;
btIntIndexData *m_indices; btVector3DoubleData *m_vertices3d;
btIntIndexData *m_indices32;
btShortIntIndexData *m_indices16;
int m_numTriangles;//length of m_indices = 3*m_numTriangles int m_numTriangles;//length of m_indices = 3*m_numTriangles
int m_numVertices; int m_numVertices;
}; };

View File

@@ -1,5 +1,5 @@
unsigned char sBulletDNAstr[]= { 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, 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, 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, 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, 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, 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, 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, 65,114,114,97,121,83,105,122,101,0,109,95,118,97,108,117,101,0,105,110,
95,118,101,114,116,105,99,101,115,0,42,109,95,105,110,100,105,99,101,115, 116,0,42,109,95,118,101,114,116,105,99,101,115,51,102,0,42,109,95,118,
0,109,95,110,117,109,84,114,105,97,110,103,108,101,115,0,109,95,110,117, 101,114,116,105,99,101,115,51,100,0,42,109,95,105,110,100,105,99,101,115,
109,86,101,114,116,105,99,101,115,0,42,109,95,109,101,115,104,80,97,114, 51,50,0,42,109,95,105,110,100,105,99,101,115,49,54,0,109,95,110,117,
116,115,80,116,114,0,109,95,110,117,109,77,101,115,104,80,97,114,116,115, 109,84,114,105,97,110,103,108,101,115,0,109,95,110,117,109,86,101,114,116,
0,109,95,115,99,97,108,105,110,103,0,98,116,67,111,108,108,105,115,105, 105,99,101,115,0,42,109,95,109,101,115,104,80,97,114,116,115,80,116,114,
111,110,83,104,97,112,101,68,97,116,97,0,109,95,109,101,115,104,73,110, 0,109,95,110,117,109,77,101,115,104,80,97,114,116,115,0,109,95,115,99,
116,101,114,102,97,99,101,0,42,109,95,117,110,115,99,97,108,101,100,80, 97,108,105,110,103,0,98,116,67,111,108,108,105,115,105,111,110,83,104,97,
111,105,110,116,115,80,116,114,0,109,95,110,117,109,85,110,115,99,97,108, 112,101,68,97,116,97,0,109,95,109,101,115,104,73,110,116,101,114,102,97,
101,100,80,111,105,110,116,115,0,109,95,119,111,114,108,100,84,114,97,110, 99,101,0,42,109,95,117,110,115,99,97,108,101,100,80,111,105,110,116,115,
115,102,111,114,109,0,109,95,105,110,116,101,114,112,111,108,97,116,105,111, 80,116,114,0,109,95,110,117,109,85,110,115,99,97,108,101,100,80,111,105,
110,87,111,114,108,100,84,114,97,110,115,102,111,114,109,0,109,95,105,110, 110,116,115,0,109,95,119,111,114,108,100,84,114,97,110,115,102,111,114,109,
116,101,114,112,111,108,97,116,105,111,110,76,105,110,101,97,114,86,101,108, 0,109,95,105,110,116,101,114,112,111,108,97,116,105,111,110,87,111,114,108,
111,99,105,116,121,0,109,95,105,110,116,101,114,112,111,108,97,116,105,111, 100,84,114,97,110,115,102,111,114,109,0,109,95,105,110,116,101,114,112,111,
110,65,110,103,117,108,97,114,86,101,108,111,99,105,116,121,0,109,95,97, 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, 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, 95,99,111,110,116,97,99,116,80,114,111,99,101,115,115,105,110,103,84,104,
105,111,110,0,109,95,99,111,110,116,97,99,116,80,114,111,99,101,115,115, 114,101,115,104,111,108,100,0,42,109,95,98,114,111,97,100,112,104,97,115,
105,110,103,84,104,114,101,115,104,111,108,100,0,42,109,95,98,114,111,97, 101,72,97,110,100,108,101,0,42,109,95,99,111,108,108,105,115,105,111,110,
100,112,104,97,115,101,72,97,110,100,108,101,0,42,109,95,99,111,108,108, 83,104,97,112,101,0,42,109,95,114,111,111,116,67,111,108,108,105,115,105,
105,115,105,111,110,83,104,97,112,101,0,42,109,95,114,111,111,116,67,111, 111,110,83,104,97,112,101,0,109,95,99,111,108,108,105,115,105,111,110,70,
108,108,105,115,105,111,110,83,104,97,112,101,0,109,95,99,111,108,108,105, 108,97,103,115,0,109,95,105,115,108,97,110,100,84,97,103,49,0,109,95,
115,105,111,110,70,108,97,103,115,0,109,95,105,115,108,97,110,100,84,97, 99,111,109,112,97,110,105,111,110,73,100,0,109,95,97,99,116,105,118,97,
103,49,0,109,95,99,111,109,112,97,110,105,111,110,73,100,0,109,95,97, 116,105,111,110,83,116,97,116,101,49,0,109,95,100,101,97,99,116,105,118,
99,116,105,118,97,116,105,111,110,83,116,97,116,101,49,0,109,95,100,101, 97,116,105,111,110,84,105,109,101,0,109,95,102,114,105,99,116,105,111,110,
97,99,116,105,118,97,116,105,111,110,84,105,109,101,0,109,95,102,114,105, 0,109,95,114,101,115,116,105,116,117,116,105,111,110,0,109,95,105,110,116,
99,116,105,111,110,0,109,95,114,101,115,116,105,116,117,116,105,111,110,0, 101,114,110,97,108,84,121,112,101,0,42,109,95,117,115,101,114,79,98,106,
109,95,105,110,116,101,114,110,97,108,84,121,112,101,0,42,109,95,117,115, 101,99,116,80,111,105,110,116,101,114,0,109,95,104,105,116,70,114,97,99,
101,114,79,98,106,101,99,116,80,111,105,110,116,101,114,0,109,95,104,105, 116,105,111,110,0,109,95,99,99,100,83,119,101,112,116,83,112,104,101,114,
116,70,114,97,99,116,105,111,110,0,109,95,99,99,100,83,119,101,112,116, 101,82,97,100,105,117,115,0,109,95,99,99,100,77,111,116,105,111,110,84,
83,112,104,101,114,101,82,97,100,105,117,115,0,109,95,99,99,100,77,111, 104,114,101,115,104,111,108,100,0,109,95,99,104,101,99,107,67,111,108,108,
116,105,111,110,84,104,114,101,115,104,111,108,100,0,109,95,99,104,101,99, 105,100,101,87,105,116,104,0,109,95,99,111,108,108,105,115,105,111,110,79,
107,67,111,108,108,105,100,101,87,105,116,104,0,109,95,99,111,108,108,105, 98,106,101,99,116,68,97,116,97,0,109,95,105,110,118,73,110,101,114,116,
115,105,111,110,79,98,106,101,99,116,68,97,116,97,0,109,95,105,110,118, 105,97,84,101,110,115,111,114,87,111,114,108,100,0,109,95,108,105,110,101,
73,110,101,114,116,105,97,84,101,110,115,111,114,87,111,114,108,100,0,109, 97,114,86,101,108,111,99,105,116,121,0,109,95,97,110,103,117,108,97,114,
95,108,105,110,101,97,114,86,101,108,111,99,105,116,121,0,109,95,97,110, 86,101,108,111,99,105,116,121,0,109,95,105,110,118,101,114,115,101,77,97,
103,117,108,97,114,86,101,108,111,99,105,116,121,0,109,95,105,110,118,101, 115,115,0,109,95,97,110,103,117,108,97,114,70,97,99,116,111,114,0,109,
114,115,101,77,97,115,115,0,109,95,97,110,103,117,108,97,114,70,97,99, 95,108,105,110,101,97,114,70,97,99,116,111,114,0,109,95,103,114,97,118,
116,111,114,0,109,95,108,105,110,101,97,114,70,97,99,116,111,114,0,109, 105,116,121,0,109,95,103,114,97,118,105,116,121,95,97,99,99,101,108,101,
95,103,114,97,118,105,116,121,0,109,95,103,114,97,118,105,116,121,95,97, 114,97,116,105,111,110,0,109,95,105,110,118,73,110,101,114,116,105,97,76,
99,99,101,108,101,114,97,116,105,111,110,0,109,95,105,110,118,73,110,101, 111,99,97,108,0,109,95,116,111,116,97,108,70,111,114,99,101,0,109,95,
114,116,105,97,76,111,99,97,108,0,109,95,116,111,116,97,108,70,111,114, 116,111,116,97,108,84,111,114,113,117,101,0,109,95,108,105,110,101,97,114,
99,101,0,109,95,116,111,116,97,108,84,111,114,113,117,101,0,109,95,108, 68,97,109,112,105,110,103,0,109,95,97,110,103,117,108,97,114,68,97,109,
105,110,101,97,114,68,97,109,112,105,110,103,0,109,95,97,110,103,117,108, 112,105,110,103,0,109,95,97,100,100,105,116,105,111,110,97,108,68,97,109,
97,114,68,97,109,112,105,110,103,0,109,95,97,100,100,105,116,105,111,110, 112,105,110,103,0,109,95,97,100,100,105,116,105,111,110,97,108,68,97,109,
97,108,68,97,109,112,105,110,103,0,109,95,97,100,100,105,116,105,111,110, 112,105,110,103,70,97,99,116,111,114,0,109,95,97,100,100,105,116,105,111,
97,108,68,97,109,112,105,110,103,70,97,99,116,111,114,0,109,95,97,100, 110,97,108,76,105,110,101,97,114,68,97,109,112,105,110,103,84,104,114,101,
100,105,116,105,111,110,97,108,76,105,110,101,97,114,68,97,109,112,105,110, 115,104,111,108,100,83,113,114,0,109,95,97,100,100,105,116,105,111,110,97,
103,84,104,114,101,115,104,111,108,100,83,113,114,0,109,95,97,100,100,105, 108,65,110,103,117,108,97,114,68,97,109,112,105,110,103,84,104,114,101,115,
116,105,111,110,97,108,65,110,103,117,108,97,114,68,97,109,112,105,110,103, 104,111,108,100,83,113,114,0,109,95,97,100,100,105,116,105,111,110,97,108,
84,104,114,101,115,104,111,108,100,83,113,114,0,109,95,97,100,100,105,116, 65,110,103,117,108,97,114,68,97,109,112,105,110,103,70,97,99,116,111,114,
105,111,110,97,108,65,110,103,117,108,97,114,68,97,109,112,105,110,103,70, 0,109,95,108,105,110,101,97,114,83,108,101,101,112,105,110,103,84,104,114,
97,99,116,111,114,0,109,95,108,105,110,101,97,114,83,108,101,101,112,105, 101,115,104,111,108,100,0,109,95,97,110,103,117,108,97,114,83,108,101,101,
110,103,84,104,114,101,115,104,111,108,100,0,109,95,97,110,103,117,108,97, 112,105,110,103,84,104,114,101,115,104,111,108,100,0,0,0,84,89,80,69,
114,83,108,101,101,112,105,110,103,84,104,114,101,115,104,111,108,100,0,0, 32,0,0,0,99,104,97,114,0,117,99,104,97,114,0,115,104,111,114,116,
84,89,80,69,29,0,0,0,99,104,97,114,0,117,99,104,97,114,0,115, 0,117,115,104,111,114,116,0,105,110,116,0,108,111,110,103,0,117,108,111,
104,111,114,116,0,117,115,104,111,114,116,0,105,110,116,0,108,111,110,103, 110,103,0,102,108,111,97,116,0,100,111,117,98,108,101,0,118,111,105,100,
0,117,108,111,110,103,0,102,108,111,97,116,0,100,111,117,98,108,101,0, 0,98,116,83,99,97,108,97,114,0,80,111,105,110,116,101,114,65,114,114,
118,111,105,100,0,98,116,83,99,97,108,97,114,0,80,111,105,110,116,101, 97,121,0,98,116,80,104,121,115,105,99,115,83,121,115,116,101,109,0,76,
114,65,114,114,97,121,0,98,116,80,104,121,115,105,99,115,83,121,115,116, 105,115,116,66,97,115,101,0,98,116,86,101,99,116,111,114,51,68,97,116,
101,109,0,76,105,115,116,66,97,115,101,0,98,116,86,101,99,116,111,114, 97,0,98,116,86,101,99,116,111,114,51,70,108,111,97,116,68,97,116,97,
51,68,97,116,97,0,98,116,77,97,116,114,105,120,51,120,51,68,97,116, 0,98,116,86,101,99,116,111,114,51,68,111,117,98,108,101,68,97,116,97,
97,0,98,116,84,114,97,110,115,102,111,114,109,68,97,116,97,0,98,116, 0,98,116,77,97,116,114,105,120,51,120,51,68,97,116,97,0,98,116,84,
67,111,108,108,105,115,105,111,110,83,104,97,112,101,68,97,116,97,0,98, 114,97,110,115,102,111,114,109,68,97,116,97,0,98,116,67,111,108,108,105,
116,67,111,110,118,101,120,73,110,116,101,114,110,97,108,83,104,97,112,101, 115,105,111,110,83,104,97,112,101,68,97,116,97,0,98,116,67,111,110,118,
68,97,116,97,0,98,116,80,111,115,105,116,105,111,110,65,110,100,82,97, 101,120,73,110,116,101,114,110,97,108,83,104,97,112,101,68,97,116,97,0,
100,105,117,115,0,98,116,77,117,108,116,105,83,112,104,101,114,101,83,104, 98,116,80,111,115,105,116,105,111,110,65,110,100,82,97,100,105,117,115,0,
97,112,101,68,97,116,97,0,98,116,73,110,116,73,110,100,101,120,68,97, 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,77,101,115,104,80,97,114,116,68,97,116,97,0,98,116, 116,97,0,98,116,73,110,116,73,110,100,101,120,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, 83,104,111,114,116,73,110,116,73,110,100,101,120,68,97,116,97,0,98,116,
101,68,97,116,97,0,98,116,84,114,105,97,110,103,108,101,77,101,115,104, 77,101,115,104,80,97,114,116,68,97,116,97,0,98,116,83,116,114,105,100,
83,104,97,112,101,68,97,116,97,0,109,95,99,111,110,99,97,118,101,83, 105,110,103,77,101,115,104,73,110,116,101,114,102,97,99,101,68,97,116,97,
104,97,112,101,68,97,116,97,59,0,98,116,67,111,110,118,101,120,72,117, 0,98,116,84,114,105,97,110,103,108,101,77,101,115,104,83,104,97,112,101,
108,108,83,104,97,112,101,68,97,116,97,0,98,116,67,111,108,108,105,115, 68,97,116,97,0,109,95,99,111,110,99,97,118,101,83,104,97,112,101,68,
105,111,110,79,98,106,101,99,116,68,97,116,97,0,98,116,82,105,103,105, 97,116,97,59,0,98,116,67,111,110,118,101,120,72,117,108,108,83,104,97,
100,66,111,100,121,68,97,116,97,0,0,0,84,76,69,78,1,0,1,0, 112,101,68,97,116,97,0,98,116,67,111,108,108,105,115,105,111,110,79,98,
2,0,2,0,4,0,4,0,4,0,4,0,8,0,0,0,4,0,12,0, 106,101,99,116,68,97,116,97,0,98,116,82,105,103,105,100,66,111,100,121,
36,0,8,0,16,0,48,0,64,0,12,0,52,0,20,0,64,0,4,0, 68,97,116,97,0,0,0,0,84,76,69,78,1,0,1,0,2,0,2,0,
16,0,28,0,0,0,0,0,64,0,-8,0,-32,1,0,0,83,84,82,67, 4,0,4,0,4,0,4,0,8,0,0,0,4,0,12,0,36,0,8,0,
17,0,0,0,11,0,3,0,4,0,0,0,4,0,1,0,9,0,2,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, 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, 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, 7,0,8,0,16,0,1,0,8,0,8,0,17,0,1,0,14,0,9,0,
9,0,12,0,4,0,13,0,0,0,14,0,18,0,5,0,17,0,15,0, 18,0,2,0,17,0,10,0,14,0,11,0,19,0,3,0,9,0,12,0,
14,0,16,0,14,0,17,0,10,0,18,0,0,0,14,0,19,0,2,0, 4,0,13,0,0,0,14,0,20,0,5,0,19,0,15,0,14,0,16,0,
14,0,19,0,10,0,20,0,20,0,4,0,18,0,21,0,19,0,22,0, 14,0,17,0,10,0,18,0,0,0,14,0,21,0,2,0,14,0,19,0,
4,0,23,0,0,0,14,0,21,0,1,0,4,0,24,0,22,0,4,0, 10,0,20,0,22,0,4,0,20,0,21,0,21,0,22,0,4,0,23,0,
14,0,25,0,21,0,26,0,4,0,27,0,4,0,28,0,23,0,4,0, 0,0,14,0,23,0,1,0,4,0,24,0,24,0,2,0,2,0,25,0,
22,0,29,0,4,0,30,0,14,0,31,0,0,0,14,0,24,0,4,0, 2,0,24,0,25,0,6,0,15,0,26,0,16,0,27,0,23,0,28,0,
25,0,32,0,25,0,15,0,23,0,33,0,10,0,18,0,26,0,4,0, 24,0,29,0,4,0,30,0,4,0,31,0,26,0,4,0,25,0,32,0,
18,0,21,0,14,0,34,0,4,0,35,0,0,0,14,0,27,0,23,0, 4,0,33,0,14,0,34,0,0,0,14,0,27,0,4,0,28,0,35,0,
16,0,36,0,16,0,37,0,14,0,38,0,14,0,39,0,14,0,40,0, 28,0,15,0,26,0,36,0,10,0,18,0,29,0,4,0,20,0,21,0,
4,0,41,0,10,0,42,0,9,0,43,0,9,0,44,0,17,0,45,0, 14,0,37,0,4,0,38,0,0,0,14,0,30,0,23,0,18,0,39,0,
4,0,46,0,4,0,47,0,4,0,48,0,4,0,49,0,10,0,50,0, 18,0,40,0,14,0,41,0,14,0,42,0,14,0,43,0,4,0,44,0,
10,0,51,0,10,0,52,0,4,0,53,0,9,0,54,0,10,0,55,0, 10,0,45,0,9,0,46,0,9,0,47,0,19,0,48,0,4,0,49,0,
10,0,56,0,10,0,57,0,4,0,58,0,28,0,21,0,27,0,59,0, 4,0,50,0,4,0,51,0,4,0,52,0,10,0,53,0,10,0,54,0,
15,0,60,0,14,0,61,0,14,0,62,0,10,0,63,0,14,0,64,0, 10,0,55,0,4,0,56,0,9,0,57,0,10,0,58,0,10,0,59,0,
14,0,65,0,14,0,66,0,14,0,67,0,14,0,68,0,14,0,69,0, 10,0,60,0,4,0,61,0,31,0,21,0,30,0,62,0,17,0,63,0,
14,0,70,0,10,0,71,0,10,0,72,0,4,0,73,0,10,0,74,0, 14,0,64,0,14,0,65,0,10,0,66,0,14,0,67,0,14,0,68,0,
10,0,75,0,10,0,76,0,10,0,77,0,10,0,78,0,10,0,79,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); int sBulletDNAlen= sizeof(sBulletDNAstr);

View File

@@ -676,6 +676,16 @@ struct btVector3Data
btScalar m_floats[4]; 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 SIMD_FORCE_INLINE void btVector3::serialize(struct btVector3Data& dataOut) const
{ {
///could also do a memcpy, check if it is worth it ///could also do a memcpy, check if it is worth it