MeshAttachment class
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.
- Inheritance
-
- Object
- Attachment<
spine_mesh_attachment> - VertexAttachment<
spine_mesh_attachment> - MeshAttachment
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
computeWorldVertices(
Slot slot) → List< double> -
Transforms and returns the attachment's local getVertices to world coordinates. If the slot's
Slot.getDeform
is not empty, it is used to deform the vertices. See World transforms in the Spine Runtimes Guide.inherited -
copy(
) → Attachment< Pointer< NativeType> > -
Returns a copy of the attachment. Copied attachments need to be disposed manually
when no longer in use via the dispose method.
inherited
-
dispose(
) → void -
inherited
-
getBones(
) → Int32List -
The bones which affect the getVertices. The array entries are, for each vertex, the number of bones affecting
the vertex followed by that many bone indices, which is the index of the bone in Skeleton.getBones. Will be null
if this attachment has no weights.
inherited
-
getColor(
) → Color -
getEdges(
) → Uint16List - 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.
-
getHeight(
) → double - The height of the mesh's image, or zero if nonessential data was not exported.
-
getHullLength(
) → int - The number of entries at the beginning of {@link #vertices} that make up the mesh hull.
-
getName(
) → String -
The attachment's name.
inherited
-
getParentMesh(
) → MeshAttachment? - The parent mesh if this is a linked mesh, else null. A linked mesh shares the bones, vertices, region UVs, triangles, hull length, edges, width, and height with the parent mesh, but may have a different name or path (and therefore a different texture).
-
getPath(
) → String -
getRegion(
) → TextureRegion? -
getRegionUVs(
) → Float32List - The UV pair for each vertex, normalized within the texture region.
-
getSequence(
) → Sequence? -
getTimelineAttachment(
) → Attachment< Pointer< ?NativeType> > -
Timelines for the timeline attachment are also applied to this attachment. May return
null
if not attachment-specific timelines should be applied.inherited -
getTriangles(
) → Uint16List - Triplets of vertex indices which describe the mesh's triangulation.
-
getType(
) → AttachmentType -
The attachment's type.
inherited
-
getUVs(
) → Float32List - The UV pair for each vertex, normalized within the entire texture.
-
getVertices(
) → Float32List -
The vertex positions in the bone's coordinate system. For a non-weighted attachment, the values are
x,y
entries for each vertex. For a weighted attachment, the values arex,y,weight
entries for each bone affecting each vertex.inherited -
getWidth(
) → double - The width of the mesh's image, or zero if nonessential data was not exported.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setColor(
double r, double g, double b, double a) → void -
setHeight(
double height) → void -
setHullLength(
int hullLength) → void -
setParentMesh(
MeshAttachment? parentMesh) → void -
setTimelineAttachment(
Attachment< Pointer< ? attachment) → voidNativeType> > -
inherited
-
setWidth(
double width) → void -
toString(
) → String -
A string representation of this object.
inherited
-
updateRegion(
) → void - Calculates texture coordinates returned by getUVs using the coordinates returned by getRegionUVs and region. Must be called if the region, the region's properties, or the getRegionUVs are changed.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited