Difference between revisions of "Mesh:getVertex"

(Geometry:getVertex -> Mesh:getVertex)
Line 1: Line 1:
 
{{newin|[[0.9.0]]|090|type=function}}
 
{{newin|[[0.9.0]]|090|type=function}}
Returns vertex information from the geometry.
+
Gets information about a vertex in the Mesh.
  
 
== Function ==
 
== Function ==
 
=== Synopsis ===
 
=== Synopsis ===
 
<source lang="lua">
 
<source lang="lua">
x, y, u, v, r, g, b, a = Geometry:getVertex( i )
+
x, y, u, v, r, g, b, a = Mesh:getVertex( index )
 
</source>
 
</source>
 
=== Arguments ===
 
=== Arguments ===
{{param|number|i|The index of the the vertex you want to retrieve the information for.}}
+
{{param|number|index|The index of the the vertex you want to retrieve the information for.}}
 
=== Returns ===
 
=== Returns ===
{{param|number|x|The x vertex coordinate.}}
+
{{param|number|x|The position of the vertex (x-axis).}}
{{param|number|y|The y vertex coordinate.}}
+
{{param|number|y|The position of the vertex (y-axis).}}
{{param|number|u|The u texture coordinate.}}
+
{{param|number|u|The horizontal component of the texture coordinate.}}
{{param|number|v|The v texture coordinate.}}
+
{{param|number|v|The vertical component of the texture coordinate.}}
{{param|number|r|The red color component.}}
+
{{param|number|r|The red component of the vertex's color.}}
{{param|number|g|The green color component.}}
+
{{param|number|g|The green component of the vertex's color.}}
{{param|number|b|The blue color component.}}
+
{{param|number|b|The blue component of the vertex's color.}}
{{param|number|a|The alpha color component.}}
+
{{param|number|a|The alpha component of the vertex's color.}}
 
== See Also ==
 
== See Also ==
* [[parent::Geometry]]
+
* [[parent::Mesh]]
* [[Geometry:setVertex]]
+
* [[Mesh:setVertex]]
 +
* [[Mesh:getVertexCount]]
 
[[Category:Functions]]
 
[[Category:Functions]]
{{#set:Description=Returns vertex information from the geometry.}}
+
{{#set:Description=Gets information about a vertex in the Mesh.}}
 
== Other Languages ==
 
== Other Languages ==
{{i18n|Geometry:getVertex}}
+
{{i18n|Mesh:getVertex}}

Revision as of 04:26, 10 October 2013

Available since LÖVE 0.9.0
This function is not supported in earlier versions.

Gets information about a vertex in the Mesh.

Function

Synopsis

x, y, u, v, r, g, b, a = Mesh:getVertex( index )

Arguments

number index
The index of the the vertex you want to retrieve the information for.

Returns

number x
The position of the vertex (x-axis).
number y
The position of the vertex (y-axis).
number u
The horizontal component of the texture coordinate.
number v
The vertical component of the texture coordinate.
number r
The red component of the vertex's color.
number g
The green component of the vertex's color.
number b
The blue component of the vertex's color.
number a
The alpha component of the vertex's color.

See Also

Other Languages