{{newin (日本語)|[[0.9.0 (日本語)|0.9.0]]|090|type=関数}}
Sets the properties of a vertex in the Mesh.

In versions prior to [[11.0]], color and byte component values were within the range of 0 to 255 instead of 0 to 1.
== 関数 ==
{{newin (日本語)|[[0.10.0 (日本語)|0.10.0]]|100|type=異形}}
=== 概要 ===
<source lang="lua">
Mesh:setVertex( index, attributecomponent, ... )
</source>
=== 引数 ===
{{param (日本語)|number|index|The index of the the vertex you want to modify (one-based).}}
{{param (日本語)|number|attributecomponent|The first component of the first vertex attribute in the specified vertex.}}
{{param (日本語)|number|...|Additional components of all vertex attributes in the specified vertex.}}
=== 返値 ===
ありません。
=== 注釈 ===
The arguments are in the same order as the vertex attributes in the Mesh's [[Mesh:getVertexFormat|vertex format]]. A standard Mesh that wasn't [[love.graphics.newMesh|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 [[AttributeDataType|data type]] is "float", or 1 if its data type is "byte".

== 関数 ==
{{newin (日本語)|[[0.10.0 (日本語)|0.10.0]]|100|type=異形}}
=== 概要 ===
<source lang="lua">
Mesh:setVertex( index, vertex )
</source>
=== 引数 ===
{{param (日本語)|number|index|The index of the the vertex you want to modify (one-based).}}
{{param (日本語)|table|vertex|A table with vertex information, in the form of <code>{attributecomponent, ...}</code>.}}
{{subparam|number|attributecomponent|The first component of the first vertex attribute in the specified vertex.}}
{{subparam|number|...|Additional components of all vertex attributes in the specified vertex.}}
=== 返値 ===
ありません。
=== 注釈 ===
The table indices are in the same order as the vertex attributes in the Mesh's [[Mesh:getVertexFormat|vertex format]]. A standard Mesh that wasn't [[love.graphics.newMesh|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 [[AttributeDataType|data type]] is "float", or 1 if its data type is "byte".

== 関数 ==
Sets the vertex components of a Mesh that wasn't [[love.graphics.newMesh|created]] with a custom vertex format.
=== 概要 ===
<source lang="lua">
Mesh:setVertex( index, x, y, u, v, r, g, b, a )
</source>
=== 引数 ===
{{param (日本語)|number|index|The index of the the vertex you want to modify (one-based).}}
{{param (日本語)|number|x|The position of the vertex on the x-axis.}}
{{param (日本語)|number|y|The position of the vertex on the y-axis.}}
{{param (日本語)|number|u|The horizontal component of the texture coordinate.}}
{{param (日本語)|number|v|The vertical component of the texture coordinate.}}
{{param (日本語)|number|r (1)|The red component of the vertex's color.}}
{{param (日本語)|number|g (1)|The green component of the vertex's color.}}
{{param (日本語)|number|b (1)|The blue component of the vertex's color.}}
{{param (日本語)|number|a (1)|The alpha component of the vertex's color.}}
=== 返値 ===
ありません。

== 関数 ==
Sets the vertex components of a Mesh that wasn't [[love.graphics.newMesh|created]] with a custom vertex format.
=== 概要 ===
<source lang="lua">
Mesh:setVertex( index, vertex )
</source>
=== 引数 ===
{{param (日本語)|number|index|The index of the the vertex you want to modify (one-based).}}
{{param (日本語)|table|vertex|A table with vertex information.}}
{{subparam|number|[1]|The position of the vertex on the x-axis.}}
{{subparam|number|[2]|The position of the vertex on the y-axis.}}
{{subparam|number|[3]|The u texture coordinate. Texture coordinates are normally in the range of [0, 1], but can be greater or less (see [[WrapMode]].)}}
{{subparam|number|[4]|The v texture coordinate. Texture coordinates are normally in the range of [0, 1], but can be greater or less (see [[WrapMode]].)}}
{{subparam|number|[5] (1)|The red color component.}}
{{subparam|number|[6] (1)|The green color component.}}
{{subparam|number|[7] (1)|The blue color component.}}
{{subparam|number|[8] (1)|The alpha color component.}}
=== 返値 ===
ありません。

== 関連 ==
* [[parent::Mesh (日本語)]]
* [[Mesh:getVertex (日本語)]]
* [[Mesh:getVertexCount (日本語)]]
* [[Mesh:getVertexFormat (日本語)]]
[[Category:Functions (日本語)]]
{{#set:Description=Sets the properties of a vertex in the Mesh.}}
== そのほかの言語 ==
{{i18n (日本語)|Mesh:setVertex}}