MeshData

Mesh data

Members

Functions

add
void add(vec2 vertex, vec2 uv)

Adds a new vertex

canTriangulate
bool canTriangulate()

Whether the mesh data is ready to be triangulated

clearConnections
void clearConnections()

Clear connections/indices

connect
void connect(ushort first, ushort second)

Connects 2 vertices together

connectionsAtPoint
int connectionsAtPoint(vec2 point)

Gets connections at a certain point

connectionsAtPoint
int connectionsAtPoint(ushort point)

Gets connections at a certain point

copy
MeshData copy()
Undocumented in source. Be warned that the author may not have intended to support it.
dbg
void dbg()
Undocumented in source. Be warned that the author may not have intended to support it.
deserializeFromFghj
SerdeException deserializeFromFghj(Fghj data)
Undocumented in source. Be warned that the author may not have intended to support it.
find
int find(vec2 vert)

Find the index of a vertex

fixWinding
void fixWinding()

Fixes the winding order of a mesh.

isReady
bool isReady()

Whether the mesh data is ready to be used

serialize
void serialize(S serializer)
Undocumented in source. Be warned that the author may not have intended to support it.

Static functions

createQuadMesh
MeshData createQuadMesh(vec2i size, vec4 uvBounds, vec2i cuts, vec2i origin)

Generates a quad based mesh which is cut cuts amount of times

Variables

indices
ushort[] indices;

Indices in the mesh

origin
vec2 origin;

Origin of the mesh

uvs
vec2[] uvs;

Base uvs

vertices
vec2[] vertices;

Vertices in the mesh

Meta