Mesh

A collection of points connected to create a mesh.

This is a nogc reimplementation of Inochi2D's mesh handling, made to be more optimal to send to the GPU.

Constructors

this
this()

Creates an empty mesh.

this
this(MeshData meshData)

Creates a mesh from a encoded Inochi2D MeshData structure.

Destructor

~this
~this()
Undocumented in source.

Members

Functions

clone
Mesh clone()

Makes a clone of this mesh.

free
void free()

Frees this mesh.

getTriangle
Triangle getTriangle(uint offset)

Gets the triangle in the mesh at the given offset.

getTriangles
Triangle[] getTriangles()

Gets an array of every triangle in the mesh.

Properties

bounds
rect bounds [@property getter]

Bounds of the deformed mesh.

elementCount
uint elementCount [@property getter]

How many indices are in the mesh.

indices
uint[] indices [@property getter]

The index data stored in the mesh.

points
vec2[] points [@property getter]

The points of the vertices of the mesh.

triangleCount
uint triangleCount [@property getter]

How many triangles are in the mesh.

vertexCount
uint vertexCount [@property getter]

How many vertices are in the mesh.

vertices
VtxData[] vertices [@property getter]

The vertex data stored in the mesh.

Static functions

fromMeshData
Mesh fromMeshData(MeshData data, bool free)

Creates a mesh from a encoded Inochi2D MeshData structure.

Meta