| 532 | } |
| 533 | |
| 534 | void CKinematics::LL_SetBoneVisible(const u16 bone_id, const BOOL val, const BOOL bRecursive) |
| 535 | { |
| 536 | //R_ASSERT(bone_id < LL_BoneCount()); |
| 537 | if (bone_id >= LL_BoneCount()) |
| 538 | return; |
| 539 | visimask.set(bone_id, !!val); |
| 540 | if (!visimask.is(bone_id)) |
| 541 | { |
| 542 | bone_instances[bone_id].mTransform.scale(0.f, 0.f, 0.f); |
| 543 | if (LL_GetData(bone_id).GetParentID() < LL_BoneCount() && LL_GetData(bone_id).GetParentID() != BI_NONE) |
| 544 | bone_instances[bone_id].mTransform.c = LL_GetBoneInstance(LL_GetData(bone_id).GetParentID()).mTransform.c; |
| 545 | } |
| 546 | else |
| 547 | { |
| 548 | CalculateBones_Invalidate(); |
| 549 | } |
| 550 | bone_instances[bone_id].mRenderTransform.mul_43(bone_instances[bone_id].mTransform, (*bones)[bone_id]->m2b_transform); |
| 551 | if (bRecursive) |
| 552 | { |
| 553 | for (const auto& C : (*bones)[bone_id]->children) |
| 554 | LL_SetBoneVisible(C->GetSelfID(), val, bRecursive); |
| 555 | } |
| 556 | Visibility_Invalidate(); |
| 557 | } |
| 558 | |
| 559 | void CKinematics::LL_SetBonesVisible(VisMask mask) |
| 560 | { |
no test coverage detected