------------------------------------------------------------------------------------------------
| 907 | |
| 908 | // ------------------------------------------------------------------------------------------------ |
| 909 | void 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 | // ------------------------------------------------------------------------------------------------ |
| 924 | void MakeTreeRelative(ConversionData &conv) { |
no test coverage detected