Skip to content

MeshSurfaceData

eduardgushchin edited this page Oct 22, 2026 · 3 revisions

Home | API by Category | Complete API Index | API Status

Field Value
Full name Electron2D.MeshSurfaceData
Namespace Electron2D
Kind class
Category API Rendering

Overview

Supplies typed vertex, numerical normal/tangent, color, texture-coordinate, packed custom and index arrays for a two-dimensional mesh surface.

Syntax

public sealed class Electron2D.MeshSurfaceData

Remarks

Arrays are borrowed while passing this value to a mesh. Adding a surface copies every array; query results own independent copies. Missing colors are white and missing texture coordinates are zero. UseEmptyVertexArray permits absent positions with an explicit VertexCount or zero-count uint16 index-only invocations.

Detailed engine reference

Members

Member Kind Summary
public MeshSurfaceData() constructor Creates an empty set of typed surface arrays.
public System.Int32[] Bones { get; set; } property Gets or sets optional flattened four- or eight-slot bone indices per vertex.
public Electron2D.Color[] Colors { get; set; } property Gets or sets optional vertex colors.
public Electron2D.MeshCustomData Custom0 { get; set; } property Gets or sets the optional first packed custom channel.
public Electron2D.MeshCustomData Custom1 { get; set; } property Gets or sets the optional second packed custom channel.
public Electron2D.MeshCustomData Custom2 { get; set; } property Gets or sets the optional third packed custom channel.
public Electron2D.MeshCustomData Custom3 { get; set; } property Gets or sets the optional fourth packed custom channel.
public System.Int32[] Indices { get; set; } property Gets or sets optional indices defining primitive vertex order.
public Electron2D.Vector3[] Normals { get; set; } property Gets or sets optional mesh-local numerical normal vectors.
public Electron2D.Vector4[] Tangents { get; set; } property Gets or sets optional mesh-local tangent vectors and handedness.
public Electron2D.Vector2[] UV2s { get; set; } property Gets or sets optional secondary texture coordinates.
public Electron2D.Vector2[] UVs { get; set; } property Gets or sets optional primary texture coordinates.
public System.Int32 VertexCount { get; set; } property Gets or sets the vertex count when positions are generated by an authored shader.
public Electron2D.Vector2[] Vertices { get; set; } property Gets or sets local two-dimensional vertex positions.
public System.Single[] Weights { get; set; } property Gets or sets flattened skin weights matching Bones.

Member Details

MeshSurfaceData()

Kind: constructor

public MeshSurfaceData()

Summary

Creates an empty set of typed surface arrays.

Bones

Kind: property

public System.Int32[] Bones { get; set; }

Summary

Gets or sets optional flattened four- or eight-slot bone indices per vertex.

Value

Empty without skin; every stored index is zero through 65535 and must resolve when drawn with a palette.

Colors

Kind: property

public Electron2D.Color[] Colors { get; set; }

Summary

Gets or sets optional vertex colors.

Value

Empty or one finite color per vertex.

Custom0

Kind: property

public Electron2D.MeshCustomData Custom0 { get; set; }

Summary

Gets or sets the optional first packed custom channel.

Value

Null without the channel; one finite packed record per vertex when present.

Custom1

Kind: property

public Electron2D.MeshCustomData Custom1 { get; set; }

Summary

Gets or sets the optional second packed custom channel.

Value

Null without the channel; independent of Custom0.

Custom2

Kind: property

public Electron2D.MeshCustomData Custom2 { get; set; }

Summary

Gets or sets the optional third packed custom channel.

Value

Null without the channel; independent of other custom channels.

Custom3

Kind: property

public Electron2D.MeshCustomData Custom3 { get; set; }

Summary

Gets or sets the optional fourth packed custom channel.

Value

Null without the channel; independent of instance shader data.

Indices

Kind: property

public System.Int32[] Indices { get; set; }

Summary

Gets or sets optional indices defining primitive vertex order.

Value

Empty for sequential invocations; each index addresses VertexCount, or zero through 65535 for an index-only procedural surface whose count is zero.

Normals

Kind: property

public Electron2D.Vector3[] Normals { get; set; }

Summary

Gets or sets optional mesh-local numerical normal vectors.

Value

Empty or one finite Vector3 per vertex; consumed surfaces pack directions to octahedral UNORM16 or a compressed joint axis/angle frame.

Tangents

Kind: property

public Electron2D.Vector4[] Tangents { get; set; }

Summary

Gets or sets optional mesh-local tangent vectors and handedness.

Value

Empty or one finite Vector4 per vertex; XYZ is the direction and W selects negative or positive orientation.

UV2s

Kind: property

public Electron2D.Vector2[] UV2s { get; set; }

Summary

Gets or sets optional secondary texture coordinates.

Value

Empty or one finite coordinate per vertex; independent of primary UVs and instance shader data.

UVs

Kind: property

public Electron2D.Vector2[] UVs { get; set; }

Summary

Gets or sets optional primary texture coordinates.

Value

Empty or one finite normalized-space coordinate per vertex; values outside zero through one retain sampler behavior.

VertexCount

Kind: property

public System.Int32 VertexCount { get; set; }

Summary

Gets or sets the vertex count when positions are generated by an authored shader.

Value

Zero infers the position-array length. A positive count must match supplied positions; without positions it sizes the optional channels. Index-only procedural surfaces may retain zero.

Vertices

Kind: property

public Electron2D.Vector2[] Vertices { get; set; }

Summary

Gets or sets local two-dimensional vertex positions.

Value

Empty initially; vertices must be finite when consumed.

Weights

Kind: property

public System.Single[] Weights { get; set; }

Summary

Gets or sets flattened skin weights matching Bones.

Value

Finite values; imports clamp and truncate to unsigned normalized 16-bit weights without normalizing the sum.

Clone this wiki locally