123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210 |
- .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
- .. DO NOT EDIT THIS FILE, but the ArrayMesh.xml source instead.
- .. The source is found in doc/classes or modules/<name>/doc_classes.
- .. _class_ArrayMesh:
- ArrayMesh
- =========
- **Inherits:** :ref:`Mesh<class_mesh>` **<** :ref:`Resource<class_resource>` **<** :ref:`Reference<class_reference>` **<** :ref:`Object<class_object>`
- **Category:** Core
- Brief Description
- -----------------
- Member Functions
- ----------------
- +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`add_blend_shape<class_ArrayMesh_add_blend_shape>` **(** :ref:`String<class_string>` name **)** |
- +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`add_surface_from_arrays<class_ArrayMesh_add_surface_from_arrays>` **(** :ref:`int<class_int>` primitive, :ref:`Array<class_array>` arrays, :ref:`Array<class_array>` blend_shapes=[ ], :ref:`int<class_int>` compress_flags=97792 **)** |
- +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`center_geometry<class_ArrayMesh_center_geometry>` **(** **)** |
- +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`clear_blend_shapes<class_ArrayMesh_clear_blend_shapes>` **(** **)** |
- +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`get_blend_shape_count<class_ArrayMesh_get_blend_shape_count>` **(** **)** const |
- +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`get_blend_shape_mode<class_ArrayMesh_get_blend_shape_mode>` **(** **)** const |
- +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`String<class_string>` | :ref:`get_blend_shape_name<class_ArrayMesh_get_blend_shape_name>` **(** :ref:`int<class_int>` index **)** const |
- +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Rect3<class_rect3>` | :ref:`get_custom_aabb<class_ArrayMesh_get_custom_aabb>` **(** **)** const |
- +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`get_surface_count<class_ArrayMesh_get_surface_count>` **(** **)** const |
- +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`regen_normalmaps<class_ArrayMesh_regen_normalmaps>` **(** **)** |
- +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_blend_shape_mode<class_ArrayMesh_set_blend_shape_mode>` **(** :ref:`int<class_int>` mode **)** |
- +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_custom_aabb<class_ArrayMesh_set_custom_aabb>` **(** :ref:`Rect3<class_rect3>` aabb **)** |
- +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`surface_get_array_index_len<class_ArrayMesh_surface_get_array_index_len>` **(** :ref:`int<class_int>` surf_idx **)** const |
- +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`surface_get_array_len<class_ArrayMesh_surface_get_array_len>` **(** :ref:`int<class_int>` surf_idx **)** const |
- +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Array<class_array>` | :ref:`surface_get_arrays<class_ArrayMesh_surface_get_arrays>` **(** :ref:`int<class_int>` surf_idx **)** const |
- +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Array<class_array>` | :ref:`surface_get_blend_shape_arrays<class_ArrayMesh_surface_get_blend_shape_arrays>` **(** :ref:`int<class_int>` surf_idx **)** const |
- +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`surface_get_format<class_ArrayMesh_surface_get_format>` **(** :ref:`int<class_int>` surf_idx **)** const |
- +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Material<class_material>` | :ref:`surface_get_material<class_ArrayMesh_surface_get_material>` **(** :ref:`int<class_int>` surf_idx **)** const |
- +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`String<class_string>` | :ref:`surface_get_name<class_ArrayMesh_surface_get_name>` **(** :ref:`int<class_int>` surf_idx **)** const |
- +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`surface_get_primitive_type<class_ArrayMesh_surface_get_primitive_type>` **(** :ref:`int<class_int>` surf_idx **)** const |
- +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`surface_remove<class_ArrayMesh_surface_remove>` **(** :ref:`int<class_int>` surf_idx **)** |
- +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`surface_set_material<class_ArrayMesh_surface_set_material>` **(** :ref:`int<class_int>` surf_idx, :ref:`Material<class_material>` material **)** |
- +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`surface_set_name<class_ArrayMesh_surface_set_name>` **(** :ref:`int<class_int>` surf_idx, :ref:`String<class_string>` name **)** |
- +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- Numeric Constants
- -----------------
- - **NO_INDEX_ARRAY** = **-1** --- Default value used for index_array_len when no indices are present.
- - **ARRAY_WEIGHTS_SIZE** = **4** --- Amount of weights/bone indices per vertex (always 4).
- - **ARRAY_VERTEX** = **0** --- Vertex array (array of :ref:`Vector3<class_vector3>` vertices).
- - **ARRAY_NORMAL** = **1** --- Normal array (array of :ref:`Vector3<class_vector3>` normals).
- - **ARRAY_TANGENT** = **2** --- Tangent array, array of groups of 4 floats. first 3 floats determine the tangent, and the last the binormal direction as -1 or 1.
- - **ARRAY_COLOR** = **3** --- Vertex array (array of :ref:`Color<class_color>` colors).
- - **ARRAY_TEX_UV** = **4** --- UV array (array of :ref:`Vector3<class_vector3>` UVs or float array of groups of 2 floats (u,v)).
- - **ARRAY_TEX_UV2** = **5** --- Second UV array (array of :ref:`Vector3<class_vector3>` UVs or float array of groups of 2 floats (u,v)).
- - **ARRAY_BONES** = **6** --- Array of bone indices, as a float array. Each element in groups of 4 floats.
- - **ARRAY_WEIGHTS** = **7** --- Array of bone weights, as a float array. Each element in groups of 4 floats.
- - **ARRAY_INDEX** = **8** --- Array of integers, used as indices referencing vertices. No index can be beyond the vertex array size.
- - **ARRAY_MAX** = **9**
- - **ARRAY_FORMAT_VERTEX** = **1** --- Array format will include vertices (mandatory).
- - **ARRAY_FORMAT_NORMAL** = **2** --- Array format will include normals
- - **ARRAY_FORMAT_TANGENT** = **4** --- Array format will include tangents
- - **ARRAY_FORMAT_COLOR** = **8** --- Array format will include a color array.
- - **ARRAY_FORMAT_TEX_UV** = **16** --- Array format will include UVs.
- - **ARRAY_FORMAT_TEX_UV2** = **32** --- Array format will include another set of UVs.
- - **ARRAY_FORMAT_BONES** = **64** --- Array format will include bone indices.
- - **ARRAY_FORMAT_WEIGHTS** = **128** --- Array format will include bone weights.
- - **ARRAY_FORMAT_INDEX** = **256** --- Index array will be used.
- Member Function Description
- ---------------------------
- .. _class_ArrayMesh_add_blend_shape:
- - void **add_blend_shape** **(** :ref:`String<class_string>` name **)**
- .. _class_ArrayMesh_add_surface_from_arrays:
- - void **add_surface_from_arrays** **(** :ref:`int<class_int>` primitive, :ref:`Array<class_array>` arrays, :ref:`Array<class_array>` blend_shapes=[ ], :ref:`int<class_int>` compress_flags=97792 **)**
- Create a new surface (:ref:`get_surface_count<class_ArrayMesh_get_surface_count>` that will become surf_idx for this.
- Surfaces are created to be rendered using a "primitive", which may be PRIMITIVE_POINTS, PRIMITIVE_LINES, PRIMITIVE_LINE_STRIP, PRIMITIVE_LINE_LOOP, PRIMITIVE_TRIANGLES, PRIMITIVE_TRIANGLE_STRIP, PRIMITIVE_TRIANGLE_FAN. (As a note, when using indices, it is recommended to only use just points, lines or triangles).
- .. _class_ArrayMesh_center_geometry:
- - void **center_geometry** **(** **)**
- .. _class_ArrayMesh_clear_blend_shapes:
- - void **clear_blend_shapes** **(** **)**
- .. _class_ArrayMesh_get_blend_shape_count:
- - :ref:`int<class_int>` **get_blend_shape_count** **(** **)** const
- .. _class_ArrayMesh_get_blend_shape_mode:
- - :ref:`int<class_int>` **get_blend_shape_mode** **(** **)** const
- .. _class_ArrayMesh_get_blend_shape_name:
- - :ref:`String<class_string>` **get_blend_shape_name** **(** :ref:`int<class_int>` index **)** const
- .. _class_ArrayMesh_get_custom_aabb:
- - :ref:`Rect3<class_rect3>` **get_custom_aabb** **(** **)** const
- .. _class_ArrayMesh_get_surface_count:
- - :ref:`int<class_int>` **get_surface_count** **(** **)** const
- Return the amount of surfaces that the ``ArrayMesh`` holds.
- .. _class_ArrayMesh_regen_normalmaps:
- - void **regen_normalmaps** **(** **)**
- .. _class_ArrayMesh_set_blend_shape_mode:
- - void **set_blend_shape_mode** **(** :ref:`int<class_int>` mode **)**
- .. _class_ArrayMesh_set_custom_aabb:
- - void **set_custom_aabb** **(** :ref:`Rect3<class_rect3>` aabb **)**
- .. _class_ArrayMesh_surface_get_array_index_len:
- - :ref:`int<class_int>` **surface_get_array_index_len** **(** :ref:`int<class_int>` surf_idx **)** const
- Return the length in indices of the index array in the requested surface (see :ref:`add_surface<class_ArrayMesh_add_surface>`).
- .. _class_ArrayMesh_surface_get_array_len:
- - :ref:`int<class_int>` **surface_get_array_len** **(** :ref:`int<class_int>` surf_idx **)** const
- Return the length in vertices of the vertex array in the requested surface (see :ref:`add_surface<class_ArrayMesh_add_surface>`).
- .. _class_ArrayMesh_surface_get_arrays:
- - :ref:`Array<class_array>` **surface_get_arrays** **(** :ref:`int<class_int>` surf_idx **)** const
- .. _class_ArrayMesh_surface_get_blend_shape_arrays:
- - :ref:`Array<class_array>` **surface_get_blend_shape_arrays** **(** :ref:`int<class_int>` surf_idx **)** const
- .. _class_ArrayMesh_surface_get_format:
- - :ref:`int<class_int>` **surface_get_format** **(** :ref:`int<class_int>` surf_idx **)** const
- Return the format mask of the requested surface (see :ref:`add_surface<class_ArrayMesh_add_surface>`).
- .. _class_ArrayMesh_surface_get_material:
- - :ref:`Material<class_material>` **surface_get_material** **(** :ref:`int<class_int>` surf_idx **)** const
- Return a :ref:`Material<class_material>` in a given surface. Surface is rendered using this material.
- .. _class_ArrayMesh_surface_get_name:
- - :ref:`String<class_string>` **surface_get_name** **(** :ref:`int<class_int>` surf_idx **)** const
- .. _class_ArrayMesh_surface_get_primitive_type:
- - :ref:`int<class_int>` **surface_get_primitive_type** **(** :ref:`int<class_int>` surf_idx **)** const
- Return the primitive type of the requested surface (see :ref:`add_surface<class_ArrayMesh_add_surface>`).
- .. _class_ArrayMesh_surface_remove:
- - void **surface_remove** **(** :ref:`int<class_int>` surf_idx **)**
- Remove a surface at position surf_idx, shifting greater surfaces one surf_idx slot down.
- .. _class_ArrayMesh_surface_set_material:
- - void **surface_set_material** **(** :ref:`int<class_int>` surf_idx, :ref:`Material<class_material>` material **)**
- .. _class_ArrayMesh_surface_set_name:
- - void **surface_set_name** **(** :ref:`int<class_int>` surf_idx, :ref:`String<class_string>` name **)**
- Set a :ref:`Material<class_material>` for a given surface. Surface will be rendered using this material.
|