Mesh:setVertices
Available since LÖVE 0.9.0 |
This function is not supported in earlier versions. |
Replaces all vertices in the Mesh with new ones.
Contents
Function
Available since LÖVE 0.10.0 |
This variant is not supported in earlier versions. |
Synopsis
Mesh:setVertices( vertices, startvertex )
Arguments
table vertices
- The table filled with vertex information tables for each vertex, in the form of
{vertex, ...}
where each vertex is a table in the form of{attributecomponent, ...}
.
number startvertex (1)
- The index of the first vertex to replace.
Returns
Nothing.
Notes
The values in each vertex table are in the same order as the vertex attributes in the Mesh's vertex format. A standard Mesh that wasn't created with a custom vertex format will use two position numbers, two texture coordinate numbers, and four color components per vertex: x, y, u, v, r, g, b, a.
If no value is supplied for a specific vertex attribute component, it will be set to a default value of 0 if its data type is "float", or 255 if its data type is "byte".
Function
Sets the vertex components of a Mesh that wasn't created with a custom vertex format.
Synopsis
Mesh:setVertices( vertices )
Arguments
table vertices
- The table filled with vertex information tables for each vertex as follows:
number [1]
- The position of the vertex on the x-axis.
number [2]
- The position of the vertex on the y-axis.
number [3]
- The horizontal component of the texture coordinate. Texture coordinates are normally in the range of [0, 1], but can be greater or less (see WrapMode).
number [4]
- The vertical component of the texture coordinate. Texture coordinates are normally in the range of [0, 1], but can be greater or less (see WrapMode).
number [5] (255)
- The red color component.
number [6] (255)
- The green color component.
number [7] (255)
- The blue color component.
number [8] (255)
- The alpha color component.
Returns
Nothing.
See Also
Other Languages
Dansk –
Deutsch –
English –
Español –
Français –
Indonesia –
Italiano –
Lietuviškai –
Magyar –
Nederlands –
Polski –
Português –
Română –
Slovenský –
Suomi –
Svenska –
Türkçe –
Česky –
Ελληνικά –
Български –
Русский –
Српски –
Українська –
עברית –
ไทย –
日本語 –
正體中文 –
简体中文 –
Tiếng Việt –
한국어
More info