fix: some file didn't have the svn:eol-style native yet
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
INCLUDE_DIRECTORIES( ${BULLET_PHYSICS_SOURCE_DIR}/src
|
||||
${BULLET_PHYSICS_SOURCE_DIR}/src
|
||||
${BULLET_PHYSICS_SOURCE_DIR}/Extras/Serialize/BulletFileLoader
|
||||
${BULLET_PHYSICS_SOURCE_DIR}/Extras/Serialize/BlenderSerialize
|
||||
)
|
||||
|
||||
ADD_LIBRARY(BlenderSerialize dna249.cpp dna249-64bit.cpp bBlenderFile.cpp bBlenderFile.h bMain.cpp bMain.h )
|
||||
INCLUDE_DIRECTORIES( ${BULLET_PHYSICS_SOURCE_DIR}/src
|
||||
${BULLET_PHYSICS_SOURCE_DIR}/src
|
||||
${BULLET_PHYSICS_SOURCE_DIR}/Extras/Serialize/BulletFileLoader
|
||||
${BULLET_PHYSICS_SOURCE_DIR}/Extras/Serialize/BlenderSerialize
|
||||
)
|
||||
|
||||
ADD_LIBRARY(BlenderSerialize dna249.cpp dna249-64bit.cpp bBlenderFile.cpp bBlenderFile.h bMain.cpp bMain.h )
|
||||
|
||||
@@ -1,224 +1,224 @@
|
||||
/*
|
||||
bParse
|
||||
Copyright (c) 2006-2009 Charlie C & Erwin Coumans http://gamekit.googlecode.com
|
||||
|
||||
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.
|
||||
*/
|
||||
|
||||
#include "bBlenderFile.h"
|
||||
#include "bMain.h"
|
||||
#include "bDefines.h"
|
||||
#include "bDNA.h"
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
// 32 && 64 bit versions
|
||||
extern unsigned char DNAstr[];
|
||||
extern int DNAlen;
|
||||
|
||||
extern unsigned char DNAstr64[];
|
||||
extern int DNAlen64;
|
||||
|
||||
|
||||
using namespace bParse;
|
||||
|
||||
bBlenderFile::bBlenderFile(const char* fileName)
|
||||
:bFile(fileName, "BLENDER")
|
||||
{
|
||||
mMain= new bMain(this, fileName, mVersion);
|
||||
}
|
||||
|
||||
|
||||
|
||||
bBlenderFile::bBlenderFile(char *memoryBuffer, int len)
|
||||
:bFile(memoryBuffer,len, "BLENDER"),
|
||||
mMain(0)
|
||||
{
|
||||
mMain= new bMain(this, "memoryBuf", mVersion);
|
||||
}
|
||||
|
||||
|
||||
bBlenderFile::~bBlenderFile()
|
||||
{
|
||||
delete mMain;
|
||||
}
|
||||
|
||||
|
||||
bMain* bBlenderFile::getMain()
|
||||
{
|
||||
return mMain;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------- //
|
||||
void bBlenderFile::parseData()
|
||||
{
|
||||
printf ("Building datablocks\n");
|
||||
printf ("Chunk size = %d\n",CHUNK_HEADER_LEN);
|
||||
printf ("File chunk size = %d\n", ChunkUtils::getOffset(mFlags));
|
||||
|
||||
const bool swap = (mFlags&FD_ENDIAN_SWAP)!=0;
|
||||
|
||||
|
||||
|
||||
char *dataPtr = mFileBuffer+mDataStart;
|
||||
|
||||
bChunkInd dataChunk;
|
||||
dataChunk.code = 0;
|
||||
|
||||
|
||||
//dataPtr += ChunkUtils::getNextBlock(&dataChunk, dataPtr, mFlags);
|
||||
int seek = getNextBlock(&dataChunk, dataPtr, mFlags);
|
||||
//dataPtr += ChunkUtils::getOffset(mFlags);
|
||||
char *dataPtrHead = 0;
|
||||
|
||||
while (dataChunk.code != DNA1)
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
// one behind
|
||||
if (dataChunk.code == SDNA) break;
|
||||
//if (dataChunk.code == DNA1) break;
|
||||
|
||||
// same as (BHEAD+DATA dependency)
|
||||
dataPtrHead = dataPtr+ChunkUtils::getOffset(mFlags);
|
||||
char *id = readStruct(dataPtrHead, dataChunk);
|
||||
|
||||
// lookup maps
|
||||
if (id)
|
||||
{
|
||||
mLibPointers.insert(dataChunk.oldPtr, (bStructHandle*)id);
|
||||
|
||||
m_chunks.push_back(dataChunk);
|
||||
// block it
|
||||
bListBasePtr *listID = mMain->getListBasePtr(dataChunk.code);
|
||||
if (listID)
|
||||
listID->push_back((bStructHandle*)id);
|
||||
}
|
||||
|
||||
if (dataChunk.code == GLOB)
|
||||
{
|
||||
m_glob = (bStructHandle*) id;
|
||||
}
|
||||
|
||||
// next please!
|
||||
dataPtr += seek;
|
||||
|
||||
seek = getNextBlock(&dataChunk, dataPtr, mFlags);
|
||||
if (seek < 0)
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void bBlenderFile::addDataBlock(char* dataBlock)
|
||||
{
|
||||
mMain->addDatablock(dataBlock);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 32 && 64 bit versions
|
||||
extern unsigned char DNAstr[];
|
||||
extern int DNAlen;
|
||||
|
||||
//unsigned char DNAstr[]={0};
|
||||
//int DNAlen=0;
|
||||
|
||||
|
||||
extern unsigned char DNAstr64[];
|
||||
extern int DNAlen64;
|
||||
|
||||
|
||||
void bBlenderFile::writeDNA(FILE* fp)
|
||||
{
|
||||
|
||||
bChunkInd dataChunk;
|
||||
dataChunk.code = DNA1;
|
||||
dataChunk.dna_nr = 0;
|
||||
dataChunk.nr = 1;
|
||||
|
||||
if (VOID_IS_8)
|
||||
{
|
||||
dataChunk.len = DNAlen64;
|
||||
dataChunk.oldPtr = DNAstr64;
|
||||
fwrite(&dataChunk,sizeof(bChunkInd),1,fp);
|
||||
fwrite(DNAstr64, DNAlen64,1,fp);
|
||||
}
|
||||
else
|
||||
{
|
||||
dataChunk.len = DNAlen;
|
||||
dataChunk.oldPtr = DNAstr;
|
||||
fwrite(&dataChunk,sizeof(bChunkInd),1,fp);
|
||||
fwrite(DNAstr, DNAlen,1,fp);
|
||||
}
|
||||
}
|
||||
|
||||
void bBlenderFile::parse(bool verboseDumpAllTypes)
|
||||
{
|
||||
if (VOID_IS_8)
|
||||
{
|
||||
parseInternal(verboseDumpAllTypes,(char*)DNAstr64,DNAlen64);
|
||||
}
|
||||
else
|
||||
{
|
||||
parseInternal(verboseDumpAllTypes,(char*)DNAstr,DNAlen);
|
||||
}
|
||||
}
|
||||
|
||||
// experimental
|
||||
int bBlenderFile::write(const char* fileName, bool fixupPointers)
|
||||
{
|
||||
FILE *fp = fopen(fileName, "wb");
|
||||
if (fp)
|
||||
{
|
||||
char header[SIZEOFBLENDERHEADER] ;
|
||||
memcpy(header, m_headerString, 7);
|
||||
int endian= 1;
|
||||
endian= ((char*)&endian)[0];
|
||||
|
||||
if (endian)
|
||||
{
|
||||
header[7] = '_';
|
||||
} else
|
||||
{
|
||||
header[7] = '-';
|
||||
}
|
||||
if (VOID_IS_8)
|
||||
{
|
||||
header[8]='V';
|
||||
} else
|
||||
{
|
||||
header[8]='v';
|
||||
}
|
||||
|
||||
header[9] = '2';
|
||||
header[10] = '4';
|
||||
header[11] = '9';
|
||||
|
||||
fwrite(header,SIZEOFBLENDERHEADER,1,fp);
|
||||
|
||||
writeChunks(fp, fixupPointers);
|
||||
|
||||
writeDNA(fp);
|
||||
|
||||
fclose(fp);
|
||||
|
||||
} else
|
||||
{
|
||||
printf("Error: cannot open file %s for writing\n",fileName);
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
/*
|
||||
bParse
|
||||
Copyright (c) 2006-2009 Charlie C & Erwin Coumans http://gamekit.googlecode.com
|
||||
|
||||
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.
|
||||
*/
|
||||
|
||||
#include "bBlenderFile.h"
|
||||
#include "bMain.h"
|
||||
#include "bDefines.h"
|
||||
#include "bDNA.h"
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
// 32 && 64 bit versions
|
||||
extern unsigned char DNAstr[];
|
||||
extern int DNAlen;
|
||||
|
||||
extern unsigned char DNAstr64[];
|
||||
extern int DNAlen64;
|
||||
|
||||
|
||||
using namespace bParse;
|
||||
|
||||
bBlenderFile::bBlenderFile(const char* fileName)
|
||||
:bFile(fileName, "BLENDER")
|
||||
{
|
||||
mMain= new bMain(this, fileName, mVersion);
|
||||
}
|
||||
|
||||
|
||||
|
||||
bBlenderFile::bBlenderFile(char *memoryBuffer, int len)
|
||||
:bFile(memoryBuffer,len, "BLENDER"),
|
||||
mMain(0)
|
||||
{
|
||||
mMain= new bMain(this, "memoryBuf", mVersion);
|
||||
}
|
||||
|
||||
|
||||
bBlenderFile::~bBlenderFile()
|
||||
{
|
||||
delete mMain;
|
||||
}
|
||||
|
||||
|
||||
bMain* bBlenderFile::getMain()
|
||||
{
|
||||
return mMain;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------- //
|
||||
void bBlenderFile::parseData()
|
||||
{
|
||||
printf ("Building datablocks\n");
|
||||
printf ("Chunk size = %d\n",CHUNK_HEADER_LEN);
|
||||
printf ("File chunk size = %d\n", ChunkUtils::getOffset(mFlags));
|
||||
|
||||
const bool swap = (mFlags&FD_ENDIAN_SWAP)!=0;
|
||||
|
||||
|
||||
|
||||
char *dataPtr = mFileBuffer+mDataStart;
|
||||
|
||||
bChunkInd dataChunk;
|
||||
dataChunk.code = 0;
|
||||
|
||||
|
||||
//dataPtr += ChunkUtils::getNextBlock(&dataChunk, dataPtr, mFlags);
|
||||
int seek = getNextBlock(&dataChunk, dataPtr, mFlags);
|
||||
//dataPtr += ChunkUtils::getOffset(mFlags);
|
||||
char *dataPtrHead = 0;
|
||||
|
||||
while (dataChunk.code != DNA1)
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
// one behind
|
||||
if (dataChunk.code == SDNA) break;
|
||||
//if (dataChunk.code == DNA1) break;
|
||||
|
||||
// same as (BHEAD+DATA dependency)
|
||||
dataPtrHead = dataPtr+ChunkUtils::getOffset(mFlags);
|
||||
char *id = readStruct(dataPtrHead, dataChunk);
|
||||
|
||||
// lookup maps
|
||||
if (id)
|
||||
{
|
||||
mLibPointers.insert(dataChunk.oldPtr, (bStructHandle*)id);
|
||||
|
||||
m_chunks.push_back(dataChunk);
|
||||
// block it
|
||||
bListBasePtr *listID = mMain->getListBasePtr(dataChunk.code);
|
||||
if (listID)
|
||||
listID->push_back((bStructHandle*)id);
|
||||
}
|
||||
|
||||
if (dataChunk.code == GLOB)
|
||||
{
|
||||
m_glob = (bStructHandle*) id;
|
||||
}
|
||||
|
||||
// next please!
|
||||
dataPtr += seek;
|
||||
|
||||
seek = getNextBlock(&dataChunk, dataPtr, mFlags);
|
||||
if (seek < 0)
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void bBlenderFile::addDataBlock(char* dataBlock)
|
||||
{
|
||||
mMain->addDatablock(dataBlock);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 32 && 64 bit versions
|
||||
extern unsigned char DNAstr[];
|
||||
extern int DNAlen;
|
||||
|
||||
//unsigned char DNAstr[]={0};
|
||||
//int DNAlen=0;
|
||||
|
||||
|
||||
extern unsigned char DNAstr64[];
|
||||
extern int DNAlen64;
|
||||
|
||||
|
||||
void bBlenderFile::writeDNA(FILE* fp)
|
||||
{
|
||||
|
||||
bChunkInd dataChunk;
|
||||
dataChunk.code = DNA1;
|
||||
dataChunk.dna_nr = 0;
|
||||
dataChunk.nr = 1;
|
||||
|
||||
if (VOID_IS_8)
|
||||
{
|
||||
dataChunk.len = DNAlen64;
|
||||
dataChunk.oldPtr = DNAstr64;
|
||||
fwrite(&dataChunk,sizeof(bChunkInd),1,fp);
|
||||
fwrite(DNAstr64, DNAlen64,1,fp);
|
||||
}
|
||||
else
|
||||
{
|
||||
dataChunk.len = DNAlen;
|
||||
dataChunk.oldPtr = DNAstr;
|
||||
fwrite(&dataChunk,sizeof(bChunkInd),1,fp);
|
||||
fwrite(DNAstr, DNAlen,1,fp);
|
||||
}
|
||||
}
|
||||
|
||||
void bBlenderFile::parse(bool verboseDumpAllTypes)
|
||||
{
|
||||
if (VOID_IS_8)
|
||||
{
|
||||
parseInternal(verboseDumpAllTypes,(char*)DNAstr64,DNAlen64);
|
||||
}
|
||||
else
|
||||
{
|
||||
parseInternal(verboseDumpAllTypes,(char*)DNAstr,DNAlen);
|
||||
}
|
||||
}
|
||||
|
||||
// experimental
|
||||
int bBlenderFile::write(const char* fileName, bool fixupPointers)
|
||||
{
|
||||
FILE *fp = fopen(fileName, "wb");
|
||||
if (fp)
|
||||
{
|
||||
char header[SIZEOFBLENDERHEADER] ;
|
||||
memcpy(header, m_headerString, 7);
|
||||
int endian= 1;
|
||||
endian= ((char*)&endian)[0];
|
||||
|
||||
if (endian)
|
||||
{
|
||||
header[7] = '_';
|
||||
} else
|
||||
{
|
||||
header[7] = '-';
|
||||
}
|
||||
if (VOID_IS_8)
|
||||
{
|
||||
header[8]='V';
|
||||
} else
|
||||
{
|
||||
header[8]='v';
|
||||
}
|
||||
|
||||
header[9] = '2';
|
||||
header[10] = '4';
|
||||
header[11] = '9';
|
||||
|
||||
fwrite(header,SIZEOFBLENDERHEADER,1,fp);
|
||||
|
||||
writeChunks(fp, fixupPointers);
|
||||
|
||||
writeDNA(fp);
|
||||
|
||||
fclose(fp);
|
||||
|
||||
} else
|
||||
{
|
||||
printf("Error: cannot open file %s for writing\n",fileName);
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
@@ -1,63 +1,63 @@
|
||||
/*
|
||||
bParse
|
||||
Copyright (c) 2006-2009 Charlie C & Erwin Coumans http://gamekit.googlecode.com
|
||||
|
||||
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.
|
||||
*/
|
||||
|
||||
#ifndef B_BLENDER_FILE_H
|
||||
#define B_BLENDER_FILE_H
|
||||
|
||||
|
||||
#include "bFile.h"
|
||||
|
||||
namespace bParse {
|
||||
|
||||
// ----------------------------------------------------- //
|
||||
class bBlenderFile : public bFile
|
||||
{
|
||||
|
||||
protected:
|
||||
bMain* mMain;
|
||||
|
||||
bStructHandle* m_glob;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
bBlenderFile(const char* fileName);
|
||||
|
||||
bBlenderFile(char *memoryBuffer, int len);
|
||||
|
||||
virtual ~bBlenderFile();
|
||||
|
||||
bMain* getMain();
|
||||
|
||||
virtual void addDataBlock(char* dataBlock);
|
||||
|
||||
bStructHandle* getFileGlobal()
|
||||
{
|
||||
return m_glob;
|
||||
}
|
||||
|
||||
// experimental
|
||||
virtual int write(const char* fileName, bool fixupPointers = false);
|
||||
|
||||
virtual void parse(bool verboseDumpAllTypes);
|
||||
|
||||
virtual void parseData();
|
||||
|
||||
virtual void writeDNA(FILE* fp);
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
#endif //B_BLENDER_FILE_H
|
||||
/*
|
||||
bParse
|
||||
Copyright (c) 2006-2009 Charlie C & Erwin Coumans http://gamekit.googlecode.com
|
||||
|
||||
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.
|
||||
*/
|
||||
|
||||
#ifndef B_BLENDER_FILE_H
|
||||
#define B_BLENDER_FILE_H
|
||||
|
||||
|
||||
#include "bFile.h"
|
||||
|
||||
namespace bParse {
|
||||
|
||||
// ----------------------------------------------------- //
|
||||
class bBlenderFile : public bFile
|
||||
{
|
||||
|
||||
protected:
|
||||
bMain* mMain;
|
||||
|
||||
bStructHandle* m_glob;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
bBlenderFile(const char* fileName);
|
||||
|
||||
bBlenderFile(char *memoryBuffer, int len);
|
||||
|
||||
virtual ~bBlenderFile();
|
||||
|
||||
bMain* getMain();
|
||||
|
||||
virtual void addDataBlock(char* dataBlock);
|
||||
|
||||
bStructHandle* getFileGlobal()
|
||||
{
|
||||
return m_glob;
|
||||
}
|
||||
|
||||
// experimental
|
||||
virtual int write(const char* fileName, bool fixupPointers = false);
|
||||
|
||||
virtual void parse(bool verboseDumpAllTypes);
|
||||
|
||||
virtual void parseData();
|
||||
|
||||
virtual void writeDNA(FILE* fp);
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
#endif //B_BLENDER_FILE_H
|
||||
|
||||
@@ -1,392 +1,392 @@
|
||||
/*
|
||||
bParse
|
||||
Copyright (c) 2006-2009 Charlie C & Erwin Coumans http://gamekit.googlecode.com
|
||||
|
||||
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.
|
||||
*/
|
||||
|
||||
#include "bMain.h"
|
||||
#include "bBlenderFile.h"
|
||||
#include "bDefines.h"
|
||||
#include "bChunk.h"
|
||||
#include "bDNA.h"
|
||||
|
||||
using namespace bParse;
|
||||
|
||||
|
||||
// ----------------------------------------------------- //
|
||||
bMain::bMain(bBlenderFile *filePtr, const char *baseName, int fileVersion)
|
||||
: mFP(filePtr),
|
||||
mVersion(fileVersion),
|
||||
mName(baseName)
|
||||
{
|
||||
mData.insert(ID_SCE,bListBasePtr());
|
||||
mData.insert(ID_LI,bListBasePtr());
|
||||
mData.insert(ID_OB,bListBasePtr());
|
||||
mData.insert(ID_ME,bListBasePtr());
|
||||
mData.insert(ID_CU,bListBasePtr());
|
||||
mData.insert(ID_MB,bListBasePtr());
|
||||
mData.insert(ID_MA,bListBasePtr());
|
||||
mData.insert(ID_TE,bListBasePtr());
|
||||
mData.insert(ID_IM,bListBasePtr());
|
||||
mData.insert(ID_WV,bListBasePtr());
|
||||
mData.insert(ID_LT,bListBasePtr());
|
||||
mData.insert(ID_LA,bListBasePtr());
|
||||
mData.insert(ID_CA,bListBasePtr());
|
||||
mData.insert(ID_IP,bListBasePtr());
|
||||
mData.insert(ID_KE,bListBasePtr());
|
||||
mData.insert(ID_WO,bListBasePtr());
|
||||
mData.insert(ID_SCR,bListBasePtr());
|
||||
mData.insert(ID_VF,bListBasePtr());
|
||||
mData.insert(ID_TXT,bListBasePtr());
|
||||
mData.insert(ID_SO,bListBasePtr());
|
||||
mData.insert(ID_GR,bListBasePtr());
|
||||
mData.insert(ID_AR,bListBasePtr());
|
||||
mData.insert(ID_AC,bListBasePtr());
|
||||
mData.insert(ID_NT,bListBasePtr());
|
||||
mData.insert(ID_BR,bListBasePtr());
|
||||
mData.insert(ID_SCRIPT, bListBasePtr());
|
||||
}
|
||||
|
||||
|
||||
// ----------------------------------------------------- //
|
||||
bMain::~bMain()
|
||||
{
|
||||
// allocated data blocks!
|
||||
|
||||
int sz = mPool.size();
|
||||
for (int i=0;i<sz;i++)
|
||||
{
|
||||
delete [] mPool[i];
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------- //
|
||||
int bMain::getVersion()
|
||||
{
|
||||
return mVersion;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------- //
|
||||
const char *bMain::getName()
|
||||
{
|
||||
return mName;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------- //
|
||||
void bMain::addDatablock(void *allocated)
|
||||
{
|
||||
assert(allocated);
|
||||
mPool.push_back((bStructHandle*)allocated);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// ------------------------------------------------------------//
|
||||
void bMain::linkList(void *listBasePtr)
|
||||
{
|
||||
|
||||
struct ListBase // local Blender::ListBase
|
||||
{
|
||||
void *first;
|
||||
void *last;
|
||||
};
|
||||
|
||||
struct Link // local Blender::Link
|
||||
{
|
||||
void *next;
|
||||
void *prev;
|
||||
};
|
||||
|
||||
|
||||
ListBase *base = (ListBase*)listBasePtr;
|
||||
|
||||
if (!base || !base->first)
|
||||
return;
|
||||
|
||||
base->first = mFP->findLibPointer(base->first);
|
||||
if (!base->first)
|
||||
{
|
||||
base->last = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
void *prev = 0;
|
||||
Link *l = (Link*)base->first;
|
||||
while (l)
|
||||
{
|
||||
l->next = mFP->findLibPointer(l->next);
|
||||
l->prev = l->next;
|
||||
prev = l->next;
|
||||
l = (Link*)l->next;
|
||||
}
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------//
|
||||
bListBasePtr* bMain::getListBasePtr(int listBaseCode)
|
||||
{
|
||||
bListBasePtr *ptr = _findCode(listBaseCode);
|
||||
if (!ptr)
|
||||
return 0;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------//
|
||||
bListBasePtr *bMain::_findCode(int code)
|
||||
{
|
||||
|
||||
bListBasePtr* lbPtr = mData.find(code);
|
||||
return lbPtr;
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------------------------------//
|
||||
bListBasePtr *bMain::getScene()
|
||||
{
|
||||
bListBasePtr *ptr = _findCode(ID_SCE);
|
||||
if (!ptr)
|
||||
return 0;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------//
|
||||
bListBasePtr *bMain::getLibrary()
|
||||
{
|
||||
bListBasePtr *ptr = _findCode(ID_LI);
|
||||
if (!ptr)
|
||||
return 0;
|
||||
return ptr;
|
||||
}
|
||||
// ------------------------------------------------------------//
|
||||
bListBasePtr *bMain::getObject()
|
||||
{
|
||||
bListBasePtr *ptr = _findCode(ID_OB);
|
||||
if (!ptr)
|
||||
return 0;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------//
|
||||
bListBasePtr *bMain::getMesh()
|
||||
{
|
||||
bListBasePtr *ptr = _findCode(ID_ME);
|
||||
if (!ptr)
|
||||
return 0;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------//
|
||||
bListBasePtr *bMain::getCurve()
|
||||
{
|
||||
bListBasePtr *ptr = _findCode(ID_CU);
|
||||
if (!ptr)
|
||||
return 0;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ------------------------------------------------------------//
|
||||
bListBasePtr *bMain::getMball()
|
||||
{
|
||||
bListBasePtr *ptr = _findCode(ID_MB);
|
||||
if (!ptr)
|
||||
return 0;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------//
|
||||
bListBasePtr *bMain::getMat()
|
||||
{
|
||||
bListBasePtr *ptr = _findCode(ID_MA);
|
||||
if (!ptr)
|
||||
return 0;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------//
|
||||
bListBasePtr *bMain::getTex()
|
||||
{
|
||||
bListBasePtr *ptr = _findCode(ID_TE);
|
||||
if (!ptr)
|
||||
return 0;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------------------------------//
|
||||
bListBasePtr *bMain::getImage()
|
||||
{
|
||||
bListBasePtr *ptr = _findCode(ID_IM);
|
||||
if (!ptr)
|
||||
return 0;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------//
|
||||
bListBasePtr *bMain::getWave()
|
||||
{
|
||||
bListBasePtr *ptr = _findCode(ID_WV);
|
||||
if (!ptr)
|
||||
return 0;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------//
|
||||
bListBasePtr *bMain::getLatt()
|
||||
{
|
||||
bListBasePtr *ptr = _findCode(ID_LT);
|
||||
if (!ptr)
|
||||
return 0;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------//
|
||||
bListBasePtr *bMain::getLamp()
|
||||
{
|
||||
bListBasePtr *ptr = _findCode(ID_LA);
|
||||
if (!ptr)
|
||||
return 0;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------//
|
||||
bListBasePtr *bMain::getCamera()
|
||||
{
|
||||
bListBasePtr *ptr = _findCode(ID_CA);
|
||||
if (!ptr)
|
||||
return 0;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------//
|
||||
bListBasePtr *bMain::getIpo()
|
||||
{
|
||||
bListBasePtr *ptr = _findCode(ID_IP);
|
||||
if (!ptr)
|
||||
return 0;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------//
|
||||
bListBasePtr *bMain::getKey()
|
||||
{
|
||||
bListBasePtr *ptr = _findCode(ID_KE);
|
||||
if (!ptr)
|
||||
return 0;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------//
|
||||
bListBasePtr *bMain::getWorld()
|
||||
{
|
||||
bListBasePtr *ptr = _findCode(ID_WO);
|
||||
if (!ptr)
|
||||
return 0;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------------------------------//
|
||||
bListBasePtr *bMain::getScreen()
|
||||
{
|
||||
bListBasePtr *ptr = _findCode(ID_SCR);
|
||||
if (!ptr)
|
||||
return 0;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------//
|
||||
bListBasePtr *bMain::getScript()
|
||||
{
|
||||
bListBasePtr *ptr = _findCode(ID_SCRIPT);
|
||||
if (!ptr)
|
||||
return 0;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------//
|
||||
bListBasePtr *bMain::getVfont()
|
||||
{
|
||||
bListBasePtr *ptr = _findCode(ID_VF);
|
||||
if (!ptr)
|
||||
return 0;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------//
|
||||
bListBasePtr *bMain::getText()
|
||||
{
|
||||
bListBasePtr *ptr = _findCode(ID_TXT);
|
||||
if (!ptr)
|
||||
return 0;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------//
|
||||
bListBasePtr *bMain::getSound()
|
||||
{
|
||||
bListBasePtr *ptr = _findCode(ID_SO);
|
||||
if (!ptr)
|
||||
return 0;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------//
|
||||
bListBasePtr *bMain::getGroup()
|
||||
{
|
||||
bListBasePtr *ptr = _findCode(ID_GR);
|
||||
if (!ptr)
|
||||
return 0;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------//
|
||||
bListBasePtr *bMain::getArmature()
|
||||
{
|
||||
bListBasePtr *ptr = _findCode(ID_AR);
|
||||
if (!ptr)
|
||||
return 0;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------//
|
||||
bListBasePtr *bMain::getAction()
|
||||
{
|
||||
bListBasePtr *ptr = _findCode(ID_AC);
|
||||
if (!ptr)
|
||||
return 0;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------------------------------//
|
||||
bListBasePtr *bMain::getNodetree()
|
||||
{
|
||||
bListBasePtr *ptr = _findCode(ID_NT);
|
||||
if (!ptr)
|
||||
return 0;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------//
|
||||
bListBasePtr *bMain::getBrush()
|
||||
{
|
||||
bListBasePtr *ptr = _findCode(ID_BR);
|
||||
if (!ptr)
|
||||
return 0;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//eof
|
||||
/*
|
||||
bParse
|
||||
Copyright (c) 2006-2009 Charlie C & Erwin Coumans http://gamekit.googlecode.com
|
||||
|
||||
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.
|
||||
*/
|
||||
|
||||
#include "bMain.h"
|
||||
#include "bBlenderFile.h"
|
||||
#include "bDefines.h"
|
||||
#include "bChunk.h"
|
||||
#include "bDNA.h"
|
||||
|
||||
using namespace bParse;
|
||||
|
||||
|
||||
// ----------------------------------------------------- //
|
||||
bMain::bMain(bBlenderFile *filePtr, const char *baseName, int fileVersion)
|
||||
: mFP(filePtr),
|
||||
mVersion(fileVersion),
|
||||
mName(baseName)
|
||||
{
|
||||
mData.insert(ID_SCE,bListBasePtr());
|
||||
mData.insert(ID_LI,bListBasePtr());
|
||||
mData.insert(ID_OB,bListBasePtr());
|
||||
mData.insert(ID_ME,bListBasePtr());
|
||||
mData.insert(ID_CU,bListBasePtr());
|
||||
mData.insert(ID_MB,bListBasePtr());
|
||||
mData.insert(ID_MA,bListBasePtr());
|
||||
mData.insert(ID_TE,bListBasePtr());
|
||||
mData.insert(ID_IM,bListBasePtr());
|
||||
mData.insert(ID_WV,bListBasePtr());
|
||||
mData.insert(ID_LT,bListBasePtr());
|
||||
mData.insert(ID_LA,bListBasePtr());
|
||||
mData.insert(ID_CA,bListBasePtr());
|
||||
mData.insert(ID_IP,bListBasePtr());
|
||||
mData.insert(ID_KE,bListBasePtr());
|
||||
mData.insert(ID_WO,bListBasePtr());
|
||||
mData.insert(ID_SCR,bListBasePtr());
|
||||
mData.insert(ID_VF,bListBasePtr());
|
||||
mData.insert(ID_TXT,bListBasePtr());
|
||||
mData.insert(ID_SO,bListBasePtr());
|
||||
mData.insert(ID_GR,bListBasePtr());
|
||||
mData.insert(ID_AR,bListBasePtr());
|
||||
mData.insert(ID_AC,bListBasePtr());
|
||||
mData.insert(ID_NT,bListBasePtr());
|
||||
mData.insert(ID_BR,bListBasePtr());
|
||||
mData.insert(ID_SCRIPT, bListBasePtr());
|
||||
}
|
||||
|
||||
|
||||
// ----------------------------------------------------- //
|
||||
bMain::~bMain()
|
||||
{
|
||||
// allocated data blocks!
|
||||
|
||||
int sz = mPool.size();
|
||||
for (int i=0;i<sz;i++)
|
||||
{
|
||||
delete [] mPool[i];
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------- //
|
||||
int bMain::getVersion()
|
||||
{
|
||||
return mVersion;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------- //
|
||||
const char *bMain::getName()
|
||||
{
|
||||
return mName;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------- //
|
||||
void bMain::addDatablock(void *allocated)
|
||||
{
|
||||
assert(allocated);
|
||||
mPool.push_back((bStructHandle*)allocated);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// ------------------------------------------------------------//
|
||||
void bMain::linkList(void *listBasePtr)
|
||||
{
|
||||
|
||||
struct ListBase // local Blender::ListBase
|
||||
{
|
||||
void *first;
|
||||
void *last;
|
||||
};
|
||||
|
||||
struct Link // local Blender::Link
|
||||
{
|
||||
void *next;
|
||||
void *prev;
|
||||
};
|
||||
|
||||
|
||||
ListBase *base = (ListBase*)listBasePtr;
|
||||
|
||||
if (!base || !base->first)
|
||||
return;
|
||||
|
||||
base->first = mFP->findLibPointer(base->first);
|
||||
if (!base->first)
|
||||
{
|
||||
base->last = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
void *prev = 0;
|
||||
Link *l = (Link*)base->first;
|
||||
while (l)
|
||||
{
|
||||
l->next = mFP->findLibPointer(l->next);
|
||||
l->prev = l->next;
|
||||
prev = l->next;
|
||||
l = (Link*)l->next;
|
||||
}
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------//
|
||||
bListBasePtr* bMain::getListBasePtr(int listBaseCode)
|
||||
{
|
||||
bListBasePtr *ptr = _findCode(listBaseCode);
|
||||
if (!ptr)
|
||||
return 0;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------//
|
||||
bListBasePtr *bMain::_findCode(int code)
|
||||
{
|
||||
|
||||
bListBasePtr* lbPtr = mData.find(code);
|
||||
return lbPtr;
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------------------------------//
|
||||
bListBasePtr *bMain::getScene()
|
||||
{
|
||||
bListBasePtr *ptr = _findCode(ID_SCE);
|
||||
if (!ptr)
|
||||
return 0;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------//
|
||||
bListBasePtr *bMain::getLibrary()
|
||||
{
|
||||
bListBasePtr *ptr = _findCode(ID_LI);
|
||||
if (!ptr)
|
||||
return 0;
|
||||
return ptr;
|
||||
}
|
||||
// ------------------------------------------------------------//
|
||||
bListBasePtr *bMain::getObject()
|
||||
{
|
||||
bListBasePtr *ptr = _findCode(ID_OB);
|
||||
if (!ptr)
|
||||
return 0;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------//
|
||||
bListBasePtr *bMain::getMesh()
|
||||
{
|
||||
bListBasePtr *ptr = _findCode(ID_ME);
|
||||
if (!ptr)
|
||||
return 0;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------//
|
||||
bListBasePtr *bMain::getCurve()
|
||||
{
|
||||
bListBasePtr *ptr = _findCode(ID_CU);
|
||||
if (!ptr)
|
||||
return 0;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ------------------------------------------------------------//
|
||||
bListBasePtr *bMain::getMball()
|
||||
{
|
||||
bListBasePtr *ptr = _findCode(ID_MB);
|
||||
if (!ptr)
|
||||
return 0;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------//
|
||||
bListBasePtr *bMain::getMat()
|
||||
{
|
||||
bListBasePtr *ptr = _findCode(ID_MA);
|
||||
if (!ptr)
|
||||
return 0;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------//
|
||||
bListBasePtr *bMain::getTex()
|
||||
{
|
||||
bListBasePtr *ptr = _findCode(ID_TE);
|
||||
if (!ptr)
|
||||
return 0;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------------------------------//
|
||||
bListBasePtr *bMain::getImage()
|
||||
{
|
||||
bListBasePtr *ptr = _findCode(ID_IM);
|
||||
if (!ptr)
|
||||
return 0;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------//
|
||||
bListBasePtr *bMain::getWave()
|
||||
{
|
||||
bListBasePtr *ptr = _findCode(ID_WV);
|
||||
if (!ptr)
|
||||
return 0;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------//
|
||||
bListBasePtr *bMain::getLatt()
|
||||
{
|
||||
bListBasePtr *ptr = _findCode(ID_LT);
|
||||
if (!ptr)
|
||||
return 0;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------//
|
||||
bListBasePtr *bMain::getLamp()
|
||||
{
|
||||
bListBasePtr *ptr = _findCode(ID_LA);
|
||||
if (!ptr)
|
||||
return 0;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------//
|
||||
bListBasePtr *bMain::getCamera()
|
||||
{
|
||||
bListBasePtr *ptr = _findCode(ID_CA);
|
||||
if (!ptr)
|
||||
return 0;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------//
|
||||
bListBasePtr *bMain::getIpo()
|
||||
{
|
||||
bListBasePtr *ptr = _findCode(ID_IP);
|
||||
if (!ptr)
|
||||
return 0;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------//
|
||||
bListBasePtr *bMain::getKey()
|
||||
{
|
||||
bListBasePtr *ptr = _findCode(ID_KE);
|
||||
if (!ptr)
|
||||
return 0;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------//
|
||||
bListBasePtr *bMain::getWorld()
|
||||
{
|
||||
bListBasePtr *ptr = _findCode(ID_WO);
|
||||
if (!ptr)
|
||||
return 0;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------------------------------//
|
||||
bListBasePtr *bMain::getScreen()
|
||||
{
|
||||
bListBasePtr *ptr = _findCode(ID_SCR);
|
||||
if (!ptr)
|
||||
return 0;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------//
|
||||
bListBasePtr *bMain::getScript()
|
||||
{
|
||||
bListBasePtr *ptr = _findCode(ID_SCRIPT);
|
||||
if (!ptr)
|
||||
return 0;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------//
|
||||
bListBasePtr *bMain::getVfont()
|
||||
{
|
||||
bListBasePtr *ptr = _findCode(ID_VF);
|
||||
if (!ptr)
|
||||
return 0;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------//
|
||||
bListBasePtr *bMain::getText()
|
||||
{
|
||||
bListBasePtr *ptr = _findCode(ID_TXT);
|
||||
if (!ptr)
|
||||
return 0;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------//
|
||||
bListBasePtr *bMain::getSound()
|
||||
{
|
||||
bListBasePtr *ptr = _findCode(ID_SO);
|
||||
if (!ptr)
|
||||
return 0;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------//
|
||||
bListBasePtr *bMain::getGroup()
|
||||
{
|
||||
bListBasePtr *ptr = _findCode(ID_GR);
|
||||
if (!ptr)
|
||||
return 0;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------//
|
||||
bListBasePtr *bMain::getArmature()
|
||||
{
|
||||
bListBasePtr *ptr = _findCode(ID_AR);
|
||||
if (!ptr)
|
||||
return 0;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------//
|
||||
bListBasePtr *bMain::getAction()
|
||||
{
|
||||
bListBasePtr *ptr = _findCode(ID_AC);
|
||||
if (!ptr)
|
||||
return 0;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------------------------------//
|
||||
bListBasePtr *bMain::getNodetree()
|
||||
{
|
||||
bListBasePtr *ptr = _findCode(ID_NT);
|
||||
if (!ptr)
|
||||
return 0;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------//
|
||||
bListBasePtr *bMain::getBrush()
|
||||
{
|
||||
bListBasePtr *ptr = _findCode(ID_BR);
|
||||
if (!ptr)
|
||||
return 0;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//eof
|
||||
|
||||
@@ -1,110 +1,110 @@
|
||||
/*
|
||||
bParse
|
||||
Copyright (c) 2006-2009 Charlie C & Erwin Coumans http://gamekit.googlecode.com
|
||||
|
||||
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.
|
||||
*/
|
||||
|
||||
#ifndef __BMAIN_H__
|
||||
#define __BMAIN_H__
|
||||
|
||||
#include "bCommon.h"
|
||||
#include "bChunk.h"
|
||||
#include "LinearMath/btHashMap.h"
|
||||
|
||||
|
||||
namespace bParse
|
||||
{
|
||||
class bDNA;
|
||||
|
||||
class bBlenderFile;
|
||||
};
|
||||
|
||||
|
||||
|
||||
namespace bParse {
|
||||
|
||||
|
||||
// ----------------------------------------------------- //
|
||||
|
||||
typedef btHashMap<btHashInt,bListBasePtr> bMainDataMap;
|
||||
|
||||
|
||||
|
||||
// ----------------------------------------------------- //
|
||||
class bMain
|
||||
{
|
||||
//private:
|
||||
public:
|
||||
bBlenderFile* mFP;
|
||||
bListBasePtr mPool;
|
||||
|
||||
int mVersion;
|
||||
const char* mName;
|
||||
|
||||
bMainDataMap mData;
|
||||
|
||||
|
||||
|
||||
|
||||
bListBasePtr *_findCode(int code);
|
||||
|
||||
public:
|
||||
bMain(bBlenderFile *filePtr, const char *baseName, int fileVersion);
|
||||
~bMain();
|
||||
|
||||
int getVersion();
|
||||
const char *getName();
|
||||
|
||||
bListBasePtr *getListBasePtr(int listBaseCode);
|
||||
|
||||
|
||||
bListBasePtr *getScene();
|
||||
bListBasePtr *getLibrary();
|
||||
bListBasePtr *getObject();
|
||||
bListBasePtr *getMesh();
|
||||
bListBasePtr *getCurve();
|
||||
bListBasePtr *getMball();
|
||||
bListBasePtr *getMat();
|
||||
bListBasePtr *getTex();
|
||||
bListBasePtr *getImage();
|
||||
bListBasePtr *getWave();
|
||||
bListBasePtr *getLatt();
|
||||
bListBasePtr *getLamp();
|
||||
bListBasePtr *getCamera();
|
||||
bListBasePtr *getIpo();
|
||||
bListBasePtr *getKey();
|
||||
bListBasePtr *getWorld();
|
||||
bListBasePtr *getScreen();
|
||||
bListBasePtr *getScript();
|
||||
bListBasePtr *getVfont();
|
||||
bListBasePtr *getText();
|
||||
bListBasePtr *getSound();
|
||||
bListBasePtr *getGroup();
|
||||
bListBasePtr *getArmature();
|
||||
bListBasePtr *getAction();
|
||||
bListBasePtr *getNodetree();
|
||||
bListBasePtr *getBrush();
|
||||
|
||||
|
||||
|
||||
// tracking allocated memory
|
||||
void addDatablock(void *allocated);
|
||||
|
||||
|
||||
// --
|
||||
|
||||
void linkList(void *listBasePtr);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BMAIN_H__
|
||||
/*
|
||||
bParse
|
||||
Copyright (c) 2006-2009 Charlie C & Erwin Coumans http://gamekit.googlecode.com
|
||||
|
||||
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.
|
||||
*/
|
||||
|
||||
#ifndef __BMAIN_H__
|
||||
#define __BMAIN_H__
|
||||
|
||||
#include "bCommon.h"
|
||||
#include "bChunk.h"
|
||||
#include "LinearMath/btHashMap.h"
|
||||
|
||||
|
||||
namespace bParse
|
||||
{
|
||||
class bDNA;
|
||||
|
||||
class bBlenderFile;
|
||||
};
|
||||
|
||||
|
||||
|
||||
namespace bParse {
|
||||
|
||||
|
||||
// ----------------------------------------------------- //
|
||||
|
||||
typedef btHashMap<btHashInt,bListBasePtr> bMainDataMap;
|
||||
|
||||
|
||||
|
||||
// ----------------------------------------------------- //
|
||||
class bMain
|
||||
{
|
||||
//private:
|
||||
public:
|
||||
bBlenderFile* mFP;
|
||||
bListBasePtr mPool;
|
||||
|
||||
int mVersion;
|
||||
const char* mName;
|
||||
|
||||
bMainDataMap mData;
|
||||
|
||||
|
||||
|
||||
|
||||
bListBasePtr *_findCode(int code);
|
||||
|
||||
public:
|
||||
bMain(bBlenderFile *filePtr, const char *baseName, int fileVersion);
|
||||
~bMain();
|
||||
|
||||
int getVersion();
|
||||
const char *getName();
|
||||
|
||||
bListBasePtr *getListBasePtr(int listBaseCode);
|
||||
|
||||
|
||||
bListBasePtr *getScene();
|
||||
bListBasePtr *getLibrary();
|
||||
bListBasePtr *getObject();
|
||||
bListBasePtr *getMesh();
|
||||
bListBasePtr *getCurve();
|
||||
bListBasePtr *getMball();
|
||||
bListBasePtr *getMat();
|
||||
bListBasePtr *getTex();
|
||||
bListBasePtr *getImage();
|
||||
bListBasePtr *getWave();
|
||||
bListBasePtr *getLatt();
|
||||
bListBasePtr *getLamp();
|
||||
bListBasePtr *getCamera();
|
||||
bListBasePtr *getIpo();
|
||||
bListBasePtr *getKey();
|
||||
bListBasePtr *getWorld();
|
||||
bListBasePtr *getScreen();
|
||||
bListBasePtr *getScript();
|
||||
bListBasePtr *getVfont();
|
||||
bListBasePtr *getText();
|
||||
bListBasePtr *getSound();
|
||||
bListBasePtr *getGroup();
|
||||
bListBasePtr *getArmature();
|
||||
bListBasePtr *getAction();
|
||||
bListBasePtr *getNodetree();
|
||||
bListBasePtr *getBrush();
|
||||
|
||||
|
||||
|
||||
// tracking allocated memory
|
||||
void addDatablock(void *allocated);
|
||||
|
||||
|
||||
// --
|
||||
|
||||
void linkList(void *listBasePtr);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BMAIN_H__
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,17 +1,17 @@
|
||||
INCLUDE_DIRECTORIES(
|
||||
${BULLET_PHYSICS_SOURCE_DIR}/src
|
||||
)
|
||||
|
||||
ADD_LIBRARY(
|
||||
BulletFileLoader
|
||||
bChunk.cpp
|
||||
bChunk.h
|
||||
bCommon.h
|
||||
bDefines.h
|
||||
bDNA.cpp
|
||||
bDNA.h
|
||||
bFile.cpp
|
||||
bFile.h
|
||||
btBulletFile.cpp
|
||||
btBulletFile.h
|
||||
)
|
||||
INCLUDE_DIRECTORIES(
|
||||
${BULLET_PHYSICS_SOURCE_DIR}/src
|
||||
)
|
||||
|
||||
ADD_LIBRARY(
|
||||
BulletFileLoader
|
||||
bChunk.cpp
|
||||
bChunk.h
|
||||
bCommon.h
|
||||
bDefines.h
|
||||
bDNA.cpp
|
||||
bDNA.h
|
||||
bFile.cpp
|
||||
bFile.h
|
||||
btBulletFile.cpp
|
||||
btBulletFile.h
|
||||
)
|
||||
|
||||
@@ -1,69 +1,69 @@
|
||||
/* 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_H__
|
||||
#define __BULLET_H__
|
||||
#include "bullet_PointerArray.h"
|
||||
#include "bullet_btPhysicsSystem.h"
|
||||
#include "bullet_ListBase.h"
|
||||
#include "bullet_btVector3FloatData.h"
|
||||
#include "bullet_btVector3DoubleData.h"
|
||||
#include "bullet_btMatrix3x3FloatData.h"
|
||||
#include "bullet_btMatrix3x3DoubleData.h"
|
||||
#include "bullet_btTransformFloatData.h"
|
||||
#include "bullet_btTransformDoubleData.h"
|
||||
#include "bullet_btBvhSubtreeInfoData.h"
|
||||
#include "bullet_btOptimizedBvhNodeFloatData.h"
|
||||
#include "bullet_btOptimizedBvhNodeDoubleData.h"
|
||||
#include "bullet_btQuantizedBvhNodeData.h"
|
||||
#include "bullet_btQuantizedBvhFloatData.h"
|
||||
#include "bullet_btQuantizedBvhDoubleData.h"
|
||||
#include "bullet_btCollisionShapeData.h"
|
||||
#include "bullet_btStaticPlaneShapeData.h"
|
||||
#include "bullet_btConvexInternalShapeData.h"
|
||||
#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"
|
||||
#include "bullet_btCompoundShapeChildData.h"
|
||||
#include "bullet_btCompoundShapeData.h"
|
||||
#include "bullet_btCylinderShapeData.h"
|
||||
#include "bullet_btCapsuleShapeData.h"
|
||||
#include "bullet_btTriangleInfoData.h"
|
||||
#include "bullet_btTriangleInfoMapData.h"
|
||||
#include "bullet_btGImpactMeshShapeData.h"
|
||||
#include "bullet_btConvexHullShapeData.h"
|
||||
#include "bullet_btCollisionObjectDoubleData.h"
|
||||
#include "bullet_btCollisionObjectFloatData.h"
|
||||
#include "bullet_btRigidBodyFloatData.h"
|
||||
#include "bullet_btRigidBodyDoubleData.h"
|
||||
#include "bullet_btConstraintInfo1.h"
|
||||
#include "bullet_btTypedConstraintData.h"
|
||||
#include "bullet_btPoint2PointConstraintFloatData.h"
|
||||
#include "bullet_btPoint2PointConstraintDoubleData.h"
|
||||
#include "bullet_btHingeConstraintDoubleData.h"
|
||||
#include "bullet_btHingeConstraintFloatData.h"
|
||||
#include "bullet_btConeTwistConstraintData.h"
|
||||
#include "bullet_btGeneric6DofConstraintData.h"
|
||||
#include "bullet_btSliderConstraintData.h"
|
||||
/* 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_H__
|
||||
#define __BULLET_H__
|
||||
#include "bullet_PointerArray.h"
|
||||
#include "bullet_btPhysicsSystem.h"
|
||||
#include "bullet_ListBase.h"
|
||||
#include "bullet_btVector3FloatData.h"
|
||||
#include "bullet_btVector3DoubleData.h"
|
||||
#include "bullet_btMatrix3x3FloatData.h"
|
||||
#include "bullet_btMatrix3x3DoubleData.h"
|
||||
#include "bullet_btTransformFloatData.h"
|
||||
#include "bullet_btTransformDoubleData.h"
|
||||
#include "bullet_btBvhSubtreeInfoData.h"
|
||||
#include "bullet_btOptimizedBvhNodeFloatData.h"
|
||||
#include "bullet_btOptimizedBvhNodeDoubleData.h"
|
||||
#include "bullet_btQuantizedBvhNodeData.h"
|
||||
#include "bullet_btQuantizedBvhFloatData.h"
|
||||
#include "bullet_btQuantizedBvhDoubleData.h"
|
||||
#include "bullet_btCollisionShapeData.h"
|
||||
#include "bullet_btStaticPlaneShapeData.h"
|
||||
#include "bullet_btConvexInternalShapeData.h"
|
||||
#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"
|
||||
#include "bullet_btCompoundShapeChildData.h"
|
||||
#include "bullet_btCompoundShapeData.h"
|
||||
#include "bullet_btCylinderShapeData.h"
|
||||
#include "bullet_btCapsuleShapeData.h"
|
||||
#include "bullet_btTriangleInfoData.h"
|
||||
#include "bullet_btTriangleInfoMapData.h"
|
||||
#include "bullet_btGImpactMeshShapeData.h"
|
||||
#include "bullet_btConvexHullShapeData.h"
|
||||
#include "bullet_btCollisionObjectDoubleData.h"
|
||||
#include "bullet_btCollisionObjectFloatData.h"
|
||||
#include "bullet_btRigidBodyFloatData.h"
|
||||
#include "bullet_btRigidBodyDoubleData.h"
|
||||
#include "bullet_btConstraintInfo1.h"
|
||||
#include "bullet_btTypedConstraintData.h"
|
||||
#include "bullet_btPoint2PointConstraintFloatData.h"
|
||||
#include "bullet_btPoint2PointConstraintDoubleData.h"
|
||||
#include "bullet_btHingeConstraintDoubleData.h"
|
||||
#include "bullet_btHingeConstraintFloatData.h"
|
||||
#include "bullet_btConeTwistConstraintData.h"
|
||||
#include "bullet_btGeneric6DofConstraintData.h"
|
||||
#include "bullet_btSliderConstraintData.h"
|
||||
#endif//__BULLET_H__
|
||||
@@ -1,77 +1,77 @@
|
||||
/* 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 __BULLETCOMMON_H__
|
||||
#define __BULLETCOMMON_H__
|
||||
|
||||
// put an empty struct in the case
|
||||
typedef struct bInvalidHandle {
|
||||
int unused;
|
||||
}bInvalidHandle;
|
||||
|
||||
namespace Bullet {
|
||||
class PointerArray;
|
||||
class btPhysicsSystem;
|
||||
class ListBase;
|
||||
class btVector3FloatData;
|
||||
class btVector3DoubleData;
|
||||
class btMatrix3x3FloatData;
|
||||
class btMatrix3x3DoubleData;
|
||||
class btTransformFloatData;
|
||||
class btTransformDoubleData;
|
||||
class btBvhSubtreeInfoData;
|
||||
class btOptimizedBvhNodeFloatData;
|
||||
class btOptimizedBvhNodeDoubleData;
|
||||
class btQuantizedBvhNodeData;
|
||||
class btQuantizedBvhFloatData;
|
||||
class btQuantizedBvhDoubleData;
|
||||
class btCollisionShapeData;
|
||||
class btStaticPlaneShapeData;
|
||||
class btConvexInternalShapeData;
|
||||
class btPositionAndRadius;
|
||||
class btMultiSphereShapeData;
|
||||
class btIntIndexData;
|
||||
class btShortIntIndexData;
|
||||
class btShortIntIndexTripletData;
|
||||
class btMeshPartData;
|
||||
class btStridingMeshInterfaceData;
|
||||
class btTriangleMeshShapeData;
|
||||
class btCompoundShapeChildData;
|
||||
class btCompoundShapeData;
|
||||
class btCylinderShapeData;
|
||||
class btCapsuleShapeData;
|
||||
class btTriangleInfoData;
|
||||
class btTriangleInfoMapData;
|
||||
class btGImpactMeshShapeData;
|
||||
class btConvexHullShapeData;
|
||||
class btCollisionObjectDoubleData;
|
||||
class btCollisionObjectFloatData;
|
||||
class btRigidBodyFloatData;
|
||||
class btRigidBodyDoubleData;
|
||||
class btConstraintInfo1;
|
||||
class btTypedConstraintData;
|
||||
class btPoint2PointConstraintFloatData;
|
||||
class btPoint2PointConstraintDoubleData;
|
||||
class btHingeConstraintDoubleData;
|
||||
class btHingeConstraintFloatData;
|
||||
class btConeTwistConstraintData;
|
||||
class btGeneric6DofConstraintData;
|
||||
class btSliderConstraintData;
|
||||
}
|
||||
/* 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 __BULLETCOMMON_H__
|
||||
#define __BULLETCOMMON_H__
|
||||
|
||||
// put an empty struct in the case
|
||||
typedef struct bInvalidHandle {
|
||||
int unused;
|
||||
}bInvalidHandle;
|
||||
|
||||
namespace Bullet {
|
||||
class PointerArray;
|
||||
class btPhysicsSystem;
|
||||
class ListBase;
|
||||
class btVector3FloatData;
|
||||
class btVector3DoubleData;
|
||||
class btMatrix3x3FloatData;
|
||||
class btMatrix3x3DoubleData;
|
||||
class btTransformFloatData;
|
||||
class btTransformDoubleData;
|
||||
class btBvhSubtreeInfoData;
|
||||
class btOptimizedBvhNodeFloatData;
|
||||
class btOptimizedBvhNodeDoubleData;
|
||||
class btQuantizedBvhNodeData;
|
||||
class btQuantizedBvhFloatData;
|
||||
class btQuantizedBvhDoubleData;
|
||||
class btCollisionShapeData;
|
||||
class btStaticPlaneShapeData;
|
||||
class btConvexInternalShapeData;
|
||||
class btPositionAndRadius;
|
||||
class btMultiSphereShapeData;
|
||||
class btIntIndexData;
|
||||
class btShortIntIndexData;
|
||||
class btShortIntIndexTripletData;
|
||||
class btMeshPartData;
|
||||
class btStridingMeshInterfaceData;
|
||||
class btTriangleMeshShapeData;
|
||||
class btCompoundShapeChildData;
|
||||
class btCompoundShapeData;
|
||||
class btCylinderShapeData;
|
||||
class btCapsuleShapeData;
|
||||
class btTriangleInfoData;
|
||||
class btTriangleInfoMapData;
|
||||
class btGImpactMeshShapeData;
|
||||
class btConvexHullShapeData;
|
||||
class btCollisionObjectDoubleData;
|
||||
class btCollisionObjectFloatData;
|
||||
class btRigidBodyFloatData;
|
||||
class btRigidBodyDoubleData;
|
||||
class btConstraintInfo1;
|
||||
class btTypedConstraintData;
|
||||
class btPoint2PointConstraintFloatData;
|
||||
class btPoint2PointConstraintDoubleData;
|
||||
class btHingeConstraintDoubleData;
|
||||
class btHingeConstraintFloatData;
|
||||
class btConeTwistConstraintData;
|
||||
class btGeneric6DofConstraintData;
|
||||
class btSliderConstraintData;
|
||||
}
|
||||
#endif//__BULLETCOMMON_H__
|
||||
@@ -1,40 +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_LISTBASE__H__
|
||||
#define __BULLET_LISTBASE__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class ListBase
|
||||
{
|
||||
public:
|
||||
void *first;
|
||||
void *last;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_LISTBASE__H__
|
||||
/* 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_LISTBASE__H__
|
||||
#define __BULLET_LISTBASE__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class ListBase
|
||||
{
|
||||
public:
|
||||
void *first;
|
||||
void *last;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_LISTBASE__H__
|
||||
|
||||
@@ -1,41 +1,41 @@
|
||||
/* 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_POINTERARRAY__H__
|
||||
#define __BULLET_POINTERARRAY__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class PointerArray
|
||||
{
|
||||
public:
|
||||
int m_size;
|
||||
int m_capacity;
|
||||
void *m_data;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_POINTERARRAY__H__
|
||||
/* 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_POINTERARRAY__H__
|
||||
#define __BULLET_POINTERARRAY__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class PointerArray
|
||||
{
|
||||
public:
|
||||
int m_size;
|
||||
int m_capacity;
|
||||
void *m_data;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_POINTERARRAY__H__
|
||||
|
||||
@@ -1,42 +1,42 @@
|
||||
/* 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_BTBVHSUBTREEINFODATA__H__
|
||||
#define __BULLET_BTBVHSUBTREEINFODATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btBvhSubtreeInfoData
|
||||
{
|
||||
public:
|
||||
int m_rootNodeIndex;
|
||||
int m_subtreeSize;
|
||||
short m_quantizedAabbMin[3];
|
||||
short m_quantizedAabbMax[3];
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTBVHSUBTREEINFODATA__H__
|
||||
/* 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_BTBVHSUBTREEINFODATA__H__
|
||||
#define __BULLET_BTBVHSUBTREEINFODATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btBvhSubtreeInfoData
|
||||
{
|
||||
public:
|
||||
int m_rootNodeIndex;
|
||||
int m_subtreeSize;
|
||||
short m_quantizedAabbMin[3];
|
||||
short m_quantizedAabbMax[3];
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTBVHSUBTREEINFODATA__H__
|
||||
|
||||
@@ -1,42 +1,42 @@
|
||||
/* 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_BTCAPSULESHAPEDATA__H__
|
||||
#define __BULLET_BTCAPSULESHAPEDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
#include "bullet_btConvexInternalShapeData.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btCapsuleShapeData
|
||||
{
|
||||
public:
|
||||
btConvexInternalShapeData m_convexInternalShapeData;
|
||||
int m_upAxis;
|
||||
char m_padding[4];
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTCAPSULESHAPEDATA__H__
|
||||
/* 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_BTCAPSULESHAPEDATA__H__
|
||||
#define __BULLET_BTCAPSULESHAPEDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
#include "bullet_btConvexInternalShapeData.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btCapsuleShapeData
|
||||
{
|
||||
public:
|
||||
btConvexInternalShapeData m_convexInternalShapeData;
|
||||
int m_upAxis;
|
||||
char m_padding[4];
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTCAPSULESHAPEDATA__H__
|
||||
|
||||
@@ -1,64 +1,64 @@
|
||||
/* 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_BTCOLLISIONOBJECTDOUBLEDATA__H__
|
||||
#define __BULLET_BTCOLLISIONOBJECTDOUBLEDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
#include "bullet_btTransformDoubleData.h"
|
||||
#include "bullet_btVector3DoubleData.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btCollisionObjectDoubleData
|
||||
{
|
||||
public:
|
||||
void *m_broadphaseHandle;
|
||||
void *m_collisionShape;
|
||||
btCollisionShapeData *m_rootCollisionShape;
|
||||
char *m_name;
|
||||
btTransformDoubleData m_worldTransform;
|
||||
btTransformDoubleData m_interpolationWorldTransform;
|
||||
btVector3DoubleData m_interpolationLinearVelocity;
|
||||
btVector3DoubleData m_interpolationAngularVelocity;
|
||||
btVector3DoubleData m_anisotropicFriction;
|
||||
double m_contactProcessingThreshold;
|
||||
double m_deactivationTime;
|
||||
double m_friction;
|
||||
double m_restitution;
|
||||
double m_hitFraction;
|
||||
double m_ccdSweptSphereRadius;
|
||||
double m_ccdMotionThreshold;
|
||||
int m_hasAnisotropicFriction;
|
||||
int m_collisionFlags;
|
||||
int m_islandTag1;
|
||||
int m_companionId;
|
||||
int m_activationState1;
|
||||
int m_internalType;
|
||||
int m_checkCollideWith;
|
||||
char m_padding[4];
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTCOLLISIONOBJECTDOUBLEDATA__H__
|
||||
/* 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_BTCOLLISIONOBJECTDOUBLEDATA__H__
|
||||
#define __BULLET_BTCOLLISIONOBJECTDOUBLEDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
#include "bullet_btTransformDoubleData.h"
|
||||
#include "bullet_btVector3DoubleData.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btCollisionObjectDoubleData
|
||||
{
|
||||
public:
|
||||
void *m_broadphaseHandle;
|
||||
void *m_collisionShape;
|
||||
btCollisionShapeData *m_rootCollisionShape;
|
||||
char *m_name;
|
||||
btTransformDoubleData m_worldTransform;
|
||||
btTransformDoubleData m_interpolationWorldTransform;
|
||||
btVector3DoubleData m_interpolationLinearVelocity;
|
||||
btVector3DoubleData m_interpolationAngularVelocity;
|
||||
btVector3DoubleData m_anisotropicFriction;
|
||||
double m_contactProcessingThreshold;
|
||||
double m_deactivationTime;
|
||||
double m_friction;
|
||||
double m_restitution;
|
||||
double m_hitFraction;
|
||||
double m_ccdSweptSphereRadius;
|
||||
double m_ccdMotionThreshold;
|
||||
int m_hasAnisotropicFriction;
|
||||
int m_collisionFlags;
|
||||
int m_islandTag1;
|
||||
int m_companionId;
|
||||
int m_activationState1;
|
||||
int m_internalType;
|
||||
int m_checkCollideWith;
|
||||
char m_padding[4];
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTCOLLISIONOBJECTDOUBLEDATA__H__
|
||||
|
||||
@@ -1,63 +1,63 @@
|
||||
/* 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_BTCOLLISIONOBJECTFLOATDATA__H__
|
||||
#define __BULLET_BTCOLLISIONOBJECTFLOATDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
#include "bullet_btTransformFloatData.h"
|
||||
#include "bullet_btVector3FloatData.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btCollisionObjectFloatData
|
||||
{
|
||||
public:
|
||||
void *m_broadphaseHandle;
|
||||
void *m_collisionShape;
|
||||
btCollisionShapeData *m_rootCollisionShape;
|
||||
char *m_name;
|
||||
btTransformFloatData m_worldTransform;
|
||||
btTransformFloatData m_interpolationWorldTransform;
|
||||
btVector3FloatData m_interpolationLinearVelocity;
|
||||
btVector3FloatData m_interpolationAngularVelocity;
|
||||
btVector3FloatData m_anisotropicFriction;
|
||||
float m_contactProcessingThreshold;
|
||||
float m_deactivationTime;
|
||||
float m_friction;
|
||||
float m_restitution;
|
||||
float m_hitFraction;
|
||||
float m_ccdSweptSphereRadius;
|
||||
float m_ccdMotionThreshold;
|
||||
int m_hasAnisotropicFriction;
|
||||
int m_collisionFlags;
|
||||
int m_islandTag1;
|
||||
int m_companionId;
|
||||
int m_activationState1;
|
||||
int m_internalType;
|
||||
int m_checkCollideWith;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTCOLLISIONOBJECTFLOATDATA__H__
|
||||
/* 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_BTCOLLISIONOBJECTFLOATDATA__H__
|
||||
#define __BULLET_BTCOLLISIONOBJECTFLOATDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
#include "bullet_btTransformFloatData.h"
|
||||
#include "bullet_btVector3FloatData.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btCollisionObjectFloatData
|
||||
{
|
||||
public:
|
||||
void *m_broadphaseHandle;
|
||||
void *m_collisionShape;
|
||||
btCollisionShapeData *m_rootCollisionShape;
|
||||
char *m_name;
|
||||
btTransformFloatData m_worldTransform;
|
||||
btTransformFloatData m_interpolationWorldTransform;
|
||||
btVector3FloatData m_interpolationLinearVelocity;
|
||||
btVector3FloatData m_interpolationAngularVelocity;
|
||||
btVector3FloatData m_anisotropicFriction;
|
||||
float m_contactProcessingThreshold;
|
||||
float m_deactivationTime;
|
||||
float m_friction;
|
||||
float m_restitution;
|
||||
float m_hitFraction;
|
||||
float m_ccdSweptSphereRadius;
|
||||
float m_ccdMotionThreshold;
|
||||
int m_hasAnisotropicFriction;
|
||||
int m_collisionFlags;
|
||||
int m_islandTag1;
|
||||
int m_companionId;
|
||||
int m_activationState1;
|
||||
int m_internalType;
|
||||
int m_checkCollideWith;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTCOLLISIONOBJECTFLOATDATA__H__
|
||||
|
||||
@@ -1,41 +1,41 @@
|
||||
/* 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_BTCOLLISIONSHAPEDATA__H__
|
||||
#define __BULLET_BTCOLLISIONSHAPEDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btCollisionShapeData
|
||||
{
|
||||
public:
|
||||
char *m_name;
|
||||
int m_shapeType;
|
||||
char m_padding[4];
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTCOLLISIONSHAPEDATA__H__
|
||||
/* 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_BTCOLLISIONSHAPEDATA__H__
|
||||
#define __BULLET_BTCOLLISIONSHAPEDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btCollisionShapeData
|
||||
{
|
||||
public:
|
||||
char *m_name;
|
||||
int m_shapeType;
|
||||
char m_padding[4];
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTCOLLISIONSHAPEDATA__H__
|
||||
|
||||
@@ -1,43 +1,43 @@
|
||||
/* 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_BTCOMPOUNDSHAPECHILDDATA__H__
|
||||
#define __BULLET_BTCOMPOUNDSHAPECHILDDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
#include "bullet_btTransformFloatData.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btCompoundShapeChildData
|
||||
{
|
||||
public:
|
||||
btTransformFloatData m_transform;
|
||||
btCollisionShapeData *m_childShape;
|
||||
int m_childShapeType;
|
||||
float m_childMargin;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTCOMPOUNDSHAPECHILDDATA__H__
|
||||
/* 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_BTCOMPOUNDSHAPECHILDDATA__H__
|
||||
#define __BULLET_BTCOMPOUNDSHAPECHILDDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
#include "bullet_btTransformFloatData.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btCompoundShapeChildData
|
||||
{
|
||||
public:
|
||||
btTransformFloatData m_transform;
|
||||
btCollisionShapeData *m_childShape;
|
||||
int m_childShapeType;
|
||||
float m_childMargin;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTCOMPOUNDSHAPECHILDDATA__H__
|
||||
|
||||
@@ -1,43 +1,43 @@
|
||||
/* 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_BTCOMPOUNDSHAPEDATA__H__
|
||||
#define __BULLET_BTCOMPOUNDSHAPEDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
#include "bullet_btCollisionShapeData.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btCompoundShapeData
|
||||
{
|
||||
public:
|
||||
btCollisionShapeData m_collisionShapeData;
|
||||
btCompoundShapeChildData *m_childShapePtr;
|
||||
int m_numChildShapes;
|
||||
float m_collisionMargin;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTCOMPOUNDSHAPEDATA__H__
|
||||
/* 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_BTCOMPOUNDSHAPEDATA__H__
|
||||
#define __BULLET_BTCOMPOUNDSHAPEDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
#include "bullet_btCollisionShapeData.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btCompoundShapeData
|
||||
{
|
||||
public:
|
||||
btCollisionShapeData m_collisionShapeData;
|
||||
btCompoundShapeChildData *m_childShapePtr;
|
||||
int m_numChildShapes;
|
||||
float m_collisionMargin;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTCOMPOUNDSHAPEDATA__H__
|
||||
|
||||
@@ -1,51 +1,51 @@
|
||||
/* 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_BTCONETWISTCONSTRAINTDATA__H__
|
||||
#define __BULLET_BTCONETWISTCONSTRAINTDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
#include "bullet_btTransformFloatData.h"
|
||||
#include "bullet_btTypedConstraintData.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btConeTwistConstraintData
|
||||
{
|
||||
public:
|
||||
btTypedConstraintData m_typeConstraintData;
|
||||
btTransformFloatData m_rbAFrame;
|
||||
btTransformFloatData m_rbBFrame;
|
||||
float m_swingSpan1;
|
||||
float m_swingSpan2;
|
||||
float m_twistSpan;
|
||||
float m_limitSoftness;
|
||||
float m_biasFactor;
|
||||
float m_relaxationFactor;
|
||||
float m_damping;
|
||||
char m_pad[4];
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTCONETWISTCONSTRAINTDATA__H__
|
||||
/* 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_BTCONETWISTCONSTRAINTDATA__H__
|
||||
#define __BULLET_BTCONETWISTCONSTRAINTDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
#include "bullet_btTransformFloatData.h"
|
||||
#include "bullet_btTypedConstraintData.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btConeTwistConstraintData
|
||||
{
|
||||
public:
|
||||
btTypedConstraintData m_typeConstraintData;
|
||||
btTransformFloatData m_rbAFrame;
|
||||
btTransformFloatData m_rbBFrame;
|
||||
float m_swingSpan1;
|
||||
float m_swingSpan2;
|
||||
float m_twistSpan;
|
||||
float m_limitSoftness;
|
||||
float m_biasFactor;
|
||||
float m_relaxationFactor;
|
||||
float m_damping;
|
||||
char m_pad[4];
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTCONETWISTCONSTRAINTDATA__H__
|
||||
|
||||
@@ -1,40 +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_BTCONSTRAINTINFO1__H__
|
||||
#define __BULLET_BTCONSTRAINTINFO1__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btConstraintInfo1
|
||||
{
|
||||
public:
|
||||
int m_numConstraintRows;
|
||||
int nub;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTCONSTRAINTINFO1__H__
|
||||
/* 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_BTCONSTRAINTINFO1__H__
|
||||
#define __BULLET_BTCONSTRAINTINFO1__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btConstraintInfo1
|
||||
{
|
||||
public:
|
||||
int m_numConstraintRows;
|
||||
int nub;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTCONSTRAINTINFO1__H__
|
||||
|
||||
@@ -1,44 +1,44 @@
|
||||
/* 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_BTCONVEXHULLSHAPEDATA__H__
|
||||
#define __BULLET_BTCONVEXHULLSHAPEDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
#include "bullet_btConvexInternalShapeData.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btConvexHullShapeData
|
||||
{
|
||||
public:
|
||||
btConvexInternalShapeData m_convexInternalShapeData;
|
||||
btVector3FloatData *m_unscaledPointsFloatPtr;
|
||||
btVector3DoubleData *m_unscaledPointsDoublePtr;
|
||||
int m_numUnscaledPoints;
|
||||
char m_padding3[4];
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTCONVEXHULLSHAPEDATA__H__
|
||||
/* 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_BTCONVEXHULLSHAPEDATA__H__
|
||||
#define __BULLET_BTCONVEXHULLSHAPEDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
#include "bullet_btConvexInternalShapeData.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btConvexHullShapeData
|
||||
{
|
||||
public:
|
||||
btConvexInternalShapeData m_convexInternalShapeData;
|
||||
btVector3FloatData *m_unscaledPointsFloatPtr;
|
||||
btVector3DoubleData *m_unscaledPointsDoublePtr;
|
||||
int m_numUnscaledPoints;
|
||||
char m_padding3[4];
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTCONVEXHULLSHAPEDATA__H__
|
||||
|
||||
@@ -1,45 +1,45 @@
|
||||
/* 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_BTCONVEXINTERNALSHAPEDATA__H__
|
||||
#define __BULLET_BTCONVEXINTERNALSHAPEDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
#include "bullet_btCollisionShapeData.h"
|
||||
#include "bullet_btVector3FloatData.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btConvexInternalShapeData
|
||||
{
|
||||
public:
|
||||
btCollisionShapeData m_collisionShapeData;
|
||||
btVector3FloatData m_localScaling;
|
||||
btVector3FloatData m_implicitShapeDimensions;
|
||||
float m_collisionMargin;
|
||||
int m_padding;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTCONVEXINTERNALSHAPEDATA__H__
|
||||
/* 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_BTCONVEXINTERNALSHAPEDATA__H__
|
||||
#define __BULLET_BTCONVEXINTERNALSHAPEDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
#include "bullet_btCollisionShapeData.h"
|
||||
#include "bullet_btVector3FloatData.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btConvexInternalShapeData
|
||||
{
|
||||
public:
|
||||
btCollisionShapeData m_collisionShapeData;
|
||||
btVector3FloatData m_localScaling;
|
||||
btVector3FloatData m_implicitShapeDimensions;
|
||||
float m_collisionMargin;
|
||||
int m_padding;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTCONVEXINTERNALSHAPEDATA__H__
|
||||
|
||||
@@ -1,42 +1,42 @@
|
||||
/* 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_BTCYLINDERSHAPEDATA__H__
|
||||
#define __BULLET_BTCYLINDERSHAPEDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
#include "bullet_btConvexInternalShapeData.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btCylinderShapeData
|
||||
{
|
||||
public:
|
||||
btConvexInternalShapeData m_convexInternalShapeData;
|
||||
int m_upAxis;
|
||||
char m_padding[4];
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTCYLINDERSHAPEDATA__H__
|
||||
/* 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_BTCYLINDERSHAPEDATA__H__
|
||||
#define __BULLET_BTCYLINDERSHAPEDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
#include "bullet_btConvexInternalShapeData.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btCylinderShapeData
|
||||
{
|
||||
public:
|
||||
btConvexInternalShapeData m_convexInternalShapeData;
|
||||
int m_upAxis;
|
||||
char m_padding[4];
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTCYLINDERSHAPEDATA__H__
|
||||
|
||||
@@ -1,46 +1,46 @@
|
||||
/* 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_BTGIMPACTMESHSHAPEDATA__H__
|
||||
#define __BULLET_BTGIMPACTMESHSHAPEDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
#include "bullet_btCollisionShapeData.h"
|
||||
#include "bullet_btStridingMeshInterfaceData.h"
|
||||
#include "bullet_btVector3FloatData.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btGImpactMeshShapeData
|
||||
{
|
||||
public:
|
||||
btCollisionShapeData m_collisionShapeData;
|
||||
btStridingMeshInterfaceData m_meshInterface;
|
||||
btVector3FloatData m_localScaling;
|
||||
float m_collisionMargin;
|
||||
int m_gimpactSubType;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTGIMPACTMESHSHAPEDATA__H__
|
||||
/* 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_BTGIMPACTMESHSHAPEDATA__H__
|
||||
#define __BULLET_BTGIMPACTMESHSHAPEDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
#include "bullet_btCollisionShapeData.h"
|
||||
#include "bullet_btStridingMeshInterfaceData.h"
|
||||
#include "bullet_btVector3FloatData.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btGImpactMeshShapeData
|
||||
{
|
||||
public:
|
||||
btCollisionShapeData m_collisionShapeData;
|
||||
btStridingMeshInterfaceData m_meshInterface;
|
||||
btVector3FloatData m_localScaling;
|
||||
float m_collisionMargin;
|
||||
int m_gimpactSubType;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTGIMPACTMESHSHAPEDATA__H__
|
||||
|
||||
@@ -1,50 +1,50 @@
|
||||
/* 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_BTGENERIC6DOFCONSTRAINTDATA__H__
|
||||
#define __BULLET_BTGENERIC6DOFCONSTRAINTDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
#include "bullet_btTransformFloatData.h"
|
||||
#include "bullet_btTypedConstraintData.h"
|
||||
#include "bullet_btVector3FloatData.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btGeneric6DofConstraintData
|
||||
{
|
||||
public:
|
||||
btTypedConstraintData m_typeConstraintData;
|
||||
btTransformFloatData m_rbAFrame;
|
||||
btTransformFloatData m_rbBFrame;
|
||||
btVector3FloatData m_linearUpperLimit;
|
||||
btVector3FloatData m_linearLowerLimit;
|
||||
btVector3FloatData m_angularUpperLimit;
|
||||
btVector3FloatData m_angularLowerLimit;
|
||||
int m_useLinearReferenceFrameA;
|
||||
int m_useOffsetForConstraintFrame;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTGENERIC6DOFCONSTRAINTDATA__H__
|
||||
/* 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_BTGENERIC6DOFCONSTRAINTDATA__H__
|
||||
#define __BULLET_BTGENERIC6DOFCONSTRAINTDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
#include "bullet_btTransformFloatData.h"
|
||||
#include "bullet_btTypedConstraintData.h"
|
||||
#include "bullet_btVector3FloatData.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btGeneric6DofConstraintData
|
||||
{
|
||||
public:
|
||||
btTypedConstraintData m_typeConstraintData;
|
||||
btTransformFloatData m_rbAFrame;
|
||||
btTransformFloatData m_rbBFrame;
|
||||
btVector3FloatData m_linearUpperLimit;
|
||||
btVector3FloatData m_linearLowerLimit;
|
||||
btVector3FloatData m_angularUpperLimit;
|
||||
btVector3FloatData m_angularLowerLimit;
|
||||
int m_useLinearReferenceFrameA;
|
||||
int m_useOffsetForConstraintFrame;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTGENERIC6DOFCONSTRAINTDATA__H__
|
||||
|
||||
@@ -1,53 +1,53 @@
|
||||
/* 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_BTHINGECONSTRAINTDOUBLEDATA__H__
|
||||
#define __BULLET_BTHINGECONSTRAINTDOUBLEDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
#include "bullet_btTransformDoubleData.h"
|
||||
#include "bullet_btTypedConstraintData.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btHingeConstraintDoubleData
|
||||
{
|
||||
public:
|
||||
btTypedConstraintData m_typeConstraintData;
|
||||
btTransformDoubleData m_rbAFrame;
|
||||
btTransformDoubleData m_rbBFrame;
|
||||
int m_useReferenceFrameA;
|
||||
int m_angularOnly;
|
||||
int m_enableAngularMotor;
|
||||
float m_motorTargetVelocity;
|
||||
float m_maxMotorImpulse;
|
||||
float m_lowerLimit;
|
||||
float m_upperLimit;
|
||||
float m_limitSoftness;
|
||||
float m_biasFactor;
|
||||
float m_relaxationFactor;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTHINGECONSTRAINTDOUBLEDATA__H__
|
||||
/* 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_BTHINGECONSTRAINTDOUBLEDATA__H__
|
||||
#define __BULLET_BTHINGECONSTRAINTDOUBLEDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
#include "bullet_btTransformDoubleData.h"
|
||||
#include "bullet_btTypedConstraintData.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btHingeConstraintDoubleData
|
||||
{
|
||||
public:
|
||||
btTypedConstraintData m_typeConstraintData;
|
||||
btTransformDoubleData m_rbAFrame;
|
||||
btTransformDoubleData m_rbBFrame;
|
||||
int m_useReferenceFrameA;
|
||||
int m_angularOnly;
|
||||
int m_enableAngularMotor;
|
||||
float m_motorTargetVelocity;
|
||||
float m_maxMotorImpulse;
|
||||
float m_lowerLimit;
|
||||
float m_upperLimit;
|
||||
float m_limitSoftness;
|
||||
float m_biasFactor;
|
||||
float m_relaxationFactor;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTHINGECONSTRAINTDOUBLEDATA__H__
|
||||
|
||||
@@ -1,53 +1,53 @@
|
||||
/* 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_BTHINGECONSTRAINTFLOATDATA__H__
|
||||
#define __BULLET_BTHINGECONSTRAINTFLOATDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
#include "bullet_btTransformFloatData.h"
|
||||
#include "bullet_btTypedConstraintData.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btHingeConstraintFloatData
|
||||
{
|
||||
public:
|
||||
btTypedConstraintData m_typeConstraintData;
|
||||
btTransformFloatData m_rbAFrame;
|
||||
btTransformFloatData m_rbBFrame;
|
||||
int m_useReferenceFrameA;
|
||||
int m_angularOnly;
|
||||
int m_enableAngularMotor;
|
||||
float m_motorTargetVelocity;
|
||||
float m_maxMotorImpulse;
|
||||
float m_lowerLimit;
|
||||
float m_upperLimit;
|
||||
float m_limitSoftness;
|
||||
float m_biasFactor;
|
||||
float m_relaxationFactor;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTHINGECONSTRAINTFLOATDATA__H__
|
||||
/* 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_BTHINGECONSTRAINTFLOATDATA__H__
|
||||
#define __BULLET_BTHINGECONSTRAINTFLOATDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
#include "bullet_btTransformFloatData.h"
|
||||
#include "bullet_btTypedConstraintData.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btHingeConstraintFloatData
|
||||
{
|
||||
public:
|
||||
btTypedConstraintData m_typeConstraintData;
|
||||
btTransformFloatData m_rbAFrame;
|
||||
btTransformFloatData m_rbBFrame;
|
||||
int m_useReferenceFrameA;
|
||||
int m_angularOnly;
|
||||
int m_enableAngularMotor;
|
||||
float m_motorTargetVelocity;
|
||||
float m_maxMotorImpulse;
|
||||
float m_lowerLimit;
|
||||
float m_upperLimit;
|
||||
float m_limitSoftness;
|
||||
float m_biasFactor;
|
||||
float m_relaxationFactor;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTHINGECONSTRAINTFLOATDATA__H__
|
||||
|
||||
@@ -1,39 +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_BTINTINDEXDATA__H__
|
||||
#define __BULLET_BTINTINDEXDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btIntIndexData
|
||||
{
|
||||
public:
|
||||
int m_value;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTINTINDEXDATA__H__
|
||||
/* 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_BTINTINDEXDATA__H__
|
||||
#define __BULLET_BTINTINDEXDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btIntIndexData
|
||||
{
|
||||
public:
|
||||
int m_value;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTINTINDEXDATA__H__
|
||||
|
||||
@@ -1,40 +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_BTMATRIX3X3DOUBLEDATA__H__
|
||||
#define __BULLET_BTMATRIX3X3DOUBLEDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
#include "bullet_btVector3DoubleData.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btMatrix3x3DoubleData
|
||||
{
|
||||
public:
|
||||
btVector3DoubleData m_el[3];
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTMATRIX3X3DOUBLEDATA__H__
|
||||
/* 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_BTMATRIX3X3DOUBLEDATA__H__
|
||||
#define __BULLET_BTMATRIX3X3DOUBLEDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
#include "bullet_btVector3DoubleData.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btMatrix3x3DoubleData
|
||||
{
|
||||
public:
|
||||
btVector3DoubleData m_el[3];
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTMATRIX3X3DOUBLEDATA__H__
|
||||
|
||||
@@ -1,40 +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_BTMATRIX3X3FLOATDATA__H__
|
||||
#define __BULLET_BTMATRIX3X3FLOATDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
#include "bullet_btVector3FloatData.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btMatrix3x3FloatData
|
||||
{
|
||||
public:
|
||||
btVector3FloatData m_el[3];
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTMATRIX3X3FLOATDATA__H__
|
||||
/* 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_BTMATRIX3X3FLOATDATA__H__
|
||||
#define __BULLET_BTMATRIX3X3FLOATDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
#include "bullet_btVector3FloatData.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btMatrix3x3FloatData
|
||||
{
|
||||
public:
|
||||
btVector3FloatData m_el[3];
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTMATRIX3X3FLOATDATA__H__
|
||||
|
||||
@@ -1,45 +1,45 @@
|
||||
/* 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_BTMESHPARTDATA__H__
|
||||
#define __BULLET_BTMESHPARTDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btMeshPartData
|
||||
{
|
||||
public:
|
||||
btVector3FloatData *m_vertices3f;
|
||||
btVector3DoubleData *m_vertices3d;
|
||||
btIntIndexData *m_indices32;
|
||||
btShortIntIndexTripletData *m_3indices16;
|
||||
btShortIntIndexData *m_indices16;
|
||||
int m_numTriangles;
|
||||
int m_numVertices;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTMESHPARTDATA__H__
|
||||
/* 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_BTMESHPARTDATA__H__
|
||||
#define __BULLET_BTMESHPARTDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btMeshPartData
|
||||
{
|
||||
public:
|
||||
btVector3FloatData *m_vertices3f;
|
||||
btVector3DoubleData *m_vertices3d;
|
||||
btIntIndexData *m_indices32;
|
||||
btShortIntIndexTripletData *m_3indices16;
|
||||
btShortIntIndexData *m_indices16;
|
||||
int m_numTriangles;
|
||||
int m_numVertices;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTMESHPARTDATA__H__
|
||||
|
||||
@@ -1,43 +1,43 @@
|
||||
/* 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_BTMULTISPHERESHAPEDATA__H__
|
||||
#define __BULLET_BTMULTISPHERESHAPEDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
#include "bullet_btConvexInternalShapeData.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btMultiSphereShapeData
|
||||
{
|
||||
public:
|
||||
btConvexInternalShapeData m_convexInternalShapeData;
|
||||
btPositionAndRadius *m_localPositionArrayPtr;
|
||||
int m_localPositionArraySize;
|
||||
char m_padding[4];
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTMULTISPHERESHAPEDATA__H__
|
||||
/* 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_BTMULTISPHERESHAPEDATA__H__
|
||||
#define __BULLET_BTMULTISPHERESHAPEDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
#include "bullet_btConvexInternalShapeData.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btMultiSphereShapeData
|
||||
{
|
||||
public:
|
||||
btConvexInternalShapeData m_convexInternalShapeData;
|
||||
btPositionAndRadius *m_localPositionArrayPtr;
|
||||
int m_localPositionArraySize;
|
||||
char m_padding[4];
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTMULTISPHERESHAPEDATA__H__
|
||||
|
||||
@@ -1,45 +1,45 @@
|
||||
/* 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_BTOPTIMIZEDBVHNODEDOUBLEDATA__H__
|
||||
#define __BULLET_BTOPTIMIZEDBVHNODEDOUBLEDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
#include "bullet_btVector3DoubleData.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btOptimizedBvhNodeDoubleData
|
||||
{
|
||||
public:
|
||||
btVector3DoubleData m_aabbMinOrg;
|
||||
btVector3DoubleData m_aabbMaxOrg;
|
||||
int m_escapeIndex;
|
||||
int m_subPart;
|
||||
int m_triangleIndex;
|
||||
char m_pad[4];
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTOPTIMIZEDBVHNODEDOUBLEDATA__H__
|
||||
/* 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_BTOPTIMIZEDBVHNODEDOUBLEDATA__H__
|
||||
#define __BULLET_BTOPTIMIZEDBVHNODEDOUBLEDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
#include "bullet_btVector3DoubleData.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btOptimizedBvhNodeDoubleData
|
||||
{
|
||||
public:
|
||||
btVector3DoubleData m_aabbMinOrg;
|
||||
btVector3DoubleData m_aabbMaxOrg;
|
||||
int m_escapeIndex;
|
||||
int m_subPart;
|
||||
int m_triangleIndex;
|
||||
char m_pad[4];
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTOPTIMIZEDBVHNODEDOUBLEDATA__H__
|
||||
|
||||
@@ -1,45 +1,45 @@
|
||||
/* 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_BTOPTIMIZEDBVHNODEFLOATDATA__H__
|
||||
#define __BULLET_BTOPTIMIZEDBVHNODEFLOATDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
#include "bullet_btVector3FloatData.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btOptimizedBvhNodeFloatData
|
||||
{
|
||||
public:
|
||||
btVector3FloatData m_aabbMinOrg;
|
||||
btVector3FloatData m_aabbMaxOrg;
|
||||
int m_escapeIndex;
|
||||
int m_subPart;
|
||||
int m_triangleIndex;
|
||||
char m_pad[4];
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTOPTIMIZEDBVHNODEFLOATDATA__H__
|
||||
/* 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_BTOPTIMIZEDBVHNODEFLOATDATA__H__
|
||||
#define __BULLET_BTOPTIMIZEDBVHNODEFLOATDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
#include "bullet_btVector3FloatData.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btOptimizedBvhNodeFloatData
|
||||
{
|
||||
public:
|
||||
btVector3FloatData m_aabbMinOrg;
|
||||
btVector3FloatData m_aabbMaxOrg;
|
||||
int m_escapeIndex;
|
||||
int m_subPart;
|
||||
int m_triangleIndex;
|
||||
char m_pad[4];
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTOPTIMIZEDBVHNODEFLOATDATA__H__
|
||||
|
||||
@@ -1,42 +1,42 @@
|
||||
/* 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_BTPHYSICSSYSTEM__H__
|
||||
#define __BULLET_BTPHYSICSSYSTEM__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
#include "bullet_PointerArray.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btPhysicsSystem
|
||||
{
|
||||
public:
|
||||
PointerArray m_collisionShapes;
|
||||
PointerArray m_collisionObjects;
|
||||
PointerArray m_constraints;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTPHYSICSSYSTEM__H__
|
||||
/* 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_BTPHYSICSSYSTEM__H__
|
||||
#define __BULLET_BTPHYSICSSYSTEM__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
#include "bullet_PointerArray.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btPhysicsSystem
|
||||
{
|
||||
public:
|
||||
PointerArray m_collisionShapes;
|
||||
PointerArray m_collisionObjects;
|
||||
PointerArray m_constraints;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTPHYSICSSYSTEM__H__
|
||||
|
||||
@@ -1,43 +1,43 @@
|
||||
/* 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_BTPOINT2POINTCONSTRAINTDOUBLEDATA__H__
|
||||
#define __BULLET_BTPOINT2POINTCONSTRAINTDOUBLEDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
#include "bullet_btTypedConstraintData.h"
|
||||
#include "bullet_btVector3DoubleData.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btPoint2PointConstraintDoubleData
|
||||
{
|
||||
public:
|
||||
btTypedConstraintData m_typeConstraintData;
|
||||
btVector3DoubleData m_pivotInA;
|
||||
btVector3DoubleData m_pivotInB;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTPOINT2POINTCONSTRAINTDOUBLEDATA__H__
|
||||
/* 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_BTPOINT2POINTCONSTRAINTDOUBLEDATA__H__
|
||||
#define __BULLET_BTPOINT2POINTCONSTRAINTDOUBLEDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
#include "bullet_btTypedConstraintData.h"
|
||||
#include "bullet_btVector3DoubleData.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btPoint2PointConstraintDoubleData
|
||||
{
|
||||
public:
|
||||
btTypedConstraintData m_typeConstraintData;
|
||||
btVector3DoubleData m_pivotInA;
|
||||
btVector3DoubleData m_pivotInB;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTPOINT2POINTCONSTRAINTDOUBLEDATA__H__
|
||||
|
||||
@@ -1,43 +1,43 @@
|
||||
/* 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_BTPOINT2POINTCONSTRAINTFLOATDATA__H__
|
||||
#define __BULLET_BTPOINT2POINTCONSTRAINTFLOATDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
#include "bullet_btTypedConstraintData.h"
|
||||
#include "bullet_btVector3FloatData.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btPoint2PointConstraintFloatData
|
||||
{
|
||||
public:
|
||||
btTypedConstraintData m_typeConstraintData;
|
||||
btVector3FloatData m_pivotInA;
|
||||
btVector3FloatData m_pivotInB;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTPOINT2POINTCONSTRAINTFLOATDATA__H__
|
||||
/* 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_BTPOINT2POINTCONSTRAINTFLOATDATA__H__
|
||||
#define __BULLET_BTPOINT2POINTCONSTRAINTFLOATDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
#include "bullet_btTypedConstraintData.h"
|
||||
#include "bullet_btVector3FloatData.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btPoint2PointConstraintFloatData
|
||||
{
|
||||
public:
|
||||
btTypedConstraintData m_typeConstraintData;
|
||||
btVector3FloatData m_pivotInA;
|
||||
btVector3FloatData m_pivotInB;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTPOINT2POINTCONSTRAINTFLOATDATA__H__
|
||||
|
||||
@@ -1,41 +1,41 @@
|
||||
/* 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_BTPOSITIONANDRADIUS__H__
|
||||
#define __BULLET_BTPOSITIONANDRADIUS__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
#include "bullet_btVector3FloatData.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btPositionAndRadius
|
||||
{
|
||||
public:
|
||||
btVector3FloatData m_pos;
|
||||
float m_radius;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTPOSITIONANDRADIUS__H__
|
||||
/* 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_BTPOSITIONANDRADIUS__H__
|
||||
#define __BULLET_BTPOSITIONANDRADIUS__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
#include "bullet_btVector3FloatData.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btPositionAndRadius
|
||||
{
|
||||
public:
|
||||
btVector3FloatData m_pos;
|
||||
float m_radius;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTPOSITIONANDRADIUS__H__
|
||||
|
||||
@@ -1,51 +1,51 @@
|
||||
/* 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_BTQUANTIZEDBVHDOUBLEDATA__H__
|
||||
#define __BULLET_BTQUANTIZEDBVHDOUBLEDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
#include "bullet_btVector3DoubleData.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btQuantizedBvhDoubleData
|
||||
{
|
||||
public:
|
||||
btVector3DoubleData m_bvhAabbMin;
|
||||
btVector3DoubleData m_bvhAabbMax;
|
||||
btVector3DoubleData m_bvhQuantization;
|
||||
int m_curNodeIndex;
|
||||
int m_useQuantization;
|
||||
int m_numContiguousLeafNodes;
|
||||
int m_numQuantizedContiguousNodes;
|
||||
btOptimizedBvhNodeDoubleData *m_contiguousNodesPtr;
|
||||
btQuantizedBvhNodeData *m_quantizedContiguousNodesPtr;
|
||||
int m_traversalMode;
|
||||
int m_numSubtreeHeaders;
|
||||
btBvhSubtreeInfoData *m_subTreeInfoPtr;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTQUANTIZEDBVHDOUBLEDATA__H__
|
||||
/* 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_BTQUANTIZEDBVHDOUBLEDATA__H__
|
||||
#define __BULLET_BTQUANTIZEDBVHDOUBLEDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
#include "bullet_btVector3DoubleData.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btQuantizedBvhDoubleData
|
||||
{
|
||||
public:
|
||||
btVector3DoubleData m_bvhAabbMin;
|
||||
btVector3DoubleData m_bvhAabbMax;
|
||||
btVector3DoubleData m_bvhQuantization;
|
||||
int m_curNodeIndex;
|
||||
int m_useQuantization;
|
||||
int m_numContiguousLeafNodes;
|
||||
int m_numQuantizedContiguousNodes;
|
||||
btOptimizedBvhNodeDoubleData *m_contiguousNodesPtr;
|
||||
btQuantizedBvhNodeData *m_quantizedContiguousNodesPtr;
|
||||
int m_traversalMode;
|
||||
int m_numSubtreeHeaders;
|
||||
btBvhSubtreeInfoData *m_subTreeInfoPtr;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTQUANTIZEDBVHDOUBLEDATA__H__
|
||||
|
||||
@@ -1,51 +1,51 @@
|
||||
/* 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_BTQUANTIZEDBVHFLOATDATA__H__
|
||||
#define __BULLET_BTQUANTIZEDBVHFLOATDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
#include "bullet_btVector3FloatData.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btQuantizedBvhFloatData
|
||||
{
|
||||
public:
|
||||
btVector3FloatData m_bvhAabbMin;
|
||||
btVector3FloatData m_bvhAabbMax;
|
||||
btVector3FloatData m_bvhQuantization;
|
||||
int m_curNodeIndex;
|
||||
int m_useQuantization;
|
||||
int m_numContiguousLeafNodes;
|
||||
int m_numQuantizedContiguousNodes;
|
||||
btOptimizedBvhNodeFloatData *m_contiguousNodesPtr;
|
||||
btQuantizedBvhNodeData *m_quantizedContiguousNodesPtr;
|
||||
btBvhSubtreeInfoData *m_subTreeInfoPtr;
|
||||
int m_traversalMode;
|
||||
int m_numSubtreeHeaders;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTQUANTIZEDBVHFLOATDATA__H__
|
||||
/* 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_BTQUANTIZEDBVHFLOATDATA__H__
|
||||
#define __BULLET_BTQUANTIZEDBVHFLOATDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
#include "bullet_btVector3FloatData.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btQuantizedBvhFloatData
|
||||
{
|
||||
public:
|
||||
btVector3FloatData m_bvhAabbMin;
|
||||
btVector3FloatData m_bvhAabbMax;
|
||||
btVector3FloatData m_bvhQuantization;
|
||||
int m_curNodeIndex;
|
||||
int m_useQuantization;
|
||||
int m_numContiguousLeafNodes;
|
||||
int m_numQuantizedContiguousNodes;
|
||||
btOptimizedBvhNodeFloatData *m_contiguousNodesPtr;
|
||||
btQuantizedBvhNodeData *m_quantizedContiguousNodesPtr;
|
||||
btBvhSubtreeInfoData *m_subTreeInfoPtr;
|
||||
int m_traversalMode;
|
||||
int m_numSubtreeHeaders;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTQUANTIZEDBVHFLOATDATA__H__
|
||||
|
||||
@@ -1,41 +1,41 @@
|
||||
/* 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_BTQUANTIZEDBVHNODEDATA__H__
|
||||
#define __BULLET_BTQUANTIZEDBVHNODEDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btQuantizedBvhNodeData
|
||||
{
|
||||
public:
|
||||
short m_quantizedAabbMin[3];
|
||||
short m_quantizedAabbMax[3];
|
||||
int m_escapeIndexOrTriangleIndex;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTQUANTIZEDBVHNODEDATA__H__
|
||||
/* 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_BTQUANTIZEDBVHNODEDATA__H__
|
||||
#define __BULLET_BTQUANTIZEDBVHNODEDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btQuantizedBvhNodeData
|
||||
{
|
||||
public:
|
||||
short m_quantizedAabbMin[3];
|
||||
short m_quantizedAabbMax[3];
|
||||
int m_escapeIndexOrTriangleIndex;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTQUANTIZEDBVHNODEDATA__H__
|
||||
|
||||
@@ -1,63 +1,63 @@
|
||||
/* 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_BTRIGIDBODYDOUBLEDATA__H__
|
||||
#define __BULLET_BTRIGIDBODYDOUBLEDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
#include "bullet_btCollisionObjectDoubleData.h"
|
||||
#include "bullet_btMatrix3x3DoubleData.h"
|
||||
#include "bullet_btVector3DoubleData.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btRigidBodyDoubleData
|
||||
{
|
||||
public:
|
||||
btCollisionObjectDoubleData m_collisionObjectData;
|
||||
btMatrix3x3DoubleData m_invInertiaTensorWorld;
|
||||
btVector3DoubleData m_linearVelocity;
|
||||
btVector3DoubleData m_angularVelocity;
|
||||
btVector3DoubleData m_angularFactor;
|
||||
btVector3DoubleData m_linearFactor;
|
||||
btVector3DoubleData m_gravity;
|
||||
btVector3DoubleData m_gravity_acceleration;
|
||||
btVector3DoubleData m_invInertiaLocal;
|
||||
btVector3DoubleData m_totalForce;
|
||||
btVector3DoubleData m_totalTorque;
|
||||
double m_inverseMass;
|
||||
double m_linearDamping;
|
||||
double m_angularDamping;
|
||||
double m_additionalDampingFactor;
|
||||
double m_additionalLinearDampingThresholdSqr;
|
||||
double m_additionalAngularDampingThresholdSqr;
|
||||
double m_additionalAngularDampingFactor;
|
||||
double m_linearSleepingThreshold;
|
||||
double m_angularSleepingThreshold;
|
||||
int m_additionalDamping;
|
||||
char m_padding[4];
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTRIGIDBODYDOUBLEDATA__H__
|
||||
/* 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_BTRIGIDBODYDOUBLEDATA__H__
|
||||
#define __BULLET_BTRIGIDBODYDOUBLEDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
#include "bullet_btCollisionObjectDoubleData.h"
|
||||
#include "bullet_btMatrix3x3DoubleData.h"
|
||||
#include "bullet_btVector3DoubleData.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btRigidBodyDoubleData
|
||||
{
|
||||
public:
|
||||
btCollisionObjectDoubleData m_collisionObjectData;
|
||||
btMatrix3x3DoubleData m_invInertiaTensorWorld;
|
||||
btVector3DoubleData m_linearVelocity;
|
||||
btVector3DoubleData m_angularVelocity;
|
||||
btVector3DoubleData m_angularFactor;
|
||||
btVector3DoubleData m_linearFactor;
|
||||
btVector3DoubleData m_gravity;
|
||||
btVector3DoubleData m_gravity_acceleration;
|
||||
btVector3DoubleData m_invInertiaLocal;
|
||||
btVector3DoubleData m_totalForce;
|
||||
btVector3DoubleData m_totalTorque;
|
||||
double m_inverseMass;
|
||||
double m_linearDamping;
|
||||
double m_angularDamping;
|
||||
double m_additionalDampingFactor;
|
||||
double m_additionalLinearDampingThresholdSqr;
|
||||
double m_additionalAngularDampingThresholdSqr;
|
||||
double m_additionalAngularDampingFactor;
|
||||
double m_linearSleepingThreshold;
|
||||
double m_angularSleepingThreshold;
|
||||
int m_additionalDamping;
|
||||
char m_padding[4];
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTRIGIDBODYDOUBLEDATA__H__
|
||||
|
||||
@@ -1,62 +1,62 @@
|
||||
/* 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_BTRIGIDBODYFLOATDATA__H__
|
||||
#define __BULLET_BTRIGIDBODYFLOATDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
#include "bullet_btCollisionObjectFloatData.h"
|
||||
#include "bullet_btMatrix3x3FloatData.h"
|
||||
#include "bullet_btVector3FloatData.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btRigidBodyFloatData
|
||||
{
|
||||
public:
|
||||
btCollisionObjectFloatData m_collisionObjectData;
|
||||
btMatrix3x3FloatData m_invInertiaTensorWorld;
|
||||
btVector3FloatData m_linearVelocity;
|
||||
btVector3FloatData m_angularVelocity;
|
||||
btVector3FloatData m_angularFactor;
|
||||
btVector3FloatData m_linearFactor;
|
||||
btVector3FloatData m_gravity;
|
||||
btVector3FloatData m_gravity_acceleration;
|
||||
btVector3FloatData m_invInertiaLocal;
|
||||
btVector3FloatData m_totalForce;
|
||||
btVector3FloatData m_totalTorque;
|
||||
float m_inverseMass;
|
||||
float m_linearDamping;
|
||||
float m_angularDamping;
|
||||
float m_additionalDampingFactor;
|
||||
float m_additionalLinearDampingThresholdSqr;
|
||||
float m_additionalAngularDampingThresholdSqr;
|
||||
float m_additionalAngularDampingFactor;
|
||||
float m_linearSleepingThreshold;
|
||||
float m_angularSleepingThreshold;
|
||||
int m_additionalDamping;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTRIGIDBODYFLOATDATA__H__
|
||||
/* 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_BTRIGIDBODYFLOATDATA__H__
|
||||
#define __BULLET_BTRIGIDBODYFLOATDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
#include "bullet_btCollisionObjectFloatData.h"
|
||||
#include "bullet_btMatrix3x3FloatData.h"
|
||||
#include "bullet_btVector3FloatData.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btRigidBodyFloatData
|
||||
{
|
||||
public:
|
||||
btCollisionObjectFloatData m_collisionObjectData;
|
||||
btMatrix3x3FloatData m_invInertiaTensorWorld;
|
||||
btVector3FloatData m_linearVelocity;
|
||||
btVector3FloatData m_angularVelocity;
|
||||
btVector3FloatData m_angularFactor;
|
||||
btVector3FloatData m_linearFactor;
|
||||
btVector3FloatData m_gravity;
|
||||
btVector3FloatData m_gravity_acceleration;
|
||||
btVector3FloatData m_invInertiaLocal;
|
||||
btVector3FloatData m_totalForce;
|
||||
btVector3FloatData m_totalTorque;
|
||||
float m_inverseMass;
|
||||
float m_linearDamping;
|
||||
float m_angularDamping;
|
||||
float m_additionalDampingFactor;
|
||||
float m_additionalLinearDampingThresholdSqr;
|
||||
float m_additionalAngularDampingThresholdSqr;
|
||||
float m_additionalAngularDampingFactor;
|
||||
float m_linearSleepingThreshold;
|
||||
float m_angularSleepingThreshold;
|
||||
int m_additionalDamping;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTRIGIDBODYFLOATDATA__H__
|
||||
|
||||
@@ -1,40 +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 m_value;
|
||||
char m_pad[2];
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTSHORTINTINDEXDATA__H__
|
||||
/* 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 m_value;
|
||||
char m_pad[2];
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTSHORTINTINDEXDATA__H__
|
||||
|
||||
@@ -1,40 +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_BTSHORTINTINDEXTRIPLETDATA__H__
|
||||
#define __BULLET_BTSHORTINTINDEXTRIPLETDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btShortIntIndexTripletData
|
||||
{
|
||||
public:
|
||||
short m_values[3];
|
||||
char m_pad[2];
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTSHORTINTINDEXTRIPLETDATA__H__
|
||||
/* 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_BTSHORTINTINDEXTRIPLETDATA__H__
|
||||
#define __BULLET_BTSHORTINTINDEXTRIPLETDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btShortIntIndexTripletData
|
||||
{
|
||||
public:
|
||||
short m_values[3];
|
||||
char m_pad[2];
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTSHORTINTINDEXTRIPLETDATA__H__
|
||||
|
||||
@@ -1,49 +1,49 @@
|
||||
/* 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_BTSLIDERCONSTRAINTDATA__H__
|
||||
#define __BULLET_BTSLIDERCONSTRAINTDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
#include "bullet_btTransformFloatData.h"
|
||||
#include "bullet_btTypedConstraintData.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btSliderConstraintData
|
||||
{
|
||||
public:
|
||||
btTypedConstraintData m_typeConstraintData;
|
||||
btTransformFloatData m_rbAFrame;
|
||||
btTransformFloatData m_rbBFrame;
|
||||
float m_linearUpperLimit;
|
||||
float m_linearLowerLimit;
|
||||
float m_angularUpperLimit;
|
||||
float m_angularLowerLimit;
|
||||
int m_useLinearReferenceFrameA;
|
||||
int m_useOffsetForConstraintFrame;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTSLIDERCONSTRAINTDATA__H__
|
||||
/* 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_BTSLIDERCONSTRAINTDATA__H__
|
||||
#define __BULLET_BTSLIDERCONSTRAINTDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
#include "bullet_btTransformFloatData.h"
|
||||
#include "bullet_btTypedConstraintData.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btSliderConstraintData
|
||||
{
|
||||
public:
|
||||
btTypedConstraintData m_typeConstraintData;
|
||||
btTransformFloatData m_rbAFrame;
|
||||
btTransformFloatData m_rbBFrame;
|
||||
float m_linearUpperLimit;
|
||||
float m_linearLowerLimit;
|
||||
float m_angularUpperLimit;
|
||||
float m_angularLowerLimit;
|
||||
int m_useLinearReferenceFrameA;
|
||||
int m_useOffsetForConstraintFrame;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTSLIDERCONSTRAINTDATA__H__
|
||||
|
||||
@@ -1,45 +1,45 @@
|
||||
/* 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_BTSTATICPLANESHAPEDATA__H__
|
||||
#define __BULLET_BTSTATICPLANESHAPEDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
#include "bullet_btCollisionShapeData.h"
|
||||
#include "bullet_btVector3FloatData.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btStaticPlaneShapeData
|
||||
{
|
||||
public:
|
||||
btCollisionShapeData m_collisionShapeData;
|
||||
btVector3FloatData m_localScaling;
|
||||
btVector3FloatData m_planeNormal;
|
||||
float m_planeConstant;
|
||||
char m_pad[4];
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTSTATICPLANESHAPEDATA__H__
|
||||
/* 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_BTSTATICPLANESHAPEDATA__H__
|
||||
#define __BULLET_BTSTATICPLANESHAPEDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
#include "bullet_btCollisionShapeData.h"
|
||||
#include "bullet_btVector3FloatData.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btStaticPlaneShapeData
|
||||
{
|
||||
public:
|
||||
btCollisionShapeData m_collisionShapeData;
|
||||
btVector3FloatData m_localScaling;
|
||||
btVector3FloatData m_planeNormal;
|
||||
float m_planeConstant;
|
||||
char m_pad[4];
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTSTATICPLANESHAPEDATA__H__
|
||||
|
||||
@@ -1,43 +1,43 @@
|
||||
/* 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_BTSTRIDINGMESHINTERFACEDATA__H__
|
||||
#define __BULLET_BTSTRIDINGMESHINTERFACEDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
#include "bullet_btVector3FloatData.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btStridingMeshInterfaceData
|
||||
{
|
||||
public:
|
||||
btMeshPartData *m_meshPartsPtr;
|
||||
btVector3FloatData m_scaling;
|
||||
int m_numMeshParts;
|
||||
char m_padding[4];
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTSTRIDINGMESHINTERFACEDATA__H__
|
||||
/* 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_BTSTRIDINGMESHINTERFACEDATA__H__
|
||||
#define __BULLET_BTSTRIDINGMESHINTERFACEDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
#include "bullet_btVector3FloatData.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btStridingMeshInterfaceData
|
||||
{
|
||||
public:
|
||||
btMeshPartData *m_meshPartsPtr;
|
||||
btVector3FloatData m_scaling;
|
||||
int m_numMeshParts;
|
||||
char m_padding[4];
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTSTRIDINGMESHINTERFACEDATA__H__
|
||||
|
||||
@@ -1,42 +1,42 @@
|
||||
/* 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_BTTRANSFORMDOUBLEDATA__H__
|
||||
#define __BULLET_BTTRANSFORMDOUBLEDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
#include "bullet_btMatrix3x3DoubleData.h"
|
||||
#include "bullet_btVector3DoubleData.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btTransformDoubleData
|
||||
{
|
||||
public:
|
||||
btMatrix3x3DoubleData m_basis;
|
||||
btVector3DoubleData m_origin;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTTRANSFORMDOUBLEDATA__H__
|
||||
/* 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_BTTRANSFORMDOUBLEDATA__H__
|
||||
#define __BULLET_BTTRANSFORMDOUBLEDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
#include "bullet_btMatrix3x3DoubleData.h"
|
||||
#include "bullet_btVector3DoubleData.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btTransformDoubleData
|
||||
{
|
||||
public:
|
||||
btMatrix3x3DoubleData m_basis;
|
||||
btVector3DoubleData m_origin;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTTRANSFORMDOUBLEDATA__H__
|
||||
|
||||
@@ -1,42 +1,42 @@
|
||||
/* 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_BTTRANSFORMFLOATDATA__H__
|
||||
#define __BULLET_BTTRANSFORMFLOATDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
#include "bullet_btMatrix3x3FloatData.h"
|
||||
#include "bullet_btVector3FloatData.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btTransformFloatData
|
||||
{
|
||||
public:
|
||||
btMatrix3x3FloatData m_basis;
|
||||
btVector3FloatData m_origin;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTTRANSFORMFLOATDATA__H__
|
||||
/* 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_BTTRANSFORMFLOATDATA__H__
|
||||
#define __BULLET_BTTRANSFORMFLOATDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
#include "bullet_btMatrix3x3FloatData.h"
|
||||
#include "bullet_btVector3FloatData.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btTransformFloatData
|
||||
{
|
||||
public:
|
||||
btMatrix3x3FloatData m_basis;
|
||||
btVector3FloatData m_origin;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTTRANSFORMFLOATDATA__H__
|
||||
|
||||
@@ -1,42 +1,42 @@
|
||||
/* 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_BTTRIANGLEINFODATA__H__
|
||||
#define __BULLET_BTTRIANGLEINFODATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btTriangleInfoData
|
||||
{
|
||||
public:
|
||||
int m_flags;
|
||||
float m_edgeV0V1Angle;
|
||||
float m_edgeV1V2Angle;
|
||||
float m_edgeV2V0Angle;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTTRIANGLEINFODATA__H__
|
||||
/* 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_BTTRIANGLEINFODATA__H__
|
||||
#define __BULLET_BTTRIANGLEINFODATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btTriangleInfoData
|
||||
{
|
||||
public:
|
||||
int m_flags;
|
||||
float m_edgeV0V1Angle;
|
||||
float m_edgeV1V2Angle;
|
||||
float m_edgeV2V0Angle;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTTRIANGLEINFODATA__H__
|
||||
|
||||
@@ -1,52 +1,52 @@
|
||||
/* 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_BTTRIANGLEINFOMAPDATA__H__
|
||||
#define __BULLET_BTTRIANGLEINFOMAPDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btTriangleInfoMapData
|
||||
{
|
||||
public:
|
||||
int *m_hashTablePtr;
|
||||
int *m_nextPtr;
|
||||
btTriangleInfoData *m_valueArrayPtr;
|
||||
int *m_keyArrayPtr;
|
||||
float m_convexEpsilon;
|
||||
float m_planarEpsilon;
|
||||
float m_equalVertexThreshold;
|
||||
float m_edgeDistanceThreshold;
|
||||
float m_zeroAreaThreshold;
|
||||
int m_nextSize;
|
||||
int m_hashTableSize;
|
||||
int m_numValues;
|
||||
int m_numKeys;
|
||||
char m_padding[4];
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTTRIANGLEINFOMAPDATA__H__
|
||||
/* 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_BTTRIANGLEINFOMAPDATA__H__
|
||||
#define __BULLET_BTTRIANGLEINFOMAPDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btTriangleInfoMapData
|
||||
{
|
||||
public:
|
||||
int *m_hashTablePtr;
|
||||
int *m_nextPtr;
|
||||
btTriangleInfoData *m_valueArrayPtr;
|
||||
int *m_keyArrayPtr;
|
||||
float m_convexEpsilon;
|
||||
float m_planarEpsilon;
|
||||
float m_equalVertexThreshold;
|
||||
float m_edgeDistanceThreshold;
|
||||
float m_zeroAreaThreshold;
|
||||
int m_nextSize;
|
||||
int m_hashTableSize;
|
||||
int m_numValues;
|
||||
int m_numKeys;
|
||||
char m_padding[4];
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTTRIANGLEINFOMAPDATA__H__
|
||||
|
||||
@@ -1,47 +1,47 @@
|
||||
/* 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_BTTRIANGLEMESHSHAPEDATA__H__
|
||||
#define __BULLET_BTTRIANGLEMESHSHAPEDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
#include "bullet_btCollisionShapeData.h"
|
||||
#include "bullet_btStridingMeshInterfaceData.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btTriangleMeshShapeData
|
||||
{
|
||||
public:
|
||||
btCollisionShapeData m_collisionShapeData;
|
||||
btStridingMeshInterfaceData m_meshInterface;
|
||||
btQuantizedBvhFloatData *m_quantizedFloatBvh;
|
||||
btQuantizedBvhDoubleData *m_quantizedDoubleBvh;
|
||||
btTriangleInfoMapData *m_triangleInfoMap;
|
||||
float m_collisionMargin;
|
||||
char m_pad3[4];
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTTRIANGLEMESHSHAPEDATA__H__
|
||||
/* 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_BTTRIANGLEMESHSHAPEDATA__H__
|
||||
#define __BULLET_BTTRIANGLEMESHSHAPEDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
#include "bullet_btCollisionShapeData.h"
|
||||
#include "bullet_btStridingMeshInterfaceData.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btTriangleMeshShapeData
|
||||
{
|
||||
public:
|
||||
btCollisionShapeData m_collisionShapeData;
|
||||
btStridingMeshInterfaceData m_meshInterface;
|
||||
btQuantizedBvhFloatData *m_quantizedFloatBvh;
|
||||
btQuantizedBvhDoubleData *m_quantizedDoubleBvh;
|
||||
btTriangleInfoMapData *m_triangleInfoMap;
|
||||
float m_collisionMargin;
|
||||
char m_pad3[4];
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTTRIANGLEMESHSHAPEDATA__H__
|
||||
|
||||
@@ -1,49 +1,49 @@
|
||||
/* 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_BTTYPEDCONSTRAINTDATA__H__
|
||||
#define __BULLET_BTTYPEDCONSTRAINTDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btTypedConstraintData
|
||||
{
|
||||
public:
|
||||
bInvalidHandle *m_rbA;
|
||||
bInvalidHandle *m_rbB;
|
||||
char *m_name;
|
||||
int m_objectType;
|
||||
int m_userConstraintType;
|
||||
int m_userConstraintId;
|
||||
int m_needsFeedback;
|
||||
float m_appliedImpulse;
|
||||
float m_dbgDrawSize;
|
||||
int m_disableCollisionsBetweenLinkedBodies;
|
||||
char m_pad4[4];
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTTYPEDCONSTRAINTDATA__H__
|
||||
/* 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_BTTYPEDCONSTRAINTDATA__H__
|
||||
#define __BULLET_BTTYPEDCONSTRAINTDATA__H__
|
||||
|
||||
|
||||
// -------------------------------------------------- //
|
||||
#include "bullet_Common.h"
|
||||
|
||||
namespace Bullet {
|
||||
|
||||
|
||||
// ---------------------------------------------- //
|
||||
class btTypedConstraintData
|
||||
{
|
||||
public:
|
||||
bInvalidHandle *m_rbA;
|
||||
bInvalidHandle *m_rbB;
|
||||
char *m_name;
|
||||
int m_objectType;
|
||||
int m_userConstraintType;
|
||||
int m_userConstraintId;
|
||||
int m_needsFeedback;
|
||||
float m_appliedImpulse;
|
||||
float m_dbgDrawSize;
|
||||
int m_disableCollisionsBetweenLinkedBodies;
|
||||
char m_pad4[4];
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BULLET_BTTYPEDCONSTRAINTDATA__H__
|
||||
|
||||
@@ -1,39 +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__
|
||||
/* 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__
|
||||
|
||||
@@ -1,39 +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__
|
||||
/* 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__
|
||||
|
||||
@@ -1,75 +1,75 @@
|
||||
/*
|
||||
bParse
|
||||
Copyright (c) 2006-2009 Charlie C & Erwin Coumans http://gamekit.googlecode.com
|
||||
|
||||
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.
|
||||
*/
|
||||
|
||||
#include "bChunk.h"
|
||||
#include "bDefines.h"
|
||||
#include "bFile.h"
|
||||
|
||||
#if !defined( __CELLOS_LV2__) && !defined(__MWERKS__)
|
||||
#include <memory.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
|
||||
|
||||
using namespace bParse;
|
||||
|
||||
|
||||
// ----------------------------------------------------- //
|
||||
short ChunkUtils::swapShort(short sht)
|
||||
{
|
||||
SWITCH_SHORT(sht);
|
||||
return sht;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------- //
|
||||
int ChunkUtils::swapInt(int inte)
|
||||
{
|
||||
SWITCH_INT(inte);
|
||||
return inte;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------- //
|
||||
long64 ChunkUtils::swapLong64(long64 lng)
|
||||
{
|
||||
SWITCH_LONGINT(lng);
|
||||
return lng;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------- //
|
||||
int ChunkUtils::getOffset(int flags)
|
||||
{
|
||||
// if the file is saved in a
|
||||
// different format, get the
|
||||
// file's chunk size
|
||||
int res = CHUNK_HEADER_LEN;
|
||||
|
||||
if (VOID_IS_8)
|
||||
{
|
||||
if (flags &FD_BITS_VARIES)
|
||||
res = sizeof(bChunkPtr4);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (flags &FD_BITS_VARIES)
|
||||
res = sizeof(bChunkPtr8);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//eof
|
||||
/*
|
||||
bParse
|
||||
Copyright (c) 2006-2009 Charlie C & Erwin Coumans http://gamekit.googlecode.com
|
||||
|
||||
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.
|
||||
*/
|
||||
|
||||
#include "bChunk.h"
|
||||
#include "bDefines.h"
|
||||
#include "bFile.h"
|
||||
|
||||
#if !defined( __CELLOS_LV2__) && !defined(__MWERKS__)
|
||||
#include <memory.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
|
||||
|
||||
using namespace bParse;
|
||||
|
||||
|
||||
// ----------------------------------------------------- //
|
||||
short ChunkUtils::swapShort(short sht)
|
||||
{
|
||||
SWITCH_SHORT(sht);
|
||||
return sht;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------- //
|
||||
int ChunkUtils::swapInt(int inte)
|
||||
{
|
||||
SWITCH_INT(inte);
|
||||
return inte;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------- //
|
||||
long64 ChunkUtils::swapLong64(long64 lng)
|
||||
{
|
||||
SWITCH_LONGINT(lng);
|
||||
return lng;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------- //
|
||||
int ChunkUtils::getOffset(int flags)
|
||||
{
|
||||
// if the file is saved in a
|
||||
// different format, get the
|
||||
// file's chunk size
|
||||
int res = CHUNK_HEADER_LEN;
|
||||
|
||||
if (VOID_IS_8)
|
||||
{
|
||||
if (flags &FD_BITS_VARIES)
|
||||
res = sizeof(bChunkPtr4);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (flags &FD_BITS_VARIES)
|
||||
res = sizeof(bChunkPtr8);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//eof
|
||||
|
||||
@@ -1,90 +1,90 @@
|
||||
/*
|
||||
bParse
|
||||
Copyright (c) 2006-2009 Charlie C & Erwin Coumans http://gamekit.googlecode.com
|
||||
|
||||
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.
|
||||
*/
|
||||
|
||||
#ifndef __BCHUNK_H__
|
||||
#define __BCHUNK_H__
|
||||
|
||||
|
||||
#if defined (_WIN32) && ! defined (__MINGW32__)
|
||||
#define long64 __int64
|
||||
#else
|
||||
#define long64 long long
|
||||
#endif
|
||||
|
||||
|
||||
namespace bParse {
|
||||
|
||||
|
||||
// ----------------------------------------------------- //
|
||||
class bChunkPtr4
|
||||
{
|
||||
public:
|
||||
bChunkPtr4(){}
|
||||
int code;
|
||||
int len;
|
||||
union
|
||||
{
|
||||
int m_uniqueInt;
|
||||
};
|
||||
int dna_nr;
|
||||
int nr;
|
||||
};
|
||||
|
||||
// ----------------------------------------------------- //
|
||||
class bChunkPtr8
|
||||
{
|
||||
public:
|
||||
bChunkPtr8(){}
|
||||
int code, len;
|
||||
union
|
||||
{
|
||||
long64 oldPrev;
|
||||
int m_uniqueInts[2];
|
||||
};
|
||||
int dna_nr, nr;
|
||||
};
|
||||
|
||||
// ----------------------------------------------------- //
|
||||
class bChunkInd
|
||||
{
|
||||
public:
|
||||
bChunkInd(){}
|
||||
int code, len;
|
||||
void *oldPtr;
|
||||
int dna_nr, nr;
|
||||
};
|
||||
|
||||
|
||||
// ----------------------------------------------------- //
|
||||
class ChunkUtils
|
||||
{
|
||||
public:
|
||||
|
||||
// file chunk offset
|
||||
static int getOffset(int flags);
|
||||
|
||||
// endian utils
|
||||
static short swapShort(short sht);
|
||||
static int swapInt(int inte);
|
||||
static long64 swapLong64(long64 lng);
|
||||
|
||||
};
|
||||
|
||||
|
||||
const int CHUNK_HEADER_LEN = ((sizeof(bChunkInd)));
|
||||
const bool VOID_IS_8 = ((sizeof(void*)==8));
|
||||
}
|
||||
|
||||
#endif//__BCHUNK_H__
|
||||
/*
|
||||
bParse
|
||||
Copyright (c) 2006-2009 Charlie C & Erwin Coumans http://gamekit.googlecode.com
|
||||
|
||||
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.
|
||||
*/
|
||||
|
||||
#ifndef __BCHUNK_H__
|
||||
#define __BCHUNK_H__
|
||||
|
||||
|
||||
#if defined (_WIN32) && ! defined (__MINGW32__)
|
||||
#define long64 __int64
|
||||
#else
|
||||
#define long64 long long
|
||||
#endif
|
||||
|
||||
|
||||
namespace bParse {
|
||||
|
||||
|
||||
// ----------------------------------------------------- //
|
||||
class bChunkPtr4
|
||||
{
|
||||
public:
|
||||
bChunkPtr4(){}
|
||||
int code;
|
||||
int len;
|
||||
union
|
||||
{
|
||||
int m_uniqueInt;
|
||||
};
|
||||
int dna_nr;
|
||||
int nr;
|
||||
};
|
||||
|
||||
// ----------------------------------------------------- //
|
||||
class bChunkPtr8
|
||||
{
|
||||
public:
|
||||
bChunkPtr8(){}
|
||||
int code, len;
|
||||
union
|
||||
{
|
||||
long64 oldPrev;
|
||||
int m_uniqueInts[2];
|
||||
};
|
||||
int dna_nr, nr;
|
||||
};
|
||||
|
||||
// ----------------------------------------------------- //
|
||||
class bChunkInd
|
||||
{
|
||||
public:
|
||||
bChunkInd(){}
|
||||
int code, len;
|
||||
void *oldPtr;
|
||||
int dna_nr, nr;
|
||||
};
|
||||
|
||||
|
||||
// ----------------------------------------------------- //
|
||||
class ChunkUtils
|
||||
{
|
||||
public:
|
||||
|
||||
// file chunk offset
|
||||
static int getOffset(int flags);
|
||||
|
||||
// endian utils
|
||||
static short swapShort(short sht);
|
||||
static int swapInt(int inte);
|
||||
static long64 swapLong64(long64 lng);
|
||||
|
||||
};
|
||||
|
||||
|
||||
const int CHUNK_HEADER_LEN = ((sizeof(bChunkInd)));
|
||||
const bool VOID_IS_8 = ((sizeof(void*)==8));
|
||||
}
|
||||
|
||||
#endif//__BCHUNK_H__
|
||||
|
||||
@@ -1,39 +1,39 @@
|
||||
/*
|
||||
bParse
|
||||
Copyright (c) 2006-2009 Charlie C & Erwin Coumans http://gamekit.googlecode.com
|
||||
|
||||
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.
|
||||
*/
|
||||
|
||||
#ifndef __BCOMMON_H__
|
||||
#define __BCOMMON_H__
|
||||
|
||||
|
||||
#include <assert.h>
|
||||
//#include "bLog.h"
|
||||
#include "LinearMath/btAlignedObjectArray.h"
|
||||
#include "LinearMath/btHashMap.h"
|
||||
|
||||
namespace bParse {
|
||||
|
||||
class bMain;
|
||||
class bFileData;
|
||||
class bFile;
|
||||
class bDNA;
|
||||
|
||||
// delete void* undefined
|
||||
typedef struct bStructHandle {int unused;}bStructHandle;
|
||||
typedef btAlignedObjectArray<bStructHandle*> bListBasePtr;
|
||||
typedef btHashMap<btHashPtr, bStructHandle*> bPtrMap;
|
||||
}
|
||||
|
||||
|
||||
#endif//__BCOMMON_H__
|
||||
/*
|
||||
bParse
|
||||
Copyright (c) 2006-2009 Charlie C & Erwin Coumans http://gamekit.googlecode.com
|
||||
|
||||
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.
|
||||
*/
|
||||
|
||||
#ifndef __BCOMMON_H__
|
||||
#define __BCOMMON_H__
|
||||
|
||||
|
||||
#include <assert.h>
|
||||
//#include "bLog.h"
|
||||
#include "LinearMath/btAlignedObjectArray.h"
|
||||
#include "LinearMath/btHashMap.h"
|
||||
|
||||
namespace bParse {
|
||||
|
||||
class bMain;
|
||||
class bFileData;
|
||||
class bFile;
|
||||
class bDNA;
|
||||
|
||||
// delete void* undefined
|
||||
typedef struct bStructHandle {int unused;}bStructHandle;
|
||||
typedef btAlignedObjectArray<bStructHandle*> bListBasePtr;
|
||||
typedef btHashMap<btHashPtr, bStructHandle*> bPtrMap;
|
||||
}
|
||||
|
||||
|
||||
#endif//__BCOMMON_H__
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,110 +1,110 @@
|
||||
/*
|
||||
bParse
|
||||
Copyright (c) 2006-2009 Charlie C & Erwin Coumans http://gamekit.googlecode.com
|
||||
|
||||
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.
|
||||
*/
|
||||
|
||||
#ifndef __BDNA_H__
|
||||
#define __BDNA_H__
|
||||
|
||||
|
||||
#include "bCommon.h"
|
||||
|
||||
namespace bParse {
|
||||
|
||||
struct bNameInfo
|
||||
{
|
||||
char* m_name;
|
||||
bool m_isPointer;
|
||||
int m_dim0;
|
||||
int m_dim1;
|
||||
};
|
||||
|
||||
class bDNA
|
||||
{
|
||||
public:
|
||||
bDNA();
|
||||
~bDNA();
|
||||
|
||||
void init(char *data, int len, bool swap=false);
|
||||
|
||||
int getArraySize(char* str);
|
||||
int getArraySizeNew(short name)
|
||||
{
|
||||
const bNameInfo& nameInfo = m_Names[name];
|
||||
return nameInfo.m_dim0*nameInfo.m_dim1;
|
||||
}
|
||||
int getElementSize(short type, short name)
|
||||
{
|
||||
const bNameInfo& nameInfo = m_Names[name];
|
||||
int size = nameInfo.m_isPointer ? mPtrLen*nameInfo.m_dim0*nameInfo.m_dim1 : mTlens[type]*nameInfo.m_dim0*nameInfo.m_dim1;
|
||||
return size;
|
||||
}
|
||||
|
||||
int getNumNames() const
|
||||
{
|
||||
return m_Names.size();
|
||||
}
|
||||
|
||||
char *getName(int ind);
|
||||
char *getType(int ind);
|
||||
short *getStruct(int ind);
|
||||
short getLength(int ind);
|
||||
int getReverseType(short type);
|
||||
int getReverseType(const char *type);
|
||||
|
||||
|
||||
int getNumStructs();
|
||||
|
||||
//
|
||||
bool lessThan(bDNA* other);
|
||||
|
||||
void initCmpFlags(bDNA *memDNA);
|
||||
bool flagNotEqual(int dna_nr);
|
||||
bool flagEqual(int dna_nr);
|
||||
bool flagNone(int dna_nr);
|
||||
|
||||
|
||||
int getPointerSize();
|
||||
|
||||
void dumpTypeDefinitions();
|
||||
|
||||
|
||||
private:
|
||||
enum FileDNAFlags
|
||||
{
|
||||
FDF_NONE=0,
|
||||
FDF_STRUCT_NEQU,
|
||||
FDF_STRUCT_EQU
|
||||
};
|
||||
|
||||
void initRecurseCmpFlags(int i);
|
||||
|
||||
btAlignedObjectArray<int> mCMPFlags;
|
||||
|
||||
btAlignedObjectArray<bNameInfo> m_Names;
|
||||
btAlignedObjectArray<char*> mTypes;
|
||||
btAlignedObjectArray<short*> mStructs;
|
||||
btAlignedObjectArray<short> mTlens;
|
||||
btHashMap<btHashInt, int> mStructReverse;
|
||||
btHashMap<btHashString,int> mTypeLookup;
|
||||
|
||||
int mPtrLen;
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BDNA_H__
|
||||
/*
|
||||
bParse
|
||||
Copyright (c) 2006-2009 Charlie C & Erwin Coumans http://gamekit.googlecode.com
|
||||
|
||||
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.
|
||||
*/
|
||||
|
||||
#ifndef __BDNA_H__
|
||||
#define __BDNA_H__
|
||||
|
||||
|
||||
#include "bCommon.h"
|
||||
|
||||
namespace bParse {
|
||||
|
||||
struct bNameInfo
|
||||
{
|
||||
char* m_name;
|
||||
bool m_isPointer;
|
||||
int m_dim0;
|
||||
int m_dim1;
|
||||
};
|
||||
|
||||
class bDNA
|
||||
{
|
||||
public:
|
||||
bDNA();
|
||||
~bDNA();
|
||||
|
||||
void init(char *data, int len, bool swap=false);
|
||||
|
||||
int getArraySize(char* str);
|
||||
int getArraySizeNew(short name)
|
||||
{
|
||||
const bNameInfo& nameInfo = m_Names[name];
|
||||
return nameInfo.m_dim0*nameInfo.m_dim1;
|
||||
}
|
||||
int getElementSize(short type, short name)
|
||||
{
|
||||
const bNameInfo& nameInfo = m_Names[name];
|
||||
int size = nameInfo.m_isPointer ? mPtrLen*nameInfo.m_dim0*nameInfo.m_dim1 : mTlens[type]*nameInfo.m_dim0*nameInfo.m_dim1;
|
||||
return size;
|
||||
}
|
||||
|
||||
int getNumNames() const
|
||||
{
|
||||
return m_Names.size();
|
||||
}
|
||||
|
||||
char *getName(int ind);
|
||||
char *getType(int ind);
|
||||
short *getStruct(int ind);
|
||||
short getLength(int ind);
|
||||
int getReverseType(short type);
|
||||
int getReverseType(const char *type);
|
||||
|
||||
|
||||
int getNumStructs();
|
||||
|
||||
//
|
||||
bool lessThan(bDNA* other);
|
||||
|
||||
void initCmpFlags(bDNA *memDNA);
|
||||
bool flagNotEqual(int dna_nr);
|
||||
bool flagEqual(int dna_nr);
|
||||
bool flagNone(int dna_nr);
|
||||
|
||||
|
||||
int getPointerSize();
|
||||
|
||||
void dumpTypeDefinitions();
|
||||
|
||||
|
||||
private:
|
||||
enum FileDNAFlags
|
||||
{
|
||||
FDF_NONE=0,
|
||||
FDF_STRUCT_NEQU,
|
||||
FDF_STRUCT_EQU
|
||||
};
|
||||
|
||||
void initRecurseCmpFlags(int i);
|
||||
|
||||
btAlignedObjectArray<int> mCMPFlags;
|
||||
|
||||
btAlignedObjectArray<bNameInfo> m_Names;
|
||||
btAlignedObjectArray<char*> mTypes;
|
||||
btAlignedObjectArray<short*> mStructs;
|
||||
btAlignedObjectArray<short> mTlens;
|
||||
btHashMap<btHashInt, int> mStructReverse;
|
||||
btHashMap<btHashString,int> mTypeLookup;
|
||||
|
||||
int mPtrLen;
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BDNA_H__
|
||||
|
||||
@@ -1,140 +1,140 @@
|
||||
/* Copyright (C) 2006-2009 Charlie C & Erwin Coumans http://gamekit.googlecode.com
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
#ifndef __B_DEFINES_H__
|
||||
#define __B_DEFINES_H__
|
||||
|
||||
|
||||
// MISC defines, see BKE_global.h, BKE_utildefines.h
|
||||
#define SIZEOFBLENDERHEADER 12
|
||||
|
||||
|
||||
// ------------------------------------------------------------
|
||||
#if defined(__sgi) || defined (__sparc) || defined (__sparc__) || defined (__PPC__) || defined (__ppc__) || defined (__BIG_ENDIAN__)
|
||||
# define MAKE_ID(a,b,c,d) ( (int)(a)<<24 | (int)(b)<<16 | (c)<<8 | (d) )
|
||||
#else
|
||||
# define MAKE_ID(a,b,c,d) ( (int)(d)<<24 | (int)(c)<<16 | (b)<<8 | (a) )
|
||||
#endif
|
||||
|
||||
|
||||
// ------------------------------------------------------------
|
||||
#if defined(__sgi) || defined(__sparc) || defined(__sparc__) || defined (__PPC__) || defined (__ppc__) || defined (__BIG_ENDIAN__)
|
||||
# define MAKE_ID2(c, d) ( (c)<<8 | (d) )
|
||||
# define MOST_SIG_BYTE 0
|
||||
# define BBIG_ENDIAN
|
||||
#else
|
||||
# define MAKE_ID2(c, d) ( (d)<<8 | (c) )
|
||||
# define MOST_SIG_BYTE 1
|
||||
# define BLITTLE_ENDIAN
|
||||
#endif
|
||||
|
||||
// ------------------------------------------------------------
|
||||
#define ID_SCE MAKE_ID2('S', 'C')
|
||||
#define ID_LI MAKE_ID2('L', 'I')
|
||||
#define ID_OB MAKE_ID2('O', 'B')
|
||||
#define ID_ME MAKE_ID2('M', 'E')
|
||||
#define ID_CU MAKE_ID2('C', 'U')
|
||||
#define ID_MB MAKE_ID2('M', 'B')
|
||||
#define ID_MA MAKE_ID2('M', 'A')
|
||||
#define ID_TE MAKE_ID2('T', 'E')
|
||||
#define ID_IM MAKE_ID2('I', 'M')
|
||||
#define ID_IK MAKE_ID2('I', 'K')
|
||||
#define ID_WV MAKE_ID2('W', 'V')
|
||||
#define ID_LT MAKE_ID2('L', 'T')
|
||||
#define ID_SE MAKE_ID2('S', 'E')
|
||||
#define ID_LF MAKE_ID2('L', 'F')
|
||||
#define ID_LA MAKE_ID2('L', 'A')
|
||||
#define ID_CA MAKE_ID2('C', 'A')
|
||||
#define ID_IP MAKE_ID2('I', 'P')
|
||||
#define ID_KE MAKE_ID2('K', 'E')
|
||||
#define ID_WO MAKE_ID2('W', 'O')
|
||||
#define ID_SCR MAKE_ID2('S', 'R')
|
||||
#define ID_VF MAKE_ID2('V', 'F')
|
||||
#define ID_TXT MAKE_ID2('T', 'X')
|
||||
#define ID_SO MAKE_ID2('S', 'O')
|
||||
#define ID_SAMPLE MAKE_ID2('S', 'A')
|
||||
#define ID_GR MAKE_ID2('G', 'R')
|
||||
#define ID_ID MAKE_ID2('I', 'D')
|
||||
#define ID_AR MAKE_ID2('A', 'R')
|
||||
#define ID_AC MAKE_ID2('A', 'C')
|
||||
#define ID_SCRIPT MAKE_ID2('P', 'Y')
|
||||
#define ID_FLUIDSIM MAKE_ID2('F', 'S')
|
||||
#define ID_NT MAKE_ID2('N', 'T')
|
||||
#define ID_BR MAKE_ID2('B', 'R')
|
||||
|
||||
|
||||
#define ID_SEQ MAKE_ID2('S', 'Q')
|
||||
#define ID_CO MAKE_ID2('C', 'O')
|
||||
#define ID_PO MAKE_ID2('A', 'C')
|
||||
#define ID_NLA MAKE_ID2('N', 'L')
|
||||
|
||||
#define ID_VS MAKE_ID2('V', 'S')
|
||||
#define ID_VN MAKE_ID2('V', 'N')
|
||||
|
||||
|
||||
// ------------------------------------------------------------
|
||||
#define FORM MAKE_ID('F','O','R','M')
|
||||
#define DDG1 MAKE_ID('3','D','G','1')
|
||||
#define DDG2 MAKE_ID('3','D','G','2')
|
||||
#define DDG3 MAKE_ID('3','D','G','3')
|
||||
#define DDG4 MAKE_ID('3','D','G','4')
|
||||
#define GOUR MAKE_ID('G','O','U','R')
|
||||
#define BLEN MAKE_ID('B','L','E','N')
|
||||
#define DER_ MAKE_ID('D','E','R','_')
|
||||
#define V100 MAKE_ID('V','1','0','0')
|
||||
#define DATA MAKE_ID('D','A','T','A')
|
||||
#define GLOB MAKE_ID('G','L','O','B')
|
||||
#define IMAG MAKE_ID('I','M','A','G')
|
||||
#define TEST MAKE_ID('T','E','S','T')
|
||||
#define USER MAKE_ID('U','S','E','R')
|
||||
|
||||
|
||||
// ------------------------------------------------------------
|
||||
#define DNA1 MAKE_ID('D','N','A','1')
|
||||
#define REND MAKE_ID('R','E','N','D')
|
||||
#define ENDB MAKE_ID('E','N','D','B')
|
||||
#define NAME MAKE_ID('N','A','M','E')
|
||||
#define SDNA MAKE_ID('S','D','N','A')
|
||||
#define TYPE MAKE_ID('T','Y','P','E')
|
||||
#define TLEN MAKE_ID('T','L','E','N')
|
||||
#define STRC MAKE_ID('S','T','R','C')
|
||||
|
||||
|
||||
// ------------------------------------------------------------
|
||||
#define SWITCH_INT(a) { \
|
||||
char s_i, *p_i; \
|
||||
p_i= (char *)&(a); \
|
||||
s_i=p_i[0]; p_i[0]=p_i[3]; p_i[3]=s_i; \
|
||||
s_i=p_i[1]; p_i[1]=p_i[2]; p_i[2]=s_i; }
|
||||
|
||||
// ------------------------------------------------------------
|
||||
#define SWITCH_SHORT(a) { \
|
||||
char s_i, *p_i; \
|
||||
p_i= (char *)&(a); \
|
||||
s_i=p_i[0]; p_i[0]=p_i[1]; p_i[1]=s_i; }
|
||||
|
||||
// ------------------------------------------------------------
|
||||
#define SWITCH_LONGINT(a) { \
|
||||
char s_i, *p_i; \
|
||||
p_i= (char *)&(a); \
|
||||
s_i=p_i[0]; p_i[0]=p_i[7]; p_i[7]=s_i; \
|
||||
s_i=p_i[1]; p_i[1]=p_i[6]; p_i[6]=s_i; \
|
||||
s_i=p_i[2]; p_i[2]=p_i[5]; p_i[5]=s_i; \
|
||||
s_i=p_i[3]; p_i[3]=p_i[4]; p_i[4]=s_i; }
|
||||
|
||||
#endif//__B_DEFINES_H__
|
||||
/* Copyright (C) 2006-2009 Charlie C & Erwin Coumans http://gamekit.googlecode.com
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
#ifndef __B_DEFINES_H__
|
||||
#define __B_DEFINES_H__
|
||||
|
||||
|
||||
// MISC defines, see BKE_global.h, BKE_utildefines.h
|
||||
#define SIZEOFBLENDERHEADER 12
|
||||
|
||||
|
||||
// ------------------------------------------------------------
|
||||
#if defined(__sgi) || defined (__sparc) || defined (__sparc__) || defined (__PPC__) || defined (__ppc__) || defined (__BIG_ENDIAN__)
|
||||
# define MAKE_ID(a,b,c,d) ( (int)(a)<<24 | (int)(b)<<16 | (c)<<8 | (d) )
|
||||
#else
|
||||
# define MAKE_ID(a,b,c,d) ( (int)(d)<<24 | (int)(c)<<16 | (b)<<8 | (a) )
|
||||
#endif
|
||||
|
||||
|
||||
// ------------------------------------------------------------
|
||||
#if defined(__sgi) || defined(__sparc) || defined(__sparc__) || defined (__PPC__) || defined (__ppc__) || defined (__BIG_ENDIAN__)
|
||||
# define MAKE_ID2(c, d) ( (c)<<8 | (d) )
|
||||
# define MOST_SIG_BYTE 0
|
||||
# define BBIG_ENDIAN
|
||||
#else
|
||||
# define MAKE_ID2(c, d) ( (d)<<8 | (c) )
|
||||
# define MOST_SIG_BYTE 1
|
||||
# define BLITTLE_ENDIAN
|
||||
#endif
|
||||
|
||||
// ------------------------------------------------------------
|
||||
#define ID_SCE MAKE_ID2('S', 'C')
|
||||
#define ID_LI MAKE_ID2('L', 'I')
|
||||
#define ID_OB MAKE_ID2('O', 'B')
|
||||
#define ID_ME MAKE_ID2('M', 'E')
|
||||
#define ID_CU MAKE_ID2('C', 'U')
|
||||
#define ID_MB MAKE_ID2('M', 'B')
|
||||
#define ID_MA MAKE_ID2('M', 'A')
|
||||
#define ID_TE MAKE_ID2('T', 'E')
|
||||
#define ID_IM MAKE_ID2('I', 'M')
|
||||
#define ID_IK MAKE_ID2('I', 'K')
|
||||
#define ID_WV MAKE_ID2('W', 'V')
|
||||
#define ID_LT MAKE_ID2('L', 'T')
|
||||
#define ID_SE MAKE_ID2('S', 'E')
|
||||
#define ID_LF MAKE_ID2('L', 'F')
|
||||
#define ID_LA MAKE_ID2('L', 'A')
|
||||
#define ID_CA MAKE_ID2('C', 'A')
|
||||
#define ID_IP MAKE_ID2('I', 'P')
|
||||
#define ID_KE MAKE_ID2('K', 'E')
|
||||
#define ID_WO MAKE_ID2('W', 'O')
|
||||
#define ID_SCR MAKE_ID2('S', 'R')
|
||||
#define ID_VF MAKE_ID2('V', 'F')
|
||||
#define ID_TXT MAKE_ID2('T', 'X')
|
||||
#define ID_SO MAKE_ID2('S', 'O')
|
||||
#define ID_SAMPLE MAKE_ID2('S', 'A')
|
||||
#define ID_GR MAKE_ID2('G', 'R')
|
||||
#define ID_ID MAKE_ID2('I', 'D')
|
||||
#define ID_AR MAKE_ID2('A', 'R')
|
||||
#define ID_AC MAKE_ID2('A', 'C')
|
||||
#define ID_SCRIPT MAKE_ID2('P', 'Y')
|
||||
#define ID_FLUIDSIM MAKE_ID2('F', 'S')
|
||||
#define ID_NT MAKE_ID2('N', 'T')
|
||||
#define ID_BR MAKE_ID2('B', 'R')
|
||||
|
||||
|
||||
#define ID_SEQ MAKE_ID2('S', 'Q')
|
||||
#define ID_CO MAKE_ID2('C', 'O')
|
||||
#define ID_PO MAKE_ID2('A', 'C')
|
||||
#define ID_NLA MAKE_ID2('N', 'L')
|
||||
|
||||
#define ID_VS MAKE_ID2('V', 'S')
|
||||
#define ID_VN MAKE_ID2('V', 'N')
|
||||
|
||||
|
||||
// ------------------------------------------------------------
|
||||
#define FORM MAKE_ID('F','O','R','M')
|
||||
#define DDG1 MAKE_ID('3','D','G','1')
|
||||
#define DDG2 MAKE_ID('3','D','G','2')
|
||||
#define DDG3 MAKE_ID('3','D','G','3')
|
||||
#define DDG4 MAKE_ID('3','D','G','4')
|
||||
#define GOUR MAKE_ID('G','O','U','R')
|
||||
#define BLEN MAKE_ID('B','L','E','N')
|
||||
#define DER_ MAKE_ID('D','E','R','_')
|
||||
#define V100 MAKE_ID('V','1','0','0')
|
||||
#define DATA MAKE_ID('D','A','T','A')
|
||||
#define GLOB MAKE_ID('G','L','O','B')
|
||||
#define IMAG MAKE_ID('I','M','A','G')
|
||||
#define TEST MAKE_ID('T','E','S','T')
|
||||
#define USER MAKE_ID('U','S','E','R')
|
||||
|
||||
|
||||
// ------------------------------------------------------------
|
||||
#define DNA1 MAKE_ID('D','N','A','1')
|
||||
#define REND MAKE_ID('R','E','N','D')
|
||||
#define ENDB MAKE_ID('E','N','D','B')
|
||||
#define NAME MAKE_ID('N','A','M','E')
|
||||
#define SDNA MAKE_ID('S','D','N','A')
|
||||
#define TYPE MAKE_ID('T','Y','P','E')
|
||||
#define TLEN MAKE_ID('T','L','E','N')
|
||||
#define STRC MAKE_ID('S','T','R','C')
|
||||
|
||||
|
||||
// ------------------------------------------------------------
|
||||
#define SWITCH_INT(a) { \
|
||||
char s_i, *p_i; \
|
||||
p_i= (char *)&(a); \
|
||||
s_i=p_i[0]; p_i[0]=p_i[3]; p_i[3]=s_i; \
|
||||
s_i=p_i[1]; p_i[1]=p_i[2]; p_i[2]=s_i; }
|
||||
|
||||
// ------------------------------------------------------------
|
||||
#define SWITCH_SHORT(a) { \
|
||||
char s_i, *p_i; \
|
||||
p_i= (char *)&(a); \
|
||||
s_i=p_i[0]; p_i[0]=p_i[1]; p_i[1]=s_i; }
|
||||
|
||||
// ------------------------------------------------------------
|
||||
#define SWITCH_LONGINT(a) { \
|
||||
char s_i, *p_i; \
|
||||
p_i= (char *)&(a); \
|
||||
s_i=p_i[0]; p_i[0]=p_i[7]; p_i[7]=s_i; \
|
||||
s_i=p_i[1]; p_i[1]=p_i[6]; p_i[6]=s_i; \
|
||||
s_i=p_i[2]; p_i[2]=p_i[5]; p_i[5]=s_i; \
|
||||
s_i=p_i[3]; p_i[3]=p_i[4]; p_i[4]=s_i; }
|
||||
|
||||
#endif//__B_DEFINES_H__
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,153 +1,153 @@
|
||||
/*
|
||||
bParse
|
||||
Copyright (c) 2006-2009 Charlie C & Erwin Coumans http://gamekit.googlecode.com
|
||||
|
||||
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.
|
||||
*/
|
||||
|
||||
#ifndef __BFILE_H__
|
||||
#define __BFILE_H__
|
||||
|
||||
#include "bCommon.h"
|
||||
#include "bChunk.h"
|
||||
#include <stdio.h>
|
||||
|
||||
namespace bParse {
|
||||
|
||||
// ----------------------------------------------------- //
|
||||
enum bFileFlags
|
||||
{
|
||||
FD_INVALID =0,
|
||||
FD_OK =1,
|
||||
FD_VOID_IS_8 =2,
|
||||
FD_ENDIAN_SWAP =4,
|
||||
FD_FILE_64 =8,
|
||||
FD_BITS_VARIES =16,
|
||||
FD_VERSION_VARIES = 32,
|
||||
FD_DOUBLE_PRECISION =64,
|
||||
FD_BROKEN_DNA = 128
|
||||
};
|
||||
|
||||
|
||||
// ----------------------------------------------------- //
|
||||
class bFile
|
||||
{
|
||||
protected:
|
||||
|
||||
char m_headerString[7];
|
||||
|
||||
bool mOwnsBuffer;
|
||||
char* mFileBuffer;
|
||||
int mFileLen;
|
||||
int mVersion;
|
||||
|
||||
|
||||
bPtrMap mLibPointers;
|
||||
|
||||
int mDataStart;
|
||||
bDNA* mFileDNA;
|
||||
bDNA* mMemoryDNA;
|
||||
|
||||
btAlignedObjectArray<char*> m_pointerFixupArray;
|
||||
btAlignedObjectArray<char*> m_pointerPtrFixupArray;
|
||||
|
||||
btAlignedObjectArray<bChunkInd> m_chunks;
|
||||
|
||||
//
|
||||
|
||||
bPtrMap mDataPointers;
|
||||
|
||||
|
||||
int mFlags;
|
||||
|
||||
// ////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// buffer offset util
|
||||
int getNextBlock(bChunkInd *dataChunk, const char *dataPtr, const int flags);
|
||||
void safeSwapPtr(char *dst, const char *src);
|
||||
|
||||
virtual void parseHeader();
|
||||
|
||||
virtual void parseData() = 0;
|
||||
|
||||
void resolvePointersMismatch();
|
||||
void resolvePointersChunk(const bChunkInd& dataChunk, bool verboseDumpAllBlocks);
|
||||
|
||||
void resolvePointersStructRecursive(char *strcPtr, int old_dna, bool verboseDumpAllBlocks, int recursion);
|
||||
//void swapPtr(char *dst, char *src);
|
||||
|
||||
void parseStruct(char *strcPtr, char *dtPtr, int old_dna, int new_dna, bool fixupPointers);
|
||||
void getMatchingFileDNA(short* old, const char* lookupName, const char* lookupType, char *strcData, char *data, bool fixupPointers);
|
||||
char* getFileElement(short *firstStruct, char *lookupName, char *lookupType, char *data, short **foundPos);
|
||||
|
||||
|
||||
void swap(char *head, class bChunkInd& ch);
|
||||
|
||||
void swapData(char *data, short type, int arraySize);
|
||||
void swapStruct(int dna_nr, char *data);
|
||||
|
||||
|
||||
|
||||
|
||||
char* readStruct(char *head, class bChunkInd& chunk);
|
||||
char *getAsString(int code);
|
||||
|
||||
void parseInternal(bool verboseDumpAllTypes, char* memDna,int memDnaLength);
|
||||
|
||||
public:
|
||||
bFile(const char *filename, const char headerString[7]);
|
||||
|
||||
//todo: make memoryBuffer const char
|
||||
//bFile( const char *memoryBuffer, int len);
|
||||
bFile( char *memoryBuffer, int len, const char headerString[7]);
|
||||
virtual ~bFile();
|
||||
|
||||
bDNA* getFileDNA()
|
||||
{
|
||||
return mFileDNA;
|
||||
}
|
||||
|
||||
virtual void addDataBlock(char* dataBlock) = 0;
|
||||
|
||||
int getFlags() const
|
||||
{
|
||||
return mFlags;
|
||||
}
|
||||
|
||||
bPtrMap& getLibPointers()
|
||||
{
|
||||
return mLibPointers;
|
||||
}
|
||||
|
||||
void* findLibPointer(void *ptr);
|
||||
|
||||
bool ok();
|
||||
|
||||
virtual void parse(bool verboseDumpAllTypes) = 0;
|
||||
|
||||
virtual int write(const char* fileName, bool fixupPointers=false) = 0;
|
||||
|
||||
virtual void writeChunks(FILE* fp, bool fixupPointers );
|
||||
|
||||
virtual void writeDNA(FILE* fp) = 0;
|
||||
|
||||
void updateOldPointers();
|
||||
void resolvePointers(bool verboseDumpAllBlocks);
|
||||
|
||||
void dumpChunks(bDNA* dna);
|
||||
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BFILE_H__
|
||||
/*
|
||||
bParse
|
||||
Copyright (c) 2006-2009 Charlie C & Erwin Coumans http://gamekit.googlecode.com
|
||||
|
||||
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.
|
||||
*/
|
||||
|
||||
#ifndef __BFILE_H__
|
||||
#define __BFILE_H__
|
||||
|
||||
#include "bCommon.h"
|
||||
#include "bChunk.h"
|
||||
#include <stdio.h>
|
||||
|
||||
namespace bParse {
|
||||
|
||||
// ----------------------------------------------------- //
|
||||
enum bFileFlags
|
||||
{
|
||||
FD_INVALID =0,
|
||||
FD_OK =1,
|
||||
FD_VOID_IS_8 =2,
|
||||
FD_ENDIAN_SWAP =4,
|
||||
FD_FILE_64 =8,
|
||||
FD_BITS_VARIES =16,
|
||||
FD_VERSION_VARIES = 32,
|
||||
FD_DOUBLE_PRECISION =64,
|
||||
FD_BROKEN_DNA = 128
|
||||
};
|
||||
|
||||
|
||||
// ----------------------------------------------------- //
|
||||
class bFile
|
||||
{
|
||||
protected:
|
||||
|
||||
char m_headerString[7];
|
||||
|
||||
bool mOwnsBuffer;
|
||||
char* mFileBuffer;
|
||||
int mFileLen;
|
||||
int mVersion;
|
||||
|
||||
|
||||
bPtrMap mLibPointers;
|
||||
|
||||
int mDataStart;
|
||||
bDNA* mFileDNA;
|
||||
bDNA* mMemoryDNA;
|
||||
|
||||
btAlignedObjectArray<char*> m_pointerFixupArray;
|
||||
btAlignedObjectArray<char*> m_pointerPtrFixupArray;
|
||||
|
||||
btAlignedObjectArray<bChunkInd> m_chunks;
|
||||
|
||||
//
|
||||
|
||||
bPtrMap mDataPointers;
|
||||
|
||||
|
||||
int mFlags;
|
||||
|
||||
// ////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// buffer offset util
|
||||
int getNextBlock(bChunkInd *dataChunk, const char *dataPtr, const int flags);
|
||||
void safeSwapPtr(char *dst, const char *src);
|
||||
|
||||
virtual void parseHeader();
|
||||
|
||||
virtual void parseData() = 0;
|
||||
|
||||
void resolvePointersMismatch();
|
||||
void resolvePointersChunk(const bChunkInd& dataChunk, bool verboseDumpAllBlocks);
|
||||
|
||||
void resolvePointersStructRecursive(char *strcPtr, int old_dna, bool verboseDumpAllBlocks, int recursion);
|
||||
//void swapPtr(char *dst, char *src);
|
||||
|
||||
void parseStruct(char *strcPtr, char *dtPtr, int old_dna, int new_dna, bool fixupPointers);
|
||||
void getMatchingFileDNA(short* old, const char* lookupName, const char* lookupType, char *strcData, char *data, bool fixupPointers);
|
||||
char* getFileElement(short *firstStruct, char *lookupName, char *lookupType, char *data, short **foundPos);
|
||||
|
||||
|
||||
void swap(char *head, class bChunkInd& ch);
|
||||
|
||||
void swapData(char *data, short type, int arraySize);
|
||||
void swapStruct(int dna_nr, char *data);
|
||||
|
||||
|
||||
|
||||
|
||||
char* readStruct(char *head, class bChunkInd& chunk);
|
||||
char *getAsString(int code);
|
||||
|
||||
void parseInternal(bool verboseDumpAllTypes, char* memDna,int memDnaLength);
|
||||
|
||||
public:
|
||||
bFile(const char *filename, const char headerString[7]);
|
||||
|
||||
//todo: make memoryBuffer const char
|
||||
//bFile( const char *memoryBuffer, int len);
|
||||
bFile( char *memoryBuffer, int len, const char headerString[7]);
|
||||
virtual ~bFile();
|
||||
|
||||
bDNA* getFileDNA()
|
||||
{
|
||||
return mFileDNA;
|
||||
}
|
||||
|
||||
virtual void addDataBlock(char* dataBlock) = 0;
|
||||
|
||||
int getFlags() const
|
||||
{
|
||||
return mFlags;
|
||||
}
|
||||
|
||||
bPtrMap& getLibPointers()
|
||||
{
|
||||
return mLibPointers;
|
||||
}
|
||||
|
||||
void* findLibPointer(void *ptr);
|
||||
|
||||
bool ok();
|
||||
|
||||
virtual void parse(bool verboseDumpAllTypes) = 0;
|
||||
|
||||
virtual int write(const char* fileName, bool fixupPointers=false) = 0;
|
||||
|
||||
virtual void writeChunks(FILE* fp, bool fixupPointers );
|
||||
|
||||
virtual void writeDNA(FILE* fp) = 0;
|
||||
|
||||
void updateOldPointers();
|
||||
void resolvePointers(bool verboseDumpAllBlocks);
|
||||
|
||||
void dumpChunks(bDNA* dna);
|
||||
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif//__BFILE_H__
|
||||
|
||||
@@ -1,384 +1,384 @@
|
||||
/*
|
||||
bParse
|
||||
Copyright (c) 2006-2010 Erwin Coumans http://gamekit.googlecode.com
|
||||
|
||||
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.
|
||||
*/
|
||||
|
||||
#include "btBulletFile.h"
|
||||
#include "bDefines.h"
|
||||
#include "bDNA.h"
|
||||
|
||||
#if !defined( __CELLOS_LV2__) && !defined(__MWERKS__)
|
||||
#include <memory.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
|
||||
|
||||
// 32 && 64 bit versions
|
||||
#ifdef BT_INTERNAL_UPDATE_SERIALIZATION_STRUCTURES
|
||||
#ifdef _WIN64
|
||||
extern unsigned char sBulletDNAstr64[];
|
||||
extern int sBulletDNAlen64;
|
||||
#else
|
||||
extern unsigned char sBulletDNAstr[];
|
||||
extern int sBulletDNAlen;
|
||||
#endif //_WIN64
|
||||
#else//BT_INTERNAL_UPDATE_SERIALIZATION_STRUCTURES
|
||||
|
||||
extern unsigned char sBulletDNAstr64[];
|
||||
extern int sBulletDNAlen64;
|
||||
extern unsigned char sBulletDNAstr[];
|
||||
extern int sBulletDNAlen;
|
||||
|
||||
#endif //BT_INTERNAL_UPDATE_SERIALIZATION_STRUCTURES
|
||||
|
||||
using namespace bParse;
|
||||
|
||||
btBulletFile::btBulletFile()
|
||||
:bFile("", "BULLET ")
|
||||
{
|
||||
mMemoryDNA = new bDNA();
|
||||
m_DnaCopy = 0;
|
||||
|
||||
|
||||
#ifdef BT_INTERNAL_UPDATE_SERIALIZATION_STRUCTURES
|
||||
#ifdef _WIN64
|
||||
m_DnaCopy = (char*)btAlignedAlloc(sBulletDNAlen64,16);
|
||||
memcpy(m_DnaCopy,sBulletDNAstr64,sBulletDNAlen64);
|
||||
mMemoryDNA->init(m_DnaCopy,sBulletDNAlen64);
|
||||
#else//_WIN64
|
||||
m_DnaCopy = (char*)btAlignedAlloc(sBulletDNAlen,16);
|
||||
memcpy(m_DnaCopy,sBulletDNAstr,sBulletDNAlen);
|
||||
mMemoryDNA->init(m_DnaCopy,sBulletDNAlen);
|
||||
#endif//_WIN64
|
||||
#else//BT_INTERNAL_UPDATE_SERIALIZATION_STRUCTURES
|
||||
if (VOID_IS_8)
|
||||
{
|
||||
m_DnaCopy = (char*) btAlignedAlloc(sBulletDNAlen64,16);
|
||||
memcpy(m_DnaCopy,sBulletDNAstr64,sBulletDNAlen64);
|
||||
mMemoryDNA->init(m_DnaCopy,sBulletDNAlen64);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_DnaCopy =(char*) btAlignedAlloc(sBulletDNAlen,16);
|
||||
memcpy(m_DnaCopy,sBulletDNAstr,sBulletDNAlen);
|
||||
mMemoryDNA->init(m_DnaCopy,sBulletDNAlen);
|
||||
}
|
||||
#endif//BT_INTERNAL_UPDATE_SERIALIZATION_STRUCTURES
|
||||
}
|
||||
|
||||
|
||||
|
||||
btBulletFile::btBulletFile(const char* fileName)
|
||||
:bFile(fileName, "BULLET ")
|
||||
{
|
||||
m_DnaCopy = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
btBulletFile::btBulletFile(char *memoryBuffer, int len)
|
||||
:bFile(memoryBuffer,len, "BULLET ")
|
||||
{
|
||||
m_DnaCopy = 0;
|
||||
}
|
||||
|
||||
|
||||
btBulletFile::~btBulletFile()
|
||||
{
|
||||
if (m_DnaCopy)
|
||||
btAlignedFree(m_DnaCopy);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ----------------------------------------------------- //
|
||||
void btBulletFile::parseData()
|
||||
{
|
||||
printf ("Building datablocks");
|
||||
printf ("Chunk size = %d",CHUNK_HEADER_LEN);
|
||||
printf ("File chunk size = %d",ChunkUtils::getOffset(mFlags));
|
||||
|
||||
const bool brokenDNA = (mFlags&FD_BROKEN_DNA)!=0;
|
||||
|
||||
//const bool swap = (mFlags&FD_ENDIAN_SWAP)!=0;
|
||||
|
||||
|
||||
mDataStart = 12;
|
||||
|
||||
char *dataPtr = mFileBuffer+mDataStart;
|
||||
|
||||
bChunkInd dataChunk;
|
||||
dataChunk.code = 0;
|
||||
|
||||
|
||||
//dataPtr += ChunkUtils::getNextBlock(&dataChunk, dataPtr, mFlags);
|
||||
int seek = getNextBlock(&dataChunk, dataPtr, mFlags);
|
||||
//dataPtr += ChunkUtils::getOffset(mFlags);
|
||||
char *dataPtrHead = 0;
|
||||
|
||||
while (dataChunk.code != DNA1)
|
||||
{
|
||||
if (!brokenDNA || (dataChunk.code != BT_QUANTIZED_BVH_CODE) )
|
||||
{
|
||||
|
||||
// one behind
|
||||
if (dataChunk.code == SDNA) break;
|
||||
//if (dataChunk.code == DNA1) break;
|
||||
|
||||
// same as (BHEAD+DATA dependency)
|
||||
dataPtrHead = dataPtr+ChunkUtils::getOffset(mFlags);
|
||||
if (dataChunk.dna_nr>=0)
|
||||
{
|
||||
char *id = readStruct(dataPtrHead, dataChunk);
|
||||
|
||||
// lookup maps
|
||||
if (id)
|
||||
{
|
||||
mLibPointers.insert(dataChunk.oldPtr, (bStructHandle*)id);
|
||||
|
||||
m_chunks.push_back(dataChunk);
|
||||
// block it
|
||||
//bListBasePtr *listID = mMain->getListBasePtr(dataChunk.code);
|
||||
//if (listID)
|
||||
// listID->push_back((bStructHandle*)id);
|
||||
}
|
||||
|
||||
if (dataChunk.code == BT_RIGIDBODY_CODE)
|
||||
{
|
||||
m_rigidBodies.push_back((bStructHandle*) id);
|
||||
}
|
||||
|
||||
if (dataChunk.code == BT_CONSTRAINT_CODE)
|
||||
{
|
||||
m_constraints.push_back((bStructHandle*) id);
|
||||
}
|
||||
|
||||
if (dataChunk.code == BT_QUANTIZED_BVH_CODE)
|
||||
{
|
||||
m_bvhs.push_back((bStructHandle*) id);
|
||||
}
|
||||
|
||||
if (dataChunk.code == BT_TRIANLGE_INFO_MAP)
|
||||
{
|
||||
m_triangleInfoMaps.push_back((bStructHandle*) id);
|
||||
}
|
||||
|
||||
if (dataChunk.code == BT_COLLISIONOBJECT_CODE)
|
||||
{
|
||||
m_collisionObjects.push_back((bStructHandle*) id);
|
||||
}
|
||||
|
||||
if (dataChunk.code == BT_SHAPE_CODE)
|
||||
{
|
||||
m_collisionShapes.push_back((bStructHandle*) id);
|
||||
}
|
||||
|
||||
// if (dataChunk.code == GLOB)
|
||||
// {
|
||||
// m_glob = (bStructHandle*) id;
|
||||
// }
|
||||
} else
|
||||
{
|
||||
printf("unknown chunk\n");
|
||||
|
||||
mLibPointers.insert(dataChunk.oldPtr, (bStructHandle*)dataPtrHead);
|
||||
}
|
||||
} else
|
||||
{
|
||||
printf("skipping BT_QUANTIZED_BVH_CODE due to broken DNA\n");
|
||||
}
|
||||
|
||||
// next please!
|
||||
dataPtr += seek;
|
||||
|
||||
seek = getNextBlock(&dataChunk, dataPtr, mFlags);
|
||||
if (seek < 0)
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void btBulletFile::addDataBlock(char* dataBlock)
|
||||
{
|
||||
//mMain->addDatablock(dataBlock);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void btBulletFile::writeDNA(FILE* fp)
|
||||
{
|
||||
|
||||
bChunkInd dataChunk;
|
||||
dataChunk.code = DNA1;
|
||||
dataChunk.dna_nr = 0;
|
||||
dataChunk.nr = 1;
|
||||
#ifdef BT_INTERNAL_UPDATE_SERIALIZATION_STRUCTURES
|
||||
if (VOID_IS_8)
|
||||
{
|
||||
#ifdef _WIN64
|
||||
dataChunk.len = sBulletDNAlen64;
|
||||
dataChunk.oldPtr = sBulletDNAstr64;
|
||||
fwrite(&dataChunk,sizeof(bChunkInd),1,fp);
|
||||
fwrite(sBulletDNAstr64, sBulletDNAlen64,1,fp);
|
||||
#else
|
||||
btAssert(0);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifndef _WIN64
|
||||
dataChunk.len = sBulletDNAlen;
|
||||
dataChunk.oldPtr = sBulletDNAstr;
|
||||
fwrite(&dataChunk,sizeof(bChunkInd),1,fp);
|
||||
fwrite(sBulletDNAstr, sBulletDNAlen,1,fp);
|
||||
#else//_WIN64
|
||||
btAssert(0);
|
||||
#endif//_WIN64
|
||||
}
|
||||
#else//BT_INTERNAL_UPDATE_SERIALIZATION_STRUCTURES
|
||||
if (VOID_IS_8)
|
||||
{
|
||||
dataChunk.len = sBulletDNAlen64;
|
||||
dataChunk.oldPtr = sBulletDNAstr64;
|
||||
fwrite(&dataChunk,sizeof(bChunkInd),1,fp);
|
||||
fwrite(sBulletDNAstr64, sBulletDNAlen64,1,fp);
|
||||
}
|
||||
else
|
||||
{
|
||||
dataChunk.len = sBulletDNAlen;
|
||||
dataChunk.oldPtr = sBulletDNAstr;
|
||||
fwrite(&dataChunk,sizeof(bChunkInd),1,fp);
|
||||
fwrite(sBulletDNAstr, sBulletDNAlen,1,fp);
|
||||
}
|
||||
#endif//BT_INTERNAL_UPDATE_SERIALIZATION_STRUCTURES
|
||||
}
|
||||
|
||||
|
||||
void btBulletFile::parse(bool verboseDumpAllTypes)
|
||||
{
|
||||
#ifdef BT_INTERNAL_UPDATE_SERIALIZATION_STRUCTURES
|
||||
if (VOID_IS_8)
|
||||
{
|
||||
#ifdef _WIN64
|
||||
|
||||
if (m_DnaCopy)
|
||||
delete m_DnaCopy;
|
||||
m_DnaCopy = (char*)btAlignedAlloc(sBulletDNAlen64,16);
|
||||
memcpy(m_DnaCopy,sBulletDNAstr64,sBulletDNAlen64);
|
||||
parseInternal(verboseDumpAllTypes,(char*)sBulletDNAstr64,sBulletDNAlen64);
|
||||
#else
|
||||
btAssert(0);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifndef _WIN64
|
||||
|
||||
if (m_DnaCopy)
|
||||
delete m_DnaCopy;
|
||||
m_DnaCopy = (char*)btAlignedAlloc(sBulletDNAlen,16);
|
||||
memcpy(m_DnaCopy,sBulletDNAstr,sBulletDNAlen);
|
||||
parseInternal(verboseDumpAllTypes,m_DnaCopy,sBulletDNAlen);
|
||||
#else
|
||||
btAssert(0);
|
||||
#endif
|
||||
}
|
||||
#else//BT_INTERNAL_UPDATE_SERIALIZATION_STRUCTURES
|
||||
if (VOID_IS_8)
|
||||
{
|
||||
if (m_DnaCopy)
|
||||
delete m_DnaCopy;
|
||||
m_DnaCopy = (char*)btAlignedAlloc(sBulletDNAlen64,16);
|
||||
memcpy(m_DnaCopy,sBulletDNAstr64,sBulletDNAlen64);
|
||||
parseInternal(verboseDumpAllTypes,m_DnaCopy,sBulletDNAlen64);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_DnaCopy)
|
||||
delete m_DnaCopy;
|
||||
m_DnaCopy = (char*)btAlignedAlloc(sBulletDNAlen,16);
|
||||
memcpy(m_DnaCopy,sBulletDNAstr,sBulletDNAlen);
|
||||
parseInternal(verboseDumpAllTypes,m_DnaCopy,sBulletDNAlen);
|
||||
}
|
||||
#endif//BT_INTERNAL_UPDATE_SERIALIZATION_STRUCTURES
|
||||
}
|
||||
|
||||
// experimental
|
||||
int btBulletFile::write(const char* fileName, bool fixupPointers)
|
||||
{
|
||||
FILE *fp = fopen(fileName, "wb");
|
||||
if (fp)
|
||||
{
|
||||
char header[SIZEOFBLENDERHEADER] ;
|
||||
memcpy(header, m_headerString, 7);
|
||||
int endian= 1;
|
||||
endian= ((char*)&endian)[0];
|
||||
|
||||
if (endian)
|
||||
{
|
||||
header[7] = '_';
|
||||
} else
|
||||
{
|
||||
header[7] = '-';
|
||||
}
|
||||
if (VOID_IS_8)
|
||||
{
|
||||
header[8]='V';
|
||||
} else
|
||||
{
|
||||
header[8]='v';
|
||||
}
|
||||
|
||||
header[9] = '2';
|
||||
header[10] = '7';
|
||||
header[11] = '5';
|
||||
|
||||
fwrite(header,SIZEOFBLENDERHEADER,1,fp);
|
||||
|
||||
writeChunks(fp, fixupPointers);
|
||||
|
||||
writeDNA(fp);
|
||||
|
||||
fclose(fp);
|
||||
|
||||
} else
|
||||
{
|
||||
printf("Error: cannot open file %s for writing\n",fileName);
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void btBulletFile::addStruct(const char* structType,void* data, int len, void* oldPtr, int code)
|
||||
{
|
||||
|
||||
bParse::bChunkInd dataChunk;
|
||||
dataChunk.code = code;
|
||||
dataChunk.nr = 1;
|
||||
dataChunk.len = len;
|
||||
dataChunk.dna_nr = mMemoryDNA->getReverseType(structType);
|
||||
dataChunk.oldPtr = oldPtr;
|
||||
|
||||
///Perform structure size validation
|
||||
short* structInfo= mMemoryDNA->getStruct(dataChunk.dna_nr);
|
||||
int elemBytes;
|
||||
elemBytes= mMemoryDNA->getLength(structInfo[0]);
|
||||
// int elemBytes = mMemoryDNA->getElementSize(structInfo[0],structInfo[1]);
|
||||
assert(len==elemBytes);
|
||||
|
||||
mLibPointers.insert(dataChunk.oldPtr, (bStructHandle*)data);
|
||||
m_chunks.push_back(dataChunk);
|
||||
/*
|
||||
bParse
|
||||
Copyright (c) 2006-2010 Erwin Coumans http://gamekit.googlecode.com
|
||||
|
||||
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.
|
||||
*/
|
||||
|
||||
#include "btBulletFile.h"
|
||||
#include "bDefines.h"
|
||||
#include "bDNA.h"
|
||||
|
||||
#if !defined( __CELLOS_LV2__) && !defined(__MWERKS__)
|
||||
#include <memory.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
|
||||
|
||||
// 32 && 64 bit versions
|
||||
#ifdef BT_INTERNAL_UPDATE_SERIALIZATION_STRUCTURES
|
||||
#ifdef _WIN64
|
||||
extern unsigned char sBulletDNAstr64[];
|
||||
extern int sBulletDNAlen64;
|
||||
#else
|
||||
extern unsigned char sBulletDNAstr[];
|
||||
extern int sBulletDNAlen;
|
||||
#endif //_WIN64
|
||||
#else//BT_INTERNAL_UPDATE_SERIALIZATION_STRUCTURES
|
||||
|
||||
extern unsigned char sBulletDNAstr64[];
|
||||
extern int sBulletDNAlen64;
|
||||
extern unsigned char sBulletDNAstr[];
|
||||
extern int sBulletDNAlen;
|
||||
|
||||
#endif //BT_INTERNAL_UPDATE_SERIALIZATION_STRUCTURES
|
||||
|
||||
using namespace bParse;
|
||||
|
||||
btBulletFile::btBulletFile()
|
||||
:bFile("", "BULLET ")
|
||||
{
|
||||
mMemoryDNA = new bDNA();
|
||||
m_DnaCopy = 0;
|
||||
|
||||
|
||||
#ifdef BT_INTERNAL_UPDATE_SERIALIZATION_STRUCTURES
|
||||
#ifdef _WIN64
|
||||
m_DnaCopy = (char*)btAlignedAlloc(sBulletDNAlen64,16);
|
||||
memcpy(m_DnaCopy,sBulletDNAstr64,sBulletDNAlen64);
|
||||
mMemoryDNA->init(m_DnaCopy,sBulletDNAlen64);
|
||||
#else//_WIN64
|
||||
m_DnaCopy = (char*)btAlignedAlloc(sBulletDNAlen,16);
|
||||
memcpy(m_DnaCopy,sBulletDNAstr,sBulletDNAlen);
|
||||
mMemoryDNA->init(m_DnaCopy,sBulletDNAlen);
|
||||
#endif//_WIN64
|
||||
#else//BT_INTERNAL_UPDATE_SERIALIZATION_STRUCTURES
|
||||
if (VOID_IS_8)
|
||||
{
|
||||
m_DnaCopy = (char*) btAlignedAlloc(sBulletDNAlen64,16);
|
||||
memcpy(m_DnaCopy,sBulletDNAstr64,sBulletDNAlen64);
|
||||
mMemoryDNA->init(m_DnaCopy,sBulletDNAlen64);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_DnaCopy =(char*) btAlignedAlloc(sBulletDNAlen,16);
|
||||
memcpy(m_DnaCopy,sBulletDNAstr,sBulletDNAlen);
|
||||
mMemoryDNA->init(m_DnaCopy,sBulletDNAlen);
|
||||
}
|
||||
#endif//BT_INTERNAL_UPDATE_SERIALIZATION_STRUCTURES
|
||||
}
|
||||
|
||||
|
||||
|
||||
btBulletFile::btBulletFile(const char* fileName)
|
||||
:bFile(fileName, "BULLET ")
|
||||
{
|
||||
m_DnaCopy = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
btBulletFile::btBulletFile(char *memoryBuffer, int len)
|
||||
:bFile(memoryBuffer,len, "BULLET ")
|
||||
{
|
||||
m_DnaCopy = 0;
|
||||
}
|
||||
|
||||
|
||||
btBulletFile::~btBulletFile()
|
||||
{
|
||||
if (m_DnaCopy)
|
||||
btAlignedFree(m_DnaCopy);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ----------------------------------------------------- //
|
||||
void btBulletFile::parseData()
|
||||
{
|
||||
printf ("Building datablocks");
|
||||
printf ("Chunk size = %d",CHUNK_HEADER_LEN);
|
||||
printf ("File chunk size = %d",ChunkUtils::getOffset(mFlags));
|
||||
|
||||
const bool brokenDNA = (mFlags&FD_BROKEN_DNA)!=0;
|
||||
|
||||
//const bool swap = (mFlags&FD_ENDIAN_SWAP)!=0;
|
||||
|
||||
|
||||
mDataStart = 12;
|
||||
|
||||
char *dataPtr = mFileBuffer+mDataStart;
|
||||
|
||||
bChunkInd dataChunk;
|
||||
dataChunk.code = 0;
|
||||
|
||||
|
||||
//dataPtr += ChunkUtils::getNextBlock(&dataChunk, dataPtr, mFlags);
|
||||
int seek = getNextBlock(&dataChunk, dataPtr, mFlags);
|
||||
//dataPtr += ChunkUtils::getOffset(mFlags);
|
||||
char *dataPtrHead = 0;
|
||||
|
||||
while (dataChunk.code != DNA1)
|
||||
{
|
||||
if (!brokenDNA || (dataChunk.code != BT_QUANTIZED_BVH_CODE) )
|
||||
{
|
||||
|
||||
// one behind
|
||||
if (dataChunk.code == SDNA) break;
|
||||
//if (dataChunk.code == DNA1) break;
|
||||
|
||||
// same as (BHEAD+DATA dependency)
|
||||
dataPtrHead = dataPtr+ChunkUtils::getOffset(mFlags);
|
||||
if (dataChunk.dna_nr>=0)
|
||||
{
|
||||
char *id = readStruct(dataPtrHead, dataChunk);
|
||||
|
||||
// lookup maps
|
||||
if (id)
|
||||
{
|
||||
mLibPointers.insert(dataChunk.oldPtr, (bStructHandle*)id);
|
||||
|
||||
m_chunks.push_back(dataChunk);
|
||||
// block it
|
||||
//bListBasePtr *listID = mMain->getListBasePtr(dataChunk.code);
|
||||
//if (listID)
|
||||
// listID->push_back((bStructHandle*)id);
|
||||
}
|
||||
|
||||
if (dataChunk.code == BT_RIGIDBODY_CODE)
|
||||
{
|
||||
m_rigidBodies.push_back((bStructHandle*) id);
|
||||
}
|
||||
|
||||
if (dataChunk.code == BT_CONSTRAINT_CODE)
|
||||
{
|
||||
m_constraints.push_back((bStructHandle*) id);
|
||||
}
|
||||
|
||||
if (dataChunk.code == BT_QUANTIZED_BVH_CODE)
|
||||
{
|
||||
m_bvhs.push_back((bStructHandle*) id);
|
||||
}
|
||||
|
||||
if (dataChunk.code == BT_TRIANLGE_INFO_MAP)
|
||||
{
|
||||
m_triangleInfoMaps.push_back((bStructHandle*) id);
|
||||
}
|
||||
|
||||
if (dataChunk.code == BT_COLLISIONOBJECT_CODE)
|
||||
{
|
||||
m_collisionObjects.push_back((bStructHandle*) id);
|
||||
}
|
||||
|
||||
if (dataChunk.code == BT_SHAPE_CODE)
|
||||
{
|
||||
m_collisionShapes.push_back((bStructHandle*) id);
|
||||
}
|
||||
|
||||
// if (dataChunk.code == GLOB)
|
||||
// {
|
||||
// m_glob = (bStructHandle*) id;
|
||||
// }
|
||||
} else
|
||||
{
|
||||
printf("unknown chunk\n");
|
||||
|
||||
mLibPointers.insert(dataChunk.oldPtr, (bStructHandle*)dataPtrHead);
|
||||
}
|
||||
} else
|
||||
{
|
||||
printf("skipping BT_QUANTIZED_BVH_CODE due to broken DNA\n");
|
||||
}
|
||||
|
||||
// next please!
|
||||
dataPtr += seek;
|
||||
|
||||
seek = getNextBlock(&dataChunk, dataPtr, mFlags);
|
||||
if (seek < 0)
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void btBulletFile::addDataBlock(char* dataBlock)
|
||||
{
|
||||
//mMain->addDatablock(dataBlock);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void btBulletFile::writeDNA(FILE* fp)
|
||||
{
|
||||
|
||||
bChunkInd dataChunk;
|
||||
dataChunk.code = DNA1;
|
||||
dataChunk.dna_nr = 0;
|
||||
dataChunk.nr = 1;
|
||||
#ifdef BT_INTERNAL_UPDATE_SERIALIZATION_STRUCTURES
|
||||
if (VOID_IS_8)
|
||||
{
|
||||
#ifdef _WIN64
|
||||
dataChunk.len = sBulletDNAlen64;
|
||||
dataChunk.oldPtr = sBulletDNAstr64;
|
||||
fwrite(&dataChunk,sizeof(bChunkInd),1,fp);
|
||||
fwrite(sBulletDNAstr64, sBulletDNAlen64,1,fp);
|
||||
#else
|
||||
btAssert(0);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifndef _WIN64
|
||||
dataChunk.len = sBulletDNAlen;
|
||||
dataChunk.oldPtr = sBulletDNAstr;
|
||||
fwrite(&dataChunk,sizeof(bChunkInd),1,fp);
|
||||
fwrite(sBulletDNAstr, sBulletDNAlen,1,fp);
|
||||
#else//_WIN64
|
||||
btAssert(0);
|
||||
#endif//_WIN64
|
||||
}
|
||||
#else//BT_INTERNAL_UPDATE_SERIALIZATION_STRUCTURES
|
||||
if (VOID_IS_8)
|
||||
{
|
||||
dataChunk.len = sBulletDNAlen64;
|
||||
dataChunk.oldPtr = sBulletDNAstr64;
|
||||
fwrite(&dataChunk,sizeof(bChunkInd),1,fp);
|
||||
fwrite(sBulletDNAstr64, sBulletDNAlen64,1,fp);
|
||||
}
|
||||
else
|
||||
{
|
||||
dataChunk.len = sBulletDNAlen;
|
||||
dataChunk.oldPtr = sBulletDNAstr;
|
||||
fwrite(&dataChunk,sizeof(bChunkInd),1,fp);
|
||||
fwrite(sBulletDNAstr, sBulletDNAlen,1,fp);
|
||||
}
|
||||
#endif//BT_INTERNAL_UPDATE_SERIALIZATION_STRUCTURES
|
||||
}
|
||||
|
||||
|
||||
void btBulletFile::parse(bool verboseDumpAllTypes)
|
||||
{
|
||||
#ifdef BT_INTERNAL_UPDATE_SERIALIZATION_STRUCTURES
|
||||
if (VOID_IS_8)
|
||||
{
|
||||
#ifdef _WIN64
|
||||
|
||||
if (m_DnaCopy)
|
||||
delete m_DnaCopy;
|
||||
m_DnaCopy = (char*)btAlignedAlloc(sBulletDNAlen64,16);
|
||||
memcpy(m_DnaCopy,sBulletDNAstr64,sBulletDNAlen64);
|
||||
parseInternal(verboseDumpAllTypes,(char*)sBulletDNAstr64,sBulletDNAlen64);
|
||||
#else
|
||||
btAssert(0);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifndef _WIN64
|
||||
|
||||
if (m_DnaCopy)
|
||||
delete m_DnaCopy;
|
||||
m_DnaCopy = (char*)btAlignedAlloc(sBulletDNAlen,16);
|
||||
memcpy(m_DnaCopy,sBulletDNAstr,sBulletDNAlen);
|
||||
parseInternal(verboseDumpAllTypes,m_DnaCopy,sBulletDNAlen);
|
||||
#else
|
||||
btAssert(0);
|
||||
#endif
|
||||
}
|
||||
#else//BT_INTERNAL_UPDATE_SERIALIZATION_STRUCTURES
|
||||
if (VOID_IS_8)
|
||||
{
|
||||
if (m_DnaCopy)
|
||||
delete m_DnaCopy;
|
||||
m_DnaCopy = (char*)btAlignedAlloc(sBulletDNAlen64,16);
|
||||
memcpy(m_DnaCopy,sBulletDNAstr64,sBulletDNAlen64);
|
||||
parseInternal(verboseDumpAllTypes,m_DnaCopy,sBulletDNAlen64);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_DnaCopy)
|
||||
delete m_DnaCopy;
|
||||
m_DnaCopy = (char*)btAlignedAlloc(sBulletDNAlen,16);
|
||||
memcpy(m_DnaCopy,sBulletDNAstr,sBulletDNAlen);
|
||||
parseInternal(verboseDumpAllTypes,m_DnaCopy,sBulletDNAlen);
|
||||
}
|
||||
#endif//BT_INTERNAL_UPDATE_SERIALIZATION_STRUCTURES
|
||||
}
|
||||
|
||||
// experimental
|
||||
int btBulletFile::write(const char* fileName, bool fixupPointers)
|
||||
{
|
||||
FILE *fp = fopen(fileName, "wb");
|
||||
if (fp)
|
||||
{
|
||||
char header[SIZEOFBLENDERHEADER] ;
|
||||
memcpy(header, m_headerString, 7);
|
||||
int endian= 1;
|
||||
endian= ((char*)&endian)[0];
|
||||
|
||||
if (endian)
|
||||
{
|
||||
header[7] = '_';
|
||||
} else
|
||||
{
|
||||
header[7] = '-';
|
||||
}
|
||||
if (VOID_IS_8)
|
||||
{
|
||||
header[8]='V';
|
||||
} else
|
||||
{
|
||||
header[8]='v';
|
||||
}
|
||||
|
||||
header[9] = '2';
|
||||
header[10] = '7';
|
||||
header[11] = '5';
|
||||
|
||||
fwrite(header,SIZEOFBLENDERHEADER,1,fp);
|
||||
|
||||
writeChunks(fp, fixupPointers);
|
||||
|
||||
writeDNA(fp);
|
||||
|
||||
fclose(fp);
|
||||
|
||||
} else
|
||||
{
|
||||
printf("Error: cannot open file %s for writing\n",fileName);
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void btBulletFile::addStruct(const char* structType,void* data, int len, void* oldPtr, int code)
|
||||
{
|
||||
|
||||
bParse::bChunkInd dataChunk;
|
||||
dataChunk.code = code;
|
||||
dataChunk.nr = 1;
|
||||
dataChunk.len = len;
|
||||
dataChunk.dna_nr = mMemoryDNA->getReverseType(structType);
|
||||
dataChunk.oldPtr = oldPtr;
|
||||
|
||||
///Perform structure size validation
|
||||
short* structInfo= mMemoryDNA->getStruct(dataChunk.dna_nr);
|
||||
int elemBytes;
|
||||
elemBytes= mMemoryDNA->getLength(structInfo[0]);
|
||||
// int elemBytes = mMemoryDNA->getElementSize(structInfo[0],structInfo[1]);
|
||||
assert(len==elemBytes);
|
||||
|
||||
mLibPointers.insert(dataChunk.oldPtr, (bStructHandle*)data);
|
||||
m_chunks.push_back(dataChunk);
|
||||
}
|
||||
@@ -1,78 +1,78 @@
|
||||
/*
|
||||
bParse
|
||||
Copyright (c) 2006-2010 Charlie C & Erwin Coumans http://gamekit.googlecode.com
|
||||
|
||||
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.
|
||||
*/
|
||||
|
||||
#ifndef BT_BULLET_FILE_H
|
||||
#define BT_BULLET_FILE_H
|
||||
|
||||
|
||||
#include "bFile.h"
|
||||
#include "LinearMath/btAlignedObjectArray.h"
|
||||
#include "bDefines.h"
|
||||
|
||||
#include "LinearMath/btSerializer.h"
|
||||
|
||||
|
||||
|
||||
namespace bParse {
|
||||
|
||||
// ----------------------------------------------------- //
|
||||
class btBulletFile : public bFile
|
||||
{
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
char* m_DnaCopy;
|
||||
|
||||
public:
|
||||
|
||||
btAlignedObjectArray<bStructHandle*> m_rigidBodies;
|
||||
|
||||
btAlignedObjectArray<bStructHandle*> m_collisionObjects;
|
||||
|
||||
btAlignedObjectArray<bStructHandle*> m_collisionShapes;
|
||||
|
||||
btAlignedObjectArray<bStructHandle*> m_constraints;
|
||||
|
||||
btAlignedObjectArray<bStructHandle*> m_bvhs;
|
||||
|
||||
btAlignedObjectArray<bStructHandle*> m_triangleInfoMaps;
|
||||
|
||||
btBulletFile();
|
||||
|
||||
btBulletFile(const char* fileName);
|
||||
|
||||
btBulletFile(char *memoryBuffer, int len);
|
||||
|
||||
virtual ~btBulletFile();
|
||||
|
||||
virtual void addDataBlock(char* dataBlock);
|
||||
|
||||
|
||||
// experimental
|
||||
virtual int write(const char* fileName, bool fixupPointers=false);
|
||||
|
||||
virtual void parse(bool verboseDumpAllTypes);
|
||||
|
||||
virtual void parseData();
|
||||
|
||||
virtual void writeDNA(FILE* fp);
|
||||
|
||||
void addStruct(const char* structType,void* data, int len, void* oldPtr, int code);
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
#endif //BT_BULLET_FILE_H
|
||||
/*
|
||||
bParse
|
||||
Copyright (c) 2006-2010 Charlie C & Erwin Coumans http://gamekit.googlecode.com
|
||||
|
||||
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.
|
||||
*/
|
||||
|
||||
#ifndef BT_BULLET_FILE_H
|
||||
#define BT_BULLET_FILE_H
|
||||
|
||||
|
||||
#include "bFile.h"
|
||||
#include "LinearMath/btAlignedObjectArray.h"
|
||||
#include "bDefines.h"
|
||||
|
||||
#include "LinearMath/btSerializer.h"
|
||||
|
||||
|
||||
|
||||
namespace bParse {
|
||||
|
||||
// ----------------------------------------------------- //
|
||||
class btBulletFile : public bFile
|
||||
{
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
char* m_DnaCopy;
|
||||
|
||||
public:
|
||||
|
||||
btAlignedObjectArray<bStructHandle*> m_rigidBodies;
|
||||
|
||||
btAlignedObjectArray<bStructHandle*> m_collisionObjects;
|
||||
|
||||
btAlignedObjectArray<bStructHandle*> m_collisionShapes;
|
||||
|
||||
btAlignedObjectArray<bStructHandle*> m_constraints;
|
||||
|
||||
btAlignedObjectArray<bStructHandle*> m_bvhs;
|
||||
|
||||
btAlignedObjectArray<bStructHandle*> m_triangleInfoMaps;
|
||||
|
||||
btBulletFile();
|
||||
|
||||
btBulletFile(const char* fileName);
|
||||
|
||||
btBulletFile(char *memoryBuffer, int len);
|
||||
|
||||
virtual ~btBulletFile();
|
||||
|
||||
virtual void addDataBlock(char* dataBlock);
|
||||
|
||||
|
||||
// experimental
|
||||
virtual int write(const char* fileName, bool fixupPointers=false);
|
||||
|
||||
virtual void parse(bool verboseDumpAllTypes);
|
||||
|
||||
virtual void parseData();
|
||||
|
||||
virtual void writeDNA(FILE* fp);
|
||||
|
||||
void addStruct(const char* structType,void* data, int len, void* oldPtr, int code);
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
#endif //BT_BULLET_FILE_H
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
INCLUDE_DIRECTORIES(
|
||||
${BULLET_PHYSICS_SOURCE_DIR}/src
|
||||
${BULLET_PHYSICS_SOURCE_DIR}/Extras/Serialize/BulletFileLoader
|
||||
)
|
||||
|
||||
ADD_LIBRARY(
|
||||
BulletWorldImporter
|
||||
btBulletWorldImporter.cpp
|
||||
btBulletWorldImporter.h
|
||||
)
|
||||
INCLUDE_DIRECTORIES(
|
||||
${BULLET_PHYSICS_SOURCE_DIR}/src
|
||||
${BULLET_PHYSICS_SOURCE_DIR}/Extras/Serialize/BulletFileLoader
|
||||
)
|
||||
|
||||
ADD_LIBRARY(
|
||||
BulletWorldImporter
|
||||
btBulletWorldImporter.cpp
|
||||
btBulletWorldImporter.h
|
||||
)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,180 +1,180 @@
|
||||
/*
|
||||
Bullet Continuous Collision Detection and Physics Library
|
||||
Copyright (c) 2003-2010 Erwin Coumans http://continuousphysics.com/Bullet/
|
||||
|
||||
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.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef BULLET_WORLD_IMPORTER_H
|
||||
#define BULLET_WORLD_IMPORTER_H
|
||||
|
||||
#include "LinearMath/btTransform.h"
|
||||
#include "LinearMath/btVector3.h"
|
||||
#include "LinearMath/btAlignedObjectArray.h"
|
||||
#include "LinearMath/btHashMap.h"
|
||||
|
||||
|
||||
class btBulletFile;
|
||||
class btCollisionShape;
|
||||
class btCollisionObject;
|
||||
class btRigidBody;
|
||||
class btTypedConstraint;
|
||||
class btDynamicsWorld;
|
||||
struct ConstraintInput;
|
||||
class btRigidBodyColladaInfo;
|
||||
struct btCollisionShapeData;
|
||||
class btTriangleIndexVertexArray;
|
||||
class btStridingMeshInterface;
|
||||
struct btStridingMeshInterfaceData;
|
||||
class btGImpactMeshShape;
|
||||
class btOptimizedBvh;
|
||||
struct btTriangleInfoMap;
|
||||
class btBvhTriangleMeshShape;
|
||||
class btPoint2PointConstraint;
|
||||
class btHingeConstraint;
|
||||
class btConeTwistConstraint;
|
||||
class btGeneric6DofConstraint;
|
||||
class btSliderConstraint;
|
||||
|
||||
|
||||
|
||||
namespace bParse
|
||||
{
|
||||
class btBulletFile;
|
||||
|
||||
};
|
||||
|
||||
|
||||
class btBulletWorldImporter
|
||||
{
|
||||
protected:
|
||||
|
||||
btDynamicsWorld* m_dynamicsWorld;
|
||||
|
||||
bool m_verboseDumpAllTypes;
|
||||
|
||||
btCollisionShape* convertCollisionShape( btCollisionShapeData* shapeData );
|
||||
|
||||
btAlignedObjectArray<btCollisionShape*> m_allocatedCollisionShapes;
|
||||
btAlignedObjectArray<btCollisionObject*> m_allocatedRigidBodies;
|
||||
btAlignedObjectArray<btTypedConstraint*> m_allocatedConstraints;
|
||||
btAlignedObjectArray<btOptimizedBvh*> m_allocatedBvhs;
|
||||
btAlignedObjectArray<btTriangleInfoMap*> m_allocatedTriangleInfoMaps;
|
||||
btAlignedObjectArray<btTriangleIndexVertexArray*> m_allocatedTriangleIndexArrays;
|
||||
btAlignedObjectArray<char*> m_allocatedNames;
|
||||
|
||||
btHashMap<btHashPtr,btOptimizedBvh*> m_bvhMap;
|
||||
btHashMap<btHashPtr,btTriangleInfoMap*> m_timMap;
|
||||
|
||||
btHashMap<btHashString,btCollisionShape*> m_nameShapeMap;
|
||||
btHashMap<btHashString,btRigidBody*> m_nameBodyMap;
|
||||
btHashMap<btHashString,btTypedConstraint*> m_nameConstraintMap;
|
||||
btHashMap<btHashPtr,const char*> m_objectNameMap;
|
||||
|
||||
//methods
|
||||
|
||||
btTriangleIndexVertexArray* createMeshInterface(btStridingMeshInterfaceData& meshData);
|
||||
|
||||
static btRigidBody& getFixedBody();
|
||||
|
||||
char* duplicateName(const char* name);
|
||||
|
||||
public:
|
||||
|
||||
btBulletWorldImporter(btDynamicsWorld* world=0);
|
||||
|
||||
virtual ~btBulletWorldImporter();
|
||||
|
||||
///delete all memory collision shapes, rigid bodies, constraints etc. allocated during the load.
|
||||
///make sure you don't use the dynamics world containing objects after you call this method
|
||||
void deleteAllData();
|
||||
|
||||
bool loadFile(const char* fileName);
|
||||
|
||||
///the memoryBuffer might be modified (for example if endian swaps are necessary)
|
||||
bool loadFileFromMemory(char *memoryBuffer, int len);
|
||||
|
||||
bool loadFileFromMemory(bParse::btBulletFile* file);
|
||||
|
||||
void setVerboseMode(bool verboseDumpAllTypes)
|
||||
{
|
||||
m_verboseDumpAllTypes = verboseDumpAllTypes;
|
||||
}
|
||||
|
||||
bool getVerboseMode() const
|
||||
{
|
||||
return m_verboseDumpAllTypes;
|
||||
}
|
||||
|
||||
// query for data
|
||||
int getNumCollisionShapes() const;
|
||||
btCollisionShape* getCollisionShapeByIndex(int index);
|
||||
int getNumRigidBodies() const;
|
||||
btCollisionObject* getRigidBodyByIndex(int index) const;
|
||||
int getNumConstraints() const;
|
||||
btTypedConstraint* getConstraintByIndex(int index) const;
|
||||
int getNumBvhs() const;
|
||||
btOptimizedBvh* getBvhByIndex(int index) const;
|
||||
int getNumTriangleInfoMaps() const;
|
||||
btTriangleInfoMap* getTriangleInfoMapByIndex(int index) const;
|
||||
|
||||
// queris involving named objects
|
||||
btCollisionShape* getCollisionShapeByName(const char* name);
|
||||
btRigidBody* getRigidBodyByName(const char* name);
|
||||
btTypedConstraint* getConstraintByName(const char* name);
|
||||
const char* getNameForPointer(const void* ptr) const;
|
||||
|
||||
///those virtuals are called by load and can be overridden by the user
|
||||
|
||||
//bodies
|
||||
virtual btRigidBody* createRigidBody(bool isDynamic, btScalar mass, const btTransform& startTransform, btCollisionShape* shape,const char* bodyName);
|
||||
virtual btCollisionObject* createCollisionObject( const btTransform& startTransform, btCollisionShape* shape,const char* bodyName);
|
||||
|
||||
///shapes
|
||||
|
||||
virtual btCollisionShape* createPlaneShape(const btVector3& planeNormal,btScalar planeConstant);
|
||||
virtual btCollisionShape* createBoxShape(const btVector3& halfExtents);
|
||||
virtual btCollisionShape* createSphereShape(btScalar radius);
|
||||
virtual btCollisionShape* createCapsuleShapeX(btScalar radius, btScalar height);
|
||||
virtual btCollisionShape* createCapsuleShapeY(btScalar radius, btScalar height);
|
||||
virtual btCollisionShape* createCapsuleShapeZ(btScalar radius, btScalar height);
|
||||
|
||||
virtual btCollisionShape* createCylinderShapeX(btScalar radius,btScalar height);
|
||||
virtual btCollisionShape* createCylinderShapeY(btScalar radius,btScalar height);
|
||||
virtual btCollisionShape* createCylinderShapeZ(btScalar radius,btScalar height);
|
||||
virtual class btTriangleIndexVertexArray* createTriangleMeshContainer();
|
||||
virtual btBvhTriangleMeshShape* createBvhTriangleMeshShape(btStridingMeshInterface* trimesh, btOptimizedBvh* bvh);
|
||||
virtual btCollisionShape* createConvexTriangleMeshShape(btStridingMeshInterface* trimesh);
|
||||
virtual btGImpactMeshShape* createGimpactShape(btStridingMeshInterface* trimesh);
|
||||
virtual class btConvexHullShape* createConvexHullShape();
|
||||
virtual class btCompoundShape* createCompoundShape();
|
||||
|
||||
///acceleration and connectivity structures
|
||||
virtual btOptimizedBvh* createOptimizedBvh();
|
||||
virtual btTriangleInfoMap* createTriangleInfoMap();
|
||||
|
||||
///constraints
|
||||
virtual btPoint2PointConstraint* createPoint2PointConstraint(btRigidBody& rbA,btRigidBody& rbB, const btVector3& pivotInA,const btVector3& pivotInB);
|
||||
virtual btPoint2PointConstraint* createPoint2PointConstraint(btRigidBody& rbA,const btVector3& pivotInA);
|
||||
virtual btHingeConstraint* createHingeConstraint(btRigidBody& rbA,btRigidBody& rbB, const btTransform& rbAFrame, const btTransform& rbBFrame, bool useReferenceFrameA=false);
|
||||
virtual btHingeConstraint* createHingeConstraint(btRigidBody& rbA,const btTransform& rbAFrame, bool useReferenceFrameA=false);
|
||||
virtual btConeTwistConstraint* createConeTwistConstraint(btRigidBody& rbA,btRigidBody& rbB,const btTransform& rbAFrame, const btTransform& rbBFrame);
|
||||
virtual btConeTwistConstraint* createConeTwistConstraint(btRigidBody& rbA,const btTransform& rbAFrame);
|
||||
virtual btGeneric6DofConstraint* createGeneric6DofConstraint(btRigidBody& rbA, btRigidBody& rbB, const btTransform& frameInA, const btTransform& frameInB ,bool useLinearReferenceFrameA);
|
||||
virtual btGeneric6DofConstraint* createGeneric6DofConstraint(btRigidBody& rbB, const btTransform& frameInB, bool useLinearReferenceFrameB);
|
||||
virtual btSliderConstraint* createSliderConstraint(btRigidBody& rbA, btRigidBody& rbB, const btTransform& frameInA, const btTransform& frameInB ,bool useLinearReferenceFrameA);
|
||||
virtual btSliderConstraint* createSliderConstraint(btRigidBody& rbB, const btTransform& frameInB, bool useLinearReferenceFrameA);
|
||||
|
||||
};
|
||||
|
||||
#endif //BULLET_WORLD_IMPORTER_H
|
||||
|
||||
/*
|
||||
Bullet Continuous Collision Detection and Physics Library
|
||||
Copyright (c) 2003-2010 Erwin Coumans http://continuousphysics.com/Bullet/
|
||||
|
||||
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.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef BULLET_WORLD_IMPORTER_H
|
||||
#define BULLET_WORLD_IMPORTER_H
|
||||
|
||||
#include "LinearMath/btTransform.h"
|
||||
#include "LinearMath/btVector3.h"
|
||||
#include "LinearMath/btAlignedObjectArray.h"
|
||||
#include "LinearMath/btHashMap.h"
|
||||
|
||||
|
||||
class btBulletFile;
|
||||
class btCollisionShape;
|
||||
class btCollisionObject;
|
||||
class btRigidBody;
|
||||
class btTypedConstraint;
|
||||
class btDynamicsWorld;
|
||||
struct ConstraintInput;
|
||||
class btRigidBodyColladaInfo;
|
||||
struct btCollisionShapeData;
|
||||
class btTriangleIndexVertexArray;
|
||||
class btStridingMeshInterface;
|
||||
struct btStridingMeshInterfaceData;
|
||||
class btGImpactMeshShape;
|
||||
class btOptimizedBvh;
|
||||
struct btTriangleInfoMap;
|
||||
class btBvhTriangleMeshShape;
|
||||
class btPoint2PointConstraint;
|
||||
class btHingeConstraint;
|
||||
class btConeTwistConstraint;
|
||||
class btGeneric6DofConstraint;
|
||||
class btSliderConstraint;
|
||||
|
||||
|
||||
|
||||
namespace bParse
|
||||
{
|
||||
class btBulletFile;
|
||||
|
||||
};
|
||||
|
||||
|
||||
class btBulletWorldImporter
|
||||
{
|
||||
protected:
|
||||
|
||||
btDynamicsWorld* m_dynamicsWorld;
|
||||
|
||||
bool m_verboseDumpAllTypes;
|
||||
|
||||
btCollisionShape* convertCollisionShape( btCollisionShapeData* shapeData );
|
||||
|
||||
btAlignedObjectArray<btCollisionShape*> m_allocatedCollisionShapes;
|
||||
btAlignedObjectArray<btCollisionObject*> m_allocatedRigidBodies;
|
||||
btAlignedObjectArray<btTypedConstraint*> m_allocatedConstraints;
|
||||
btAlignedObjectArray<btOptimizedBvh*> m_allocatedBvhs;
|
||||
btAlignedObjectArray<btTriangleInfoMap*> m_allocatedTriangleInfoMaps;
|
||||
btAlignedObjectArray<btTriangleIndexVertexArray*> m_allocatedTriangleIndexArrays;
|
||||
btAlignedObjectArray<char*> m_allocatedNames;
|
||||
|
||||
btHashMap<btHashPtr,btOptimizedBvh*> m_bvhMap;
|
||||
btHashMap<btHashPtr,btTriangleInfoMap*> m_timMap;
|
||||
|
||||
btHashMap<btHashString,btCollisionShape*> m_nameShapeMap;
|
||||
btHashMap<btHashString,btRigidBody*> m_nameBodyMap;
|
||||
btHashMap<btHashString,btTypedConstraint*> m_nameConstraintMap;
|
||||
btHashMap<btHashPtr,const char*> m_objectNameMap;
|
||||
|
||||
//methods
|
||||
|
||||
btTriangleIndexVertexArray* createMeshInterface(btStridingMeshInterfaceData& meshData);
|
||||
|
||||
static btRigidBody& getFixedBody();
|
||||
|
||||
char* duplicateName(const char* name);
|
||||
|
||||
public:
|
||||
|
||||
btBulletWorldImporter(btDynamicsWorld* world=0);
|
||||
|
||||
virtual ~btBulletWorldImporter();
|
||||
|
||||
///delete all memory collision shapes, rigid bodies, constraints etc. allocated during the load.
|
||||
///make sure you don't use the dynamics world containing objects after you call this method
|
||||
void deleteAllData();
|
||||
|
||||
bool loadFile(const char* fileName);
|
||||
|
||||
///the memoryBuffer might be modified (for example if endian swaps are necessary)
|
||||
bool loadFileFromMemory(char *memoryBuffer, int len);
|
||||
|
||||
bool loadFileFromMemory(bParse::btBulletFile* file);
|
||||
|
||||
void setVerboseMode(bool verboseDumpAllTypes)
|
||||
{
|
||||
m_verboseDumpAllTypes = verboseDumpAllTypes;
|
||||
}
|
||||
|
||||
bool getVerboseMode() const
|
||||
{
|
||||
return m_verboseDumpAllTypes;
|
||||
}
|
||||
|
||||
// query for data
|
||||
int getNumCollisionShapes() const;
|
||||
btCollisionShape* getCollisionShapeByIndex(int index);
|
||||
int getNumRigidBodies() const;
|
||||
btCollisionObject* getRigidBodyByIndex(int index) const;
|
||||
int getNumConstraints() const;
|
||||
btTypedConstraint* getConstraintByIndex(int index) const;
|
||||
int getNumBvhs() const;
|
||||
btOptimizedBvh* getBvhByIndex(int index) const;
|
||||
int getNumTriangleInfoMaps() const;
|
||||
btTriangleInfoMap* getTriangleInfoMapByIndex(int index) const;
|
||||
|
||||
// queris involving named objects
|
||||
btCollisionShape* getCollisionShapeByName(const char* name);
|
||||
btRigidBody* getRigidBodyByName(const char* name);
|
||||
btTypedConstraint* getConstraintByName(const char* name);
|
||||
const char* getNameForPointer(const void* ptr) const;
|
||||
|
||||
///those virtuals are called by load and can be overridden by the user
|
||||
|
||||
//bodies
|
||||
virtual btRigidBody* createRigidBody(bool isDynamic, btScalar mass, const btTransform& startTransform, btCollisionShape* shape,const char* bodyName);
|
||||
virtual btCollisionObject* createCollisionObject( const btTransform& startTransform, btCollisionShape* shape,const char* bodyName);
|
||||
|
||||
///shapes
|
||||
|
||||
virtual btCollisionShape* createPlaneShape(const btVector3& planeNormal,btScalar planeConstant);
|
||||
virtual btCollisionShape* createBoxShape(const btVector3& halfExtents);
|
||||
virtual btCollisionShape* createSphereShape(btScalar radius);
|
||||
virtual btCollisionShape* createCapsuleShapeX(btScalar radius, btScalar height);
|
||||
virtual btCollisionShape* createCapsuleShapeY(btScalar radius, btScalar height);
|
||||
virtual btCollisionShape* createCapsuleShapeZ(btScalar radius, btScalar height);
|
||||
|
||||
virtual btCollisionShape* createCylinderShapeX(btScalar radius,btScalar height);
|
||||
virtual btCollisionShape* createCylinderShapeY(btScalar radius,btScalar height);
|
||||
virtual btCollisionShape* createCylinderShapeZ(btScalar radius,btScalar height);
|
||||
virtual class btTriangleIndexVertexArray* createTriangleMeshContainer();
|
||||
virtual btBvhTriangleMeshShape* createBvhTriangleMeshShape(btStridingMeshInterface* trimesh, btOptimizedBvh* bvh);
|
||||
virtual btCollisionShape* createConvexTriangleMeshShape(btStridingMeshInterface* trimesh);
|
||||
virtual btGImpactMeshShape* createGimpactShape(btStridingMeshInterface* trimesh);
|
||||
virtual class btConvexHullShape* createConvexHullShape();
|
||||
virtual class btCompoundShape* createCompoundShape();
|
||||
|
||||
///acceleration and connectivity structures
|
||||
virtual btOptimizedBvh* createOptimizedBvh();
|
||||
virtual btTriangleInfoMap* createTriangleInfoMap();
|
||||
|
||||
///constraints
|
||||
virtual btPoint2PointConstraint* createPoint2PointConstraint(btRigidBody& rbA,btRigidBody& rbB, const btVector3& pivotInA,const btVector3& pivotInB);
|
||||
virtual btPoint2PointConstraint* createPoint2PointConstraint(btRigidBody& rbA,const btVector3& pivotInA);
|
||||
virtual btHingeConstraint* createHingeConstraint(btRigidBody& rbA,btRigidBody& rbB, const btTransform& rbAFrame, const btTransform& rbBFrame, bool useReferenceFrameA=false);
|
||||
virtual btHingeConstraint* createHingeConstraint(btRigidBody& rbA,const btTransform& rbAFrame, bool useReferenceFrameA=false);
|
||||
virtual btConeTwistConstraint* createConeTwistConstraint(btRigidBody& rbA,btRigidBody& rbB,const btTransform& rbAFrame, const btTransform& rbBFrame);
|
||||
virtual btConeTwistConstraint* createConeTwistConstraint(btRigidBody& rbA,const btTransform& rbAFrame);
|
||||
virtual btGeneric6DofConstraint* createGeneric6DofConstraint(btRigidBody& rbA, btRigidBody& rbB, const btTransform& frameInA, const btTransform& frameInB ,bool useLinearReferenceFrameA);
|
||||
virtual btGeneric6DofConstraint* createGeneric6DofConstraint(btRigidBody& rbB, const btTransform& frameInB, bool useLinearReferenceFrameB);
|
||||
virtual btSliderConstraint* createSliderConstraint(btRigidBody& rbA, btRigidBody& rbB, const btTransform& frameInA, const btTransform& frameInB ,bool useLinearReferenceFrameA);
|
||||
virtual btSliderConstraint* createSliderConstraint(btRigidBody& rbB, const btTransform& frameInB, bool useLinearReferenceFrameA);
|
||||
|
||||
};
|
||||
|
||||
#endif //BULLET_WORLD_IMPORTER_H
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
|
||||
IF (BUILD_BLEND_DEMO OR INTERNAL_UPDATE_SERIALIZATION_STRUCTURES)
|
||||
SUBDIRS(BlenderSerialize )
|
||||
ENDIF()
|
||||
|
||||
|
||||
IF(INTERNAL_UPDATE_SERIALIZATION_STRUCTURES)
|
||||
|
||||
# makesdna and HeaderGenerator are for advanced use only
|
||||
# makesdna can re-generate the binary DNA representing the Bullet serialization structures
|
||||
# Be very careful modifying any of this, otherwise the .bullet format becomes incompatible
|
||||
|
||||
SUBDIRS ( BulletFileLoader BulletWorldImporter HeaderGenerator makesdna)
|
||||
|
||||
ELSE(INTERNAL_UPDATE_SERIALIZATION_STRUCTURES)
|
||||
|
||||
SUBDIRS ( BulletFileLoader BulletWorldImporter )
|
||||
|
||||
ENDIF (INTERNAL_UPDATE_SERIALIZATION_STRUCTURES)
|
||||
|
||||
|
||||
IF (BUILD_BLEND_DEMO OR INTERNAL_UPDATE_SERIALIZATION_STRUCTURES)
|
||||
SUBDIRS(BlenderSerialize )
|
||||
ENDIF()
|
||||
|
||||
|
||||
IF(INTERNAL_UPDATE_SERIALIZATION_STRUCTURES)
|
||||
|
||||
# makesdna and HeaderGenerator are for advanced use only
|
||||
# makesdna can re-generate the binary DNA representing the Bullet serialization structures
|
||||
# Be very careful modifying any of this, otherwise the .bullet format becomes incompatible
|
||||
|
||||
SUBDIRS ( BulletFileLoader BulletWorldImporter HeaderGenerator makesdna)
|
||||
|
||||
ELSE(INTERNAL_UPDATE_SERIALIZATION_STRUCTURES)
|
||||
|
||||
SUBDIRS ( BulletFileLoader BulletWorldImporter )
|
||||
|
||||
ENDIF (INTERNAL_UPDATE_SERIALIZATION_STRUCTURES)
|
||||
|
||||
|
||||
@@ -1,464 +1,464 @@
|
||||
/* Copyright (C) 2006 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.
|
||||
*/
|
||||
#include <sstream>
|
||||
#include "bDNA.h"
|
||||
#include "bBlenderFile.h"
|
||||
#include "btBulletFile.h"
|
||||
#include "bCommon.h"
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include <string.h>
|
||||
|
||||
bool isBulletFile = false;
|
||||
|
||||
using namespace bParse;
|
||||
typedef std::string bString;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
typedef std::map<bString, bString> bStringMap;
|
||||
typedef std::vector<class bVariable> bVariableList;
|
||||
typedef std::vector<bString> bStringList;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
static FILE *dump = 0;
|
||||
static bDNA *mDNA =0;
|
||||
static bStringMap mStructs;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class bVariable
|
||||
{
|
||||
public:
|
||||
bVariable();
|
||||
~bVariable();
|
||||
|
||||
|
||||
bString dataType;
|
||||
bString variableName;
|
||||
|
||||
|
||||
bString functionName;
|
||||
bString classCtor;
|
||||
|
||||
bString memberVariable;
|
||||
bString memberDataType;
|
||||
bString functionArgs;
|
||||
|
||||
|
||||
void initialize(bString dataType, bString variable, bStringMap refDataTable);
|
||||
|
||||
bool isPtr;
|
||||
bool isFunctionPtr;
|
||||
bool isPtrToPtr;
|
||||
bool isArray;
|
||||
bool isCharArray;
|
||||
bool isListBase;
|
||||
bool isPadding;
|
||||
bool isCommentedOut;
|
||||
bool isGeneratedType;
|
||||
bool isbString;
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
bool dataTypeStandard(bString dataType)
|
||||
{
|
||||
if (dataType == "char")
|
||||
return true;
|
||||
if (dataType == "short")
|
||||
return true;
|
||||
if (dataType == "int")
|
||||
return true;
|
||||
if (dataType == "long")
|
||||
return true;
|
||||
if (dataType == "float")
|
||||
return true;
|
||||
if (dataType == "double")
|
||||
return true;
|
||||
if (dataType == "void")
|
||||
return true;
|
||||
if (dataType == "btScalar")
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
void writeTemplate(short *structData)
|
||||
{
|
||||
bString type = mDNA->getType(structData[0]);
|
||||
bString className=type;
|
||||
bString prefix = isBulletFile? "bullet_" : "blender_";
|
||||
|
||||
int thisLen = structData[1];
|
||||
structData+=2;
|
||||
|
||||
bString fileName = prefix+type;
|
||||
|
||||
bVariableList dataTypes;
|
||||
bStringMap includeFiles;
|
||||
|
||||
|
||||
for (int dataVal =0; dataVal<thisLen; dataVal++, structData+=2)
|
||||
{
|
||||
bString dataType = mDNA->getType(structData[0]);
|
||||
bString dataName = mDNA->getName(structData[1]);
|
||||
{
|
||||
bString newDataType = "";
|
||||
bString newDataName = "";
|
||||
|
||||
bStringMap::iterator addB = mStructs.find(dataType);
|
||||
if (addB != mStructs.end())
|
||||
{
|
||||
newDataType = addB->second;
|
||||
newDataName = dataName;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
if (dataTypeStandard(dataType))
|
||||
{
|
||||
newDataType = dataType;
|
||||
newDataName = dataName;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Unresolved
|
||||
// set it to an empty struct
|
||||
// if it's not a ptr generate an error
|
||||
newDataType = "bInvalidHandle";
|
||||
newDataName = dataName;
|
||||
|
||||
if (dataName[0] != '*')
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (!newDataType.empty() && !newDataName.empty())
|
||||
{
|
||||
bVariable var = bVariable();
|
||||
var.initialize(newDataType, newDataName, mStructs);
|
||||
dataTypes.push_back(var);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bStringMap::iterator include = mStructs.find(dataType);
|
||||
if (include != mStructs.end())
|
||||
{
|
||||
if (dataName[0] != '*')
|
||||
{
|
||||
if (includeFiles.find(dataType)== includeFiles.end())
|
||||
{
|
||||
includeFiles[dataType]=prefix+dataType;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fprintf(dump, "###############################################################\n");
|
||||
fprintf(dump, "%s = bStructClass()\n", fileName.c_str());
|
||||
fprintf(dump, "%s.name = '%s'\n", fileName.c_str(), className.c_str());
|
||||
fprintf(dump, "%s.filename = '%s'\n", fileName.c_str(), fileName.c_str());
|
||||
|
||||
bVariableList::iterator vars = dataTypes.begin();
|
||||
while (vars!= dataTypes.end())
|
||||
{
|
||||
fprintf(dump, "%s.dataTypes.append('%s %s')\n", fileName.c_str(), vars->dataType.c_str(), vars->variableName.c_str());
|
||||
vars++;
|
||||
}
|
||||
|
||||
bStringMap::iterator inc = includeFiles.begin();
|
||||
while (inc != includeFiles.end())
|
||||
{
|
||||
fprintf(dump, "%s.includes.append('%s.h')\n", fileName.c_str(), inc->second.c_str());
|
||||
inc++;
|
||||
}
|
||||
fprintf(dump, "DataTypeList.append(%s)\n", fileName.c_str());
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
char data[]={
|
||||
"\n"
|
||||
"class bStructClass:\n"
|
||||
" def __init__(self):\n"
|
||||
" self.name = \"\";\n"
|
||||
" self.filename = \"\";\n"
|
||||
" self.includes = []\n"
|
||||
" self.dataTypes = []\n"
|
||||
"\n\n"
|
||||
"DataTypeList = []\n"
|
||||
};
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
int main(int argc,char** argv)
|
||||
{
|
||||
using namespace bParse;
|
||||
dump = fopen("dump.py", "w");
|
||||
|
||||
if (!dump) return 0;
|
||||
fprintf(dump, "%s\n", data);
|
||||
|
||||
|
||||
char* filename = "../../../Demos/SerializeDemo/testFile.bullet";
|
||||
|
||||
if (argc==2)
|
||||
filename = argv[1];
|
||||
|
||||
bString fileStr(filename);
|
||||
bString extension(".bullet");
|
||||
|
||||
int index2 = fileStr.find(extension);
|
||||
if (index2>=0)
|
||||
isBulletFile=true;
|
||||
|
||||
|
||||
FILE* fp = fopen (filename,"rb");
|
||||
|
||||
if (!fp)
|
||||
{
|
||||
printf("error: file not found %s\n",filename);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
char* memBuf = 0;
|
||||
int len = 0;
|
||||
|
||||
long currentpos = ftell(fp); /* save current cursor position */
|
||||
long newpos;
|
||||
int bytesRead;
|
||||
|
||||
fseek(fp, 0, SEEK_END); /* seek to end */
|
||||
newpos = ftell(fp); /* find position of end -- this is the length */
|
||||
fseek(fp, currentpos, SEEK_SET); /* restore previous cursor position */
|
||||
|
||||
len = newpos;
|
||||
|
||||
memBuf = (char*)malloc(len);
|
||||
bytesRead = fread(memBuf,len,1,fp);
|
||||
|
||||
bool swap = false;
|
||||
|
||||
|
||||
if (isBulletFile)
|
||||
{
|
||||
btBulletFile f(memBuf,len);
|
||||
swap = (f.getFlags() & FD_ENDIAN_SWAP)!=0;
|
||||
} else
|
||||
{
|
||||
bBlenderFile f(memBuf,len);
|
||||
swap = (f.getFlags() & FD_ENDIAN_SWAP)!=0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
char *blenderData = memBuf;
|
||||
int sdnaPos=0;
|
||||
int mDataStart = 12;
|
||||
|
||||
char *tempBuffer = blenderData;
|
||||
for (int i=0; i<len; i++)
|
||||
{
|
||||
// looking for the data's starting position
|
||||
// and the start of SDNA decls
|
||||
|
||||
if (!mDataStart && strncmp(tempBuffer, "REND", 4)==0)
|
||||
mDataStart = i;
|
||||
if (!sdnaPos && strncmp(tempBuffer, "SDNA", 4)==0)
|
||||
sdnaPos = i;
|
||||
|
||||
if (mDataStart && sdnaPos) break;
|
||||
tempBuffer++;
|
||||
}
|
||||
|
||||
|
||||
|
||||
FILE* fpdna = fopen("dnaString.txt","w");
|
||||
char buf[1024];
|
||||
|
||||
for (int i=0;i<len-sdnaPos;i++)
|
||||
{
|
||||
int dnaval = (memBuf+sdnaPos)[i];
|
||||
|
||||
if ((i%32)==0)
|
||||
{
|
||||
sprintf(buf,"%d,\n",dnaval);
|
||||
|
||||
} else
|
||||
{
|
||||
sprintf(buf,"%d,",dnaval);
|
||||
}
|
||||
|
||||
|
||||
fwrite(buf,strlen(buf),1,fpdna);
|
||||
}
|
||||
|
||||
fclose(fpdna);
|
||||
|
||||
|
||||
|
||||
mDNA = new bDNA();
|
||||
//mDNA->initMemory();
|
||||
|
||||
mDNA->init(memBuf+sdnaPos, len-sdnaPos, swap);
|
||||
|
||||
|
||||
for (int i=0; i<mDNA->getNumStructs(); i++)
|
||||
{
|
||||
short *structData = mDNA->getStruct(i);
|
||||
bString type = mDNA->getType(structData[0]);
|
||||
|
||||
bString className = type;
|
||||
mStructs[type]=className;
|
||||
}
|
||||
|
||||
|
||||
for (int i=0; i<mDNA->getNumStructs(); i++)
|
||||
{
|
||||
short *structData = mDNA->getStruct(i);
|
||||
writeTemplate(structData);
|
||||
}
|
||||
|
||||
delete mDNA;
|
||||
fclose(dump);
|
||||
return 0;
|
||||
}
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
int _getArraySize(char* str)
|
||||
{
|
||||
int a, mul=1;
|
||||
char stri[100], *cp=0;
|
||||
int len = (int)strlen(str);
|
||||
|
||||
memcpy(stri, str, len+1);
|
||||
for (a=0; a<len; a++)
|
||||
{
|
||||
if (str[a]== '[')
|
||||
cp= &(stri[a+1]);
|
||||
else if ( str[a]==']' && cp)
|
||||
{
|
||||
stri[a]= 0;
|
||||
mul*= atoi(cp);
|
||||
}
|
||||
}
|
||||
return mul;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
bVariable::bVariable()
|
||||
: dataType("invalid"),
|
||||
variableName("invalid"),
|
||||
functionName(""),
|
||||
classCtor(""),
|
||||
memberVariable(""),
|
||||
memberDataType(""),
|
||||
functionArgs(""),
|
||||
isPtr(false),
|
||||
isFunctionPtr(false),
|
||||
isPtrToPtr(false),
|
||||
isArray(false),
|
||||
isCharArray(false),
|
||||
isListBase(false),
|
||||
isPadding(false),
|
||||
isCommentedOut(false),
|
||||
isGeneratedType(false),
|
||||
isbString(false)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
bVariable::~bVariable()
|
||||
{
|
||||
dataType.clear();
|
||||
variableName.clear();
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
void bVariable::initialize(bString type, bString variable, bStringMap refDataTable)
|
||||
{
|
||||
dataType = type;
|
||||
variableName = variable;
|
||||
|
||||
if (variableName[0] == '*')
|
||||
{
|
||||
isPtr = true;
|
||||
if (variableName[1] == '*')
|
||||
isPtrToPtr = true;
|
||||
}
|
||||
if (variableName[0] == '(')
|
||||
if (variableName[1] == '*')
|
||||
isFunctionPtr = true;
|
||||
|
||||
if (variableName[variableName.size()-1] == ']')
|
||||
{
|
||||
isArray = true;
|
||||
if (type == "char")
|
||||
isCharArray = true;
|
||||
}
|
||||
|
||||
if (type == "ListBase")
|
||||
isListBase = true;
|
||||
|
||||
if (variableName[0] == 'p')
|
||||
{
|
||||
bString sub = variableName.substr(0,3);
|
||||
if (sub == "pad")
|
||||
isPadding = true;
|
||||
}
|
||||
if (dataType[0] == '/' && dataType[1] == '/')
|
||||
isCommentedOut = true;
|
||||
|
||||
|
||||
if (refDataTable.find(dataType) != refDataTable.end())
|
||||
isGeneratedType = true;
|
||||
|
||||
if (!isBulletFile)
|
||||
{
|
||||
// replace valid float arrays
|
||||
if (dataType == "float" && isArray)
|
||||
{
|
||||
int size = _getArraySize((char*)variableName.c_str());
|
||||
if (size==3)
|
||||
{
|
||||
dataType = "vec3f";
|
||||
variableName = variableName.substr(0, variableName.find_first_of("["));
|
||||
}
|
||||
if (size==4)
|
||||
{
|
||||
dataType = "vec4f";
|
||||
variableName = variableName.substr(0, variableName.find_first_of("["));
|
||||
}
|
||||
}
|
||||
}
|
||||
memberDataType = dataType;
|
||||
functionArgs = variableName;
|
||||
}
|
||||
|
||||
// eof
|
||||
/* Copyright (C) 2006 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.
|
||||
*/
|
||||
#include <sstream>
|
||||
#include "bDNA.h"
|
||||
#include "bBlenderFile.h"
|
||||
#include "btBulletFile.h"
|
||||
#include "bCommon.h"
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include <string.h>
|
||||
|
||||
bool isBulletFile = false;
|
||||
|
||||
using namespace bParse;
|
||||
typedef std::string bString;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
typedef std::map<bString, bString> bStringMap;
|
||||
typedef std::vector<class bVariable> bVariableList;
|
||||
typedef std::vector<bString> bStringList;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
static FILE *dump = 0;
|
||||
static bDNA *mDNA =0;
|
||||
static bStringMap mStructs;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class bVariable
|
||||
{
|
||||
public:
|
||||
bVariable();
|
||||
~bVariable();
|
||||
|
||||
|
||||
bString dataType;
|
||||
bString variableName;
|
||||
|
||||
|
||||
bString functionName;
|
||||
bString classCtor;
|
||||
|
||||
bString memberVariable;
|
||||
bString memberDataType;
|
||||
bString functionArgs;
|
||||
|
||||
|
||||
void initialize(bString dataType, bString variable, bStringMap refDataTable);
|
||||
|
||||
bool isPtr;
|
||||
bool isFunctionPtr;
|
||||
bool isPtrToPtr;
|
||||
bool isArray;
|
||||
bool isCharArray;
|
||||
bool isListBase;
|
||||
bool isPadding;
|
||||
bool isCommentedOut;
|
||||
bool isGeneratedType;
|
||||
bool isbString;
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
bool dataTypeStandard(bString dataType)
|
||||
{
|
||||
if (dataType == "char")
|
||||
return true;
|
||||
if (dataType == "short")
|
||||
return true;
|
||||
if (dataType == "int")
|
||||
return true;
|
||||
if (dataType == "long")
|
||||
return true;
|
||||
if (dataType == "float")
|
||||
return true;
|
||||
if (dataType == "double")
|
||||
return true;
|
||||
if (dataType == "void")
|
||||
return true;
|
||||
if (dataType == "btScalar")
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
void writeTemplate(short *structData)
|
||||
{
|
||||
bString type = mDNA->getType(structData[0]);
|
||||
bString className=type;
|
||||
bString prefix = isBulletFile? "bullet_" : "blender_";
|
||||
|
||||
int thisLen = structData[1];
|
||||
structData+=2;
|
||||
|
||||
bString fileName = prefix+type;
|
||||
|
||||
bVariableList dataTypes;
|
||||
bStringMap includeFiles;
|
||||
|
||||
|
||||
for (int dataVal =0; dataVal<thisLen; dataVal++, structData+=2)
|
||||
{
|
||||
bString dataType = mDNA->getType(structData[0]);
|
||||
bString dataName = mDNA->getName(structData[1]);
|
||||
{
|
||||
bString newDataType = "";
|
||||
bString newDataName = "";
|
||||
|
||||
bStringMap::iterator addB = mStructs.find(dataType);
|
||||
if (addB != mStructs.end())
|
||||
{
|
||||
newDataType = addB->second;
|
||||
newDataName = dataName;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
if (dataTypeStandard(dataType))
|
||||
{
|
||||
newDataType = dataType;
|
||||
newDataName = dataName;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Unresolved
|
||||
// set it to an empty struct
|
||||
// if it's not a ptr generate an error
|
||||
newDataType = "bInvalidHandle";
|
||||
newDataName = dataName;
|
||||
|
||||
if (dataName[0] != '*')
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (!newDataType.empty() && !newDataName.empty())
|
||||
{
|
||||
bVariable var = bVariable();
|
||||
var.initialize(newDataType, newDataName, mStructs);
|
||||
dataTypes.push_back(var);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bStringMap::iterator include = mStructs.find(dataType);
|
||||
if (include != mStructs.end())
|
||||
{
|
||||
if (dataName[0] != '*')
|
||||
{
|
||||
if (includeFiles.find(dataType)== includeFiles.end())
|
||||
{
|
||||
includeFiles[dataType]=prefix+dataType;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fprintf(dump, "###############################################################\n");
|
||||
fprintf(dump, "%s = bStructClass()\n", fileName.c_str());
|
||||
fprintf(dump, "%s.name = '%s'\n", fileName.c_str(), className.c_str());
|
||||
fprintf(dump, "%s.filename = '%s'\n", fileName.c_str(), fileName.c_str());
|
||||
|
||||
bVariableList::iterator vars = dataTypes.begin();
|
||||
while (vars!= dataTypes.end())
|
||||
{
|
||||
fprintf(dump, "%s.dataTypes.append('%s %s')\n", fileName.c_str(), vars->dataType.c_str(), vars->variableName.c_str());
|
||||
vars++;
|
||||
}
|
||||
|
||||
bStringMap::iterator inc = includeFiles.begin();
|
||||
while (inc != includeFiles.end())
|
||||
{
|
||||
fprintf(dump, "%s.includes.append('%s.h')\n", fileName.c_str(), inc->second.c_str());
|
||||
inc++;
|
||||
}
|
||||
fprintf(dump, "DataTypeList.append(%s)\n", fileName.c_str());
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
char data[]={
|
||||
"\n"
|
||||
"class bStructClass:\n"
|
||||
" def __init__(self):\n"
|
||||
" self.name = \"\";\n"
|
||||
" self.filename = \"\";\n"
|
||||
" self.includes = []\n"
|
||||
" self.dataTypes = []\n"
|
||||
"\n\n"
|
||||
"DataTypeList = []\n"
|
||||
};
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
int main(int argc,char** argv)
|
||||
{
|
||||
using namespace bParse;
|
||||
dump = fopen("dump.py", "w");
|
||||
|
||||
if (!dump) return 0;
|
||||
fprintf(dump, "%s\n", data);
|
||||
|
||||
|
||||
char* filename = "../../../Demos/SerializeDemo/testFile.bullet";
|
||||
|
||||
if (argc==2)
|
||||
filename = argv[1];
|
||||
|
||||
bString fileStr(filename);
|
||||
bString extension(".bullet");
|
||||
|
||||
int index2 = fileStr.find(extension);
|
||||
if (index2>=0)
|
||||
isBulletFile=true;
|
||||
|
||||
|
||||
FILE* fp = fopen (filename,"rb");
|
||||
|
||||
if (!fp)
|
||||
{
|
||||
printf("error: file not found %s\n",filename);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
char* memBuf = 0;
|
||||
int len = 0;
|
||||
|
||||
long currentpos = ftell(fp); /* save current cursor position */
|
||||
long newpos;
|
||||
int bytesRead;
|
||||
|
||||
fseek(fp, 0, SEEK_END); /* seek to end */
|
||||
newpos = ftell(fp); /* find position of end -- this is the length */
|
||||
fseek(fp, currentpos, SEEK_SET); /* restore previous cursor position */
|
||||
|
||||
len = newpos;
|
||||
|
||||
memBuf = (char*)malloc(len);
|
||||
bytesRead = fread(memBuf,len,1,fp);
|
||||
|
||||
bool swap = false;
|
||||
|
||||
|
||||
if (isBulletFile)
|
||||
{
|
||||
btBulletFile f(memBuf,len);
|
||||
swap = (f.getFlags() & FD_ENDIAN_SWAP)!=0;
|
||||
} else
|
||||
{
|
||||
bBlenderFile f(memBuf,len);
|
||||
swap = (f.getFlags() & FD_ENDIAN_SWAP)!=0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
char *blenderData = memBuf;
|
||||
int sdnaPos=0;
|
||||
int mDataStart = 12;
|
||||
|
||||
char *tempBuffer = blenderData;
|
||||
for (int i=0; i<len; i++)
|
||||
{
|
||||
// looking for the data's starting position
|
||||
// and the start of SDNA decls
|
||||
|
||||
if (!mDataStart && strncmp(tempBuffer, "REND", 4)==0)
|
||||
mDataStart = i;
|
||||
if (!sdnaPos && strncmp(tempBuffer, "SDNA", 4)==0)
|
||||
sdnaPos = i;
|
||||
|
||||
if (mDataStart && sdnaPos) break;
|
||||
tempBuffer++;
|
||||
}
|
||||
|
||||
|
||||
|
||||
FILE* fpdna = fopen("dnaString.txt","w");
|
||||
char buf[1024];
|
||||
|
||||
for (int i=0;i<len-sdnaPos;i++)
|
||||
{
|
||||
int dnaval = (memBuf+sdnaPos)[i];
|
||||
|
||||
if ((i%32)==0)
|
||||
{
|
||||
sprintf(buf,"%d,\n",dnaval);
|
||||
|
||||
} else
|
||||
{
|
||||
sprintf(buf,"%d,",dnaval);
|
||||
}
|
||||
|
||||
|
||||
fwrite(buf,strlen(buf),1,fpdna);
|
||||
}
|
||||
|
||||
fclose(fpdna);
|
||||
|
||||
|
||||
|
||||
mDNA = new bDNA();
|
||||
//mDNA->initMemory();
|
||||
|
||||
mDNA->init(memBuf+sdnaPos, len-sdnaPos, swap);
|
||||
|
||||
|
||||
for (int i=0; i<mDNA->getNumStructs(); i++)
|
||||
{
|
||||
short *structData = mDNA->getStruct(i);
|
||||
bString type = mDNA->getType(structData[0]);
|
||||
|
||||
bString className = type;
|
||||
mStructs[type]=className;
|
||||
}
|
||||
|
||||
|
||||
for (int i=0; i<mDNA->getNumStructs(); i++)
|
||||
{
|
||||
short *structData = mDNA->getStruct(i);
|
||||
writeTemplate(structData);
|
||||
}
|
||||
|
||||
delete mDNA;
|
||||
fclose(dump);
|
||||
return 0;
|
||||
}
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
int _getArraySize(char* str)
|
||||
{
|
||||
int a, mul=1;
|
||||
char stri[100], *cp=0;
|
||||
int len = (int)strlen(str);
|
||||
|
||||
memcpy(stri, str, len+1);
|
||||
for (a=0; a<len; a++)
|
||||
{
|
||||
if (str[a]== '[')
|
||||
cp= &(stri[a+1]);
|
||||
else if ( str[a]==']' && cp)
|
||||
{
|
||||
stri[a]= 0;
|
||||
mul*= atoi(cp);
|
||||
}
|
||||
}
|
||||
return mul;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
bVariable::bVariable()
|
||||
: dataType("invalid"),
|
||||
variableName("invalid"),
|
||||
functionName(""),
|
||||
classCtor(""),
|
||||
memberVariable(""),
|
||||
memberDataType(""),
|
||||
functionArgs(""),
|
||||
isPtr(false),
|
||||
isFunctionPtr(false),
|
||||
isPtrToPtr(false),
|
||||
isArray(false),
|
||||
isCharArray(false),
|
||||
isListBase(false),
|
||||
isPadding(false),
|
||||
isCommentedOut(false),
|
||||
isGeneratedType(false),
|
||||
isbString(false)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
bVariable::~bVariable()
|
||||
{
|
||||
dataType.clear();
|
||||
variableName.clear();
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
void bVariable::initialize(bString type, bString variable, bStringMap refDataTable)
|
||||
{
|
||||
dataType = type;
|
||||
variableName = variable;
|
||||
|
||||
if (variableName[0] == '*')
|
||||
{
|
||||
isPtr = true;
|
||||
if (variableName[1] == '*')
|
||||
isPtrToPtr = true;
|
||||
}
|
||||
if (variableName[0] == '(')
|
||||
if (variableName[1] == '*')
|
||||
isFunctionPtr = true;
|
||||
|
||||
if (variableName[variableName.size()-1] == ']')
|
||||
{
|
||||
isArray = true;
|
||||
if (type == "char")
|
||||
isCharArray = true;
|
||||
}
|
||||
|
||||
if (type == "ListBase")
|
||||
isListBase = true;
|
||||
|
||||
if (variableName[0] == 'p')
|
||||
{
|
||||
bString sub = variableName.substr(0,3);
|
||||
if (sub == "pad")
|
||||
isPadding = true;
|
||||
}
|
||||
if (dataType[0] == '/' && dataType[1] == '/')
|
||||
isCommentedOut = true;
|
||||
|
||||
|
||||
if (refDataTable.find(dataType) != refDataTable.end())
|
||||
isGeneratedType = true;
|
||||
|
||||
if (!isBulletFile)
|
||||
{
|
||||
// replace valid float arrays
|
||||
if (dataType == "float" && isArray)
|
||||
{
|
||||
int size = _getArraySize((char*)variableName.c_str());
|
||||
if (size==3)
|
||||
{
|
||||
dataType = "vec3f";
|
||||
variableName = variableName.substr(0, variableName.find_first_of("["));
|
||||
}
|
||||
if (size==4)
|
||||
{
|
||||
dataType = "vec4f";
|
||||
variableName = variableName.substr(0, variableName.find_first_of("["));
|
||||
}
|
||||
}
|
||||
}
|
||||
memberDataType = dataType;
|
||||
functionArgs = variableName;
|
||||
}
|
||||
|
||||
// eof
|
||||
|
||||
@@ -1,111 +1,111 @@
|
||||
import dump
|
||||
|
||||
|
||||
header = """/* Copyright (C) 2006 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
|
||||
"""
|
||||
|
||||
dtList = dump.DataTypeList
|
||||
|
||||
out = "../BlenderSerialize/autogenerated/"
|
||||
spaces = 4
|
||||
|
||||
def addSpaces(file, space):
|
||||
for i in range(0, space):
|
||||
file.write(" ")
|
||||
|
||||
def write(file, spaces, string):
|
||||
addSpaces(file, spaces)
|
||||
file.write(string)
|
||||
|
||||
###################################################################################
|
||||
blender = open(out+"blender.h", 'w')
|
||||
blender.write(header)
|
||||
blender.write("#ifndef __BLENDER_H__\n")
|
||||
blender.write("#define __BLENDER_H__\n")
|
||||
for dt in dtList:
|
||||
blender.write("#include \"%s.h\"\n"%dt.filename)
|
||||
|
||||
blender.write("#endif//__BLENDER_H__")
|
||||
blender.close()
|
||||
|
||||
###################################################################################
|
||||
blenderC = open(out+"blender_Common.h", 'w')
|
||||
blenderC.write(header)
|
||||
blenderC.write("#ifndef __BLENDERCOMMON_H__\n")
|
||||
blenderC.write("#define __BLENDERCOMMON_H__\n")
|
||||
|
||||
strUnRes = """
|
||||
// put an empty struct in the case
|
||||
typedef struct bInvalidHandle {
|
||||
int unused;
|
||||
}bInvalidHandle;
|
||||
|
||||
"""
|
||||
blenderC.write(strUnRes)
|
||||
|
||||
blenderC.write("namespace Blender {\n")
|
||||
for dt in dtList:
|
||||
write(blenderC, 4, "class %s;\n"%dt.name)
|
||||
|
||||
blenderC.write("}\n")
|
||||
blenderC.write("#endif//__BLENDERCOMMON_H__")
|
||||
blenderC.close()
|
||||
|
||||
|
||||
for dt in dtList:
|
||||
fp = open(out+dt.filename+".h", 'w')
|
||||
|
||||
fp.write(header)
|
||||
strUpper = dt.filename.upper()
|
||||
|
||||
fp.write("#ifndef __%s__H__\n"%strUpper)
|
||||
fp.write("#define __%s__H__\n"%strUpper)
|
||||
fp.write("\n\n")
|
||||
|
||||
|
||||
fp.write("// -------------------------------------------------- //\n")
|
||||
fp.write("#include \"blender_Common.h\"\n")
|
||||
|
||||
for i in dt.includes:
|
||||
fp.write("#include \"%s\"\n"%i)
|
||||
|
||||
fp.write("\nnamespace Blender {\n")
|
||||
fp.write("\n\n")
|
||||
|
||||
addSpaces(fp,4)
|
||||
fp.write("// ---------------------------------------------- //\n")
|
||||
|
||||
|
||||
write(fp, 4, "class %s\n"%dt.name)
|
||||
|
||||
write(fp, 4, "{\n")
|
||||
write(fp, 4, "public:\n")
|
||||
for i in dt.dataTypes:
|
||||
write(fp, 8, i+";\n")
|
||||
|
||||
|
||||
write(fp, 4, "};\n")
|
||||
fp.write("}\n")
|
||||
fp.write("\n\n")
|
||||
fp.write("#endif//__%s__H__\n"%strUpper)
|
||||
fp.close()
|
||||
|
||||
import dump
|
||||
|
||||
|
||||
header = """/* Copyright (C) 2006 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
|
||||
"""
|
||||
|
||||
dtList = dump.DataTypeList
|
||||
|
||||
out = "../BlenderSerialize/autogenerated/"
|
||||
spaces = 4
|
||||
|
||||
def addSpaces(file, space):
|
||||
for i in range(0, space):
|
||||
file.write(" ")
|
||||
|
||||
def write(file, spaces, string):
|
||||
addSpaces(file, spaces)
|
||||
file.write(string)
|
||||
|
||||
###################################################################################
|
||||
blender = open(out+"blender.h", 'w')
|
||||
blender.write(header)
|
||||
blender.write("#ifndef __BLENDER_H__\n")
|
||||
blender.write("#define __BLENDER_H__\n")
|
||||
for dt in dtList:
|
||||
blender.write("#include \"%s.h\"\n"%dt.filename)
|
||||
|
||||
blender.write("#endif//__BLENDER_H__")
|
||||
blender.close()
|
||||
|
||||
###################################################################################
|
||||
blenderC = open(out+"blender_Common.h", 'w')
|
||||
blenderC.write(header)
|
||||
blenderC.write("#ifndef __BLENDERCOMMON_H__\n")
|
||||
blenderC.write("#define __BLENDERCOMMON_H__\n")
|
||||
|
||||
strUnRes = """
|
||||
// put an empty struct in the case
|
||||
typedef struct bInvalidHandle {
|
||||
int unused;
|
||||
}bInvalidHandle;
|
||||
|
||||
"""
|
||||
blenderC.write(strUnRes)
|
||||
|
||||
blenderC.write("namespace Blender {\n")
|
||||
for dt in dtList:
|
||||
write(blenderC, 4, "class %s;\n"%dt.name)
|
||||
|
||||
blenderC.write("}\n")
|
||||
blenderC.write("#endif//__BLENDERCOMMON_H__")
|
||||
blenderC.close()
|
||||
|
||||
|
||||
for dt in dtList:
|
||||
fp = open(out+dt.filename+".h", 'w')
|
||||
|
||||
fp.write(header)
|
||||
strUpper = dt.filename.upper()
|
||||
|
||||
fp.write("#ifndef __%s__H__\n"%strUpper)
|
||||
fp.write("#define __%s__H__\n"%strUpper)
|
||||
fp.write("\n\n")
|
||||
|
||||
|
||||
fp.write("// -------------------------------------------------- //\n")
|
||||
fp.write("#include \"blender_Common.h\"\n")
|
||||
|
||||
for i in dt.includes:
|
||||
fp.write("#include \"%s\"\n"%i)
|
||||
|
||||
fp.write("\nnamespace Blender {\n")
|
||||
fp.write("\n\n")
|
||||
|
||||
addSpaces(fp,4)
|
||||
fp.write("// ---------------------------------------------- //\n")
|
||||
|
||||
|
||||
write(fp, 4, "class %s\n"%dt.name)
|
||||
|
||||
write(fp, 4, "{\n")
|
||||
write(fp, 4, "public:\n")
|
||||
for i in dt.dataTypes:
|
||||
write(fp, 8, i+";\n")
|
||||
|
||||
|
||||
write(fp, 4, "};\n")
|
||||
fp.write("}\n")
|
||||
fp.write("\n\n")
|
||||
fp.write("#endif//__%s__H__\n"%strUpper)
|
||||
fp.close()
|
||||
|
||||
|
||||
@@ -1,111 +1,111 @@
|
||||
import dump
|
||||
|
||||
|
||||
header = """/* 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
|
||||
"""
|
||||
|
||||
dtList = dump.DataTypeList
|
||||
|
||||
out = "autogenerated/"
|
||||
spaces = 4
|
||||
|
||||
def addSpaces(file, space):
|
||||
for i in range(0, space):
|
||||
file.write(" ")
|
||||
|
||||
def write(file, spaces, string):
|
||||
addSpaces(file, spaces)
|
||||
file.write(string)
|
||||
|
||||
###################################################################################
|
||||
blender = open(out+"bullet.h", 'w')
|
||||
blender.write(header)
|
||||
blender.write("#ifndef __BULLET_H__\n")
|
||||
blender.write("#define __BULLET_H__\n")
|
||||
for dt in dtList:
|
||||
blender.write("#include \"%s.h\"\n"%dt.filename)
|
||||
|
||||
blender.write("#endif//__BULLET_H__")
|
||||
blender.close()
|
||||
|
||||
###################################################################################
|
||||
blenderC = open(out+"bullet_Common.h", 'w')
|
||||
blenderC.write(header)
|
||||
blenderC.write("#ifndef __BULLETCOMMON_H__\n")
|
||||
blenderC.write("#define __BULLETCOMMON_H__\n")
|
||||
|
||||
strUnRes = """
|
||||
// put an empty struct in the case
|
||||
typedef struct bInvalidHandle {
|
||||
int unused;
|
||||
}bInvalidHandle;
|
||||
|
||||
"""
|
||||
blenderC.write(strUnRes)
|
||||
|
||||
blenderC.write("namespace Bullet {\n")
|
||||
for dt in dtList:
|
||||
write(blenderC, 4, "class %s;\n"%dt.name)
|
||||
|
||||
blenderC.write("}\n")
|
||||
blenderC.write("#endif//__BULLETCOMMON_H__")
|
||||
blenderC.close()
|
||||
|
||||
|
||||
for dt in dtList:
|
||||
fp = open(out+dt.filename+".h", 'w')
|
||||
|
||||
fp.write(header)
|
||||
strUpper = dt.filename.upper()
|
||||
|
||||
fp.write("#ifndef __%s__H__\n"%strUpper)
|
||||
fp.write("#define __%s__H__\n"%strUpper)
|
||||
fp.write("\n\n")
|
||||
|
||||
|
||||
fp.write("// -------------------------------------------------- //\n")
|
||||
fp.write("#include \"bullet_Common.h\"\n")
|
||||
|
||||
for i in dt.includes:
|
||||
fp.write("#include \"%s\"\n"%i)
|
||||
|
||||
fp.write("\nnamespace Bullet {\n")
|
||||
fp.write("\n\n")
|
||||
|
||||
addSpaces(fp,4)
|
||||
fp.write("// ---------------------------------------------- //\n")
|
||||
|
||||
|
||||
write(fp, 4, "class %s\n"%dt.name)
|
||||
|
||||
write(fp, 4, "{\n")
|
||||
write(fp, 4, "public:\n")
|
||||
for i in dt.dataTypes:
|
||||
write(fp, 8, i+";\n")
|
||||
|
||||
|
||||
write(fp, 4, "};\n")
|
||||
fp.write("}\n")
|
||||
fp.write("\n\n")
|
||||
fp.write("#endif//__%s__H__\n"%strUpper)
|
||||
fp.close()
|
||||
|
||||
import dump
|
||||
|
||||
|
||||
header = """/* 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
|
||||
"""
|
||||
|
||||
dtList = dump.DataTypeList
|
||||
|
||||
out = "autogenerated/"
|
||||
spaces = 4
|
||||
|
||||
def addSpaces(file, space):
|
||||
for i in range(0, space):
|
||||
file.write(" ")
|
||||
|
||||
def write(file, spaces, string):
|
||||
addSpaces(file, spaces)
|
||||
file.write(string)
|
||||
|
||||
###################################################################################
|
||||
blender = open(out+"bullet.h", 'w')
|
||||
blender.write(header)
|
||||
blender.write("#ifndef __BULLET_H__\n")
|
||||
blender.write("#define __BULLET_H__\n")
|
||||
for dt in dtList:
|
||||
blender.write("#include \"%s.h\"\n"%dt.filename)
|
||||
|
||||
blender.write("#endif//__BULLET_H__")
|
||||
blender.close()
|
||||
|
||||
###################################################################################
|
||||
blenderC = open(out+"bullet_Common.h", 'w')
|
||||
blenderC.write(header)
|
||||
blenderC.write("#ifndef __BULLETCOMMON_H__\n")
|
||||
blenderC.write("#define __BULLETCOMMON_H__\n")
|
||||
|
||||
strUnRes = """
|
||||
// put an empty struct in the case
|
||||
typedef struct bInvalidHandle {
|
||||
int unused;
|
||||
}bInvalidHandle;
|
||||
|
||||
"""
|
||||
blenderC.write(strUnRes)
|
||||
|
||||
blenderC.write("namespace Bullet {\n")
|
||||
for dt in dtList:
|
||||
write(blenderC, 4, "class %s;\n"%dt.name)
|
||||
|
||||
blenderC.write("}\n")
|
||||
blenderC.write("#endif//__BULLETCOMMON_H__")
|
||||
blenderC.close()
|
||||
|
||||
|
||||
for dt in dtList:
|
||||
fp = open(out+dt.filename+".h", 'w')
|
||||
|
||||
fp.write(header)
|
||||
strUpper = dt.filename.upper()
|
||||
|
||||
fp.write("#ifndef __%s__H__\n"%strUpper)
|
||||
fp.write("#define __%s__H__\n"%strUpper)
|
||||
fp.write("\n\n")
|
||||
|
||||
|
||||
fp.write("// -------------------------------------------------- //\n")
|
||||
fp.write("#include \"bullet_Common.h\"\n")
|
||||
|
||||
for i in dt.includes:
|
||||
fp.write("#include \"%s\"\n"%i)
|
||||
|
||||
fp.write("\nnamespace Bullet {\n")
|
||||
fp.write("\n\n")
|
||||
|
||||
addSpaces(fp,4)
|
||||
fp.write("// ---------------------------------------------- //\n")
|
||||
|
||||
|
||||
write(fp, 4, "class %s\n"%dt.name)
|
||||
|
||||
write(fp, 4, "{\n")
|
||||
write(fp, 4, "public:\n")
|
||||
for i in dt.dataTypes:
|
||||
write(fp, 8, i+";\n")
|
||||
|
||||
|
||||
write(fp, 4, "};\n")
|
||||
fp.write("}\n")
|
||||
fp.write("\n\n")
|
||||
fp.write("#endif//__%s__H__\n"%strUpper)
|
||||
fp.close()
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
delete dnaString.txt
|
||||
|
||||
mkdir autogenerated
|
||||
|
||||
Debug\HeaderGenerator.exe
|
||||
|
||||
delete dnaString.txt
|
||||
|
||||
mkdir autogenerated
|
||||
|
||||
Debug\HeaderGenerator.exe
|
||||
|
||||
python bulletGenerate.py
|
||||
@@ -1,37 +1,37 @@
|
||||
cmake_minimum_required(VERSION 2.4)
|
||||
|
||||
IF(COMMAND cmake_policy)
|
||||
cmake_policy(SET CMP0003 NEW)
|
||||
ENDIF(COMMAND cmake_policy)
|
||||
|
||||
INCLUDE_DIRECTORIES(${BULLET_PHYSICS_SOURCE_DIR}/src )
|
||||
|
||||
#FILE(GLOB INC_FILES ../*.h)
|
||||
|
||||
SET (INC_FILES
|
||||
DNA_rigidbody.h
|
||||
|
||||
${BULLET_PHYSICS_SOURCE_DIR}/src/LinearMath/btVector3.h
|
||||
${BULLET_PHYSICS_SOURCE_DIR}/src/LinearMath/btMatrix3x3.h
|
||||
${BULLET_PHYSICS_SOURCE_DIR}/src/LinearMath/btTransform.h
|
||||
${BULLET_PHYSICS_SOURCE_DIR}/src/BulletCollision/CollisionShapes/btCollisionShape.h
|
||||
${BULLET_PHYSICS_SOURCE_DIR}/src/BulletCollision/CollisionShapes/btConvexInternalShape.h
|
||||
${BULLET_PHYSICS_SOURCE_DIR}/src/BulletCollision/CollisionDispatch/btCollisionObject.h
|
||||
)
|
||||
|
||||
# Build makesdna executable
|
||||
SET(SRC makesdna.cpp)
|
||||
ADD_EXECUTABLE(makesdna ${SRC} ${INC_FILES})
|
||||
|
||||
# Output BulletDNA.c
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${BULLET_PHYSICS_SOURCE_DIR}/src/LinearMath/btSerializer.cpp
|
||||
COMMAND ${CMAKE_CFG_INTDIR}/makesdna ${BULLET_PHYSICS_SOURCE_DIR}/src/LinearMath/btSerializer.cpp ${BULLET_PHYSICS_SOURCE_DIR}/Extras/Serialize/CommonSerialize/
|
||||
DEPENDS makesdna
|
||||
)
|
||||
|
||||
# Build bf_dna library
|
||||
SET(SRC ${BULLET_PHYSICS_SOURCE_DIR}/src/LinearMath/btSerializer.cpp)
|
||||
ADD_LIBRARY(BulletDNA ${SRC} ${INC_FILES})
|
||||
|
||||
MESSAGE(STATUS "Configuring makesdna")
|
||||
cmake_minimum_required(VERSION 2.4)
|
||||
|
||||
IF(COMMAND cmake_policy)
|
||||
cmake_policy(SET CMP0003 NEW)
|
||||
ENDIF(COMMAND cmake_policy)
|
||||
|
||||
INCLUDE_DIRECTORIES(${BULLET_PHYSICS_SOURCE_DIR}/src )
|
||||
|
||||
#FILE(GLOB INC_FILES ../*.h)
|
||||
|
||||
SET (INC_FILES
|
||||
DNA_rigidbody.h
|
||||
|
||||
${BULLET_PHYSICS_SOURCE_DIR}/src/LinearMath/btVector3.h
|
||||
${BULLET_PHYSICS_SOURCE_DIR}/src/LinearMath/btMatrix3x3.h
|
||||
${BULLET_PHYSICS_SOURCE_DIR}/src/LinearMath/btTransform.h
|
||||
${BULLET_PHYSICS_SOURCE_DIR}/src/BulletCollision/CollisionShapes/btCollisionShape.h
|
||||
${BULLET_PHYSICS_SOURCE_DIR}/src/BulletCollision/CollisionShapes/btConvexInternalShape.h
|
||||
${BULLET_PHYSICS_SOURCE_DIR}/src/BulletCollision/CollisionDispatch/btCollisionObject.h
|
||||
)
|
||||
|
||||
# Build makesdna executable
|
||||
SET(SRC makesdna.cpp)
|
||||
ADD_EXECUTABLE(makesdna ${SRC} ${INC_FILES})
|
||||
|
||||
# Output BulletDNA.c
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${BULLET_PHYSICS_SOURCE_DIR}/src/LinearMath/btSerializer.cpp
|
||||
COMMAND ${CMAKE_CFG_INTDIR}/makesdna ${BULLET_PHYSICS_SOURCE_DIR}/src/LinearMath/btSerializer.cpp ${BULLET_PHYSICS_SOURCE_DIR}/Extras/Serialize/CommonSerialize/
|
||||
DEPENDS makesdna
|
||||
)
|
||||
|
||||
# Build bf_dna library
|
||||
SET(SRC ${BULLET_PHYSICS_SOURCE_DIR}/src/LinearMath/btSerializer.cpp)
|
||||
ADD_LIBRARY(BulletDNA ${SRC} ${INC_FILES})
|
||||
|
||||
MESSAGE(STATUS "Configuring makesdna")
|
||||
|
||||
@@ -1,29 +1,29 @@
|
||||
|
||||
#ifndef DNA_RIGIDBODY_H
|
||||
#define DNA_RIGIDBODY_H
|
||||
|
||||
|
||||
struct PointerArray
|
||||
{
|
||||
int m_size;
|
||||
int m_capacity;
|
||||
void *m_data;
|
||||
};
|
||||
|
||||
|
||||
struct btPhysicsSystem
|
||||
{
|
||||
PointerArray m_collisionShapes;
|
||||
PointerArray m_collisionObjects;
|
||||
PointerArray m_constraints;
|
||||
};
|
||||
|
||||
///we need this to compute the pointer sizes
|
||||
struct ListBase
|
||||
{
|
||||
void *first;
|
||||
void *last;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef DNA_RIGIDBODY_H
|
||||
#define DNA_RIGIDBODY_H
|
||||
|
||||
|
||||
struct PointerArray
|
||||
{
|
||||
int m_size;
|
||||
int m_capacity;
|
||||
void *m_data;
|
||||
};
|
||||
|
||||
|
||||
struct btPhysicsSystem
|
||||
{
|
||||
PointerArray m_collisionShapes;
|
||||
PointerArray m_collisionObjects;
|
||||
PointerArray m_constraints;
|
||||
};
|
||||
|
||||
///we need this to compute the pointer sizes
|
||||
struct ListBase
|
||||
{
|
||||
void *first;
|
||||
void *last;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user