MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / GetNodeTransformation

Method GetNodeTransformation

Source/Engine/Level/Actors/AnimatedModel.cpp:236–250  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

234}
235
236void 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
252void AnimatedModel::GetNodeTransformation(const StringView& nodeName, Matrix& nodeTransformation, bool worldSpace) const
253{

Callers 1

OnDebugDrawMethod · 0.80

Calls 4

PreInitSkinningDataMethod · 0.80
IsEmptyMethod · 0.45
CountMethod · 0.45
FindNodeMethod · 0.45

Tested by

no test coverage detected