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

Method getNodeWorldTransform

Engine/source/ts/tsShape.cpp:357–380  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 6

addSourceMeshMethod · 0.80
tsMeshFit.cppFile · 0.80
_initMountMethod · 0.80
buildColShapesMethod · 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