addMesh(actor,vertices,normals,faces)
adds a partial mesh defined by vertices, normals,
and faces to the actor specified by actor. The
resulting geometric mesh creates a single body.
addMesh(___,tcoords,vcolor)
adds a mesh additionally defined by the texture coordinates tcoords and
the vertex colors vcolor.
Vertex positions, specified as an N-by-3 matrix. This matrix includes the
coordinates of all vertex positions to be used for the mesh
geometry. Each vertex has a vertex ID equal to its row number in
the matrix. N specifies the number of
vertices.
Vertices of each triangular face, specified as
an M-by-3 matrix. This matrix defines how each triangle of the mesh is
drawn. The matrix specifies the vertex IDs that define each triangular face of the mesh.
M is the number of triangular faces in the mesh.
Example: faces = [0 3 2; 0 2 1; 4 6 7;
4 5 6]
Data Types: double
Normal vectors of each vertex, specified as an N-by-3 matrix. Each
row of the matrix specifies the normal vector for a vertex. This matrix must be the same
size as vertices matrix.
Vertex colors, specified as an N-by-3 matrix. This matrix specifies the
color value of each vertex in the [R G B] form. This matrix must be the
same length as vertices.
Note
To display vcolor along with the actor base color, set the
VertexBlend property to a value greater than 0. If
VertexBlend is 1, then actor displays only the
vcolor.
Texture coordinates for each vertex, specified as an N-by-2 matrix. This
matrix defines which point on the texture file maps to each of
the vertices. This matrix must be the same length as
vertices.
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.