| United States-English |
|
|
|
![]() |
Starbase Display List Programmer's Manual: HP 9000 Series 700 Computers > Chapter 7 Display List EditingTraversal Control |
|
Both the display and pick traversal processes can be controlled by their respective user-definable controls:
Traversal control elements are elements that can be placed in a segment to control the display or pick traversal process. Pick traversal control affects the detectability or ability to pick parts of the segment network. Display traversal control elements affect both display and pick traversal (this is necessary so a pick operation does not pick an invisible object), pick traversal control elements only affect pick traversal, and segment- and element-control elements control either or both. The two routines that set traversal control (i.e., the ones that insert display-traversal control and pick-traversal control elements into the open segment) are set_disp_traversal_control and set_pick_traversal_control:
where:
The following figure shows how different values of 〈control〉 would affect the display of the segment network shown. Assuming the previous display list, and having a 〈control〉 parameter value of TRAVERSAL_CONTINUE in effect, the output would be: Assuming the previous display list, and having a 〈control〉 parameter value of TRAVERSAL_RETURN in effect, the output would be: And finally, assuming the previous display list, and having a 〈control〉 parameter value of TRAVERSAL_ABORT in effect, the output would be: The traversal depth is defined to be the depth into the hierarchical structure of the currently traversed segment. At the start of the traversal process, the traversal depth is 0. Each time a call_segment or execute_segment element (conditional or not) is traversed, the traversal depth is incremented. As the traversal process proceeds deeper into a segment network the traversal depth increases. Similarly, when traversal of a segment is terminated and control is returned to its parent segment, the traversal depth is decremented. Display List maintains a value for its maximum traversal depth; by default, it is 42. When the maximum traversal depth would be exceeded during traversal, a warning is generated and the segment referenced by the call_segment or execute_segment element is not traversed. You can define your own value for the maximum traversal depth by calling set_traversal_depth and specifying an appropriate value. You can inquire the maximum depth with inq_traversal_depth:
where:
The maximum traversal depth prevents infinite looping when traversing recursive networks. Each segment and element in a display list has two more attributes: visibility and pickability. The default value of these attributes is visible and pickable. The attributes are controlled and inquired by the seg_control, inq_seg_control, ele_control and inq_ele_control calls, respectively:
where:
Unlike traversal control elements and filters, an element's DISP_IGNORE flag does not affect its pickability. To affect both visibility and pickability, use both flags. Also, if an element is normally invisible/unpickable (e.g., application_data) it cannot be made visible/pickable by clearing control flags. |
|||||||||||||||||||||||||||||||
|
|||||||||||||||