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.
public class Mesh extends BaseObj
Modifier and Type | Class and Description |
---|---|
static class |
Mesh.AllocationBuilder
Deprecated.
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
|
static class |
Mesh.Builder
Deprecated.
in API 16
Mesh builder object. It starts empty and requires you to
add the types necessary to create vertex and index
allocations.
|
static class |
Mesh.Primitive
Deprecated.
in API 16
Describes the way mesh vertex data is interpreted when rendering
|
static class |
Mesh.TriangleMeshBuilder
Deprecated.
in API 16
Builder that allows creation of a mesh object point by point
and triangle by triangle
|
Modifier and Type | Method and Description |
---|---|
Allocation |
getIndexSetAllocation(int slot)
Deprecated.
in API 16
|
Mesh.Primitive |
getPrimitive(int slot)
Deprecated.
in API 16
|
int |
getPrimitiveCount()
Deprecated.
in API 16
|
Allocation |
getVertexAllocation(int slot)
Deprecated.
in API 16
|
int |
getVertexAllocationCount()
Deprecated.
in API 16
|
public int getVertexAllocationCount()
public Allocation getVertexAllocation(int slot)
slot
- index in the list of allocations to returnpublic int getPrimitiveCount()
public Allocation getIndexSetAllocation(int slot)
slot
- locaton within the list of index set allocationpublic Mesh.Primitive getPrimitive(int slot)
slot
- locaiton within the list of index set primitives