Work with RGL windows
open3d
opens a new RGL window; cur3d
returns the device number of the current
window; close3d
closes one or more windows.
open3d(..., params = getr3dDefaults(), useNULL = rgl.useNULL(), silent = FALSE) close3d(dev = cur3d(), silent = TRUE) cur3d() set3d(dev, silent = FALSE) getr3dDefaults(class = NULL, value = NULL) r3dDefaults
... |
arguments in |
params |
a list of graphical parameters |
useNULL |
whether to use the null graphics device |
dev |
which device to close or use |
silent |
whether report on what was done |
class, value |
names of components to retrieve |
open3d
opens a new RGL device, and sets the parameters as
requested. The r3dDefaults
list returned by the
getr3dDefaults
function will be used as default
values for parameters. As installed this sets the point of view to
'world coordinates' (i.e. x running from left to right, y from front
to back, z from bottom to top), the mouseMode
to
(zAxis, zoom, fov)
, and the field of view to 30 degrees. useFreeType
defaults to FALSE
on
Windows; on other systems it indicates the availability
of FreeType.
Users may create their own variable named r3dDefaults
in the global
environment and it will override the installed one. If there
is a bg
element in the list or the arguments, it should be
a list of arguments to pass to the bg3d
function to
set the background.
The arguments to open3d
may include material
, a list
of material properties as in r3dDefaults
, but note
that high level functions such as plot3d
normally use
the r3dDefaults
values in preference to this setting.
If useNULL
is TRUE
, RGL will use a “null”
device. This device records objects as they are plotted, but
displays nothing. It is intended for use with rglwidget
.
The open3d
function returns the device that
was opened. If
silent = TRUE
, it is returned invisibly.
The cur3d
function returns the current device,
or the value 0 if there isn't one.
set3d
returns the device number of the
previously active device.
The close3d
function returns the new current
device, invisibly.
The r3dDefaults
variable is a list containing default
settings. The getr3dDefaults
function searches the user's
global environment for r3dDefaults
and returns the
one in the RGL namespace if it was not found there.
The components of the list may include any settable par3d
parameter, or "material"
, which should include a list
of default material3d
properties, or "bg"
,
which is a
list of defaults to pass to the bg3d
function.
rgl.useNULL
for default usage of null device.
r3dDefaults open3d() shade3d(cube3d(color = rainbow(6), meshColor = "faces")) cur3d()
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.