Skip to content

Commit

Permalink
MathLib: added BoundBox::GetCorner method
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMostDiligent committed Mar 19, 2024
1 parent 1b0e29b commit a4d5efd
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Common/interface/AdvancedMath.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,15 @@ struct BoundBox
return NewBB;
}

float3 GetCorner(size_t i) const
{
return {
(i & 0x01u) ? Max.x : Min.x,
(i & 0x02u) ? Max.y : Min.y,
(i & 0x04u) ? Max.z : Min.z,
};
}

BoundBox Combine(const BoundBox& Box) const
{
return {
Expand Down

0 comments on commit a4d5efd

Please sign in to comment.