ArrayMeshAddSurfaceFromArrays Method |
Creates a new surface.
Surfaces are created to be rendered using a primitive, which may be any of the types defined in MeshPrimitiveType. (As a note, when using indices, it is recommended to only use points, lines or triangles.) GetSurfaceCount will become the surf_idx for this new surface.
The arrays argument is an array of arrays. See ArrayMeshArrayType for the values used in this array. For example, arrays[0] is the array of vertices. That first vertex sub-array is always required; the others are optional. Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data and the index array defines the vertex order. All sub-arrays must have the same length as the vertex array or be empty, except for if it is used.
Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data, and the index array defines the order of the vertices.
Namespace: Godot
public void AddSurfaceFromArrays( MeshPrimitiveType primitive, Array arrays, Array blendShapes = null, uint compressFlags = 97280 )
[Missing <param name="primitive"/> documentation for "M:Godot.ArrayMesh.AddSurfaceFromArrays(Godot.Mesh.PrimitiveType,Godot.Collections.Array,Godot.Collections.Array,System.UInt32)"]
[Missing <param name="arrays"/> documentation for "M:Godot.ArrayMesh.AddSurfaceFromArrays(Godot.Mesh.PrimitiveType,Godot.Collections.Array,Godot.Collections.Array,System.UInt32)"]
[Missing <param name="compressFlags"/> documentation for "M:Godot.ArrayMesh.AddSurfaceFromArrays(Godot.Mesh.PrimitiveType,Godot.Collections.Array,Godot.Collections.Array,System.UInt32)"]