MCPcopy Create free account
hub / github.com/bulletphysics/bullet3 / btBulletFile

Method btBulletFile

Extras/Serialize/BulletFileLoader/btBulletFile.cpp:45–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43using namespace bParse;
44
45btBulletFile::btBulletFile()
46 : bFile("", "BULLET ")
47{
48 mMemoryDNA = new bDNA(); //this memory gets released in the bFile::~bFile destructor,@todo not consistent with the rule 'who allocates it, has to deallocate it"
49
50 m_DnaCopy = 0;
51
52#ifdef BT_INTERNAL_UPDATE_SERIALIZATION_STRUCTURES
53#ifdef _WIN64
54 m_DnaCopy = (char*)btAlignedAlloc(sBulletDNAlen64, 16);
55 memcpy(m_DnaCopy, sBulletDNAstr64, sBulletDNAlen64);
56 mMemoryDNA->init(m_DnaCopy, sBulletDNAlen64);
57#else //_WIN64
58 m_DnaCopy = (char*)btAlignedAlloc(sBulletDNAlen, 16);
59 memcpy(m_DnaCopy, sBulletDNAstr, sBulletDNAlen);
60 mMemoryDNA->init(m_DnaCopy, sBulletDNAlen);
61#endif //_WIN64
62#else //BT_INTERNAL_UPDATE_SERIALIZATION_STRUCTURES
63 if (VOID_IS_8)
64 {
65 m_DnaCopy = (char*)btAlignedAlloc(sBulletDNAlen64, 16);
66 memcpy(m_DnaCopy, sBulletDNAstr64, sBulletDNAlen64);
67 mMemoryDNA->init(m_DnaCopy, sBulletDNAlen64);
68 }
69 else
70 {
71 m_DnaCopy = (char*)btAlignedAlloc(sBulletDNAlen, 16);
72 memcpy(m_DnaCopy, sBulletDNAstr, sBulletDNAlen);
73 mMemoryDNA->init(m_DnaCopy, sBulletDNAlen);
74 }
75#endif //BT_INTERNAL_UPDATE_SERIALIZATION_STRUCTURES
76}
77
78btBulletFile::btBulletFile(const char* fileName)
79 : bFile(fileName, "BULLET ")

Callers

nothing calls this directly

Calls 1

initMethod · 0.45

Tested by

no test coverage detected