Difference between revisions of "Mesh"
From GiderosMobile
(Created page with "__NOTOC__ '''Supported platforms:''' <br/> '''Available since:''' Gideros 2012.09<br/> === Description === <br /> Mesh class is used to create and display custom constructed s...") |
|||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
− | '''Supported platforms:''' <br/> | + | '''Supported platforms:''' android, ios, mac, pc<br/> |
'''Available since:''' Gideros 2012.09<br/> | '''Available since:''' Gideros 2012.09<br/> | ||
=== Description === | === Description === | ||
Line 14: | Line 14: | ||
</ul><br /> | </ul><br /> | ||
<br /> | <br /> | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
{|- | {|- | ||
| style="width: 50%;"| | | style="width: 50%;"| | ||
=== Methods === | === Methods === | ||
+ | [[Mesh.new]] - <br/> | ||
+ | [[Mesh:clearColorArray]] - <br/> | ||
+ | [[Mesh:clearIndexArray]] - <br/> | ||
+ | [[Mesh:clearTexture]] - <br/> | ||
+ | [[Mesh:clearTextureCoordinateArray]] - <br/> | ||
+ | [[Mesh:clearVertexArray]] - <br/> | ||
+ | [[Mesh:getColor]] - Returns color and alpha of the i-th element from color array<br/> | ||
+ | [[Mesh:getColorArraySize]] - Get size of the Color array<br/> | ||
+ | [[Mesh:getIndex]] - Returns the i-th element from index array<br/> | ||
+ | [[Mesh:getIndexArraySize]] - Get size of the Index array<br/> | ||
+ | [[Mesh:getTextureCoordinate]] - Returns u and v coordinate of the i-th element from texture coordinate array<br/> | ||
+ | [[Mesh:getTextureCoordinateArraySize]] - Get size of the Texture Coordinate array<br/> | ||
+ | [[Mesh:getVertex]] - Returns x and y coordinate of the i-th element from vertex array<br/> | ||
+ | [[Mesh:getVertexArraySize]] - Get size of the Vertices array<br/> | ||
+ | [[Mesh:resizeColorArray]] - <br/> | ||
+ | [[Mesh:resizeIndexArray]] - <br/> | ||
+ | [[Mesh:resizeTextureCoordinateArray]] - <br/> | ||
+ | [[Mesh:resizeVertexArray]] - <br/> | ||
+ | [[Mesh:setColor]] - <br/> | ||
+ | [[Mesh:setColorArray]] - <br/> | ||
+ | [[Mesh:setColors]] - <br/> | ||
+ | [[Mesh:setGenericArray]] - <br/> | ||
+ | [[Mesh:setIndex]] - <br/> | ||
+ | [[Mesh:setIndexArray]] - <br/> | ||
+ | [[Mesh:setIndices]] - <br/> | ||
+ | [[Mesh:setTexture]] - <br/> | ||
+ | [[Mesh:setTextureCoordinate]] - <br/> | ||
+ | [[Mesh:setTextureCoordinateArray]] - <br/> | ||
+ | [[Mesh:setTextureCoordinates]] - <br/> | ||
+ | [[Mesh:setVertex]] - <br/> | ||
+ | [[Mesh:setVertexArray]] - <br/> | ||
+ | [[Mesh:setVertices]] - <br/> | ||
| style="width: 50%;"| | | style="width: 50%;"| | ||
=== Events === | === Events === | ||
=== Constants === | === Constants === | ||
|} | |} |
Revision as of 08:56, 23 August 2018
Supported platforms: android, ios, mac, pc
Available since: Gideros 2012.09
Description
Mesh class is used to create and display custom constructed set of triangles (triangle meshes). It basically consists of
4 arrays: vertex, index, color (optional), textureCoordinate (optional) and a texture (optional) and it provides more than
one way to set/modify these arrays.
Mesh can be 2D or 3D, the latter expects an additionnal Z coordinate in its vertices. Additionnally, 3D meshes and their children are rendered with depth testing enabled, which prevents far objects to be drawn above nearest ones, irrespective of actual drawing order.
- `Note 1:` Mesh class doesn't do bounds check. If an element at index array points to an non-existent vertex, the application may crash.