Mesh:setVertices

From GiderosMobile
Revision as of 10:44, 23 August 2018 by Hgy29 (talk | contribs)

Available since: Gideros 2012.09

Description


Sets zero or more vertices at vertex array with a single function call. It accepts multiple values or a Lua array.

 Mesh:setVertices(vertices)

Parameters

vertices: (any)

Examples

Example

-- set 3 vertices with seperate function calls<br />
mesh:setVertex(1, 100, 100)<br />
mesh:setVertex(2, 150, 100)<br />
mesh:setVertex(3, 100, 150)<br />
<br />
-- set 3 vertices with one function call<br />
mesh:setVertices(1, 100, 100, 2, 150, 100, 3, 100, 150)<br />
<br />
-- same as above<br />
mesh:setVertices{1, 100, 100, 2, 150, 100, 3, 100, 150}<br />
<br />
-- these two functions do nothing<br />
mesh:setVertices()<br />
mesh:setVertices{}<br />