Tech ENABLE_GLBEGIN_GLEND_REMOVAL - LayersEditing profile

This commit is contained in:
enricoturri1966 2022-01-21 11:03:25 +01:00
parent 0e3a3aa522
commit 2673994471
3 changed files with 106 additions and 12 deletions

View file

@ -25,16 +25,26 @@ class CommonGizmosDataPool;
class Rect
{
float m_left;
float m_top;
float m_right;
float m_bottom;
float m_left{ 0.0f };
float m_top{ 0.0f };
float m_right{ 0.0f };
float m_bottom{ 0.0f };
public:
Rect() : m_left(0.0f) , m_top(0.0f) , m_right(0.0f) , m_bottom(0.0f) {}
Rect() = default;
Rect(float left, float top, float right, float bottom) : m_left(left) , m_top(top) , m_right(right) , m_bottom(bottom) {}
#if ENABLE_GLBEGIN_GLEND_REMOVAL
bool operator == (const Rect& other) {
if (std::abs(m_left - other.m_left) > EPSILON) return false;
if (std::abs(m_top - other.m_top) > EPSILON) return false;
if (std::abs(m_right - other.m_right) > EPSILON) return false;
if (std::abs(m_bottom - other.m_bottom) > EPSILON) return false;
return true;
}
bool operator != (const Rect& other) { return !operator==(other); }
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
float get_left() const { return m_left; }
void set_left(float left) { m_left = left; }