|  | KudanAR - iOS
    1.6.0
    | 
#import <ARMesh.h>
Inherits NSObject.
| Instance Methods | |
| (instancetype) | - initWithVertexData:indexData:hasNormals:hasUVs: | 
| (instancetype) | - initWithVertexData:indexData:hasNormals:hasUVs:hasUVs2:hasTangents:maxBones: | 
| (instancetype) | - initWithVertexData:indexData:hasNormals:hasUVs:maxBones: | 
| (instancetype) | - initWithVertices:normals:UVs:indices: | 
| (NSData *) | - createVertexDataWithVertices:UVs:indices: | 
| (instancetype) | - initWithEmpty | 
| (void) | - setVertexData: | 
| (instancetype) | - initWithTestMeshWithUV:height: | 
| (instancetype) | - initWithTestMeshWithUV:height:u:v: | 
| (void) | - prepareRenderer:meshNode: | 
| Class Methods | |
| (id) | + testMesh | 
| (id) | + testMeshWithUV | 
| (instancetype) | + texturedMeshWidth:height: | 
| (instancetype) | + meshWithWidth:height: | 
| Properties | |
| ARVertexBuffer * | vertexBuffer | 
| GLuint | indexBuffer | 
| NSUInteger | numberOfIndices | 
| unsigned | numberOfVertices | 
| unsigned | vertexStride | 
| BOOL | hasNormals | 
| BOOL | hasTangents | 
| BOOL | hasUVs | 
| BOOL | hasBones | 
| NSMutableArray * | bones | 
| BOOL | hasBlendShapes | 
An ARMesh is a class representing the geometry and mapping of a mesh. It is a collection of vertices, edges and faces that define the shape of an object. It also specifies the data of this mesh, including the vertex data, bones and texture data.
| - (NSData *) createVertexDataWithVertices: | (NSData *) | vertices | |
| UVs: | (NSData *) | UVs | |
| indices: | (NSData *) | indices | |
Creates vertex data from verticies, UVs and indicies.
| vertices | Mesh vertices. | 
| UVs | Mesh UV map. | 
| indices | Mesh indicies. | 
| - (instancetype) initWithEmpty | 
Initialises mesh with empty vertex buffer.
| - (instancetype) initWithTestMeshWithUV: | (float) | width | |
| height: | (float) | height | |
Initialises flat mesh with UV map with coordinates in range(0..1,0..1).
| width | Mesh width. | 
| height | Mesh height. | 
| - (instancetype) initWithTestMeshWithUV: | (float) | width | |
| height: | (float) | height | |
| u: | (float) | u | |
| v: | (float) | v | |
Initialises flat mesh with UV map with coordinates in range(0..u,0...v).
| width | Mesh width. | 
| height | Mesh height. | 
| u | UV map width. | 
| v | UV map height. | 
| - (instancetype) initWithVertexData: | (NSData *) | vertexData | |
| indexData: | (NSData *) | indexData | |
| hasNormals: | (BOOL) | hasNormals | |
| hasUVs: | (BOOL) | hasUVs | |
Initialises mesh from vertex and index data. Also sets mesh parameters.
| vertexData | Mesh vertex data. | 
| indexData | Mesh indicies. | 
| hasNormals | If the mesh has vertex normals in its vertex data. | 
| hasUVs | If the mesh has a UVs in its vertex data. | 
| - (instancetype) initWithVertexData: | (NSData *) | vertexData | |
| indexData: | (NSData *) | indexData | |
| hasNormals: | (BOOL) | hasNormals | |
| hasUVs: | (BOOL) | hasUVs | |
| hasUVs2: | (BOOL) | hasUVs2 | |
| hasTangents: | (BOOL) | hasTangents | |
| maxBones: | (unsigned) | maxBones | |
Initialises mesh from vertex and index data. Also sets mesh parameters.
| vertexData | Mesh vertex data. | 
| indexData | Mesh index data. | 
| hasNormals | If the mesh has vertex normals. | 
| hasUVs | If the mesh has a UVs in its vertex data. | 
| hasUVs2 | If the mesh has a two sets of UVs in its vertex data. | 
| hasTangents | If the mesh has vertex tangents in its vertex data. | 
| maxBones | The maximum number of bones in the mesh. | 
| - (instancetype) initWithVertexData: | (NSData *) | vertexData | |
| indexData: | (NSData *) | index12Data | |
| hasNormals: | (BOOL) | hasNormals | |
| hasUVs: | (BOOL) | hasUVs | |
| maxBones: | (unsigned) | maxBones | |
Initialises mesh from vertex and index data. Also sets mesh parameters.
| vertexData | Mesh vertex data. | 
| indexData | Mesh indicies. | 
| hasNormals | If the mesh has vertex normals in its vertex data. | 
| hasUVs | If the mesh has a UVs in its vertex data. | 
| maxBones | The maximum number of bones in the mesh. | 
| - (instancetype) initWithVertices: | (NSData *) | vertices | |
| normals: | (NSData *) | normals | |
| UVs: | (NSData *) | UVs | |
| indices: | (NSData *) | indices | |
Initialises mesh with indicies, normals, UVs and indicies.
| vertices | Mesh verticies. | 
| normals | Mesh normals. | 
| UVs | Mesh's UV map. | 
| indices | Mesh vertices. | 
| + (instancetype) meshWithWidth: | (float) | width | |
| height: | (float) | height | |
Creates a flat mesh.
| width | Mesh width. | 
| height | Mesh height. | 
| - (void) prepareRenderer: | (ARRenderer *) | renderer | |
| meshNode: | (ARMeshNode *) | meshNode | |
Prepares the renderer for drawing the mesh by processing the bones and blend shapes associated with this mesh, as well as activating the relevant buffers.
| - (void) setVertexData: | (NSData *) | vertexData | 
Set mesh vertex data.
| vertexData | Mesh vertex data. | 
| + (instancetype) testMesh | 
Creates a 10x10 flat mesh.
| + (instancetype) testMeshWithUV | 
Creates a 100x100 flat mesh and UV map with coordinates in range(0..1,0..1).
| + (instancetype) texturedMeshWidth: | (float) | width | |
| height: | (float) | height | |
Creates a flat mesh with UV map with coordinates in range(0..1,0..1).
| width | Mesh width. | 
| height | Mesh height. | 
| 
 | readwritenonatomicassign | 
The array of ARBoneNodes that are part of this mesh. There is a limit of 64 bones per mesh.
| 
 | readwritenonatomicassign | 
Whether this mesh has blend shape deformers.
| 
 | readwritenonatomicassign | 
Whether the mesh has bones in its vertex data.
| 
 | readwritenonatomicassign | 
Whether the mesh has normals in its vertex data.
| 
 | readwritenonatomicassign | 
Whether this mesh has tangents in its vertex data.
| 
 | readwritenonatomicassign | 
Whether the mesh has UVs in its vertex data. If it doesn't, materials with textures shouldn't be used.
| 
 | readwritenonatomicassign | 
The index buffer used by the mesh.
| 
 | readnonatomicassign | 
The total number of triangles in this mesh. A good number of triangles to aim for is 100,000.
| 
 | readwritenonatomicassign | 
The total number of vertices in this mesh. During the model conversion process in the Kudan AR Toolkit, any meshes exceeding 65535 (2^16 - 1) vertices will be split into multiple separate meshes.
| 
 | readwritenonatomicassign | 
The vertex buffer used by the mesh.
| 
 | readwritenonatomicassign | 
The size of each vertex in this mesh.