Bullet Collision Detection & Physics Library
Public Member Functions | Public Attributes | Protected Attributes | List of all members
bParse::btBulletFile Class Reference

#include <btBulletFile.h>

Inheritance diagram for bParse::btBulletFile:
Inheritance graph
Collaboration diagram for bParse::btBulletFile:
Collaboration graph

Public Member Functions

 btBulletFile ()
 btBulletFile (const char *fileName)
 btBulletFile (char *memoryBuffer, int len)
virtual ~btBulletFile ()
virtual void addDataBlock (char *dataBlock)
virtual int write (const char *fileName, bool fixupPointers=false)
virtual void parse (int verboseMode)
virtual void parseData ()
virtual void writeDNA (FILE *fp)
void addStruct (const char *structType, void *data, int len, void *oldPtr, int code)
- Public Member Functions inherited from bParse::bFile
 bFile (const char *filename, const char headerString[7])
 bFile (char *memoryBuffer, int len, const char headerString[7])
virtual ~bFile ()
bDNAgetFileDNA ()
int getFlags () const
void setFileDNAisMemoryDNA ()
bPtrMapgetLibPointers ()
void * findLibPointer (void *ptr)
bool ok ()
virtual void writeChunks (FILE *fp, bool fixupPointers)
void updateOldPointers ()
void resolvePointers (int verboseMode)
 Resolve pointers replaces the original pointers in structures, and linked lists by the new in-memory structures. More...
void dumpChunks (bDNA *dna)
virtual void setFileDNA (int verboseMode, char *buffer, int len)
int getVersion () const
void preSwap ()
void writeFile (const char *fileName)

Public Attributes

btAlignedObjectArray< bStructHandle * > m_multiBodies
btAlignedObjectArray< bStructHandle * > m_softBodies
btAlignedObjectArray< bStructHandle * > m_rigidBodies
btAlignedObjectArray< bStructHandle * > m_collisionObjects
btAlignedObjectArray< bStructHandle * > m_collisionShapes
btAlignedObjectArray< bStructHandle * > m_constraints
btAlignedObjectArray< bStructHandle * > m_bvhs
btAlignedObjectArray< bStructHandle * > m_triangleInfoMaps
btAlignedObjectArray< bStructHandle * > m_dynamicsWorldInfo
btAlignedObjectArray< char * > m_dataBlocks

Protected Attributes

char * m_DnaCopy
- Protected Attributes inherited from bParse::bFile
char m_headerString [7]
bool mOwnsBuffer
char * mFileBuffer
int mFileLen
int mVersion
bPtrMap mLibPointers
int mDataStart
btAlignedObjectArray< char * > m_pointerFixupArray
btAlignedObjectArray< char * > m_pointerPtrFixupArray
btAlignedObjectArray< bChunkIndm_chunks
btHashMap< btHashPtr, bChunkIndm_chunkPtrPtrMap
bPtrMap mDataPointers
int mFlags

Additional Inherited Members

- Protected Member Functions inherited from bParse::bFile
int getNextBlock (bChunkInd *dataChunk, const char *dataPtr, const int flags)
void safeSwapPtr (char *dst, const char *src)
virtual void parseHeader ()
void resolvePointersMismatch ()
void resolvePointersChunk (const bChunkInd &dataChunk, int verboseMode)
 this loop only works fine if the Blender DNA structure of the file matches the headerfiles More...
int resolvePointersStructRecursive (char *strcPtr, int old_dna, int verboseMode, int recursion)
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, bool ignoreEndianFlag)
void swapData (char *data, short type, int arraySize, bool ignoreEndianFlag)
void swapStruct (int dna_nr, char *data, bool ignoreEndianFlag)
void swapLen (char *dataPtr)
void swapDNA (char *ptr)
char * readStruct (char *head, class bChunkInd &chunk)
char * getAsString (int code)
virtual void parseInternal (int verboseMode, char *memDna, int memDnaLength)

Detailed Description

Definition at line 32 of file btBulletFile.h.

Constructor & Destructor Documentation

btBulletFile::btBulletFile ( )

Definition at line 46 of file btBulletFile.cpp.

btBulletFile::btBulletFile ( const char *  fileName)

Definition at line 82 of file btBulletFile.cpp.

btBulletFile::btBulletFile ( char *  memoryBuffer,
int  len 

Definition at line 90 of file btBulletFile.cpp.

btBulletFile::~btBulletFile ( )

Definition at line 97 of file btBulletFile.cpp.

Member Function Documentation

void btBulletFile::addDataBlock ( char *  dataBlock)

Implements bParse::bFile.

Definition at line 252 of file btBulletFile.cpp.

void btBulletFile::addStruct ( const char *  structType,
void *  data,
int  len,
void *  oldPtr,
int  code 

Perform structure size validation

Definition at line 416 of file btBulletFile.cpp.

void btBulletFile::parse ( int  verboseMode)

Implements bParse::bFile.

Definition at line 310 of file btBulletFile.cpp.

void btBulletFile::parseData ( )

Implements bParse::bFile.

Definition at line 115 of file btBulletFile.cpp.

int btBulletFile::write ( const char *  fileName,
bool  fixupPointers = false 

Implements bParse::bFile.

Definition at line 369 of file btBulletFile.cpp.

void btBulletFile::writeDNA ( FILE *  fp)

Implements bParse::bFile.

Definition at line 261 of file btBulletFile.cpp.

Member Data Documentation

btAlignedObjectArray<bStructHandle*> bParse::btBulletFile::m_bvhs

Definition at line 54 of file btBulletFile.h.

btAlignedObjectArray<bStructHandle*> bParse::btBulletFile::m_collisionObjects

Definition at line 48 of file btBulletFile.h.

btAlignedObjectArray<bStructHandle*> bParse::btBulletFile::m_collisionShapes

Definition at line 50 of file btBulletFile.h.

btAlignedObjectArray<bStructHandle*> bParse::btBulletFile::m_constraints

Definition at line 52 of file btBulletFile.h.

btAlignedObjectArray<char*> bParse::btBulletFile::m_dataBlocks

Definition at line 60 of file btBulletFile.h.

char* bParse::btBulletFile::m_DnaCopy

Definition at line 38 of file btBulletFile.h.

btAlignedObjectArray<bStructHandle*> bParse::btBulletFile::m_dynamicsWorldInfo

Definition at line 58 of file btBulletFile.h.

btAlignedObjectArray<bStructHandle*> bParse::btBulletFile::m_multiBodies

Definition at line 42 of file btBulletFile.h.

btAlignedObjectArray<bStructHandle*> bParse::btBulletFile::m_rigidBodies

Definition at line 46 of file btBulletFile.h.

btAlignedObjectArray<bStructHandle*> bParse::btBulletFile::m_softBodies

Definition at line 44 of file btBulletFile.h.

btAlignedObjectArray<bStructHandle*> bParse::btBulletFile::m_triangleInfoMaps

Definition at line 56 of file btBulletFile.h.

The documentation for this class was generated from the following files: