20constexpr Quad::Quad(Vector2f
const& fillValue) :
21 _points{fillValue, fillValue, fillValue, fillValue}
23constexpr Quad::Quad(RectFloat
const& rect) :
24 _points{Vector2f{rect._x, rect._y}, Vector2f{rect._x + rect._width, rect._y},
25 Vector2f{rect._x + rect._width, rect._y + rect._height}, Vector2f{rect._x, rect._y + rect._height}}
27constexpr Quad::Quad(Vector2f
const& vec1, Vector2f
const& vec2, Vector2f
const& vec3, Vector2f
const& vec4) :
28 _points{vec1, vec2, vec3, vec4}
31constexpr bool Quad::operator==(Quad
const& right)
const
33 return _points[0] == right._points[0] && _points[1] == right._points[1] && _points[2] == right._points[2] &&
34 _points[3] == right._points[3];
36constexpr bool Quad::operator!=(Quad
const& right)
const
38 return !(*
this == right);
41constexpr fge::Vector2f
const& Quad::operator[](std::size_t index)
const
43 return this->_points[index];
45constexpr fge::Vector2f& Quad::operator[](std::size_t index)
47 return this->_points[index];
50constexpr void Quad::fill(Vector2f
const& fillValue)
52 this->_points[0] = fillValue;
53 this->_points[1] = fillValue;
54 this->_points[2] = fillValue;
55 this->_points[3] = fillValue;
60 return {left * glm::vec4{right[0], 0.0f, 1.0f}, left * glm::vec4{right[1], 0.0f, 1.0f},
61 left * glm::vec4{right[2], 0.0f, 1.0f}, left * glm::vec4{right[3], 0.0f, 1.0f}};