| 3469 | //-------------------------------------------------------------------------- |
| 3470 | |
| 3471 | void ShapeBaseConvex::findNodeTransform() |
| 3472 | { |
| 3473 | S32 dl = pShapeBase->mDataBlock->collisionDetails[hullId]; |
| 3474 | |
| 3475 | TSShapeInstance* si = pShapeBase->getShapeInstance(); |
| 3476 | TSShape* shape = si->getShape(); |
| 3477 | |
| 3478 | const TSShape::Detail* detail = &shape->details[dl]; |
| 3479 | const S32 subs = detail->subShapeNum; |
| 3480 | const S32 start = shape->subShapeFirstObject[subs]; |
| 3481 | const S32 end = start + shape->subShapeNumObjects[subs]; |
| 3482 | |
| 3483 | // Find the first object that contains a mesh for this |
| 3484 | // detail level. There should only be one mesh per |
| 3485 | // collision detail level. |
| 3486 | for (S32 i = start; i < end; i++) |
| 3487 | { |
| 3488 | const TSShape::Object* obj = &shape->objects[i]; |
| 3489 | if (obj->numMeshes && detail->objectDetailNum < obj->numMeshes) |
| 3490 | { |
| 3491 | nodeTransform = &si->mNodeTransforms[obj->nodeIndex]; |
| 3492 | return; |
| 3493 | } |
| 3494 | } |
| 3495 | return; |
| 3496 | } |
| 3497 | |
| 3498 | const MatrixF& ShapeBaseConvex::getTransform() const |
| 3499 | { |
no test coverage detected