123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- :github_url: hide
- .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
- .. DO NOT EDIT THIS FILE, but the Rect2i.xml source instead.
- .. The source is found in doc/classes or modules/<name>/doc_classes.
- .. _class_Rect2i:
- Rect2i
- ======
- 2D axis-aligned bounding box using integer coordinates.
- Description
- -----------
- ``Rect2i`` consists of a position, a size, and several utility functions. It is typically used for fast overlap tests.
- It uses integer coordinates.
- Tutorials
- ---------
- - :doc:`../tutorials/math/index`
- Methods
- -------
- +-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Rect2i<class_Rect2i>` | :ref:`Rect2i<class_Rect2i_method_Rect2i>` **(** :ref:`Vector2<class_Vector2>` position, :ref:`Vector2<class_Vector2>` size **)** |
- +-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Rect2i<class_Rect2i>` | :ref:`Rect2i<class_Rect2i_method_Rect2i>` **(** :ref:`int<class_int>` x, :ref:`int<class_int>` y, :ref:`int<class_int>` width, :ref:`int<class_int>` height **)** |
- +-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Rect2i<class_Rect2i>` | :ref:`Rect2i<class_Rect2i_method_Rect2i>` **(** :ref:`Rect2<class_Rect2>` from **)** |
- +-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- Method Descriptions
- -------------------
- .. _class_Rect2i_method_Rect2i:
- - :ref:`Rect2i<class_Rect2i>` **Rect2i** **(** :ref:`Vector2<class_Vector2>` position, :ref:`Vector2<class_Vector2>` size **)**
- Constructs a ``Rect2i`` by position and size.
- ----
- - :ref:`Rect2i<class_Rect2i>` **Rect2i** **(** :ref:`int<class_int>` x, :ref:`int<class_int>` y, :ref:`int<class_int>` width, :ref:`int<class_int>` height **)**
- Constructs a ``Rect2i`` by x, y, width, and height.
- ----
- - :ref:`Rect2i<class_Rect2i>` **Rect2i** **(** :ref:`Rect2<class_Rect2>` from **)**
- Constructs a new ``Rect2i`` from :ref:`Rect2<class_Rect2>`. The floating point coordinates will be truncated.
|