| 355 | } |
| 356 | |
| 357 | void 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 | |
| 382 | void TSShape::getNodeObjects(S32 nodeIndex, Vector<S32>& nodeObjects) |
| 383 | { |
no test coverage detected