Find tags on rgl objects.
tagged3d.RdObjects 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.
Arguments
A vector of tags to use for selection.
- ids
A vector of ids to report the tags on.
- full
logical; whether to return a dataframe containing
id,type,tag, or a vector of ids or tags.- subscene
Where to look: by default, the whole scene is searched.
NArestricts the search to the current subscene, or a subscene id can be given.
Value
A dataframe is constructed with columns
- id
item id
- type
item type
- tag
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).
Examples
open3d()
ids <- plot3d(rnorm(10), rnorm(10), rnorm(10), tag = "plot")
unclass(ids)
#> data axes xlab ylab zlab
#> 2094 2095 2096 2097 2098
tagged3d("plot")
#> [1] 2094 2096 2097 2098 2095
tagged3d(ids = ids, full = TRUE)
#> id type tag
#> 1 2094 points plot
#> 6 2095 bboxdeco plot
#> 2 2096 text plot
#> 3 2097 text plot
#> 4 2098 text plot