Quad
Generated from engine/math/quad.h at aceb130. The text under each declaration is the header's own comment, word for word. About the reference says how these pages are made.
Audience: game code.
#include "engine/math/quad.h" · namespace labrador
struct Quad
Section titled “struct Quad”A convex quadrilateral: four points in order around it, either winding and from any start, so long as the diagonals properly cross (is_valid). The RectangleF form lists the top left, top right, bottom right and bottom left corners.
Quad · operator=
Section titled “Quad · operator=”Quad(const Quad&) = default;Quad& operator=(const Quad&) = default; const Vector2F& point_2, const Vector2F& point_3);Explicit, because a rectangle is not a Quad and both forms throw on a degenerate one: an implicit conversion would become a runtime exception from inside the callee with no conversion visible at the call site.
bounding_box · shape_type · offset · inflate
Section titled “bounding_box · shape_type · offset · inflate”void inflate(float amount) override;is_valid
Section titled “is_valid”bool is_valid() const;point_0 · point_1 · point_2 · point_3 · set_point_0 · set_point_1 · set_point_2 · set_point_3
Section titled “point_0 · point_1 · point_2 · point_3 · set_point_0 · set_point_1 · set_point_2 · set_point_3”const Point2F& point_0() const;const Point2F& point_1() const;const Point2F& point_2() const;const Point2F& point_3() const;void set_point_0(const Point2F& point);void set_point_1(const Point2F& point);void set_point_2(const Point2F& point);void set_point_3(const Point2F& point);points
Section titled “points”const std::array<Point2F, 4>& points() const;The four points, in the order point_0..point_3 name them.
edge_0 · edge_1 · edge_2 · edge_3 · edges
Section titled “edge_0 · edge_1 · edge_2 · edge_3 · edges”Segment edge_1() const;Segment edge_2() const;Segment edge_3() const;std::array<Segment, 4> edges() const;triangles
Section titled “triangles”Split along the diagonal from point 0 to point 2: (0, 1, 2) and (0, 2, 3).
operator== · operator!=
Section titled “operator== · operator!=”bool operator!=(const Quad& other) const;center
Section titled “center”Related types
Section titled “Related types”Named in the public declarations above: RectangleF, RectangleRotated, Segment, Shape, ShapeType, Triangle, Vector2F.
In the samples and tests
Section titled “In the samples and tests”The files that include this header directly. A file can also reach it through another header.
samples/components/shape_outline.cpp,shape_outline_null_tests.cpp,shape_outline_tests.cpptests/collision/finite_shape_tests.cpp,narrow_phase_tests.cpptests/math/inflate_tests.cpp,quad_tests.cpp,rectanglef_tests.cpp,shape_intersect_tests.cpp,shape_tests.cpp
Explained in
Section titled “Explained in”Development documentation (unreleased). Built from Labrador aceb130 of 2026-11-20.