Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

merge.mesh3d

Merge RGL mesh objects


Description

Attempts to merge "mesh3d" objects. Objects need to be similar enough; see Details.

Usage

## S3 method for class 'mesh3d'
merge(x, y, ..., attributesMustMatch = FALSE)

Arguments

x, y

"mesh3d" objects to merge.

...

Optional additional objects.

attributesMustMatch

See Details.

Details

To allow objects to be merged, they need to be similar enough in terms of having the same list of material properties, normals, texture coordinates, etc.

If attributesMustMatch is TRUE, it is an error to have attributes in one mesh but not in another, and those attributes that only specify a single value must have equal values in all meshes.

If attributesMustMatch is FALSE, any non-matching attributes will be dropped from the final result.

Value

A single "mesh3d" object merging the contents of the arguments.

Author(s)

Duncan Murdoch

Examples

open3d()
# Notice that the alpha setting for the cube is dropped, because
# the other shapes don't specify alpha.
shade3d(merge(cube3d(col="red", alpha = 0.5),
              translate3d(tetrahedron3d(col="green"), 2, 0, 0),
              translate3d(octahedron3d(col="blue"), 4, 0, 0)))

rgl

3D Visualization Using OpenGL

v0.106.8
GPL
Authors
Duncan Murdoch [aut, cre], Daniel Adler [aut], Oleg Nenadic [ctb], Simon Urbanek [ctb], Ming Chen [ctb], Albrecht Gebhardt [ctb], Ben Bolker [ctb], Gabor Csardi [ctb], Adam Strzelecki [ctb], Alexander Senger [ctb], The R Core Team [ctb, cph], Dirk Eddelbuettel [ctb], The authors of Shiny [cph], The authors of knitr [cph], Jeroen Ooms [ctb], Yohann Demont [ctb], Joshua Ulrich [ctb], Xavier Fernandez i Marin [ctb], George Helffrich [ctb], Ivan Krylov [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.