HDK
|
Definition of a geometric primitive. More...
#include <GA_PrimitiveDefinition.h>
Classes | |
class | SharedDataLoader |
Class to load shared data. More... | |
Public Member Functions | |
const UT_StringHolder & | getToken () const |
The name of the primitive. More... | |
const UT_StringHolder & | getLabel () const |
The label (user friendly & readable token) of the primitive. More... | |
const UT_StringHolder & | getIcon () const |
The icon associated with the primitive type (if any). More... | |
SYS_FORCE_INLINE const GA_PrimitiveTypeId & | getId () const |
The unique ID assigned by the GA_PrimitiveFactory. More... | |
GA_PrimitiveFamilyMask | getFamilyMask () const |
The optional family mask. More... | |
const GA_IntrinsicManager & | getIntrinsicManager () const |
Primitive intrinsic attributes defined for this primitive. More... | |
GA_IntrinsicManager & | getIntrinsicManager () |
void | setLabel (const UT_StringHolder &label) |
Set the label for the primitive. More... | |
void | setIcon (const UT_StringHolder &icon) |
Set the icon for the primitive. More... | |
void | setMergeConstructor (GA_Primitive *(*ctor)(const GA_MergeMap &map, GA_Detail &dest_detail, GA_Offset dest_offset, const GA_Primitive &src_prim)) |
bool | hasLocalTransform () const |
Return whether the primitive has a transform associated with it. More... | |
void | setHasLocalTransform (bool x) |
Set whether the primitive is has a transform associated with it. More... | |
bool | hasCECaches () const |
Return whether the primitive is able to be cached on the GPU. More... | |
void | setHasCECaches (bool x) |
bool | isForPrimaryDetail () const |
bool | hasSharedLoadData () const |
Return whether the primitive type has a shared data loader. More... | |
void | setSharedDataLoader (const SharedDataLoader *l) |
Associate the primitive type with a shared data loader. More... | |
const SharedDataLoader * | sharedDataLoader () const |
Friends | |
class | GA_PrimitiveFactory |
class | GA_PrimitiveList |
Definition of a geometric primitive.
Every primitive type is registered with a GA_PrimitiveFactory which creates a GA_PrimitiveDefinition. Each GA_PrimitiveDefinition in a given GA_PrimitiveFactory is assigned a unique identifier. In addition, an optional family mask can be registered with the type to specify from which standard primitive types (managed by that factory) the new GA_Primitive subclass derives.
The GA_PrimitiveDefinition for the new type registers a constructor function that will be used to allocate new instances of that type.
Finally, the definition also contains a list of "intrinsics" that can be queried from primitives of that type.
Definition at line 58 of file GA_PrimitiveDefinition.h.
|
inline |
The optional family mask.
Definition at line 72 of file GA_PrimitiveDefinition.h.
|
inline |
The icon associated with the primitive type (if any).
Definition at line 66 of file GA_PrimitiveDefinition.h.
|
inline |
The unique ID assigned by the GA_PrimitiveFactory.
Definition at line 70 of file GA_PrimitiveDefinition.h.
|
inline |
Primitive intrinsic attributes defined for this primitive.
Definition at line 75 of file GA_PrimitiveDefinition.h.
|
inline |
Definition at line 77 of file GA_PrimitiveDefinition.h.
|
inline |
The label (user friendly & readable token) of the primitive.
Definition at line 64 of file GA_PrimitiveDefinition.h.
|
inline |
The name of the primitive.
Definition at line 62 of file GA_PrimitiveDefinition.h.
|
inline |
Return whether the primitive is able to be cached on the GPU.
Definition at line 104 of file GA_PrimitiveDefinition.h.
|
inline |
Return whether the primitive has a transform associated with it.
Definition at line 99 of file GA_PrimitiveDefinition.h.
|
inline |
Return whether the primitive type has a shared data loader.
Definition at line 144 of file GA_PrimitiveDefinition.h.
|
inline |
Returns true if this type is for use by GEO_Detail and false if this type is for use by GD_Detail.
Definition at line 109 of file GA_PrimitiveDefinition.h.
|
inline |
Definition at line 105 of file GA_PrimitiveDefinition.h.
|
inline |
Set whether the primitive is has a transform associated with it.
Definition at line 101 of file GA_PrimitiveDefinition.h.
|
inline |
Set the icon for the primitive.
Definition at line 85 of file GA_PrimitiveDefinition.h.
|
inline |
Set the label for the primitive.
Definition at line 81 of file GA_PrimitiveDefinition.h.
|
inline |
NOTE: This used to set the merge constructor, but merge constructors are no longer a thing. Please make sure that the regular constructor of your primitive types don't add any vertices to the detail or anything else thread-unsafe like that. You can always add vertices and initialize them later. This change was required in order for all primitive types to be able to be constructed in parallel.
Definition at line 95 of file GA_PrimitiveDefinition.h.
|
inline |
Associate the primitive type with a shared data loader.
Definition at line 147 of file GA_PrimitiveDefinition.h.
|
inline |
Definition at line 149 of file GA_PrimitiveDefinition.h.
|
friend |
Definition at line 206 of file GA_PrimitiveDefinition.h.
|
friend |
Definition at line 207 of file GA_PrimitiveDefinition.h.