displaz icon indicating copy to clipboard operation
displaz copied to clipboard

Axis alignment tools

Open c42f opened this issue 12 years ago • 8 comments

Create UI elements to align the view with the axes.

c42f avatar Aug 22 '13 11:08 c42f

Hot keys to align the view is probably fairly straight forward. Do you want a google-earth style compass widget on the window? This is probably unnecessary once the axis symbols are implemented. Paraview uses buttons like these - do you want something similar? On the GL window or as a separate toolbar? untitled If we build a toolbar then we could use it to also implement the distance measuring stuff.

gphysics avatar Jun 12 '15 22:06 gphysics

I've got a strong preference for minimalism in the UI where possible - if I thought it would be usable I'd just bind everything to keyboard shortcuts and keep the screen free to view the data! Obviously not going to work though, nobody would be able to find anything... including me.

For the kind of datasets we use at work, I think it would suffice to have a single "align" keyboard shortcut to view from above, with +x to the right and +y up. Actually this is quite like google earth which uses R for the same thing. To avoid being jarring, it would be nice to animate the rotation. We'd better keep it snappy though, nobody working on data seriously wants to wait around for the UI to do pretty zooming and panning.

The 3D axis widget is basically implemented in #47. It might be possible to enhance it so that clicking there does something useful with aligning the axes. Actually, how about this for general axis alignment: holding the "align" hotkey and dragging the rotate (left) mouse button snaps the angles in coarse discrete jumps (90, 45, 30 or 15 degrees I guess; needs experimentation). Advantages:

  • No excess of UI clutter
  • Actually getting the direction you want is intuitive, since it uses the same drag-to-rotate idioim as normal non-snapped rotation.
  • The same keyboard shortcut can be reused for the default "view from above" if you press it without dragging the mouse. I've seen programs like sublime text do this kind of shortcut overloading really really well - just use the same shortcut for a bunch of related actions, and deduce which one was desired from programmatic context. The only disadvantage is discoverability. This might be addressed by a status bar showing context-dependent actions when a hotkey is held, and having the default hotkey action in the menu. Inkscape is an example of where this is done quite well.

TBH, I think the paraview toolbar is a bit of a horror show of nonintuitive clickyness and wasted screen realestate ;-) "When all you have is a toolbar, every user interaction looks like a button".

c42f avatar Jun 13 '15 04:06 c42f

I like your ideas. I also get very frustrated with UI's that waste useful pixels on stuff you don't want to see. Yes I also thought a simple animate transition would be useful for the large view changes, but perhaps unnecessary for 15 deg jumps.

gphysics avatar Jun 13 '15 06:06 gphysics

For distance measurement, I currently use the log text which is adequate but not great because it lacks a graphical representation of the two points which were selected. I think potree has some useful ideas for this, so it's worth looking at as an example: http://potree.org/demo/potree_2014.12.30/examples/viewer.html

The basic idea would be to allow two or more points to be selected as a set of points of interest, and draw lines between these with some graphical representation of the distance (also might be worth putting it the log window for maximum copy&paste-ability.

See also #26, which is related - we might consider that the user wants (in general) to be able to select and measure N-dimensional primitives, at least for N=0,1,2 and possibly 3. Actually, measurement is a completely separate issue to the axis alignment stuff. I'll open a new issue for it.

c42f avatar Jun 13 '15 06:06 c42f

New issue #53 created for discussion about measurement tools.

c42f avatar Jun 13 '15 07:06 c42f

One thought on this is to have a keybinding for "snapping" to the nearest axis-aligned orientation. It's a matter of inspecting the 3x3 rotation/scale portion of the view matrix. For 30 degree or 15 degree increments, there could be keyboard modifiers for the existing mouse-based interaction.

nigels-com avatar Jun 13 '15 08:06 nigels-com

I prefer to have a single modifier key if we can get away with it. A separate key for snapping to 90 degress is a good idea if a single modifier doesn't seem to be working well.

Related complication: I'm not sure how this all works when considering camera roll as well (ie, what sensible snapping can be done in trackball mode?)

c42f avatar Jun 13 '15 10:06 c42f

(I mean to say - I do like the idea of a special keybinding for 90 degree snapping and it could be really useful in certain circumstances (say you were viewing CAD models). I just need to be convinced that it's in scope for displaz which so far is usually used for geospatial data. In this case the need to have snapping to most principle directions is reduced since the only really blessed orientation is the plan view with north=up)

c42f avatar Jun 13 '15 10:06 c42f