ArrayMesh¶
Inherits: Mesh < Resource < Reference < Object
Category: Core
Brief Description¶
Member Functions¶
void | add_blend_shape ( String name ) |
void | add_surface_from_arrays ( int primitive, Array arrays, Array blend_shapes=null, int compress_flags=null ) |
void | center_geometry ( ) |
void | clear_blend_shapes ( ) |
int | get_blend_shape_count ( ) const |
int | get_blend_shape_mode ( ) const |
String | get_blend_shape_name ( int index ) const |
Rect3 | get_custom_aabb ( ) const |
int | get_surface_count ( ) const |
void | regen_normalmaps ( ) |
void | set_blend_shape_mode ( int mode ) |
void | set_custom_aabb ( Rect3 aabb ) |
int | surface_get_array_index_len ( int surf_idx ) const |
int | surface_get_array_len ( int surf_idx ) const |
int | surface_get_format ( int surf_idx ) const |
Material | surface_get_material ( int surf_idx ) const |
String | surface_get_name ( int surf_idx ) const |
int | surface_get_primitive_type ( int surf_idx ) const |
void | surface_remove ( int surf_idx ) |
void | surface_set_material ( int surf_idx, Material material ) |
void | surface_set_name ( int surf_idx, 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 Vector3 vertices).
- ARRAY_NORMAL = 1 — Normal array (array of 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 Color colors).
- ARRAY_TEX_UV = 4 — UV array (array of Vector3 UVs or float array of groups of 2 floats (u,v)).
- ARRAY_TEX_UV2 = 5 — Second UV array (array of 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¶
- void add_blend_shape ( String name )
- void add_surface_from_arrays ( int primitive, Array arrays, Array blend_shapes=null, int compress_flags=null )
Create a new surface (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).
- void center_geometry ( )
- void clear_blend_shapes ( )
- int get_blend_shape_count ( ) const
- int get_blend_shape_mode ( ) const
- Rect3 get_custom_aabb ( ) const
- int get_surface_count ( ) const
Return the amount of surfaces that the ArrayMesh holds.
- void regen_normalmaps ( )
- void set_blend_shape_mode ( int mode )
- void set_custom_aabb ( Rect3 aabb )
Return the length in indices of the index array in the requested surface (see add_surface).
Return the length in vertices of the vertex array in the requested surface (see add_surface).
Return the format mask of the requested surface (see add_surface).
Return a Material in a given surface. Surface is rendered using this material.
Return the primitive type of the requested surface (see add_surface).
- void surface_remove ( int surf_idx )
Remove a surface at position surf_idx, shifting greater surfaces one surf_idx slot down.
Set a Material for a given surface. Surface will be rendered using this material.