KudanAR - Android
ARMesh Class Reference
+ Collaboration diagram for ARMesh:

Public Member Functions

 ARMesh ()
 
void setVertextBuffer (ARVertexBuffer vertexBuffer)
 
int getNumbumberOfVertices ()
 
int getVertexDataStride ()
 
void setBones (List< ARBoneNode > bones)
 
void addBone (ARBoneNode bone)
 
List< ARBoneNodegetBones ()
 
 ARMesh (NativeMesh nativeMesh)
 
 ARMesh (int nativeVertexBuffer, int nativeIndexBuffer, boolean hasNormals, boolean hasUVs, boolean hasTangents, int maxBonesPerVertex)
 
void createTestMeshNoUV (float width, float height)
 
void createTestMesh (float width, float height)
 
ARVertexBuffer getVertexBuffer ()
 
void createTestMesh2 (float width, float height)
 
void createTestMeshWithUvs (float width, float height, float u, float u2, float v, float v2, boolean rotate, boolean update)
 
void createTestMeshWithUvs (float width, float height, float u, float u2, float v, float v2)
 
boolean prepareRenderer (ARMeshNode meshNode)
 
int getNumberOfIndices ()
 
void addBlendShapeChannel (ARBlendShapeChannel channel)
 

Detailed Description

A class that represents a mesh on a model

Constructor & Destructor Documentation

ARMesh ( )
inline

Initialises ARMesh with values to be set later.

ARMesh ( NativeMesh  nativeMesh)
inline

Initialises an ARMesh with a NativeMesh.

Parameters
nativeMesh
ARMesh ( int  nativeVertexBuffer,
int  nativeIndexBuffer,
boolean  hasNormals,
boolean  hasUVs,
boolean  hasTangents,
int  maxBonesPerVertex 
)
inline

Create a mesh with natively allocated vertex and index buffers

Parameters
nativeVertexBuffer
nativeIndexBuffer
hasNormals
hasUVs
hasTangents
maxBonesPerVertex

Member Function Documentation

void addBlendShapeChannel ( ARBlendShapeChannel  channel)
inline

Adds a ARBlendShapeChannel to the ARMesh's ARBlendShapeChannel. Used for adding blend shape deformations.

Parameters
channelThe blend shape channel added.
void addBone ( ARBoneNode  bone)
inline

Adds ARBoneNode to the list of ARBoneNodes in the ARMesh.

Parameters
bonea single ARBoneNode
void createTestMesh ( float  width,
float  height 
)
inline

Creates a flat mesh with UV map with coordinates in range(0..1,0..1).

Parameters
widthMesh width.
heightMesh height.
void createTestMesh2 ( float  width,
float  height 
)
inline

Initialises flat mesh with UV map with coordinates in range(0..1,0..1).

Parameters
widthMesh width.
heightMesh height.
void createTestMeshNoUV ( float  width,
float  height 
)
inline

Creates a flat mesh with no UV map.

Parameters
widthMesh width.
heightMesh height.
void createTestMeshWithUvs ( float  width,
float  height,
float  u,
float  u2,
float  v,
float  v2,
boolean  rotate,
boolean  update 
)
inline

Initialises flat mesh with two UV maps with coordinates in range(0..u,0...v) and (0..u2,0...v2)..

Parameters
widthMesh width.
heightMesh height.
uUV map width.
vUV map height.
u2UV2 map width.
v2UV2 map height.
rotate
updateWhetehr the mesh should update the vertex buffer.
void createTestMeshWithUvs ( float  width,
float  height,
float  u,
float  u2,
float  v,
float  v2 
)
inline

Initialises flat mesh with two UV map with coordinates in range(0..u,0...v) and (0..u2,0...v2)..

Parameters
widthMesh width.
heightMesh height.
uUV map width.
vUV map height.
List<ARBoneNode> getBones ( )
inline

Returns a list of the ARBoneNodes

Returns
The List of ARBoneNode bones that are part of this mesh.
int getNumberOfIndices ( )
inline

Return the number of indices that are in the mesh.

Returns
The number of triangles in this mesh.
int getNumbumberOfVertices ( )
inline

Return the number of vertices in the mesh.

Returns
ARVertexBuffer getVertexBuffer ( )
inline

Returns the ARMesh's vertex buffer

Returns
int getVertexDataStride ( )
inline

Return the vertex data stride for the mesh.

Returns
boolean prepareRenderer ( ARMeshNode  meshNode)
inline

Prepare renderer to draw ARMesh.

Parameters
meshNode
Returns
void setBones ( List< ARBoneNode bones)
inline

Sets list of ARBoneNodes in an ARMesh.

Parameters
bonesa List of ARBoneNones
void setVertextBuffer ( ARVertexBuffer  vertexBuffer)
inline

Set vertex buffer for the mesh.

Parameters
vertexBuffer

The documentation for this class was generated from the following file: