MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / getNodeWorldTransform

Method getNodeWorldTransform

Engine/source/ts/tsShape.cpp:364–387  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

362}
363
364void TSShape::getNodeWorldTransform(S32 nodeIndex, MatrixF* mat) const
365{
366 if ( nodeIndex == -1 )
367 {
368 mat->identity();
369 }
370 else
371 {
372 // Calculate the world transform of the given node
373 defaultRotations[nodeIndex].getQuatF().setMatrix(mat);
374 mat->setPosition(defaultTranslations[nodeIndex]);
375
376 S32 parentIndex = nodes[nodeIndex].parentIndex;
377 while (parentIndex != -1)
378 {
379 MatrixF mat2(*mat);
380 defaultRotations[parentIndex].getQuatF().setMatrix(mat);
381 mat->setPosition(defaultTranslations[parentIndex]);
382 mat->mul(mat2);
383
384 parentIndex = nodes[parentIndex].parentIndex;
385 }
386 }
387}
388
389void TSShape::getNodeObjects(S32 nodeIndex, Vector<S32>& nodeObjects)
390{

Callers 5

addSourceMeshMethod · 0.80
tsMeshFit.cppFile · 0.80
_initMountMethod · 0.80
setMountNodeMethod · 0.80

Calls 5

getQuatFMethod · 0.80
identityMethod · 0.45
setMatrixMethod · 0.45
setPositionMethod · 0.45
mulMethod · 0.45

Tested by

no test coverage detected