tagged3d.Rd
Objects with material properties may have an arbitrary string set as a tag. This function retrieves the id values associated with a given tag, or the tags set on given ids.
tagged3d(tags = NULL, ids = NULL, full = FALSE, subscene = 0)
A vector of tags to use for selection.
A vector of ids to report the tags on.
logical; whether to return
a dataframe containing id
, type
, tag
,
or a vector of ids or tags.
Where to look: by default, the whole scene is searched.
NA
restricts the search to the current subscene,
or a subscene id can be given.
Exactly one of tags
and ids
must be specified.
A dataframe is constructed with columns
item id
item type
item tag
matching the specified tags
or ids
value.
If full = TRUE
, the full dataframe is returned, otherwise
just the requested ids or tags.
If ids
is specified, the return value will be
in the same order
as ids
).
open3d()
ids <- plot3d(rnorm(10), rnorm(10), rnorm(10), tag = "plot")
unclass(ids)
#> data axes xlab ylab zlab
#> 2099 2100 2101 2102 2103
tagged3d("plot")
#> [1] 2099 2101 2102 2103 2100
tagged3d(ids = ids, full = TRUE)
#> id type tag
#> 1 2099 points plot
#> 6 2100 bboxdeco plot
#> 2 2101 text plot
#> 3 2102 text plot
#> 4 2103 text plot