Difference between revisions of "Mesh:getVertex"

(Created page with "{{newin|0.9.0|090|type=function}} Returns vertex information from the geometry. == Function == === Synopsis === <source lang="lua"> x, y, s, t, r, g, b, a = Geometry:getVert...")
 
m
Line 5: Line 5:
 
=== Synopsis ===
 
=== Synopsis ===
 
<source lang="lua">
 
<source lang="lua">
x, y, s, t, r, g, b, a = Geometry:getVertex( i )
+
x, y, u, v, r, g, b, a = Geometry:getVertex( i )
 
</source>
 
</source>
 
=== Arguments ===
 
=== Arguments ===
Line 12: Line 12:
 
{{param|number|x|The x vertex coordinate.}}
 
{{param|number|x|The x vertex coordinate.}}
 
{{param|number|y|The y vertex coordinate.}}
 
{{param|number|y|The y vertex coordinate.}}
{{param|number|s|The s texture coordinate.}}
+
{{param|number|u|The u texture coordinate.}}
{{param|number|t|The t texture coordinate.}}
+
{{param|number|v|The v texture coordinate.}}
 
{{param|number|r|The red color component.}}
 
{{param|number|r|The red color component.}}
 
{{param|number|g|The green color component.}}
 
{{param|number|g|The green color component.}}

Revision as of 18:35, 25 April 2013

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

Returns vertex information from the geometry.

Function

Synopsis

x, y, u, v, r, g, b, a = Geometry:getVertex( i )

Arguments

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

Returns

number x
The x vertex coordinate.
number y
The y vertex coordinate.
number u
The u texture coordinate.
number v
The v texture coordinate.
number r
The red color component.
number g
The green color component.
number b
The blue color component.
number a
The alpha color component.

See Also

Other Languages