github_url: | hide |
---|
A packed :ref:`Array<class_Array>` of :ref:`Vector3<class_Vector3>`s.
An :ref:`Array<class_Array>` specifically designed to hold :ref:`Vector3<class_Vector3>`. Packs data tightly, so it saves memory for large array sizes.
Note: This type is passed by value and not by reference.
- :ref:`PackedVector3Array<class_PackedVector3Array>` PackedVector3Array ( :ref:`Array<class_Array>` from )
Constructs a new PackedVector3Array
. Optionally, you can pass in a generic :ref:`Array<class_Array>` that will be converted.
- void append ( :ref:`Vector3<class_Vector3>` vector3 )
Appends an element at the end of the array (alias of :ref:`push_back<class_PackedVector3Array_method_push_back>`).
- void append_array ( :ref:`PackedVector3Array<class_PackedVector3Array>` array )
Appends a PackedVector3Array
at the end of this array.
- :ref:`bool<class_bool>` empty ( )
Returns true
if the array is empty.
- :ref:`int<class_int>` insert ( :ref:`int<class_int>` idx, :ref:`Vector3<class_Vector3>` vector3 )
Inserts a new element at a given position in the array. The position must be valid, or at the end of the array (idx == size()
).
- void invert ( )
Reverses the order of the elements in the array.
- void push_back ( :ref:`Vector3<class_Vector3>` vector3 )
Inserts a :ref:`Vector3<class_Vector3>` at the end.
- void remove ( :ref:`int<class_int>` idx )
Removes an element from the array by index.
- void resize ( :ref:`int<class_int>` idx )
Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size.
- void set ( :ref:`int<class_int>` idx, :ref:`Vector3<class_Vector3>` vector3 )
Changes the :ref:`Vector3<class_Vector3>` at the given index.
- :ref:`int<class_int>` size ( )
Returns the size of the array.