Difference between revisions of "Mesh:getVertexMap"

(Geometry:getVertexMap -> Mesh:getVertexMap)
Line 1: Line 1:
 
{{newin|[[0.9.0]]|090|type=function}}
 
{{newin|[[0.9.0]]|090|type=function}}
Gets the Geometry's vertex map.
+
Gets the vertex map for the Mesh. The vertex map describes the order in which the vertices are used when the Mesh is drawn. The vertices, vertex map, and mesh draw mode work together to determine what exactly is displayed on the screen.
  
If no vertex map has been set previously (either in [[love.graphics.newGeometry]] or with [[Geometry:setVertexMap]]), then this function will return the default vertex map: {1, 2, 3, ..., [[Geometry:getVertexCount|Geometry:getVertexCount()]]}.
+
If no vertex map has been set previously via [[Mesh:setVertexMap]], then this function will return the default vertex map for the Mesh: {1, 2, 3, 4, ..., [[Mesh:getVertexCount|Mesh:getVertexCount()]]}.
  
 
== Function ==
 
== Function ==
 
=== Synopsis ===
 
=== Synopsis ===
 
<source lang="lua">
 
<source lang="lua">
vertex_map = Geometry:getVertexMap( )
+
vertex_map = Mesh:getVertexMap( )
 
</source>
 
</source>
 
=== Arguments ===
 
=== Arguments ===
 
None.
 
None.
 
=== Returns ===
 
=== Returns ===
{{param|table|vertex_map|A table containing a list of vertex indices used when drawing.}}
+
{{param|table|vertex_map|A table containing the list of vertex indices used when drawing.}}
 
== See Also ==
 
== See Also ==
* [[parent::Geometry]]
+
* [[parent::Mesh]]
* [[Geometry:setVertexMap]]
+
* [[Mesh:setVertexMap]]
 
[[Category:Functions]]
 
[[Category:Functions]]
{{#set:Description=Gets the Geometry's vertex map.}}
+
{{#set:Description=Gets the vertex map for the Mesh.}}
 
== Other Languages ==
 
== Other Languages ==
{{i18n|Geometry:getVertexMap}}
+
{{i18n|Mesh:getVertexMap}}

Revision as of 07:24, 10 October 2013

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

Gets the vertex map for the Mesh. The vertex map describes the order in which the vertices are used when the Mesh is drawn. The vertices, vertex map, and mesh draw mode work together to determine what exactly is displayed on the screen.

If no vertex map has been set previously via Mesh:setVertexMap, then this function will return the default vertex map for the Mesh: {1, 2, 3, 4, ..., Mesh:getVertexCount()}.

Function

Synopsis

vertex_map = Mesh:getVertexMap( )

Arguments

None.

Returns

table vertex_map
A table containing the list of vertex indices used when drawing.

See Also

Other Languages