class_poolvector2array.rst 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the PoolVector2Array.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_PoolVector2Array:
  5. PoolVector2Array
  6. ================
  7. **Category:** Built-In Types
  8. Brief Description
  9. -----------------
  10. An Array of Vector2.
  11. Member Functions
  12. ----------------
  13. +--------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+
  14. | :ref:`PoolVector2Array<class_poolvector2array>` | :ref:`PoolVector2Array<class_PoolVector2Array_PoolVector2Array>` **(** :ref:`Array<class_array>` from **)** |
  15. +--------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+
  16. | void | :ref:`append<class_PoolVector2Array_append>` **(** :ref:`Vector2<class_vector2>` vector2 **)** |
  17. +--------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+
  18. | void | :ref:`append_array<class_PoolVector2Array_append_array>` **(** :ref:`PoolVector2Array<class_poolvector2array>` array **)** |
  19. +--------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+
  20. | :ref:`int<class_int>` | :ref:`insert<class_PoolVector2Array_insert>` **(** :ref:`int<class_int>` idx, :ref:`Vector2<class_vector2>` vector2 **)** |
  21. +--------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+
  22. | void | :ref:`invert<class_PoolVector2Array_invert>` **(** **)** |
  23. +--------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+
  24. | void | :ref:`push_back<class_PoolVector2Array_push_back>` **(** :ref:`Vector2<class_vector2>` vector2 **)** |
  25. +--------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+
  26. | void | :ref:`remove<class_PoolVector2Array_remove>` **(** :ref:`int<class_int>` idx **)** |
  27. +--------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+
  28. | void | :ref:`resize<class_PoolVector2Array_resize>` **(** :ref:`int<class_int>` idx **)** |
  29. +--------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+
  30. | void | :ref:`set<class_PoolVector2Array_set>` **(** :ref:`int<class_int>` idx, :ref:`Vector2<class_vector2>` vector2 **)** |
  31. +--------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+
  32. | :ref:`int<class_int>` | :ref:`size<class_PoolVector2Array_size>` **(** **)** |
  33. +--------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+
  34. Description
  35. -----------
  36. An Array specifically designed to hold Vector2. Note that this type is passed by value and not by reference.
  37. Member Function Description
  38. ---------------------------
  39. .. _class_PoolVector2Array_PoolVector2Array:
  40. - :ref:`PoolVector2Array<class_poolvector2array>` **PoolVector2Array** **(** :ref:`Array<class_array>` from **)**
  41. Construct a new ``PoolVector2Array``. Optionally, you can pass in an Array that will be converted.
  42. .. _class_PoolVector2Array_append:
  43. - void **append** **(** :ref:`Vector2<class_vector2>` vector2 **)**
  44. Append an element at the end of the array (alias of :ref:`push_back<class_PoolVector2Array_push_back>`).
  45. .. _class_PoolVector2Array_append_array:
  46. - void **append_array** **(** :ref:`PoolVector2Array<class_poolvector2array>` array **)**
  47. Append an ``PoolVector2Array`` at the end of this array.
  48. .. _class_PoolVector2Array_insert:
  49. - :ref:`int<class_int>` **insert** **(** :ref:`int<class_int>` idx, :ref:`Vector2<class_vector2>` vector2 **)**
  50. 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()).
  51. .. _class_PoolVector2Array_invert:
  52. - void **invert** **(** **)**
  53. Reverse the order of the elements in the array (so first element will now be the last).
  54. .. _class_PoolVector2Array_push_back:
  55. - void **push_back** **(** :ref:`Vector2<class_vector2>` vector2 **)**
  56. Insert a :ref:`Vector2<class_vector2>` at the end.
  57. .. _class_PoolVector2Array_remove:
  58. - void **remove** **(** :ref:`int<class_int>` idx **)**
  59. Remove an element from the array by index.
  60. .. _class_PoolVector2Array_resize:
  61. - void **resize** **(** :ref:`int<class_int>` idx **)**
  62. 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.
  63. .. _class_PoolVector2Array_set:
  64. - void **set** **(** :ref:`int<class_int>` idx, :ref:`Vector2<class_vector2>` vector2 **)**
  65. Change the :ref:`Vector2<class_vector2>` at the given index.
  66. .. _class_PoolVector2Array_size:
  67. - :ref:`int<class_int>` **size** **(** **)**
  68. Return the size of the array.