The PolygonReduction class allows to reduce the polygon count of a given PolygonObject while retaining its overall shape. The class gives access to the functionality used within the "Polygon Reduction" generator. It is defined in the lib_polygonreduction.h
header file.
A PolygonReduction object can be created with the usual tools, see Entity Creation and Destruction Manual (Classic).
A PolygonReduction object has to be initialized. It will pre-process the given PolygonObject.
The PolygonReductionData argument has these members:
opolyreduxgen.h
.If the PolygonReductionData::_thread member is set the pre-process is running asynchronously in a background thread.
After the pre-process the PolygonReduction object is ready:
The linked PolygonObject can be reduced by defining the overall reduction strength or the target triangle, vertex or edge count.
The triangle count is defined with:
The vertex count is defined with:
Finally the edge count can be defined: