-
Notifications
You must be signed in to change notification settings - Fork 21
/
open3d.Rd
118 lines (94 loc) · 3.74 KB
/
open3d.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
\name{open3d}
\alias{open3d}
\alias{close3d}
\alias{cur3d}
\alias{set3d}
\alias{getr3dDefaults}
\alias{r3dDefaults}
\alias{rgl.dev.list}
\alias{rgl.quit}
\title{Work with RGL windows}
\description{
\code{open3d} opens a new RGL window; \code{cur3d} returns the device number of the current
window; \code{close3d} closes one or more windows.
}
\usage{
open3d(\dots, params = getr3dDefaults(),
useNULL = rgl.useNULL(), silent = FALSE)
close3d(dev = cur3d(), silent = TRUE)
cur3d()
rgl.dev.list()
set3d(dev, silent = FALSE)
getr3dDefaults(class = NULL, value = NULL)
r3dDefaults
rgl.quit()
}
\arguments{
\item{\dots}{arguments in \code{name = value} form, or a list of named
values. The names must come from the graphical
parameters described in \code{\link{par3d}}.}
\item{params}{a list of graphical parameters}
\item{useNULL}{whether to use the null graphics device}
\item{dev}{which device to close or use}
\item{silent}{whether report on what was done}
\item{class, value}{names of components to retrieve}
}
\details{
\code{open3d} opens a new RGL device, and sets the parameters as
requested. The \code{r3dDefaults} list returned by the
\code{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 \code{mouseMode} to
\code{(zAxis, zoom, fov)}, and the field of view to 30 degrees. \code{useFreeType} defaults to \code{FALSE} on
Windows; on other systems it indicates the availability
of FreeType.
Users may create their own variable named \code{r3dDefaults} in the global
environment and it will override the installed one. If there
is a \code{bg} element in the list or the arguments, it should be
a list of arguments to pass to the \code{\link{bg3d}} function to
set the background.
The arguments to \code{open3d} may include \code{material}, a list
of material properties as in \code{\link{r3dDefaults}}, but note
that high level functions such as \code{\link{plot3d}} normally use
the \code{r3dDefaults} values in preference to this setting.
If \code{useNULL} is \code{TRUE}, RGL will use a \dQuote{null}
device. This device records objects as they are plotted, but
displays nothing. It is intended for use with \code{\link{rglwidget}}.
}
\value{
The \code{open3d} function returns the device that
was opened. If
\code{silent = TRUE}, it is returned invisibly.
The \code{cur3d} function returns the current device,
or the value 0 if there isn't one. \code{rgl.dev.list}
returns a vector of all open devices. Items are named
according to the type of device: \code{null} for a hidden
null device,
\code{wgl} for a Windows device, and \code{glX} for an X windows device.
\code{set3d} returns the device number of the
previously active device.
The \code{close3d} function returns the new current
device, invisibly.
The \code{r3dDefaults} variable is a list containing default
settings. The \code{getr3dDefaults} function searches the user's
global environment for \code{r3dDefaults} and returns the
one in the RGL namespace if it was not found there.
The components of the list may include any settable \code{par3d}
parameter, or \code{"material"}, which should include a list
of default \code{\link{material3d}} properties, or \code{"bg"},
which is a
list of defaults to pass to the \code{\link{bg3d}} function.
\code{rgl.quit} attempts to unload \pkg{rgl} and then returns
\code{NULL} invisibly.
}
\seealso{
\code{\link{rgl.useNULL}} for default usage of null device.
}
\examples{
r3dDefaults
open3d()
shade3d(cube3d(color = rainbow(6), meshColor = "faces"))
cur3d()
}
\keyword{dynamic}