Convert a misc3d Triangles3D iso-surface to a coloredmesh.
Source:R/coloredmesh.R
Triangles3D.to.coloredmesh.RdConvert a misc3d::contour3d(draw = FALSE) result (an iso-surface mesh of class 'Triangles3D', e.g., as returned by volvis.contour) into an fs.coloredmesh. This allows rendering volume iso-surfaces with ANY renderer backend: while the rgl backend can render 'Triangles3D' instances directly, the scimesh backend requires fs.coloredmesh instances and converts them automatically, so you normally do not need to call this function yourself.
Arguments
- tris
a 'Triangles3D' instance as returned by
misc3d::contour3d(draw = FALSE)orvolvis.contour, or a list of such instances (e.g., when multiple frames of a 4D volume were extracted withframe = "all").- hemi
character string or NULL, the hemisphere for the resulting coloredmesh. 'Triangles3D' iso-surfaces are not hemisphere-specific, so this defaults to NULL. See
fs.coloredmesh.- add_normals
logical, whether to compute per-vertex normals for the mesh. Required for correct lighting in the scimesh backend, defaults to TRUE.