Debian Codegraph @

apps/demos/gview/README

raw
1 README for Inventor GraphViewer
2 -------------------------------
3
4 Notes on the "gview" sample program:
5
6 This program creates a window containing an ExaminerViewer on the left
7 and a GraphViewer on the right. Changes to the graph displayed in the
8 GraphViewer are reflected in the 3D scene displayed by the
9 ExaminerViewer. A pulldown menu lets you save the resulting scene
10 graph in "gview.iv".
11
12 Callbacks have been set up so that selecting objects in the left
13 window also selects the appropriate graph icon, and vice-versa.
14 Selecting an icon representing a non-group, non-shape node selects the
15 parent group in the left window.
16
17 Note that the "icons.iv" file must be either in the directory in which
18 the program is run or in a directory named by the "IV_GRAPH_DIR"
19 environment variable. You can create your own "icons.iv" file with
20 your own icon styles in it.
21
22
23 Notes on the GraphViewer component:
24
25 The GraphViewer consists of a main viewer window and a top-bar of
26 pulldown menus. The viewer is derived from SoXtPlaneViewer and has an
27 orthographic camera, so you get only one view of the graph. The left
28 mouse button pans around. The zoom slider or thumbwheel can be used to
29 "zoom" in and out (although only the size of the parallel view volume
30 is really changing).
31
32 When not in viewer mode, the GraphViewer allows you to perform
33 selection (single-selection policy) of icons. You can register
34 selection and deselection callbacks with the viewer. The top-bar menus
35 contain a variety of editing and graph viewing options, including
36 cut/copy/paste, creating new nodes, navigating through the graph, and
37 editing fields of a node. Each menu option has a corresponding
38 keyboard shortcut listed in the menu.
39
40 Double-clicking on an icon initiates the most common action for that
41 type of node. For a group, it toggles the display mode. (It opens the
42 group, showing the children, if the group is closed, and closes it if
43 it is open.) For an instance (looks like an "I"), it shows what
44 node it is an instance of or hides the connection if it is already
45 shown. For any other node, it opens an editor on the fields of the
46 node.
47
48 The GraphViewer does not use data sensors to determine when
49 someone else changes the graph it represents - that would make it much
50 too slow. If you change the graph from within your program, you can
51 call the "update()" method on the GraphViewer or use the "update"
52 menu button.