Converts the quads in a mesh version of an object to triangles by splitting them up. Optionally drops any point or segment components.
as.tmesh3d(x, ...) # S3 method for default as.tmesh3d(x, drop = FALSE, ...) # S3 method for mesh3d as.tmesh3d(x, drop = FALSE, keepTags = FALSE, ...)
An object from which to create a triangular mesh object.
TRUE, drop any point or segment components.
Whether to include the
"tags" component in the output.
Ignored in the
mesh3d method, passed to
as.mesh3d in the default method.
The default method simply calls
and passes the result to the
Older versions of rgl had a
for meshes of triangles. That class is no longer used:
tmesh3d both produce
"mesh3d" object containing no quads. If
drop = TRUE, it will only contain triangles.
keepTags = TRUE, a
"tags" element will be
added to the result. For details, see the
as.triangles3d to get just the coordinates.
x <- cuboctahedron3d() x # has quads and triangles #> mesh3d object with 12 vertices, 8 triangles, 6 quads. as.tmesh3d(x) # has only triangles #> mesh3d object with 12 vertices, 20 triangles.