Difference between revisions of "Mesh:resizeIndexArray"

From GiderosMobile
m (Text replacement - "</source>" to "</syntaxhighlight>")
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
 
'''Available since:''' Gideros 2012.09<br/>
 
'''Available since:''' Gideros 2012.09<br/>
 +
'''Class:''' [[Mesh]]<br/>
 +
 
=== Description ===
 
=== Description ===
<translate><br />
+
Resizes the index array to contain ''size'' elements.
Resizes the index array to contain [[size]] elements.<br />
+
<syntaxhighlight lang="lua">
<br />
 
If [[size]] is smaller than the current index array size, the content is reduced to its first [[size]] elements, the rest being dropped.<br />
 
<br />
 
If [[size]] is greater than the current index array size, the content is expanded by inserting at the end as many copies of 0s as needed to reach a size of [[size]] elements.<br />
 
<br /></translate>
 
<source lang="lua">
 
 
  Mesh:resizeIndexArray(size)
 
  Mesh:resizeIndexArray(size)
</source>
+
</syntaxhighlight>
 +
 
 +
If ''size'' is smaller than the current index array size, the content is reduced to its first ''size'' elements, the rest being dropped.
 +
 
 +
If ''size'' is greater than the current index array size, the content is expanded by inserting at the end as many copies of 0s as needed to reach a size of ''size'' elements.
 +
 
 
=== Parameters ===
 
=== Parameters ===
'''size''': (number) <translate>new index array size</translate> <br/>
+
'''size''': (number) new index array size<br/>
 +
 
 +
{{Mesh}}

Latest revision as of 15:30, 13 July 2023

Available since: Gideros 2012.09
Class: Mesh

Description

Resizes the index array to contain size elements.

 Mesh:resizeIndexArray(size)

If size is smaller than the current index array size, the content is reduced to its first size elements, the rest being dropped.

If size is greater than the current index array size, the content is expanded by inserting at the end as many copies of 0s as needed to reach a size of size elements.

Parameters

size: (number) new index array size