Description Usage Arguments Value Author(s) See Also Examples
View source: R/as.mesh3d.default.R
A mesh object can have the same vertex listed twice. Each copy is
allowed to have separate normals, texture coordinates, and color.
However, it is more efficient to have just a single copy if those
differences aren't needed. For automatic smoothing using
addNormals
, triangles and quads need to share vertices.
This function merges identical (or similar) vertices to achieve this.
1 2 3 4 | mergeVertices(mesh,
notEqual = NULL,
attribute = "vertices",
tolerance = sqrt(.Machine$double.eps))
|
mesh |
A |
notEqual |
A logical matrix indicating that certain pairs should not be merged even if they appear identical. |
attribute |
Which attribute(s) should be considered in comparing vertices?
A vector chosen from |
tolerance |
When comparing vertices using |
A new mesh object.
Duncan Murdoch
as.mesh3d.rglId
, which often constructs mesh
objects containing a lot of duplication.
1 2 3 4 |
Warning messages:
1: In rgl.init(initValue, onlyNULL) : RGL: unable to open X11 display
2: 'rgl.init' failed, running with 'rgl.useNULL = TRUE'.
mesh3d object with 8 vertices, 0 triangles and 6 quads.
mesh3d object with 24 vertices, 12 triangles and 0 quads.
mesh3d object with 8 vertices, 12 triangles and 0 quads.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.