File tree Expand file tree Collapse file tree 1 file changed +7
-13
lines changed Expand file tree Collapse file tree 1 file changed +7
-13
lines changed Original file line number Diff line number Diff line change @@ -11,20 +11,14 @@ vertex_descriptors can be hashed in constant time (they are just pointers).
11
11
12
12
## Creating Tree Views
13
13
TreeViews can be created by calling `` getTree() `` and providing a root node.
14
+ <pre ><code data-snippetId =" graph_trees_get_1 " data-file =" https://raw.githubusercontent.com/envire/envire-tutorials/master/src/envire_graph_tutorials/trees.cpp " ></code ></pre >
14
15
15
- ``` cpp
16
- EnvireGraph g;
17
- const FrameId a = " frame_a" ;
18
- /* ... */
19
- TreeView view = g.getTree(graph.vertex(a));
20
- ```
21
16
Note that the view will most likely be copied on return. If the tree is large
22
17
you might want to avoid that copy and pass an empty view as out-parameter instead:
18
+ <pre ><code data-snippetId =" graph_trees_get_2 " data-file =" https://raw.githubusercontent.com/envire/envire-tutorials/master/src/envire_graph_tutorials/trees.cpp " ></code ></pre >
23
19
24
- ``` cpp
25
- EnvireGraph g;
26
- const FrameId a = " frame_a" ;
27
- /* ... */
28
- TreeView view;
29
- g.getTree(a, &view);
30
- ```
20
+ By default, a tree view shows a snapshot of the graph. I.e. if the graph changes,
21
+ the changes will not be visible in the view. The view or parts of it might
22
+ become invalid when vertices or edges are removed from the graph.
23
+ To avoid this, you can request a self-updating tree view:
24
+ <pre ><code data-snippetId =" graph_trees_get_3 " data-file =" https://raw.githubusercontent.com/envire/envire-tutorials/master/src/envire_graph_tutorials/trees.cpp " ></code ></pre >
You can’t perform that action at this time.
0 commit comments