1 Star 1 Fork 0

天天编程/godot-docs

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
class_packedfloat32array.rst 7.26 KB
一键复制 编辑 原始数据 按行查看 历史
github_url: hide

PackedFloat32Array

A packed :ref:`Array<class_Array>` of 32-bit floating-point values.

Description

An :ref:`Array<class_Array>` specifically designed to hold 32-bit floating-point values. Packs data tightly, so it saves memory for large array sizes.

Note: This type is passed by value and not by reference.

If you need to pack 64-bit floats tightly, see :ref:`PackedFloat64Array<class_PackedFloat64Array>`.

Methods

:ref:`PackedFloat32Array<class_PackedFloat32Array>` :ref:`PackedFloat32Array<class_PackedFloat32Array_method_PackedFloat32Array>` ( :ref:`Array<class_Array>` from )
void :ref:`append<class_PackedFloat32Array_method_append>` ( :ref:`float<class_float>` value )
void :ref:`append_array<class_PackedFloat32Array_method_append_array>` ( :ref:`PackedFloat32Array<class_PackedFloat32Array>` array )
:ref:`bool<class_bool>` :ref:`empty<class_PackedFloat32Array_method_empty>` ( )
:ref:`int<class_int>` :ref:`insert<class_PackedFloat32Array_method_insert>` ( :ref:`int<class_int>` idx, :ref:`float<class_float>` value )
void :ref:`invert<class_PackedFloat32Array_method_invert>` ( )
void :ref:`push_back<class_PackedFloat32Array_method_push_back>` ( :ref:`float<class_float>` value )
void :ref:`remove<class_PackedFloat32Array_method_remove>` ( :ref:`int<class_int>` idx )
void :ref:`resize<class_PackedFloat32Array_method_resize>` ( :ref:`int<class_int>` idx )
void :ref:`set<class_PackedFloat32Array_method_set>` ( :ref:`int<class_int>` idx, :ref:`float<class_float>` value )
:ref:`int<class_int>` :ref:`size<class_PackedFloat32Array_method_size>` ( )

Method Descriptions

Constructs a new PackedFloat32Array. 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_PackedFloat32Array_method_push_back>`).


Appends a PackedFloat32Array 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.


Appends an element at the end of the array.


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 float at the given index.


Returns the size of the array.

Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ttcode-net/godot-docs.git
git@gitee.com:ttcode-net/godot-docs.git
ttcode-net
godot-docs
godot-docs
master

搜索帮助