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

Function RemoveSingleNodeFromList

code/AssetLib/MD3/MD3Loader.cpp:509–522  ·  view source on GitHub ↗

------------------------------------------------------------------------------------------------ Tiny helper to remove a single node from its parent' list

Source from the content-addressed store, hash-verified

507// ------------------------------------------------------------------------------------------------
508// Tiny helper to remove a single node from its parent' list
509void RemoveSingleNodeFromList(aiNode *nd) {
510 if (!nd || nd->mNumChildren || !nd->mParent) return;
511 aiNode *par = nd->mParent;
512 for (unsigned int i = 0; i < par->mNumChildren; ++i) {
513 if (par->mChildren[i] == nd) {
514 --par->mNumChildren;
515 for (; i < par->mNumChildren; ++i) {
516 par->mChildren[i] = par->mChildren[i + 1];
517 }
518 delete nd;
519 break;
520 }
521 }
522}
523
524// ------------------------------------------------------------------------------------------------
525// Read a multi-part Q3 player model

Callers 1

ReadMultipartFileMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected