rglIds {rgl} | R Documentation

## rgl id values

### Description

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.

### Usage

    lowlevel(ids = integer())
    highlevel(ids = integer())
    ## S3 method for class 'rglId'
    print(x,
          rglwidget = getOption("rgl.printRglwidget", FALSE),
          ...)

### Arguments

`ids` | A vector of object ids.
`x` | An `"rglId"` object to print.
`rglwidget` | 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.

### Details

These functions and classes are intended to allow rgl scenes to be automatically displayed in R Markdown documents. However, this is not fully in place yet, so explicit `rglwidget()` calls are still recommended.

Note that all objects in the current scene will be printed by default, not just the ids in `x`. (The reason for this is that lights are also objects; printing objects without lights would rarely make sense.)

### Value

Objects of class `c("rglHighlevel", "rglId", "numeric")` or `c("rglLowlevel", "rglId", "numeric")`.

### Author(s)

Duncan Murdoch

### Examples

    x <- matrix(rnorm(30), ncol = 3, dimnames = list(NULL, c("x", "y", "z")))
    p <- plot3d(x, type = "s")
    str(p)
    if (interactive())
      print(p, rglwidget = TRUE)

[Package rgl version 0.96.0 Index]