Skip to content

Latest commit

 

History

History
136 lines (82 loc) · 7.22 KB

class_packedvector3array.rst

File metadata and controls

136 lines (82 loc) · 7.22 KB
github_url:hide

PackedVector3Array

A packed :ref:`Array<class_Array>` of :ref:`Vector3<class_Vector3>`s.

Description

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.

Methods

:ref:`PackedVector3Array<class_PackedVector3Array>` :ref:`PackedVector3Array<class_PackedVector3Array_method_PackedVector3Array>` ( :ref:`Array<class_Array>` from )
void :ref:`append<class_PackedVector3Array_method_append>` ( :ref:`Vector3<class_Vector3>` vector3 )
void :ref:`append_array<class_PackedVector3Array_method_append_array>` ( :ref:`PackedVector3Array<class_PackedVector3Array>` array )
:ref:`bool<class_bool>` :ref:`empty<class_PackedVector3Array_method_empty>` ( )
:ref:`int<class_int>` :ref:`insert<class_PackedVector3Array_method_insert>` ( :ref:`int<class_int>` idx, :ref:`Vector3<class_Vector3>` vector3 )
void :ref:`invert<class_PackedVector3Array_method_invert>` ( )
void :ref:`push_back<class_PackedVector3Array_method_push_back>` ( :ref:`Vector3<class_Vector3>` vector3 )
void :ref:`remove<class_PackedVector3Array_method_remove>` ( :ref:`int<class_int>` idx )
void :ref:`resize<class_PackedVector3Array_method_resize>` ( :ref:`int<class_int>` idx )
void :ref:`set<class_PackedVector3Array_method_set>` ( :ref:`int<class_int>` idx, :ref:`Vector3<class_Vector3>` vector3 )
:ref:`int<class_int>` :ref:`size<class_PackedVector3Array_method_size>` ( )

Method Descriptions

Constructs a new PackedVector3Array. Optionally, you can pass in a generic :ref:`Array<class_Array>` that will be converted.


Appends an element at the end of the array (alias of :ref:`push_back<class_PackedVector3Array_method_push_back>`).


Appends a PackedVector3Array at the end of this array.


Returns true if the array is empty.


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.


Inserts a :ref:`Vector3<class_Vector3>` at the end.


Removes an element from the array by index.


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.


Changes the :ref:`Vector3<class_Vector3>` at the given index.


Returns the size of the array.