par3d.save: Save and Restore the par3d Parameters for an rgl Scene
Description
Use this function to make a manually manipulated rgl view reproducible, within sessions or
across sessions. Within an R session, simply use par3d.save
to record
the par3d
parameters for the view(s) to named objects. Across
sessions, use the filename
argument to save these to .rds files
Usage
par3d.save(
params = c("userMatrix", "scale", "zoom", "FOV"),
filename,
dev = rgl.cur()
)par3d.restore(parms, filename)
Value
par3d.save
returns a list with the current values of the
par3d
parameters named in params
.
Arguments
- params
A list of par3d
parameters to save
- filename
Name of a .rds
file to save to or restore from
- dev
The rgl device. Currently unused
- parms
A list of par3d
parameters to restore
Examples
Run this code
if (FALSE) {
library(rgl)
open3d()
# ...
parms <- par3d.save()
# ....
par3d.restore(parms)
}
Run the code above in your browser using DataLab