to top
Android APIs
public static class

Mesh.TriangleMeshBuilder

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

This class is deprecated.
in API 16 Builder that allows creation of a mesh object point by point and triangle by triangle

Summary

Constants
int COLOR This constant is deprecated. in API 16
int NORMAL This constant is deprecated. in API 16
int TEXTURE_0 This constant is deprecated. in API 16
Public Constructors
Mesh.TriangleMeshBuilder(RenderScript rs, int vtxSize, int flags)
This constructor is deprecated. in API 16
Public Methods
Mesh.TriangleMeshBuilder addTriangle(int idx1, int idx2, int idx3)
This method is deprecated. in API 16 Adds a new triangle to the mesh builder
Mesh.TriangleMeshBuilder addVertex(float x, float y, float z)
This method is deprecated. in API 16 Adds a float3 vertex to the mesh
Mesh.TriangleMeshBuilder addVertex(float x, float y)
This method is deprecated. in API 16 Adds a float2 vertex to the mesh
Mesh create(boolean uploadToBufferObject)
This method is deprecated. in API 16 Creates the mesh object from the current state of the builder
Mesh.TriangleMeshBuilder setColor(float r, float g, float b, float a)
This method is deprecated. in API 16 Sets the color for the vertices that are added after this method call.
Mesh.TriangleMeshBuilder setNormal(float x, float y, float z)
This method is deprecated. in API 16 Sets the normal vector for the vertices that are added after this method call.
Mesh.TriangleMeshBuilder setTexture(float s, float t)
This method is deprecated. in API 16 Sets the texture coordinate for the vertices that are added after this method call.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int COLOR

Since: API Level 11

This constant is deprecated.
in API 16

Constant Value: 1 (0x00000001)

public static final int NORMAL

Since: API Level 11

This constant is deprecated.
in API 16

Constant Value: 2 (0x00000002)

public static final int TEXTURE_0

Since: API Level 11

This constant is deprecated.
in API 16

Constant Value: 256 (0x00000100)

Public Constructors

public Mesh.TriangleMeshBuilder (RenderScript rs, int vtxSize, int flags)

Since: API Level 11

This constructor is deprecated.
in API 16

Parameters
rs Context to which the mesh will belong.
vtxSize specifies whether the vertex is a float2 or float3
flags bitfield that is a combination of COLOR, NORMAL, and TEXTURE_0 that specifies what vertex data channels are present in the mesh

Public Methods

public Mesh.TriangleMeshBuilder addTriangle (int idx1, int idx2, int idx3)

Since: API Level 11

This method is deprecated.
in API 16 Adds a new triangle to the mesh builder

Parameters
idx1 index of the first vertex in the triangle
idx2 index of the second vertex in the triangle
idx3 index of the third vertex in the triangle
Returns
  • this

public Mesh.TriangleMeshBuilder addVertex (float x, float y, float z)

Since: API Level 11

This method is deprecated.
in API 16 Adds a float3 vertex to the mesh

Parameters
x position x
y position y
z position z
Returns
  • this

public Mesh.TriangleMeshBuilder addVertex (float x, float y)

Since: API Level 11

This method is deprecated.
in API 16 Adds a float2 vertex to the mesh

Parameters
x position x
y position y
Returns
  • this

public Mesh create (boolean uploadToBufferObject)

Since: API Level 11

This method is deprecated.
in API 16 Creates the mesh object from the current state of the builder

Parameters
uploadToBufferObject specifies whether the vertex data is to be uploaded into the buffer object indicating that it's likely not going to be modified and rendered many times. Alternatively, it indicates the mesh data will be updated frequently and remain in script accessible memory

public Mesh.TriangleMeshBuilder setColor (float r, float g, float b, float a)

Since: API Level 11

This method is deprecated.
in API 16 Sets the color for the vertices that are added after this method call.

Parameters
r red component
g green component
b blue component
a alpha component
Returns
  • this

public Mesh.TriangleMeshBuilder setNormal (float x, float y, float z)

Since: API Level 11

This method is deprecated.
in API 16 Sets the normal vector for the vertices that are added after this method call.

Parameters
x normal vector x
y normal vector y
z normal vector z
Returns
  • this

public Mesh.TriangleMeshBuilder setTexture (float s, float t)

Since: API Level 11

This method is deprecated.
in API 16 Sets the texture coordinate for the vertices that are added after this method call.

Parameters
s texture coordinate s
t texture coordinate t
Returns
  • this