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

Method LoadNodalBlocks

code/AssetLib/LWO/LWOMaterial.cpp:690–718  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

688
689// ------------------------------------------------------------------------------------------------
690void LWOImporter::LoadNodalBlocks(unsigned int size) {
691 LE_NCONST uint8_t *const end = mFileBuffer + size;
692
693 while (true) {
694 if (mFileBuffer + 8 >= end)
695 break;
696
697 IFF::ChunkHeader head = IFF::LoadChunk(mFileBuffer);
698 int bufOffset = 0;
699 if (head.type == AI_IFF_FOURCC_FORM) { // not chunk, it's a form
700 mFileBuffer -= 8;
701 head = IFF::LoadForm(mFileBuffer);
702 bufOffset = 4;
703 }
704
705 if (mFileBuffer + head.length > end) {
706 throw DeadlyImportError("LWO3: cannot read length; LoadNodalBlocks");
707 }
708 uint8_t *const next = mFileBuffer + head.length;
709 mFileBuffer += bufOffset;
710 switch (head.type) {
711 case AI_LWO_NNDS:
712 LoadNodes(head.length);
713 break;
714 }
715
716 mFileBuffer = next;
717 }
718}
719
720// ------------------------------------------------------------------------------------------------
721void LWOImporter::LoadNodes(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