Difference between revisions of "Mesh:getVertexMap"

(Created page)
 
m (Edited description to match new behaviour)
Line 1: Line 1:
 
{{newin|[[0.9.0]]|090|type=function}}
 
{{newin|[[0.9.0]]|090|type=function}}
Gets the Geometry's vertex map. If no vertex map has been set previously (either in [[love.graphics.newGeometry]] or [[Geometry:setVertexMap]]), then this function will return nil.
+
Gets the Geometry's vertex map.
 +
 
 +
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()]]}.
  
 
== Function ==
 
== Function ==
Line 10: Line 12:
 
None.
 
None.
 
=== Returns ===
 
=== Returns ===
{{param|table|vertex_map (nil)|A table containing a list of vertex indices used when drawing, or nil if the vertex map has not been set for this Geometry.}}
+
{{param|table|vertex_map|A table containing a list of vertex indices used when drawing.}}
 
== See Also ==
 
== See Also ==
 
* [[parent::Geometry]]
 
* [[parent::Geometry]]

Revision as of 22:28, 16 August 2013

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

Gets the Geometry's vertex map.

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()}.

Function

Synopsis

vertex_map = Geometry:getVertexMap( )

Arguments

None.

Returns

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

See Also

Other Languages