2
0

class_poolvector2array.rst 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  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 PoolVector2Array.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_PoolVector2Array:
  6. PoolVector2Array
  7. ================
  8. **Category:** Built-In Types
  9. Brief Description
  10. -----------------
  11. A pooled :ref:`Array<class_Array>` of :ref:`Vector2<class_Vector2>`.
  12. Methods
  13. -------
  14. +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+
  15. | :ref:`PoolVector2Array<class_PoolVector2Array>` | :ref:`PoolVector2Array<class_PoolVector2Array_method_PoolVector2Array>` **(** :ref:`Array<class_Array>` from **)** |
  16. +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+
  17. | void | :ref:`append<class_PoolVector2Array_method_append>` **(** :ref:`Vector2<class_Vector2>` vector2 **)** |
  18. +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+
  19. | void | :ref:`append_array<class_PoolVector2Array_method_append_array>` **(** :ref:`PoolVector2Array<class_PoolVector2Array>` array **)** |
  20. +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+
  21. | :ref:`int<class_int>` | :ref:`insert<class_PoolVector2Array_method_insert>` **(** :ref:`int<class_int>` idx, :ref:`Vector2<class_Vector2>` vector2 **)** |
  22. +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+
  23. | void | :ref:`invert<class_PoolVector2Array_method_invert>` **(** **)** |
  24. +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+
  25. | void | :ref:`push_back<class_PoolVector2Array_method_push_back>` **(** :ref:`Vector2<class_Vector2>` vector2 **)** |
  26. +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+
  27. | void | :ref:`remove<class_PoolVector2Array_method_remove>` **(** :ref:`int<class_int>` idx **)** |
  28. +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+
  29. | void | :ref:`resize<class_PoolVector2Array_method_resize>` **(** :ref:`int<class_int>` idx **)** |
  30. +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+
  31. | void | :ref:`set<class_PoolVector2Array_method_set>` **(** :ref:`int<class_int>` idx, :ref:`Vector2<class_Vector2>` vector2 **)** |
  32. +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+
  33. | :ref:`int<class_int>` | :ref:`size<class_PoolVector2Array_method_size>` **(** **)** |
  34. +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+
  35. Description
  36. -----------
  37. An :ref:`Array<class_Array>` specifically designed to hold :ref:`Vector2<class_Vector2>`. Optimized for memory usage, does not fragment the memory. Note that this type is passed by value and not by reference.
  38. Method Descriptions
  39. -------------------
  40. .. _class_PoolVector2Array_method_PoolVector2Array:
  41. - :ref:`PoolVector2Array<class_PoolVector2Array>` **PoolVector2Array** **(** :ref:`Array<class_Array>` from **)**
  42. Construct a new ``PoolVector2Array``. Optionally, you can pass in a generic :ref:`Array<class_Array>` that will be converted.
  43. ----
  44. .. _class_PoolVector2Array_method_append:
  45. - void **append** **(** :ref:`Vector2<class_Vector2>` vector2 **)**
  46. Append an element at the end of the array (alias of :ref:`push_back<class_PoolVector2Array_method_push_back>`).
  47. ----
  48. .. _class_PoolVector2Array_method_append_array:
  49. - void **append_array** **(** :ref:`PoolVector2Array<class_PoolVector2Array>` array **)**
  50. Append a ``PoolVector2Array`` at the end of this array.
  51. ----
  52. .. _class_PoolVector2Array_method_insert:
  53. - :ref:`int<class_int>` **insert** **(** :ref:`int<class_int>` idx, :ref:`Vector2<class_Vector2>` vector2 **)**
  54. Insert a new element at a given position in the array. The position must be valid, or at the end of the array (``idx == size()``).
  55. ----
  56. .. _class_PoolVector2Array_method_invert:
  57. - void **invert** **(** **)**
  58. Reverse the order of the elements in the array.
  59. ----
  60. .. _class_PoolVector2Array_method_push_back:
  61. - void **push_back** **(** :ref:`Vector2<class_Vector2>` vector2 **)**
  62. Insert a :ref:`Vector2<class_Vector2>` at the end.
  63. ----
  64. .. _class_PoolVector2Array_method_remove:
  65. - void **remove** **(** :ref:`int<class_int>` idx **)**
  66. Remove an element from the array by index.
  67. ----
  68. .. _class_PoolVector2Array_method_resize:
  69. - void **resize** **(** :ref:`int<class_int>` idx **)**
  70. Set the size of the array. If the array is grown reserve elements at the end of the array. If the array is shrunk truncate the array to the new size.
  71. ----
  72. .. _class_PoolVector2Array_method_set:
  73. - void **set** **(** :ref:`int<class_int>` idx, :ref:`Vector2<class_Vector2>` vector2 **)**
  74. Change the :ref:`Vector2<class_Vector2>` at the given index.
  75. ----
  76. .. _class_PoolVector2Array_method_size:
  77. - :ref:`int<class_int>` **size** **(** **)**
  78. Returns the size of the array.