mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-09-23 06:53:43 +00:00
Most remaining level editor work
This commit is contained in:
@@ -40,7 +40,8 @@ namespace PortabilityLayer
|
||||
void SetRight(int32_t i);
|
||||
|
||||
bool IsValid() const;
|
||||
Rect2i Intersect(const Rect2i &other) const;
|
||||
Rect2i Intersect(const Rect2i &other) const;
|
||||
bool Contains(const Vec2i &pt) const;
|
||||
|
||||
Rect ToShortRect() const;
|
||||
};
|
||||
@@ -156,6 +157,11 @@ namespace PortabilityLayer
|
||||
const int32_t right = std::min(m_bottomRight.m_x, other.m_bottomRight.m_x);
|
||||
|
||||
return Rect2i(top, left, bottom, right);
|
||||
}
|
||||
|
||||
inline bool Rect2i::Contains(const Vec2i &pt) const
|
||||
{
|
||||
return pt.m_x >= m_topLeft.m_x && pt.m_x < m_bottomRight.m_x && pt.m_y >= m_topLeft.m_y && pt.m_y < m_bottomRight.m_y;
|
||||
}
|
||||
|
||||
inline Rect Rect2i::ToShortRect() const
|
||||
|
Reference in New Issue
Block a user