RectangleI
Generated from engine/math/rectanglei.h at 862e08b. The text under each declaration is the header's own comment, word for word. About the reference says how these pages are made.
#include "engine/math/rectanglei.h" · namespace mattmath
struct RectangleI
Section titled “struct RectangleI”x · y · width · height
Section titled “x · y · width · height”int x = 0;int y = 0;int width = 0;int height = 0;RectangleI
Section titled “RectangleI”RectangleI(const RectangleI&) = default;RectangleI
Section titled “RectangleI” const mattmath::Vector2I& size); const mattmath::Vector2F& size);constexpr and defined here so ZERO is constant-initialised. See Vector2F's constants for what the dynamic alternative risks.
left · top · right · bottom
Section titled “left · top · right · bottom”int left() const;int top() const;int right() const;int bottom() const;position · size
Section titled “position · size”mattmath::Vector2I size() const;top_left · bottom_right
Section titled “top_left · bottom_right”mattmath::Vector2I bottom_right() const;operator== · operator!=
Section titled “operator== · operator!=”bool operator!=(const RectangleI& other) const;contains
Section titled “contains”offset
Section titled “offset”void offset(int horizontal_amount, int vertical_amount);set_left · set_top · set_right · set_bottom
Section titled “set_left · set_top · set_right · set_bottom”void set_left(int left);void set_top(int top);void set_right(int right);void set_bottom(int bottom);set_position · set_size
Section titled “set_position · set_size”void set_size(const mattmath::Vector2I& size);set_top_left · set_bottom_right · set_top_left_and_bottom_right
Section titled “set_top_left · set_bottom_right · set_top_left_and_bottom_right”void set_bottom_right(const mattmath::Vector2I& bottom_right);void set_top_left_and_bottom_right(const mattmath::Vector2I& top_left, const mattmath::Vector2I& bottom_right);Related types
Section titled “Related types”Named in the public declarations above: RectangleF, Vector2F, Vector2I.
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/collision/body.cppsamples/linesweeper/presentation/board_view.cpp,particles.cpp,top_out_banner.cppsamples/linesweeper/states/pause_state.cppsamples/local_multiplayer/arena.cpptests/math/constant_initialisation_tests.cpptests/render/animation_object_tests.cpp,font_tests.cpp,label_tests.cpp,null_tests.cpp,pixel_tests.cpp,sprite_geometry_tests.cpp,sprite_sheet_object_tests.cpp,text_drop_shadow_tests.cpp,viewport_tests.cpp,visual_tests.cpptests/scene/cull_tests.cpp,fanout_tests.cpp
Development documentation (unreleased). Built from Labrador 862e08b of 2026-10-08.