public class ArrayMesh : Mesh

Inheritance Chain

Static Fields

    public const Int32 ArrayWeightsSize = 4

    public const Int32 NoIndexArray = -1

Constructors

    public ArrayMesh()

Properties

    public Mesh.BlendShapeMode BlendShapeMode { get; set; }

    public AABB CustomAabb { get; set; }

Methods

    public void AddBlendShape(string name)

    public void AddSurfaceFromArrays(PrimitiveType primitive, object[] arrays, object[] blendShapes = null, int compressFlags = 97792)

Create a new surface (GetSurfaceCount() 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).

    public void CenterGeometry()

    public void ClearBlendShapes()

    public int GetBlendShapeCount()

    public BlendShapeMode GetBlendShapeMode()

Getter for BlendShapeMode

    public string GetBlendShapeName(int index)

    public AABB GetCustomAabb()

Getter for CustomAabb

    public int GetSurfaceCount()

Return the amount of surfaces that the ArrayMesh holds.

    public void RegenNormalmaps()

    public void SetBlendShapeMode(BlendShapeMode mode)

Setter for BlendShapeMode

    public void SetCustomAabb(AABB aabb)

Setter for CustomAabb

    public int SurfaceGetArrayIndexLen(int surfIdx)

Return the length in indices of the index array in the requested surface (see AddSurfaceFromArrays(Godot.Mesh.PrimitiveType, object[], object[], int)).

    public int SurfaceGetArrayLen(int surfIdx)

Return the length in vertices of the vertex array in the requested surface (see AddSurfaceFromArrays(Godot.Mesh.PrimitiveType, object[], object[], int)).

    public object[] SurfaceGetArrays(int surfIdx)

    public object[] SurfaceGetBlendShapeArrays(int surfIdx)

    public int SurfaceGetFormat(int surfIdx)

Return the format mask of the requested surface (see AddSurfaceFromArrays(Godot.Mesh.PrimitiveType, object[], object[], int)).

    public Material SurfaceGetMaterial(int surfIdx)

Return a Material in a given surface. Surface is rendered using this material.

    public string SurfaceGetName(int surfIdx)

    public PrimitiveType SurfaceGetPrimitiveType(int surfIdx)

Return the primitive type of the requested surface (see AddSurfaceFromArrays(Godot.Mesh.PrimitiveType, object[], object[], int)).

    public void SurfaceRemove(int surfIdx)

Remove a surface at position surf_idx, shifting greater surfaces one surf_idx slot down.

    public void SurfaceSetMaterial(int surfIdx, Material material)

    public void SurfaceSetName(int surfIdx, string name)

Set a Material for a given surface. Surface will be rendered using this material.

    public void SurfaceUpdateRegion(int surfIdx, int offset, byte[] data)

Inner Types

ArrayFormat

Name Value Description
Vertex 1 Array format will include vertices (mandatory).
Normal 2 Array format will include normals
Tangent 4 Array format will include tangents
Color 8 Array format will include a color array.
TexUv 16 Array format will include UVs.
TexUv2 32 Array format will include another set of UVs.
Bones 64 Array format will include bone indices.
Weights 128 Array format will include bone weights.
Index 256 Index array will be used.

ArrayType

Name Value Description
Vertex 0 Vertex array (array of [Vector3] vertices).
Normal 1 Normal array (array of [Vector3] normals).
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.
Color 3 Vertex array (array of [Color] colors).
TexUv 4 UV array (array of [Vector3] UVs or float array of groups of 2 floats (u,v)).
TexUv2 5 Second UV array (array of [Vector3] UVs or float array of groups of 2 floats (u,v)).
Bones 6 Array of bone indices, as a float array. Each element in groups of 4 floats.
Weights 7 Array of bone weights, as a float array. Each element in groups of 4 floats.
Index 8 Array of integers, used as indices referencing vertices. No index can be beyond the vertex array size.
Max 9  
Tags: