| 263 | } |
| 264 | |
| 265 | void AnimatedModel::SetNodeTransformation(int32 nodeIndex, const Matrix& nodeTransformation, bool worldSpace) |
| 266 | { |
| 267 | if (GraphInstance.NodesPose.IsEmpty()) |
| 268 | const_cast<AnimatedModel*>(this)->PreInitSkinningData(); // Ensure to have valid nodes pose to return |
| 269 | CHECK(nodeIndex >= 0 && nodeIndex < GraphInstance.NodesPose.Count()); |
| 270 | GraphInstance.NodesPose[nodeIndex] = nodeTransformation; |
| 271 | if (worldSpace) |
| 272 | { |
| 273 | Matrix world; |
| 274 | GetLocalToWorldMatrix(world); |
| 275 | Matrix invWorld; |
| 276 | Matrix::Invert(world, invWorld); |
| 277 | GraphInstance.NodesPose[nodeIndex] = GraphInstance.NodesPose[nodeIndex] * invWorld; |
| 278 | } |
| 279 | OnAnimationUpdated(); |
| 280 | } |
| 281 | |
| 282 | void AnimatedModel::SetNodeTransformation(const Array<NodeTransformation>& nodeTransformations, bool worldSpace) |
| 283 | { |
nothing calls this directly
no test coverage detected