[R] rgl keyboard shortcut for translation on Mac?

Duncan Murdoch murdoch at stats.uwo.ca
Mon Dec 7 03:14:24 CET 2009


Bryan Hanson wrote:
> Hello Everyone.
>
> I¹m on a Mac, using rgl.  Thanks to all the developers and maintainers on
> it!
>
> If I drag the mouse, I can rotate the view, if I hold down the option key or
> the ctrl key and drag, I get scaling (though at times I seem to alter the
> perspective?).  Adding the shift key doesn't seem to modify anything.
>
> So, what I can't find is a key combination that translates the object.  From
> reading various documents about openGL, it seems there might be a toggle
> somewhere, but I need a hint!  Or do I need to install/invoke some
> additional command?
>   

By default there's no translation action attached to a button on any 
platform.  The example code for rgl.setMouseCallbacks puts together most 
of one (though it doesn't work so well if you also rescale, and the 
bounding box isn't calculated perfectly).  It sets it on mouse button 
3:  on my Mac, you get that by Option clicking the main button.  You 
could run pan3d(1) to set it on button 1 if you can't find button 3.

Duncan Murdoch
> Thanks, Bryan
> *************
> Bryan Hanson
> Acting Chair
> Professor of Chemistry & Biochemistry
> DePauw University, Greencastle IN USA
>
>   
>> sessionInfo()
>>     
> R version 2.10.0 RC (2009-10-19 r50172)
> i386-apple-darwin8.11.1
>
> locale:
> [1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8
>
> attached base packages:
> [1] datasets  tools     grid      graphics  grDevices utils     stats
> methods   base     
>
> other attached packages:
>  [1] dichromat_1.2-3    mvbutils_2.5.0     ChemoSpec_1.31     rgl_0.87
> lattice_0.17-26   
>  [6] mvoutlier_1.4      plyr_0.1.9         RColorBrewer_1.0-2
> chemometrics_0.5   som_0.3-4
> [11] robustbase_0.5-0-1 rpart_3.1-45       pls_2.1-0          pcaPP_1.7
> mvtnorm_0.9-8     
> [16] nnet_7.3-1         mclust_3.3.2       MASS_7.3-4         lars_0.9-7
> e1071_1.5-21      
> [21] class_7.3-1 
>
> ______________________________________________
> R-help at r-project.org mailing list
> 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.
>




More information about the R-help mailing list