HDK
|
#include <GT_GEOPrimCollect.h>
Public Member Functions | |
GT_GEOPrimCollect () | |
Constructor. More... | |
virtual | ~GT_GEOPrimCollect () |
Destructor. More... | |
virtual GT_GEOPrimCollectData * | beginCollecting (const GT_GEODetailListHandle &geometry, const GT_RefineParms *parms) const |
virtual GT_PrimitiveHandle | collect (const GT_GEODetailListHandle &geometry, const GEO_Primitive *const *prim_list, int nsegments, GT_GEOPrimCollectData *data) const =0 |
virtual GT_PrimitiveHandle | endCollecting (const GT_GEODetailListHandle &geometry, GT_GEOPrimCollectData *data) const |
void | bind (const GA_PrimitiveTypeId &id) const |
Static Public Member Functions | |
static GT_GEOPrimCollectPtr | getCollector (const GA_PrimitiveTypeId &id) |
Get the current collector bound for a primitive. More... | |
Refine primitives for a detail.
When a detail refines itself, it asks the "collectors" to refine primitives. The refiners can "collect" primitives on the fly, or they can collect primitives and generate a single primitive at the end of the collection.
Definition at line 58 of file GT_GEOPrimCollect.h.
GT_GEOPrimCollect::GT_GEOPrimCollect | ( | ) |
Constructor.
|
virtual |
Destructor.
|
virtual |
This method is called when the detail begins collecting. The method may or may not be called if there are now collectable primitives in the detail.
The data container is passed to the collect()
and endCollect()
methods. It is automatically deleted on completion. If no data is needed for collection, this method should return a NULL pointer (which is the default behaviour).
Reimplemented in GT_GEOPrimCollectVolume, GusdGT_PrimCollect, GABC_NAMESPACE::GABC_CollectPacked, GT_GEOPrimCollectChannel, HDK_Sample::GT_PrimTetraCollect, and GT_GEOPrimCollectPacked.
void GT_GEOPrimCollect::bind | ( | const GA_PrimitiveTypeId & | id | ) | const |
Register to process primitives of the given primitive id. You can bind to multiple primitive types, in which case, beginCollecting()
and endCollecting()
will be invoked only once for each detail traversal. collect()
will be called for each primitive that matches any of the bound primitive types. For example:
|
pure virtual |
For each matching primitive in the detail, this method will be called. If no GT primitive should be created, return an empty handle.
Implemented in GT_GEOPrimCollectVolume, GusdGT_PrimCollect, GT_GEOPrimCollectVDB, GABC_NAMESPACE::GABC_CollectPacked, GT_GEOPrimCollectChannel, HDK_Sample::GT_PrimTetraCollect, and GT_GEOPrimCollectPacked.
|
virtual |
Complete any processing fter all primitives have been collected
This method should not delete the collection data
Reimplemented in GT_GEOPrimCollectVolume, GusdGT_PrimCollect, GABC_NAMESPACE::GABC_CollectPacked, GT_GEOPrimCollectChannel, HDK_Sample::GT_PrimTetraCollect, and GT_GEOPrimCollectPacked.
|
static |
Get the current collector bound for a primitive.