to top
Android APIs
public class

Mesh

extends BaseObj
java.lang.Object
   ↳ android.renderscript.BaseObj
     ↳ android.renderscript.Mesh

This class was deprecated in API level 16.
in API 16

This class is a container for geometric data displayed with Renderscript. Internally, a mesh is a collection of allocations that represent vertex data (positions, normals, texture coordinates) and index data such as triangles and lines.

Vertex data could either be interleaved within one allocation that is provided separately, as multiple allocation objects, or done as a combination of both. When a vertex channel name matches an input in the vertex program, Renderscript automatically connects the two together.

Parts of the mesh can be rendered with either explicit index sets or primitive types.

Summary

Nested Classes
class Mesh.AllocationBuilder This class was deprecated in API level 16. in API 16 Mesh builder object. It starts empty and requires the user to add all the vertex and index allocations that comprise the mesh  
class Mesh.Builder This class was deprecated in API level 16. in API 16 Mesh builder object. It starts empty and requires you to add the types necessary to create vertex and index allocations.  
enum Mesh.Primitive This enum was deprecated in API level 16. in API 16 Describes the way mesh vertex data is interpreted when rendering  
class Mesh.TriangleMeshBuilder This class was deprecated in API level 16. in API 16 Builder that allows creation of a mesh object point by point and triangle by triangle  
Public Methods
Allocation getIndexSetAllocation(int slot)
This method was deprecated in API level 16. in API 16
Mesh.Primitive getPrimitive(int slot)
This method was deprecated in API level 16. in API 16
int getPrimitiveCount()
This method was deprecated in API level 16. in API 16
Allocation getVertexAllocation(int slot)
This method was deprecated in API level 16. in API 16
int getVertexAllocationCount()
This method was deprecated in API level 16. in API 16
[Expand]
Inherited Methods
From class android.renderscript.BaseObj
From class java.lang.Object

Public Methods

public Allocation getIndexSetAllocation (int slot)

Added in API level 11

This method was deprecated in API level 16.
in API 16

Parameters
slot locaton within the list of index set allocation
Returns
  • allocation containing primtive index data or null if the index data is not specified explicitly

public Mesh.Primitive getPrimitive (int slot)

Added in API level 11

This method was deprecated in API level 16.
in API 16

Parameters
slot locaiton within the list of index set primitives
Returns
  • index set primitive type

public int getPrimitiveCount ()

Added in API level 11

This method was deprecated in API level 16.
in API 16

Returns
  • number of primitives or index sets in the mesh

public Allocation getVertexAllocation (int slot)

Added in API level 11

This method was deprecated in API level 16.
in API 16

Parameters
slot index in the list of allocations to return
Returns
  • vertex data allocation at the given index

public int getVertexAllocationCount ()

Added in API level 11

This method was deprecated in API level 16.
in API 16

Returns
  • number of allocations containing vertex data