HDK
|
#include <GU_Skin.h>
Public Member Functions | |
GU_SkinCache (GEO_Detail &parent_detail) | |
virtual | ~GU_SkinCache () |
void | addCleanupPrimitives (UT_Array< GEO_Primitive * > *prims_array, bool delete_points) |
void | addCleanupPrimitive (GEO_Primitive *prim, bool delete_points) |
virtual void | cleanup () |
Deletes all queued up primitives. More... | |
This class can be used to queue up all primitives that are to be deleted, with actual deletion being done once the operation is complete.
This is particularly useful when an operation is performed on multiple groups within one detail, since each deletion opeartion itself is O(n) where n is the number of primitives in the detail. Thus, accumulating primitives that are to be deleted and deleting them once instead of every time for every group can lead to signficantly faster code.
GU_SkinCache::GU_SkinCache | ( | GEO_Detail & | parent_detail | ) |
|
virtual |
void GU_SkinCache::addCleanupPrimitive | ( | GEO_Primitive * | prim, |
bool | delete_points | ||
) |
Queues up a single primitive to delete. If delete_points is true, will delete primitives' points as well. All queued primitives are deleted either by calling cleanup() or in the destructor.
void GU_SkinCache::addCleanupPrimitives | ( | UT_Array< GEO_Primitive * > * | prims_array, |
bool | delete_points | ||
) |
Queues up an array of primitives to delete. If delete_points is true, will delete primitives' points as well. All queued primitives are deleted either by calling cleanup() or in the destructor.
|
virtual |
Deletes all queued up primitives.