mirror of
https://github.com/godotengine/godot-docs.git
synced 2025-12-31 17:49:03 +03:00
58 lines
2.5 KiB
ReStructuredText
58 lines
2.5 KiB
ReStructuredText
: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.
|
|
|