MCPcopy Create free account
hub / github.com/assimp/assimp / LoadNodes

Method LoadNodes

code/AssetLib/LWO/LWOMaterial.cpp:721–750  ·  view source on GitHub ↗

------------------------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

719
720// ------------------------------------------------------------------------------------------------
721void LWOImporter::LoadNodes(unsigned int size) {
722 LE_NCONST uint8_t *const end = mFileBuffer + size;
723
724 while (true) {
725 if (mFileBuffer + 8 >= end)
726 break;
727
728 IFF::ChunkHeader head = IFF::LoadChunk(mFileBuffer);
729 int bufOffset = 0;
730 if (head.type == AI_IFF_FOURCC_FORM) { // not chunk, it's a form
731 mFileBuffer -= 8;
732 head = IFF::LoadForm(mFileBuffer);
733 bufOffset = 4;
734 }
735
736 if (mFileBuffer + head.length > end) {
737 throw DeadlyImportError("LWO3: cannot read length; LoadNodes");
738 }
739
740 uint8_t *const next = mFileBuffer + head.length;
741 mFileBuffer += bufOffset;
742 switch (head.type) {
743 case AI_LWO_NTAG:
744 LoadNodeTag(head.length);
745 break;
746 }
747
748 mFileBuffer = next;
749 }
750}
751
752// ------------------------------------------------------------------------------------------------
753void LWOImporter::LoadNodeTag(unsigned int size) {

Callers

nothing calls this directly

Calls 3

LoadChunkFunction · 0.85
LoadFormFunction · 0.85
DeadlyImportErrorFunction · 0.85

Tested by

no test coverage detected