| 813 | } |
| 814 | |
| 815 | CcpMath::AxisAlignedBox GetItemSetAabb( const CcpMath::AxisAlignedBox& staticBounds, const std::vector<std::pair<int, CcpMath::AxisAlignedBox>>& boneBounds, const Float4x3* bones, size_t boneCount ) |
| 816 | { |
| 817 | auto aabb = staticBounds; |
| 818 | for( auto& box : boneBounds ) |
| 819 | { |
| 820 | if( box.first < int( boneCount ) ) |
| 821 | { |
| 822 | Matrix boneTF = IdentityMatrix(); |
| 823 | TriMatrixCopyFrom3x4( &boneTF, &bones[box.first] ); |
| 824 | auto boxAabb = box.second; |
| 825 | boxAabb.Transform( boneTF ); |
| 826 | aabb.IncludeBox( boxAabb ); |
| 827 | } |
| 828 | else |
| 829 | { |
| 830 | aabb.IncludeBox( box.second ); |
| 831 | } |
| 832 | } |
| 833 | return aabb; |
| 834 | } |
no test coverage detected