A widget library for large scale displays and immersive environments


An example of widgets rendered to a cube texture
In CAVE2, most omegalib applications display a user interface using the 3D menu system. On menus, it is possible to create a variety of standard controls like buttons, sliders, sub-menus etc. Internally, the menu system makes use of the omegalib widget library, which is part of omegaToolkit. This library is designed to support rendering of 2D widgets on large scale, cluster-driven displays. Since we want to support stereo displays, the widget library supports 3D renderingWidget containers can draw themselves to arbitrary surfaces in the scene. That's how the menu system 3D mode works, but you can do the same with your own widgets, using the Container3DSettings class. Container output planes can also be attached to scene nodes, using the Container3DSettings.node  property. For instance, you can attach a 3D mode container to the default camera, to implement a 3D heads-up display. Or you can attach it to a movable object in the scene, to create a floating 3D label that follows the object. The Text3D class can be used for simple text-only labels, but the widget library gives you a lot more flexibility with your label design, and the kinds of data you can put on it. If you need more control over the output surface, you can also grab the container output texture directly and use it as a 3D object texture. See https://github.com/uic-evl/omegalib/blob/master/examples/python/uitotexture.py for an example of this.

Of course the widget library can be used to draw classic 2D interfaces. The ohelloWidgets C++ demo shows how to use the widget toolkit for 2D drawing. It also shows how to create custom widgets using OpenGL.
Widgets, widgets everywhere!
In order to support very different devices like your laptop, OmegaDesk, touch walls and CAVE2, the widget library accepts a variety of input sources to control interaction. Like the rest of omegalib, input handling is based on omicron, making it possible to interact with widgets using mouse pointers, SAGE pointers, touch screens, gamepads, tracked wands etc. In particular, widgets support both pointer-based and gamepad-based interaction. An interface can be used with a mouse or navigated with a game controller d-pad. The interaction mode (and a bunch of other properties of the widget library) can be specified in the omegalib configuration file.

When using gamepad navigation, the widget library does most of the work for you. For instance, putting widgets in a vertical layout container, will automatically set up navigation so that pressing the up/down buttons on a gamepad will move widget selection up and down. The same happens for horizontal containers. For free-layouts, or for navigation between containers, you can explicitly `link` widgets together to tell omegalib how interface navigation should work. This is done using the Widgets setPrevHorizontalWidget, setPrevVerticalWidget, setNextHorizontalWidget  and setNextVerticalWidget methods. The menuColumns example shows how to use custom navigation to create a multi-column menu.

Comments

Popular posts from this blog

Parallel Gaussian Elimination Using MPI

Parallel Beam Tracing and Visualization of 200 Million Sonar Points

Flickering 2D transform elements in Chrome: a simple fix