Added some improvements on Bullet serialization:

Introduced generated unique id's, instead of the pointer address to avoid 64bit->32bit truncation issues
Use serializer->getUniquePointer instead of directly using a pointer

moved  ChunkUtils::getNextBlock to bFile::getNextBlock.
Moved 'TEST_BACKWARD_FORWARD_COMPATIBILITY' to bDNA.cpp. Enable the define for further testing of .bullet format
Removed duplicate definitions and use the one in LinearMath/btSerialization.h
This commit is contained in:
erwin.coumans
2010-02-28 20:50:50 +00:00
parent d5ea1d569f
commit 9acb3d1805
19 changed files with 266 additions and 185 deletions

View File

@@ -34,7 +34,10 @@ namespace bParse {
bChunkPtr4(){}
int code;
int len;
int old;
union
{
int m_uniqueInt;
};
int dna_nr;
int nr;
};
@@ -45,7 +48,11 @@ namespace bParse {
public:
bChunkPtr8(){}
int code, len;
long64 old;
union
{
long64 oldPrev;
int m_uniqueInts[2];
};
int dna_nr, nr;
};
@@ -64,8 +71,6 @@ namespace bParse {
class ChunkUtils
{
public:
// buffer offset util
static int getNextBlock(bChunkInd *dataChunk, const char *dataPtr, const int flags);
// file chunk offset
static int getOffset(int flags);