Table of Contents

Class Mesh3D<T>

Namespace
AiDotNet.Interfaces
Assembly
AiDotNet.dll

Represents a 3D mesh with vertices, faces, and optional textures.

public class Mesh3D<T>

Type Parameters

T

The numeric type used for calculations.

Inheritance
Mesh3D<T>
Inherited Members

Constructors

Mesh3D()

Initializes a new empty mesh.

public Mesh3D()

Mesh3D(Tensor<T>, int[,])

Initializes a mesh with vertices and faces.

public Mesh3D(Tensor<T> vertices, int[,] faces)

Parameters

vertices Tensor<T>

Vertex positions [numVertices, 3].

faces int[,]

Face indices [numFaces, 3].

Properties

Colors

Gets or sets the vertex colors [numVertices, 3] (optional).

public Tensor<T>? Colors { get; set; }

Property Value

Tensor<T>

Faces

Gets or sets the face indices [numFaces, 3] for triangular faces.

public int[,] Faces { get; set; }

Property Value

int[,]

Normals

Gets or sets the vertex normals [numVertices, 3] (optional).

public Tensor<T>? Normals { get; set; }

Property Value

Tensor<T>

TextureImage

Gets or sets the texture image [height, width, channels] (optional).

public Tensor<T>? TextureImage { get; set; }

Property Value

Tensor<T>

UVCoordinates

Gets or sets the UV texture coordinates [numVertices, 2] (optional).

public Tensor<T>? UVCoordinates { get; set; }

Property Value

Tensor<T>

Vertices

Gets or sets the vertex positions [numVertices, 3].

public Tensor<T> Vertices { get; set; }

Property Value

Tensor<T>