class_vector2array.rst 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead.
  3. .. _class_Vector2Array:
  4. Vector2Array
  5. ============
  6. **Category:** Built-In Types
  7. Brief Description
  8. -----------------
  9. An Array of Vector2.
  10. Member Functions
  11. ----------------
  12. +------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+
  13. | :ref:`Vector2Array<class_vector2array>` | :ref:`Vector2Array<class_Vector2Array_Vector2Array>` **(** :ref:`Array<class_array>` from **)** |
  14. +------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+
  15. | void | :ref:`append<class_Vector2Array_append>` **(** :ref:`Vector2<class_vector2>` vector2 **)** |
  16. +------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+
  17. | void | :ref:`append_array<class_Vector2Array_append_array>` **(** :ref:`Vector2Array<class_vector2array>` array **)** |
  18. +------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+
  19. | :ref:`int<class_int>` | :ref:`insert<class_Vector2Array_insert>` **(** :ref:`int<class_int>` idx, :ref:`Vector2<class_vector2>` vector2 **)** |
  20. +------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+
  21. | void | :ref:`invert<class_Vector2Array_invert>` **(** **)** |
  22. +------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+
  23. | void | :ref:`push_back<class_Vector2Array_push_back>` **(** :ref:`Vector2<class_vector2>` vector2 **)** |
  24. +------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+
  25. | void | :ref:`remove<class_Vector2Array_remove>` **(** :ref:`int<class_int>` idx **)** |
  26. +------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+
  27. | void | :ref:`resize<class_Vector2Array_resize>` **(** :ref:`int<class_int>` idx **)** |
  28. +------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+
  29. | void | :ref:`set<class_Vector2Array_set>` **(** :ref:`int<class_int>` idx, :ref:`Vector2<class_vector2>` vector2 **)** |
  30. +------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+
  31. | :ref:`int<class_int>` | :ref:`size<class_Vector2Array_size>` **(** **)** |
  32. +------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+
  33. Description
  34. -----------
  35. An Array specifically designed to hold Vector2.
  36. Member Function Description
  37. ---------------------------
  38. .. _class_Vector2Array_Vector2Array:
  39. - :ref:`Vector2Array<class_vector2array>` **Vector2Array** **(** :ref:`Array<class_array>` from **)**
  40. Construct a new :ref:`Vector2Array<class_vector2array>`. Optionally, you can pass in an Array that will be converted.
  41. .. _class_Vector2Array_append:
  42. - void **append** **(** :ref:`Vector2<class_vector2>` vector2 **)**
  43. Append an element at the end of the array (alias of :ref:`push_back<class_Vector2Array_push_back>`).
  44. .. _class_Vector2Array_append_array:
  45. - void **append_array** **(** :ref:`Vector2Array<class_vector2array>` array **)**
  46. Append an :ref:`Vector2Array<class_vector2array>` at the end of this array.
  47. .. _class_Vector2Array_insert:
  48. - :ref:`int<class_int>` **insert** **(** :ref:`int<class_int>` idx, :ref:`Vector2<class_vector2>` vector2 **)**
  49. Insert a new element at a given position in the array. The position must be valid, or at the end of the array (pos==size()).
  50. .. _class_Vector2Array_invert:
  51. - void **invert** **(** **)**
  52. Reverse the order of the elements in the array (so first element will now be the last).
  53. .. _class_Vector2Array_push_back:
  54. - void **push_back** **(** :ref:`Vector2<class_vector2>` vector2 **)**
  55. Insert a :ref:`Vector2<class_vector2>` at the end.
  56. .. _class_Vector2Array_remove:
  57. - void **remove** **(** :ref:`int<class_int>` idx **)**
  58. Remove an element from the array by index.
  59. .. _class_Vector2Array_resize:
  60. - void **resize** **(** :ref:`int<class_int>` idx **)**
  61. Set the size of the Vector2Array. If larger than the current size it will reserve some space beforehand, and if it is smaller it will cut off the array.
  62. .. _class_Vector2Array_set:
  63. - void **set** **(** :ref:`int<class_int>` idx, :ref:`Vector2<class_vector2>` vector2 **)**
  64. Change the :ref:`Vector2<class_vector2>` at the given index.
  65. .. _class_Vector2Array_size:
  66. - :ref:`int<class_int>` **size** **(** **)**
  67. Return the size of the array.