class MeshAttachment
package spine.attachments
extends VertexAttachment › Attachment
Available with spine plugin
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.
Constructor
Methods
updateUVs():Void
Calculates {@link #uvs} using {@link #regionUVs} and the {@link #region}. Must be called after changing the region UVs or region.
setRegionUVs(regionUVs:FloatArray):Void
Sets the texture coordinates for the region. The values are u,v pairs for each vertex.
getUVs():FloatArray
The UV pair for each vertex, normalized within the entire texture.
See {@link #updateUVs}.
getHullLength():Int
The number of entries at the beginning of {@link #vertices} that make up the mesh hull.
getEdges():ShortArray
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.
getParentMesh():MeshAttachment
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).
newLinkedMesh():MeshAttachment
Returns a new mesh with the {@link #parentMesh} set to this mesh's parent mesh, if any, else to this mesh.