MeshAttachment
An attachment that displays a textured mesh. A mesh has hull vertices and internal vertices within the hull. Holes are not
supported. Each vertex has UVs (texture coordinates) and triangles are used to map an image on to the mesh.
See Mesh attachments in the Spine User Guide.
Instance Members
Calculates {@link #uvs} using {@link #regionUVs} and the {@link #region}. Must be called after changing the region UVs or
region.
Triplets of vertex indices which describe the mesh's triangulation.
The UV pair for each vertex, normalized within the texture region.
Sets the texture coordinates for the region. The values are u,v pairs for each vertex.
The UV pair for each vertex, normalized within the entire texture.
See {@link #updateUVs}.
| Returns |
|---------|
| [spine.support.utils.FloatArray](/api-docs/clay-native/spine/support/utils/FloatArray/) |
The color to tint the mesh.
The name of the texture region for this attachment.
spine
getHullLength(): Int
The number of entries at the beginning of {@link #vertices} that make up the mesh hull.
spine
setHullLength(hullLength: Int): Void
Vertex index pairs describing edges for controlling triangulation, or be null if nonessential data was not exported. Mesh
triangles will never cross edges. Triangulation is not performed at runtime.
The width of the mesh's image, or zero if nonessential data was not exported.
The height of the mesh's image, or zero if nonessential data was not exported.
The parent mesh if this is a linked mesh, else null. A linked mesh shares the {@link #bones}, {@link #vertices},
{@link #regionUVs}, {@link #triangles}, {@link #hullLength}, {@link #edges}, {@link #width}, and {@link #height} with the
parent mesh, but may have a different {@link #name} or {@link #path} (and therefore a different texture).
Returns a new mesh with the {@link #parentMesh} set to this mesh's parent mesh, if any, else to this mesh.
Private Members