March Tech Tip: Vizdlg Dialog Boxes

March 25, 2015


Vizard’s vizdlg library includes a number of dialog boxes for eliciting user input and displaying messages. These include a ChooseDialog that displays a drop list of options, an AskDialog that displays multiple options as buttons, an InputDialog for typing in values, and much more. The vizdlg dialogs provide similar functionality to the vizinput dialogs without causing a blocking action that halts the rendering of the world. In addition, vizdlg dialogs can be added to a GUI canvas which can be rendered in the world for stereo applications. Run the following code and press different buttons on the AskDialog to change the world model:

In the example above the dialog box is rendered to the screen. This works well for non-stereo desktop setups. For GUIs to appear properly to the user in stereo applications they should be rendered in the world. Add the following code immediately after the viz.go() statement to place the dialog box on a GUI canvas. The GUI canvas is rendered in the world at a fixed distance from the viewpoint so it can be comfortably viewed in a stereo application:

Stay Updated
Subscribe to our monthly Newsletter
Phone +1 (888) 841-3416
Fax +1 (866) 226-7529
813 Reddick St
Santa Barbara, CA 93103