qqqabbc123 / surfaceplotter

Automatically exported from code.google.com/p/surfaceplotter
0 stars 0 forks source link

Feature request: Keyboard shortcuts for camera movement #4

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The default JSurfacePanel has a nice mouse based movement control. Would be 
good to have keyboard shortcuts too.

Original issue reported on code.google.com by harshad...@gmail.com on 10 Sep 2011 at 9:37

GoogleCodeExporter commented 8 years ago
wht do you suggest ? 

Original comment by e...@ericaro.net on 9 Oct 2011 at 3:56

GoogleCodeExporter commented 8 years ago
Any standard key combos would be fine. Either arrow keys or W,A,S,D.

Thanks.

Original comment by harshad...@gmail.com on 9 Oct 2011 at 3:59

GoogleCodeExporter commented 8 years ago
I've started thinking about it, and here is my opinion:
It's not a good idea to implement it in surfaceplotter.

Not because keyboard navigation is not a great idea (it is) but because surface 
plotter is designed to be a reusable component. Therfore we must make as few 
choices as possible, and provide as many as possible way to control the surface 
panel.
I've looked at the code, and the class Project is really easy to use for a 
simple key binding. ( up/down  would increase/decrease the elevation angle), 
right/left would increase/decrease the roation angle.

There are two many possible options in my opinion ( up would increase or 
decrease the elevation angle, what's natural ?)

so based on the environment you are using surfaceplotter just add four actions: 
In pseudo code this would be:
p = getModel().getProjector();
p.setRotationAngle( p.getRotationAngle()+delta)

where get model is the SurfaceModel accessor.

Original comment by e...@ericaro.net on 9 Oct 2011 at 4:21

GoogleCodeExporter commented 8 years ago

Original comment by e...@ericaro.net on 10 Feb 2012 at 10:06