Hierarchical surfaces are used to manage sequences of vertex splits or collapses which can be different from the initial sequence described by the progressive surface. In this way different branches of the vertex split tree can be collapsed or expanded resulting in a level of detail varying across different parts of the surface. This is the fundamental mechanism of view-dependent level of detail.
Hierarchical surfaces maintain two priority heaps one containing the next vertices (GtsHSplit) ready to be expanded, the other the next vertices ready to be collapsed. By updating the priorities for these vertices as the view point changes and collapsing or expanding the top ones until a given criterium is verified, the level of detail can be dynamically adapted.
the order in which nodes are visited - G_PRE_ORDER or G_POST_ORDER.
depth :
the maximum depth of the traversal. Nodes below this depth
will not be visited. If max_depth is -1 all nodes in the tree are
visited. If depth is 1, only the root is visited. If depth is 2,
the root and its children are visited. And so on.
Starts by expanding all the GtsHSplit of hsurface. If order is
G_PRE_ORDER, calls func for each GtsHSplit and collapses it. If
order is G_POST_ORDER, collapses each GtsHSplit first and then
calls func. The traversal can be halted at any point by returning
TRUE from func.