Difference between revisions of "Mesh:setVertices"
From GiderosMobile
Line 8: | Line 8: | ||
Mesh:setVertices(vertices) | Mesh:setVertices(vertices) | ||
</source> | </source> | ||
− | '''vertices''': (any) ''''''<br/> | + | === Parameters === |
+ | '''vertices''': (any) <br/> | ||
+ | === Examples === | ||
+ | '''Example'''<br/> | ||
+ | <source lang="lua">-- 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 /></source> |
Revision as of 10:44, 23 August 2018
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 />