Modifier and Type | Field and Description |
---|---|
static int |
COLOR
Deprecated.
in API 16
|
static int |
NORMAL
Deprecated.
in API 16
|
static int |
TEXTURE_0
Deprecated.
in API 16
|
Constructor and Description |
---|
TriangleMeshBuilder(RenderScript rs,
int vtxSize,
int flags)
Deprecated.
in API 16
|
Modifier and Type | Method and Description |
---|---|
Mesh.TriangleMeshBuilder |
addTriangle(int idx1,
int idx2,
int idx3)
Deprecated.
in API 16
Adds a new triangle to the mesh builder
|
Mesh.TriangleMeshBuilder |
addVertex(float x,
float y)
Deprecated.
in API 16
Adds a float2 vertex to the mesh
|
Mesh.TriangleMeshBuilder |
addVertex(float x,
float y,
float z)
Deprecated.
in API 16
Adds a float3 vertex to the mesh
|
Mesh |
create(boolean uploadToBufferObject)
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)
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)
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)
Deprecated.
in API 16
Sets the texture coordinate for the vertices that are added after this method call.
|
public static final int COLOR
public static final int NORMAL
public static final int TEXTURE_0
public TriangleMeshBuilder(RenderScript rs, int vtxSize, int flags)
rs
- Context to which the mesh will belong.vtxSize
- specifies whether the vertex is a float2 or
float3flags
- bitfield that is a combination of COLOR, NORMAL,
and TEXTURE_0 that specifies what vertex data
channels are present in the meshpublic Mesh.TriangleMeshBuilder addVertex(float x, float y)
x
- position xy
- position ypublic Mesh.TriangleMeshBuilder addVertex(float x, float y, float z)
x
- position xy
- position yz
- position zpublic Mesh.TriangleMeshBuilder setTexture(float s, float t)
s
- texture coordinate st
- texture coordinate tpublic Mesh.TriangleMeshBuilder setNormal(float x, float y, float z)
x
- normal vector xy
- normal vector yz
- normal vector zpublic Mesh.TriangleMeshBuilder setColor(float r, float g, float b, float a)
r
- red componentg
- green componentb
- blue componenta
- alpha componentpublic Mesh.TriangleMeshBuilder addTriangle(int idx1, int idx2, int idx3)
idx1
- index of the first vertex in the triangleidx2
- index of the second vertex in the triangleidx3
- index of the third vertex in the trianglepublic Mesh create(boolean uploadToBufferObject)
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