MCPcopy Create free account
hub / github.com/carbonengine/trinity / GetItemSetAabb

Function GetItemSetAabb

trinity/Utilities/BoundingBox.cpp:815–834  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

813}
814
815CcpMath::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}

Callers 7

GetAabbMethod · 0.85
UpdateVisibilityMethod · 0.85
GetAabbMethod · 0.85
UpdateVisibilityMethod · 0.85
GetAabbMethod · 0.85
GetAabbMethod · 0.85
GetAabbMethod · 0.85

Calls 1

TriMatrixCopyFrom3x4Function · 0.85

Tested by

no test coverage detected