class_rect2i.rst 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the Rect2i.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_Rect2i:
  6. Rect2i
  7. ======
  8. 2D axis-aligned bounding box using integer coordinates.
  9. Description
  10. -----------
  11. ``Rect2i`` consists of a position, a size, and several utility functions. It is typically used for fast overlap tests.
  12. It uses integer coordinates.
  13. Tutorials
  14. ---------
  15. - :doc:`../tutorials/math/index`
  16. Methods
  17. -------
  18. +-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  19. | :ref:`Rect2i<class_Rect2i>` | :ref:`Rect2i<class_Rect2i_method_Rect2i>` **(** :ref:`Vector2<class_Vector2>` position, :ref:`Vector2<class_Vector2>` size **)** |
  20. +-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  21. | :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 **)** |
  22. +-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  23. | :ref:`Rect2i<class_Rect2i>` | :ref:`Rect2i<class_Rect2i_method_Rect2i>` **(** :ref:`Rect2<class_Rect2>` from **)** |
  24. +-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  25. Method Descriptions
  26. -------------------
  27. .. _class_Rect2i_method_Rect2i:
  28. - :ref:`Rect2i<class_Rect2i>` **Rect2i** **(** :ref:`Vector2<class_Vector2>` position, :ref:`Vector2<class_Vector2>` size **)**
  29. Constructs a ``Rect2i`` by position and size.
  30. ----
  31. - :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 **)**
  32. Constructs a ``Rect2i`` by x, y, width, and height.
  33. ----
  34. - :ref:`Rect2i<class_Rect2i>` **Rect2i** **(** :ref:`Rect2<class_Rect2>` from **)**
  35. Constructs a new ``Rect2i`` from :ref:`Rect2<class_Rect2>`. The floating point coordinates will be truncated.