| 234 | } |
| 235 | |
| 236 | void AnimatedModel::GetNodeTransformation(int32 nodeIndex, Matrix& nodeTransformation, bool worldSpace) const |
| 237 | { |
| 238 | if (GraphInstance.NodesPose.IsEmpty()) |
| 239 | const_cast<AnimatedModel*>(this)->PreInitSkinningData(); // Ensure to have valid nodes pose to return |
| 240 | if (nodeIndex >= 0 && nodeIndex < GraphInstance.NodesPose.Count()) |
| 241 | nodeTransformation = GraphInstance.NodesPose[nodeIndex]; |
| 242 | else |
| 243 | nodeTransformation = Matrix::Identity; |
| 244 | if (worldSpace) |
| 245 | { |
| 246 | Matrix world; |
| 247 | GetLocalToWorldMatrix(world); |
| 248 | nodeTransformation = nodeTransformation * world; |
| 249 | } |
| 250 | } |
| 251 | |
| 252 | void AnimatedModel::GetNodeTransformation(const StringView& nodeName, Matrix& nodeTransformation, bool worldSpace) const |
| 253 | { |
no test coverage detected