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 clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window.
Web browsers do not support MATLAB commands.
Seleziona un sito web
Seleziona un sito web per visualizzare contenuto tradotto dove disponibile e vedere eventi e offerte locali. In base alla tua area geografica, ti consigliamo di selezionare: .
Puoi anche selezionare un sito web dal seguente elenco:
Come ottenere le migliori prestazioni del sito
Per ottenere le migliori prestazioni del sito, seleziona il sito cinese (in cinese o in inglese). I siti MathWorks per gli altri paesi non sono ottimizzati per essere visitati dalla tua area geografica.