rgl.attrib.info.Rd
These functions give information about the attributes of
RGL objects. rgl.attrib.info
is the more
“user-friendly” function; rgl.attrib.count
is a
lower-level function more likely to be used in programming.
rgl.attrib.info(id = ids3d("all", 0)$id, attribs = NULL, showAll = FALSE)
rgl.attrib.count(id, attrib)
One or more RGL object ids.
A character vector of one or more attribute names.
Should attributes with zero entries be shown?
A single attribute name.
See the first example below to get the full list of attribute names.
A dataframe containing the following columns:
The id of the object.
The full name of the attribute.
The size of matrix that would be returned
by rgl.attrib
for this attribute.
rgl.attrib
to obtain the attribute values.
open3d()
id <- points3d(rnorm(100), rnorm(100), rnorm(100), col = "green")
rgl.attrib.info(id, showAll = TRUE)
#> id attrib nrow ncol
#> 1 1546 vertices 100 3
#> 2 1546 normals 0 3
#> 3 1546 colors 1 4
#> 4 1546 texcoords 0 2
#> 5 1546 dim 0 2
#> 6 1546 texts 0 1
#> 7 1546 cex 0 1
#> 8 1546 adj 0 3
#> 9 1546 radii 0 1
#> 10 1546 centers 100 3
#> 11 1546 ids 0 1
#> 12 1546 usermatrix 0 4
#> 13 1546 types 0 1
#> 14 1546 flags 1 1
#> 15 1546 offsets 0 1
#> 16 1546 family 0 1
#> 17 1546 font 0 1
#> 18 1546 pos 0 1
#> 19 1546 fogscale 0 1
#> 20 1546 axes 0 3
#> 21 1546 indices 0 1
#> 22 1546 shapenum 0 1
rgl.attrib.count(id, "vertices")
#> [1] 100
merge(rgl.attrib.info(), ids3d("all"))
#> id attrib nrow ncol type
#> 1 1544 colors 3 4 light
#> 2 1544 flags 2 1 light
#> 3 1544 vertices 1 3 light
#> 4 1545 flags 4 1 background
#> 5 1545 fogscale 1 1 background
#> 6 1545 colors 1 4 background
#> 7 1545 centers 1 3 background
#> 8 1546 colors 1 4 points
#> 9 1546 centers 100 3 points
#> 10 1546 vertices 100 3 points
#> 11 1546 flags 1 1 points