rglIds.Rd
All objects in an RGL scene have a
numerical id. These ids are normally stored
in vectors of class c("rglIds", "numeric")
, which
will also have class "rglHighlevel"
or "rglLowlevel"
depending on
whether a high level function like
plot3d
or persp3d
, or a low level function created the objects.
A vector of object ids.
An "rglId"
object to print.
Whether to create and print an RGL widget. If false, nothing is printed.
Other arguments which will be passed to
rglwidget
if it is used.
These functions and classes are intended to allow
RGL scenes to be automatically
displayed in R Markdown documents. See setupKnitr
for details on enabling auto-printing.
Note that all objects in the current
scene will be printed by default, not just
the ids in x
. (One reason for this
is that lights are also objects; printing
objects without lights would rarely make
sense.)
Objects of class "rglId"
, c("rglHighlevel", "rglId",
"numeric")
or c("rglLowlevel", "rglId",
"numeric")
for rglId
, lowlevel
or highlevel
respectively.
x <- matrix(rnorm(30), ncol = 3, dimnames = list(NULL, c("x", "y", "z")))
p <- plot3d(x, type = "s")
str(p)
#> 'rglHighlevel' Named num [1:5] 1658 1659 1660 1661 1662
#> - attr(*, "names")= chr [1:5] "data" "axes" "xlab" "ylab" ...
if (interactive() || in_pkgdown_example())
print(p, rglwidget = TRUE)