On 29/07/2020 5:35 p.m., Byron Dom via R-help wrote:
How can I access the C++ source associated with the rgl function shade3d. More
specifically, I'm interested in the part of the code used by arrow3d to draw
arrow heads.
I'm not familiar with how GitHub is organized and I've put in a lot of effort
doing searches there and on the web in general. The result has been a few
fragments of rgl C++ code but not what I'm looking for.
shade3d() is purely written in R: so just type "shade3d" and you'll see
that it's a generic function. Most commonly it is used on objects of
type "mesh3d", so type "rgl:::shade3d.mesh3d" and you can see the full
source. It makes calls to other R functions; C++ doesn't come in until
it has chosen to draw triangles or quadrilaterals. I think you probably
don't care about how those are drawn, but let me know if you are.
The arrow3d function is also a pure R function, but not a generic. You
can see the source by typing "arrow3d".
Duncan Murdoch
______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.