Difference between revisions of "Mesh:getVertices"

(Created page)
 
m
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{newin|[[0.9.0]]|090|type=function}}
+
{{newinoldin|[[0.9.0]]|090|[[0.10.0]]|100|type=function|text=Use [[Mesh:getVertex]] in a loop instead}}
 
Gets all the vertices in the Mesh.
 
Gets all the vertices in the Mesh.
  
Line 21: Line 21:
 
{{subparam|number|[7] (255)|The blue color component.}}
 
{{subparam|number|[7] (255)|The blue color component.}}
 
{{subparam|number|[8] (255)|The alpha color component.}}
 
{{subparam|number|[8] (255)|The alpha color component.}}
=== Returns ===
 
Nothing.
 
 
== See Also ==
 
== See Also ==
 
* [[parent::Mesh]]
 
* [[parent::Mesh]]

Latest revision as of 16:34, 27 December 2015

Available since LÖVE 0.9.0 and removed in LÖVE 0.10.0
Use Mesh:getVertex in a loop instead.

Gets all the vertices in the Mesh.

O.png This method can be slow if the Mesh has a large number of vertices. Keep the original table used to create the Mesh around and update it when necessary instead of using this method frequently, if possible.  


Function

Synopsis

vertices = Mesh:getVertices( )

Arguments

None.

Returns

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.

See Also

Other Languages