RectangleI
Generated from engine/math/rectanglei.h at 0f4f503. 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/rectanglei.h" · namespace labrador
struct RectangleI
Section titled “struct RectangleI”int x = 0;int y = 0;int width = 0;height
Section titled “height”int height = 0;RectangleI · operator=
Section titled “RectangleI · operator=”RectangleI(const RectangleI&) = default;RectangleI& operator=(const RectangleI&) = default;RectangleI
Section titled “RectangleI” const Vector2I& size); const 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”Vector2I size() const;top_left · bottom_right
Section titled “top_left · bottom_right”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_position · set_size
Section titled “set_position · set_size”void set_size(const Vector2I& size);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/components/animation_preview_content_tests.cpp,animation_preview_test_content.h,gallery_state.cpp,nine_slice.h,nine_slice_tests.cpp,slider.cpp,test_content.hsamples/linesweeper/presentation/board_view.cpp,particles.cpp,top_out_banner.cpp,touch_controls.cppsamples/linesweeper/states/pause_state.cppsamples/local_multiplayer/arena.cpptests/assets/sprite_sheet_loader_tests.cpp,string_table_text_tests.cpptests/linesweeper/top_out_banner_tests.cpptests/math/constant_initialisation_tests.cpptests/render/animation_strip_tests.cpp,font_tests.cpp,label_tests.cpp,null_tests.cpp,pixel_test_harness.h,pixel_tests.cpp,presentation_lifecycle_tests.cpp,render_resources_tests.cpp,resource_pixel_tests.cpp,sprite_geometry_tests.cpp,sprite_pixel_tests.cpp,sprite_sheet_object_tests.cpp,text_pixel_tests.cpp,text_tests.cpp,view_pixel_tests.cpp,viewport_tests.cpp,visual_tests.cpptests/render/d3d12/submit_allocation_tests.cpp,texture_replacement_tests.cpptests/render/vulkan/submit_allocation_tests.cpp,submit_failure_tests.cpptests/render/web/context_loss_tests.cpptests/scene/cull_tests.cpp,fanout_tests.cpp,order_tests.cpptests/ui/text_widget_tests.cpp
Explained in
Section titled “Explained in”Documentation for Labrador v0.3.0. Built from Labrador 0f4f503 of 2026-11-03.