Mesh:setTextureCoordinates: Difference between revisions
From GiderosMobile
No edit summary |
clarification? |
||
| Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
'''Available since:''' Gideros 2012.09<br/> | |||
''' | '''Class:''' [[Mesh]]<br/> | ||
''' | |||
=== | === Description === | ||
Sets zero or more texture coordinates with a single function call. | |||
<source lang="lua"> | <source lang="lua"> | ||
Mesh:setTextureCoordinates(textureCoordinates) | |||
</source> | </source> | ||
=== | |||
'''textureCoordinates''': (any) | === Parameters === | ||
=== | '''textureCoordinates''': (any) multiple values or a Lua array<br/> | ||
''' | |||
<source lang="lua">-- | === Examples === | ||
'''Texture coordinates function calls''' | |||
<source lang="lua"> | |||
-- sets 3 texture coordinates with seperate function calls | |||
mesh:setTextureCoordinate(1, 0, 0) | mesh:setTextureCoordinate(1, 0, 0) | ||
mesh:setTextureCoordinate(2, 100, 0) | mesh:setTextureCoordinate(2, 100, 0) | ||
mesh:setTextureCoordinate(3, 0, 100) | mesh:setTextureCoordinate(3, 0, 100) | ||
-- | -- sets 3 texture coordinates with one function call | ||
mesh:setTextureCoordinates(1, 0, 0, 2, 100, 0, 3, 0, 100) | mesh:setTextureCoordinates(1, 0, 0, 2, 100, 0, 3, 0, 100) | ||
| Line 25: | Line 28: | ||
-- these two functions do nothing | -- these two functions do nothing | ||
mesh:setTextureCoordinates() | mesh:setTextureCoordinates() | ||
mesh:setTextureCoordinates{}</source> | mesh:setTextureCoordinates{} | ||
</source> | |||
{{Mesh}} | {{Mesh}} | ||
Revision as of 18:13, 14 March 2021
Available since: Gideros 2012.09
Class: Mesh
Description
Sets zero or more texture coordinates with a single function call.
Mesh:setTextureCoordinates(textureCoordinates)
Parameters
textureCoordinates: (any) multiple values or a Lua array
Examples
Texture coordinates function calls
-- sets 3 texture coordinates with seperate function calls
mesh:setTextureCoordinate(1, 0, 0)
mesh:setTextureCoordinate(2, 100, 0)
mesh:setTextureCoordinate(3, 0, 100)
-- sets 3 texture coordinates with one function call
mesh:setTextureCoordinates(1, 0, 0, 2, 100, 0, 3, 0, 100)
-- same as above
mesh:setTextureCoordinates{1, 0, 0, 2, 100, 0, 3, 0, 100}
-- these two functions do nothing
mesh:setTextureCoordinates()
mesh:setTextureCoordinates{}
- Mesh
- Mesh.new
- Mesh:clearColorArray
- Mesh:clearIndexArray
- Mesh:clearTexture
- Mesh:clearTextureCoordinateArray
- Mesh:clearVertexArray
- Mesh:getColor
- Mesh:getColorArraySize
- Mesh:getIndex
- Mesh:getIndexArraySize
- Mesh:getTextureCoordinate
- Mesh:getTextureCoordinateArraySize
- Mesh:getVertex
- Mesh:getVertexArraySize
- Mesh:resizeColorArray
- Mesh:resizeIndexArray
- Mesh:resizeTextureCoordinateArray
- Mesh:resizeVertexArray
- Mesh:setColor
- Mesh:setColorArray
- Mesh:setColors
- Mesh:setCullMode
- Mesh:setGenericArray
- Mesh:setIndex
- Mesh:setIndexArray
- Mesh:setIndices
- Mesh:setInstanceCount
- Mesh:setPrimitiveType
- Mesh:setTexture
- Mesh:setTextureCoordinate
- Mesh:setTextureCoordinateArray
- Mesh:setTextureCoordinates
- Mesh:setVertex
- Mesh:setVertexArray
- Mesh:setVertices
- Mesh:updateBones