| 362 | } |
| 363 | |
| 364 | void 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 | |
| 389 | void TSShape::getNodeObjects(S32 nodeIndex, Vector<S32>& nodeObjects) |
| 390 | { |
no test coverage detected