Difference between revisions of "Mesh:setIndices"

From GiderosMobile
Line 8: Line 8:
 
  Mesh:setIndices(indices)
 
  Mesh:setIndices(indices)
 
</source>
 
</source>
'''indices''': (any)  ''''''<br/>
+
=== Parameters ===
 +
'''indices''': (any)  <br/>
 +
=== Examples ===
 +
'''Example'''<br/>
 +
<source lang="lua">-- set 3 indices with seperate function calls<br />
 +
mesh:setIndex(1, 10)<br />
 +
mesh:setIndex(2, 11)<br />
 +
mesh:setIndex(3, 12)<br />
 +
<br />
 +
-- set 3 indices with one function call<br />
 +
mesh:setIndices(1, 10, 2, 11, 3, 12)<br />
 +
<br />
 +
-- same as above<br />
 +
mesh:setIndices{1, 10, 2, 11, 3, 12}<br />
 +
<br />
 +
-- these two functions do nothing<br />
 +
mesh:setIndices()<br />
 +
mesh:setIndices{}<br /></source>

Revision as of 10:39, 23 August 2018

Available since: Gideros 2012.09

Description


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

 Mesh:setIndices(indices)

Parameters

indices: (any)

Examples

Example

-- set 3 indices with seperate function calls<br />
mesh:setIndex(1, 10)<br />
mesh:setIndex(2, 11)<br />
mesh:setIndex(3, 12)<br />
<br />
-- set 3 indices with one function call<br />
mesh:setIndices(1, 10, 2, 11, 3, 12)<br />
<br />
-- same as above<br />
mesh:setIndices{1, 10, 2, 11, 3, 12}<br />
<br />
-- these two functions do nothing<br />
mesh:setIndices()<br />
mesh:setIndices{}<br />