Simple sprites (used when shapes
is NULL
) are 1 by 1 squares
that are directed towards the viewpoint. Their primary use is for
fast (and faked) atmospherical effects, e.g. particles and clouds
using alpha blended textures. Particles are Sprites using an alpha-blended
particle texture giving the illusion of clouds and gasses.
The centre of each square will be at the coordinates given by x, y, z
.
When shapes
is not NULL
, it should be a vector of
identifers of objects to plot in the scene (e.g. as returned by
plotting functions or by rgl.ids
). These objects will
be removed from the scene and duplicated as a sprite image in a
constant orientation, as specified by userMatrix
. The
origin 0, 0, 0
will be plotted at the coordinates given by x, y, z
.
The userMatrix
argument is ignored for shapes = NULL
. For
shapes, sprites3d
defaults the matrix to r3dDefaults$userMatrix
while rgl.sprites
defaults it to an identity transformation.
If any coordinate is NA
, the sprite is not plotted.
The id values of the shapes are retrieved using rgl.attrib(id, "ids")
;
the user matrix is retrieved using rgl.attrib(id, "usermatrix")
.