This is a function to produce actions in a web display. A
playwidget or Shiny
input control (e.g. a sliderInput control)
sets a value which controls attributes of a selection of vertices.
The value to use for input (typically input$value
in a Shiny app.) Not needed with playwidget.
values
A matrix of values, each row corresponding to an input value.
vertices
Which vertices are being controlled? Specify vertices as a number from 1 to
the number of vertices in the objid.
attributes
A vector of attributes of a vertex,
from c("x", "y", "z", "red", "green", "blue", "alpha", "nx", "ny", "nz",
"radius", "ox", "oy", "oz", "ts", "tt"). See
Details.
objid
A single rgl object id.
param
Parameter values corresponding to each row of values.
interp
Whether to interpolate between rows of values.
Details
Like rgl::vertexSetter, this function
modifies attributes of vertices in a single
object. The attributes are properties of each vertex
in a scene; not all are applicable to all objects. In order,
they are: coordinates of the vertex "x", "y", "z", color
of the vertex "red", "green", "blue", "alpha", normal at the vertex
"nx", "ny", "nz", radius of a sphere at the vertex
"radius", origin within a texture "ox", "oy" and
perhaps "oz", texture coordinates "ts", "tt".
If only one attribute of one vertex is specified, values may
be given as a vector and will be treated as a one-column matrix. Otherwise
values must be given as a matrix with ncol(values) == max(length(vertices),
length(attributes)).
The value argument is translated into a row (or two rows if
interp = TRUE) of values
by finding its location in param.
Value
A list of class "rglControl" of cleaned up parameter
values, to be used in an rgl widget.