for for btBvhTriangleMeshShape with short int indices serialization
disable bvh serialization, it has issues (needs testing)
This commit is contained in:
@@ -40,7 +40,7 @@
|
||||
#include "bullet_btPositionAndRadius.h"
|
||||
#include "bullet_btMultiSphereShapeData.h"
|
||||
#include "bullet_btIntIndexData.h"
|
||||
#include "bullet_btShortIntIndexData.h"
|
||||
#include "bullet_btShortIntIndexTripletData.h"
|
||||
#include "bullet_btMeshPartData.h"
|
||||
#include "bullet_btStridingMeshInterfaceData.h"
|
||||
#include "bullet_btTriangleMeshShapeData.h"
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace Bullet {
|
||||
class btPositionAndRadius;
|
||||
class btMultiSphereShapeData;
|
||||
class btIntIndexData;
|
||||
class btShortIntIndexData;
|
||||
class btShortIntIndexTripletData;
|
||||
class btMeshPartData;
|
||||
class btStridingMeshInterfaceData;
|
||||
class btTriangleMeshShapeData;
|
||||
|
||||
@@ -33,9 +33,7 @@ namespace Bullet {
|
||||
public:
|
||||
int m_rootNodeIndex;
|
||||
int m_subtreeSize;
|
||||
short int;
|
||||
short m_quantizedAabbMin[3];
|
||||
short int;
|
||||
short m_quantizedAabbMax[3];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace Bullet {
|
||||
btVector3FloatData *m_vertices3f;
|
||||
btVector3DoubleData *m_vertices3d;
|
||||
btIntIndexData *m_indices32;
|
||||
btShortIntIndexData *m_indices16;
|
||||
btShortIntIndexTripletData *m_3indices16;
|
||||
int m_numTriangles;
|
||||
int m_numVertices;
|
||||
};
|
||||
|
||||
@@ -31,11 +31,9 @@ namespace Bullet {
|
||||
class btQuantizedBvhNodeData
|
||||
{
|
||||
public:
|
||||
int m_escapeIndexOrTriangleIndex;
|
||||
short int;
|
||||
short m_quantizedAabbMin[3];
|
||||
short int;
|
||||
short m_quantizedAabbMax[3];
|
||||
int m_escapeIndexOrTriangleIndex;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
* 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__
|
||||
#ifndef __BULLET_BTSHORTINTINDEXTRIPLETDATA__H__
|
||||
#define __BULLET_BTSHORTINTINDEXTRIPLETDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
@@ -28,13 +28,13 @@ namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btShortIntIndexData
|
||||
class btShortIntIndexTripletData
|
||||
{
|
||||
public:
|
||||
short int;
|
||||
short m_value;
|
||||
short m_values[3];
|
||||
char m_pad[2];
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTSHORTINTINDEXDATA__H__
|
||||
#endif//__BULLET_BTSHORTINTINDEXTRIPLETDATA__H__
|
||||
@@ -23,6 +23,8 @@ subject to the following restrictions:
|
||||
#define MAX_ARRAY_LENGTH 512
|
||||
using namespace bParse;
|
||||
|
||||
//this define will force traversal of structures, to check backward (and forward) compatibility
|
||||
//#define TEST_BACKWARD_FORWARD_COMPATIBILITY
|
||||
|
||||
int numallocs = 0;
|
||||
|
||||
@@ -260,7 +262,11 @@ char* bFile::readStruct(char *head, bChunkInd& dataChunk)
|
||||
|
||||
|
||||
|
||||
#ifdef TEST_BACKWARD_FORWARD_COMPATIBILITY
|
||||
if (1)
|
||||
#else
|
||||
if (!mFileDNA->flagEqual(dataChunk.dna_nr))
|
||||
#endif
|
||||
{
|
||||
// Ouch! need to rebuild the struct
|
||||
short *oldStruct,*curStruct;
|
||||
@@ -938,7 +944,11 @@ void bFile::resolvePointers(bool verboseDumpAllBlocks)
|
||||
{
|
||||
const bChunkInd& dataChunk = m_chunks.at(i);
|
||||
|
||||
#ifdef TEST_BACKWARD_FORWARD_COMPATIBILITY
|
||||
if (1)
|
||||
#else
|
||||
if (!mFileDNA || fileDna->flagEqual(dataChunk.dna_nr))
|
||||
#endif
|
||||
{
|
||||
//dataChunk.len
|
||||
short int* oldStruct = fileDna->getStruct(dataChunk.dna_nr);
|
||||
|
||||
Reference in New Issue
Block a user