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

Method dumpTypeDefinitions

Extras/Serialize/BulletFileLoader/bDNA.cpp:524–615  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

522}
523
524void bDNA::dumpTypeDefinitions()
525{
526 int i;
527
528 int numTypes = mTypes.size();
529
530 for (i = 0; i < numTypes; i++)
531 {
532 }
533
534 for (i = 0; i < (int)mStructs.size(); i++)
535 {
536 int totalBytes = 0;
537 short *oldStruct = mStructs[i];
538
539 int oldLookup = getReverseType(oldStruct[0]);
540 if (oldLookup == -1)
541 {
542 mCMPFlags[i] = FDF_NONE;
543 continue;
544 }
545
546 short *newStruct = mStructs[oldLookup];
547 char *typeName = mTypes[newStruct[0]];
548 printf("%3d: %s ", i, typeName);
549
550 //char *name = mNames[oldStruct[1]];
551 int len = oldStruct[1];
552 printf(" (%d fields) ", len);
553 oldStruct += 2;
554
555 printf("{");
556 int j;
557 for (j = 0; j < len; ++j, oldStruct += 2)
558 {
559 const char *name = m_Names[oldStruct[1]].m_name;
560 printf("%s %s", mTypes[oldStruct[0]], name);
561 int elemNumBytes = 0;
562 int arrayDimensions = getArraySizeNew(oldStruct[1]);
563
564 if (m_Names[oldStruct[1]].m_isPointer)
565 {
566 elemNumBytes = VOID_IS_8 ? 8 : 4;
567 }
568 else
569 {
570 elemNumBytes = getLength(oldStruct[0]);
571 }
572 printf(" /* %d bytes */", elemNumBytes * arrayDimensions);
573
574 if (j == len - 1)
575 {
576 printf(";}");
577 }
578 else
579 {
580 printf("; ");
581 }

Callers 2

setFileDNAMethod · 0.45
parseInternalMethod · 0.45

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected