int budgetSimplifyTree (vdsNode *rootnode, vdsErrorMetric Error, vdsVisibilityFunction visible, int budget)

Simplify the vertex tree based on a triangle budget

Documentation

Simplify the vertex tree based on a triangle budget. Given an octree and a polygon budget, traverses the tree and simplifies the scene. The goal is to minimize the maximum screenspace error metric of any node without exceeding the polygon budget. This is done iteratively by keeping the Leaf nodes in a priority queue. Each iteration the node with the greatest error metric is expanded, removing the node from the top of the queue and inserting its children into the queue. When the top node cannot be expanded without exceeding the triangle budget the function halts, returning the number of triangles actually used. Subtris created by expanding a node only count towards the budget if their containing nodes are visible.
Returns:
The number of triangles actually used.
Parameters:
rootnode - The root node of the octree.
vdsErrorMetric - User supplied function to determine the importance of the node.
vdsVisibilityFunction - User supplied function to determine if the node is visible.
budget - The maximum number of triangles to use in the simplification.

alphabetic index hierarchy of classes