mirror of
https://github.com/godotengine/godot-docs.git
synced 2025-12-31 17:49:03 +03:00
110 lines
5.2 KiB
ReStructuredText
110 lines
5.2 KiB
ReStructuredText
.. Generated automatically by doc/tools/makerst.py in Godot's source tree.
|
|
.. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead.
|
|
|
|
.. _class_IntArray:
|
|
|
|
IntArray
|
|
========
|
|
|
|
**Category:** Built-In Types
|
|
|
|
Brief Description
|
|
-----------------
|
|
|
|
Integer Array.
|
|
|
|
Member Functions
|
|
----------------
|
|
|
|
+----------------------------------+-------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`IntArray<class_intarray>` | :ref:`IntArray<class_IntArray_IntArray>` **(** :ref:`Array<class_array>` from **)** |
|
|
+----------------------------------+-------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`append<class_IntArray_append>` **(** :ref:`int<class_int>` integer **)** |
|
|
+----------------------------------+-------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`append_array<class_IntArray_append_array>` **(** :ref:`IntArray<class_intarray>` array **)** |
|
|
+----------------------------------+-------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`insert<class_IntArray_insert>` **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` integer **)** |
|
|
+----------------------------------+-------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`invert<class_IntArray_invert>` **(** **)** |
|
|
+----------------------------------+-------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`push_back<class_IntArray_push_back>` **(** :ref:`int<class_int>` integer **)** |
|
|
+----------------------------------+-------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`remove<class_IntArray_remove>` **(** :ref:`int<class_int>` idx **)** |
|
|
+----------------------------------+-------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`resize<class_IntArray_resize>` **(** :ref:`int<class_int>` idx **)** |
|
|
+----------------------------------+-------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set<class_IntArray_set>` **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` integer **)** |
|
|
+----------------------------------+-------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`size<class_IntArray_size>` **(** **)** |
|
|
+----------------------------------+-------------------------------------------------------------------------------------------------------------+
|
|
|
|
Description
|
|
-----------
|
|
|
|
Integer Array. Array of integers. Can only contain integers. Optimized for memory usage, can't fragment the memory.
|
|
|
|
Member Function Description
|
|
---------------------------
|
|
|
|
.. _class_IntArray_IntArray:
|
|
|
|
- :ref:`IntArray<class_intarray>` **IntArray** **(** :ref:`Array<class_array>` from **)**
|
|
|
|
Create from a generic array.
|
|
|
|
.. _class_IntArray_append:
|
|
|
|
- void **append** **(** :ref:`int<class_int>` integer **)**
|
|
|
|
Append an element at the end of the array (alias of :ref:`push_back<class_IntArray_push_back>`).
|
|
|
|
.. _class_IntArray_append_array:
|
|
|
|
- void **append_array** **(** :ref:`IntArray<class_intarray>` array **)**
|
|
|
|
Append an :ref:`IntArray<class_intarray>` at the end of this array.
|
|
|
|
.. _class_IntArray_insert:
|
|
|
|
- :ref:`int<class_int>` **insert** **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` integer **)**
|
|
|
|
Insert a new int at a given position in the array. The position must be valid, or at the end of the array (pos==size()).
|
|
|
|
.. _class_IntArray_invert:
|
|
|
|
- void **invert** **(** **)**
|
|
|
|
Reverse the order of the elements in the array (so first element will now be the last).
|
|
|
|
.. _class_IntArray_push_back:
|
|
|
|
- void **push_back** **(** :ref:`int<class_int>` integer **)**
|
|
|
|
Append a value to the array.
|
|
|
|
.. _class_IntArray_remove:
|
|
|
|
- void **remove** **(** :ref:`int<class_int>` idx **)**
|
|
|
|
Remove an element from the array by index.
|
|
|
|
.. _class_IntArray_resize:
|
|
|
|
- void **resize** **(** :ref:`int<class_int>` idx **)**
|
|
|
|
Set the size of the :ref:`IntArray<class_intarray>`. If larger than the current size it will reserve some space beforehand, and if it is smaller it will cut off the array.
|
|
|
|
.. _class_IntArray_set:
|
|
|
|
- void **set** **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` integer **)**
|
|
|
|
Change the int at the given index.
|
|
|
|
.. _class_IntArray_size:
|
|
|
|
- :ref:`int<class_int>` **size** **(** **)**
|
|
|
|
Return the array size.
|
|
|
|
|