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

Function MakeTreeRelative

code/AssetLib/IFC/IFCLoader.cpp:909–921  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

907
908// ------------------------------------------------------------------------------------------------
909void MakeTreeRelative(aiNode *start, const aiMatrix4x4 &combined) {
910 // combined is the parent's absolute transformation matrix
911 const aiMatrix4x4 old = start->mTransformation;
912
913 if (!combined.IsIdentity()) {
914 start->mTransformation = aiMatrix4x4(combined).Inverse() * start->mTransformation;
915 }
916
917 // All nodes store absolute transformations right now, so we need to make them relative
918 for (unsigned int i = 0; i < start->mNumChildren; ++i) {
919 MakeTreeRelative(start->mChildren[i], old);
920 }
921}
922
923// ------------------------------------------------------------------------------------------------
924void MakeTreeRelative(ConversionData &conv) {

Callers 1

InternReadFileMethod · 0.85

Calls 1

aiMatrix4x4Class · 0.85

Tested by

no test coverage detected