vdsNode* vdsEndVertexTree ()

Finalize the VDS vertex tree

Documentation

Finalize the VDS vertex tree. After all geometry has been added and all leaf nodes (created by vdsAddNode()) merged to form a single hierarchy of vdsNodes, call vdsEndVertexTree() to process the hierarchy and produce a finished vertex tree, ready for simplification/rendering.

Tasks: Performs the following tasks, in order:

  • Computes node paths and ids
  • Verifies that node hierarchy forms a single rooted tree
  • Computes node bounds for fold & visibility tests
  • Computes node subtris, attaching via vistris linked list
  • Converts vdsTris to use leaf node ids, rather than indices
  • Reallocates each node to store subtris directly
  • Nullifies node->vistris list and tri next,prev pointers
  • Computes triangle container nodes for tri->node field
  • Assigns tri->proxies[] pointers to point at root node
  • Deletes triarray
  • Labels root node Boundary
  • Returns:
    Pointer to the root node of the new vertex tree.

    alphabetic index hierarchy of classes