KudanAR - Android  1.6.0
ARMesh Class Reference

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 (long nativeVertexBuffer, long 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() [1/3]

ARMesh.ARMesh ( )

Initialises ARMesh with values to be set later.

◆ ARMesh() [2/3]

ARMesh.ARMesh ( NativeMesh  nativeMesh)

Initialises an ARMesh with a NativeMesh.

Parameters
nativeMesh

◆ ARMesh() [3/3]

ARMesh.ARMesh ( long  nativeVertexBuffer,
long  nativeIndexBuffer,
boolean  hasNormals,
boolean  hasUVs,
boolean  hasTangents,
int  maxBonesPerVertex 
)

Create a mesh with natively allocated vertex and index buffers

Parameters
nativeVertexBuffer
nativeIndexBuffer
hasNormals
hasUVs
hasTangents
maxBonesPerVertex

Member Function Documentation

◆ addBlendShapeChannel()

void ARMesh.addBlendShapeChannel ( ARBlendShapeChannel  channel)

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

Parameters
channelThe blend shape channel added.

◆ addBone()

void ARMesh.addBone ( ARBoneNode  bone)

Adds ARBoneNode to the list of ARBoneNodes in the ARMesh.

Parameters
bonea single ARBoneNode

◆ createTestMesh()

void ARMesh.createTestMesh ( float  width,
float  height 
)

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

Parameters
widthMesh width.
heightMesh height.

◆ createTestMesh2()

void ARMesh.createTestMesh2 ( float  width,
float  height 
)

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

Parameters
widthMesh width.
heightMesh height.

◆ createTestMeshNoUV()

void ARMesh.createTestMeshNoUV ( float  width,
float  height 
)

Creates a flat mesh with no UV map.

Parameters
widthMesh width.
heightMesh height.

◆ createTestMeshWithUvs() [1/2]

void ARMesh.createTestMeshWithUvs ( float  width,
float  height,
float  u,
float  u2,
float  v,
float  v2 
)

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.

◆ createTestMeshWithUvs() [2/2]

void ARMesh.createTestMeshWithUvs ( float  width,
float  height,
float  u,
float  u2,
float  v,
float  v2,
boolean  rotate,
boolean  update 
)

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.

◆ getBones()

List<ARBoneNode> ARMesh.getBones ( )

Returns a list of the ARBoneNodes

Returns
The List of ARBoneNode bones that are part of this mesh.

◆ getNumberOfIndices()

int ARMesh.getNumberOfIndices ( )

Return the number of indices that are in the mesh.

Returns
The number of triangles in this mesh.

◆ getNumbumberOfVertices()

int ARMesh.getNumbumberOfVertices ( )

Return the number of vertices in the mesh.

Returns

◆ getVertexBuffer()

ARVertexBuffer ARMesh.getVertexBuffer ( )

Returns the ARMesh's vertex buffer

Returns

◆ getVertexDataStride()

int ARMesh.getVertexDataStride ( )

Return the vertex data stride for the mesh.

Returns

◆ prepareRenderer()

boolean ARMesh.prepareRenderer ( ARMeshNode  meshNode)

Prepare renderer to draw ARMesh.

Parameters
meshNode
Returns

◆ setBones()

void ARMesh.setBones ( List< ARBoneNode bones)

Sets list of ARBoneNodes in an ARMesh.

Parameters
bonesa List of ARBoneNones

◆ setVertextBuffer()

void ARMesh.setVertextBuffer ( ARVertexBuffer  vertexBuffer)

Set vertex buffer for the mesh.

Parameters
vertexBuffer

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