------------------------------------------------------------------------------------------------ Add a name prefix to all nodes in a hierarchy if a hash match is found
| 143 | // ------------------------------------------------------------------------------------------------ |
| 144 | // Add a name prefix to all nodes in a hierarchy if a hash match is found |
| 145 | void SceneCombiner::AddNodePrefixesChecked(aiNode *node, const char *prefix, unsigned int len, |
| 146 | std::vector<SceneHelper> &input, unsigned int cur) { |
| 147 | ai_assert(nullptr != prefix); |
| 148 | |
| 149 | const unsigned int hash = SuperFastHash(node->mName.data, static_cast<uint32_t>(node->mName.length)); |
| 150 | |
| 151 | // Check whether we find a positive match in one of the given sets |
| 152 | for (unsigned int i = 0; i < input.size(); ++i) { |
| 153 | if (cur != i && input[i].hashes.find(hash) != input[i].hashes.end()) { |
| 154 | PrefixString(node->mName, prefix, len); |
| 155 | break; |
| 156 | } |
| 157 | } |
| 158 | |
| 159 | // Process all children recursively |
| 160 | for (unsigned int i = 0; i < node->mNumChildren; ++i) { |
| 161 | AddNodePrefixesChecked(node->mChildren[i], prefix, len, input, cur); |
| 162 | } |
| 163 | } |
| 164 | |
| 165 | // ------------------------------------------------------------------------------------------------ |
| 166 | // Add an offset to all mesh indices in a node graph |
nothing calls this directly
no test coverage detected