HDK
|
The base class for all GT primitive types. More...
#include <GT_Primitive.h>
Classes | |
class | jsonWriter |
Public Member Functions | |
GT_Primitive () | |
GT_Primitive (const GT_Primitive &src) | |
virtual | ~GT_Primitive () |
virtual const char * | className () const =0 |
virtual int | getPrimitiveType () const |
virtual bool | getUniqueID (int64 &id) const |
virtual void | enlargeBounds (UT_BoundingBox boxes[], int nsegments) const =0 |
virtual void | enlargeRenderBounds (UT_BoundingBox boxes[], int nsegments) const |
virtual void | getVelocityRange (UT_Vector3 &min, UT_Vector3 &max, const UT_StringRef &attribute_name=GA_Names::v) const |
virtual bool | refine (GT_Refine &refiner, const GT_RefineParms *parms=NULL) const |
virtual int | getMotionSegments () const =0 |
virtual int64 | getMemoryUsage () const =0 |
const GT_TransformHandle & | getPrimitiveTransform () const |
void | setPrimitiveTransform (const GT_TransformHandle &x) |
Set the transform for a the primitive. More... | |
GT_PrimitiveHandle | clone () const |
virtual bool | hasDataArray (const UT_StringRef &name, GT_Owner owner_scope[], int num_owners, GT_Storage *storage=NULL, GT_Size *tuple_size=NULL) const |
virtual bool | updateGeoPrim (const GU_ConstDetailHandle &dtl, const GT_RefineParms &parms) |
update any cached data for geometry and its attributes More... | |
void | setStaticGeometry (bool static_geo) |
Return true if the primitive represents geometry at frame 'fr'. More... | |
bool | isStaticGeometry () const |
bool | isFrameInfoAvailable () const |
bool | getDataIdHash (int64 &hash, int segment=0, bool cache_data_id=false) const |
virtual bool | getTopologyVersion (int64 &version) const |
Returns the topology version for the primitive. More... | |
GT_DataArrayHandle | findAttribute (const UT_StringRef &name, GT_Owner &owner, int segment) const |
void | dumpAttributeLists (const char *label, bool data_too) const |
print out all attribute lists More... | |
void | dumpPrimitive () const |
bool | saveAttributeLists (UT_JSONWriter &w) const |
virtual bool | save (UT_JSONWriter &w) const |
virtual const GT_ViewportRefineOptions & | viewportRefineOptions () const |
GT_PrimitiveHandle | harden () const |
GT_PrimitiveHandle | copyTransformed (const GT_TransformHandle &x, bool force=false) const |
void | refineCopyTransformFrom (const GT_Primitive &src) |
GT_PrimitiveHandle | attributeMerge (const GT_Primitive &src, const UT_StringMMPattern *vertex_pattern, const UT_StringMMPattern *point_pattern, const UT_StringMMPattern *uniform_pattern, const UT_StringMMPattern *detail_pattern) const |
virtual GT_PrimitiveHandle | doHarden () const |
virtual GT_PrimitiveHandle | doSoftCopy () const =0 |
virtual GT_PrimitiveHandle | doAttributeMerge (const GT_Primitive &src, const UT_StringMMPattern *vertex, const UT_StringMMPattern *point, const UT_StringMMPattern *uniform, const UT_StringMMPattern *detail) const |
The virtual implementation of attribute merging. More... | |
bool | enlargeWidth (UT_BoundingBox boxes[], int nsegments, fpreal defwidth=-1) const |
virtual const GT_AttributeListHandle & | getPointAttributes () const |
virtual const GT_AttributeListHandle & | getVertexAttributes () const |
virtual const GT_AttributeListHandle & | getUniformAttributes () const |
virtual const GT_AttributeListHandle & | getDetailAttributes () const |
const GT_AttributeListHandle & | getAttributeList (GT_Owner owner) const |
virtual const GT_DataArrayHandle & | getVertexList () const |
virtual GT_DataArrayHandle | createPointNormals (int segment=0, const UT_StringRef &P=GA_Names::P, bool normalize=true, const fpreal32 *pntdata=NULL, GT_Storage store=GT_STORE_REAL32) const |
virtual fpreal | computePerimeter (int seg=0) const |
virtual fpreal | computeSurfaceArea (int seg=0) const |
virtual fpreal | computeVolume (const UT_Vector3 &ref_P, int seg=0) const |
Public Member Functions inherited from UT_IntrusiveRefCounter< GT_Primitive > | |
SYS_FORCE_INLINE | UT_IntrusiveRefCounter () noexcept |
Default constructor: Sets counter to 0. More... | |
SYS_FORCE_INLINE | UT_IntrusiveRefCounter (const UT_IntrusiveRefCounter &) noexcept |
Copy constructor: Sets counter to 0. More... | |
UT_IntrusiveRefCounter & | operator= (const UT_IntrusiveRefCounter &) noexcept |
Assignment operator: Does not modify counter. More... | |
SYS_FORCE_INLINE uint32 | use_count () const noexcept |
Return current counter. More... | |
SYS_FORCE_INLINE bool | conditionalAddRef () noexcept |
Static Public Member Functions | |
static int | createPrimitiveTypeId () |
static GT_AttributeListHandle | mergeAttributeLists (bool &changed, const GT_AttributeListHandle &src, const GT_AttributeListHandle &merge, const UT_StringMMPattern *pattern, const UT_StringMMPattern *alternate=NULL) |
static bool | computeVelocityRange (UT_Vector3 &vmin, UT_Vector3 &vmax, const GT_DataArrayHandle &v) |
static GT_PrimitiveHandle | refineDetail (const GU_ConstDetailHandle &detail, const GT_RefineParms *parms) |
static GT_PrimitiveHandle | refinePrimitive (const GT_PrimitiveHandle &primh, const GT_RefineParms *parms) |
static void * | operator new (size_t size) |
static void * | operator new (size_t size, void *p) |
static void | operator delete (void *p, size_t size) |
Protected Member Functions | |
void | enlargeP (UT_BoundingBox &box, const GT_AttributeListHandle &list, int segment) const |
void | enlargeP (UT_BoundingBox &B, const GT_DataArrayHandle &P) const |
Convenience method to enlarge a bounding box given a position attribute. More... | |
void | enlargePw (UT_BoundingBox &B, const GT_DataArrayHandle &P) const |
Protected Member Functions inherited from UT_IntrusiveRefCounter< GT_Primitive > | |
SYS_FORCE_INLINE | ~UT_IntrusiveRefCounter () |
Destructor: Only derived classes can destruct this. More... | |
The base class for all GT primitive types.
Primitives represent geometric entities like spheres and polygons. There is a list of well-known primitives defined in GT_PrimitiveTypes.h. These are returned by the getPrimitiveType()
method.
Each primitive must be able to compute a bounding box. Since a primitive may be part of a sequence of primitives, the primitive must be able to compute the bounding boxes for each segment.
Definition at line 43 of file GT_Primitive.h.
GT_Primitive::GT_Primitive | ( | ) |
GT_Primitive::GT_Primitive | ( | const GT_Primitive & | src | ) |
|
virtual |
|
inline |
The attributeMerge method will return a new primitive, but with the given attributes merged in from the source primitive. If the method isn't implementd on the sub-class, or if the primitive types don't match, or if there are other errors, the method will return the original primitive (i.e. this
).
Definition at line 254 of file GT_Primitive.h.
|
pure virtual |
Implemented in GT_AlembicInstance, GT_PackedAlembicMesh, GusdGT_PackedUSDMesh, GABC_NAMESPACE::GABC_PackedAlembic, GT_GEOPackedAgent, GT_PrimCurveMesh, GT_PrimSubdivisionMesh, GT_PrimAgentShape, GT_PrimMeshSplitChild, GT_GEOPrimitive, GABC_NAMESPACE::GABC_PackedArchive, GT_PrimPolygonMesh, GT_PrimVolume, GT_PrimPatchMesh, GT_PrimNURBSCurveMesh, GusdGT_PackedUSD, GusdXformWrapper, GT_PrimHyperboloid, GusdMeshWrapper, GusdInstancerWrapper, GT_PrimNuPatch, GusdPointsWrapper, GusdScopeWrapper, GT_PrimPatch, GusdCurvesWrapper, GusdNURBSCurvesWrapper, GT_PrimSphere, GT_GEOPrimCaptureRegions, GT_PrimCircle, GusdPackedUsdWrapper, GusdGT_PointInstancer, GT_GEOPrimPacked, GT_PrimTube, GT_PrimTubeMesh, GT_PrimQuadric, GT_PrimFragments, GT_PrimQuadricMesh, GT_PrimSubdivisionCurves, GT_PrimInstance, GT_PrimPolygon, GT_PrimCircleMesh, GT_PrimSphereMesh, GT_GEOPrimMetaBall, GT_PrimPointMesh, GT_PrimTetMesh, GT_GEODetail, GusdCylinderWrapper, GT_PrimPackedDetail, GT_PrimVDB, GusdNurbsPatchWrapper, GT_GEOPrimList, GT_GEOPrimTPSurf, GT_PrimMeshSplitParent, GusdConeWrapper, GusdCubeWrapper, GusdSphereWrapper, GT_PrimCollect, GT_PrimMultiSegment, GT_GEOPrimCurve, GT_PrimCurve, GT_PrimChannel, GusdTetMeshWrapper, and GT_PrimNull.
|
inline |
Create a clone of this primitive, the clone may share references to the same data.
Definition at line 119 of file GT_Primitive.h.
Methods for GEO/GU support.
The default methods for these simply refine until a primitive can handle the method.
Reimplemented in GT_PrimPolygonMesh, GT_PrimCurveMesh, GT_PrimPolygon, GT_PrimCurve, GT_PrimFragments, and GT_PrimInstance.
Methods for GEO/GU support.
The default methods for these simply refine until a primitive can handle the method.
Reimplemented in GT_PrimPolygonMesh, GT_PrimPolygon, GT_PrimFragments, and GT_PrimInstance.
|
static |
Convenience method to compute the velocity bounds given a data array Returns false
if the data array handle wasn't valid. If invalid, vmin
and vmax
will be set to 0.
|
virtual |
Methods for GEO/GU support.
The default methods for these simply refine until a primitive can handle the method.
Reimplemented in GT_PrimPolygonMesh, GT_PrimPolygon, GT_PrimFragments, and GT_PrimInstance.
GT_PrimitiveHandle GT_Primitive::copyTransformed | ( | const GT_TransformHandle & | x, |
bool | force = false |
||
) | const |
Create a transformed copy. This will transform a clone()
of the primitive by the given transform. It's possible this
primitive might be returned if the clone doesn't need to be transformed. The force
parameter will force a clone to be created.
|
virtual |
Methods defined on GT_Primitive which are a short-cut to avoid a static/dynamic cast of the primitive when we know that the primitive is a polygon mesh. These are not part of the interface of GT_Primitive per se.
Reimplemented in GT_PrimPolygonMesh.
|
static |
The GT library has pre-defined primitive types (see GT_PrimitiveType) Custom primitives may ask for an identifier which is guaranteed to be unique. These integers are created at run time and may have different values from run to run. They will always be greater or equal to GT_MAX_PRIM_TYPES.
|
virtual |
The virtual implementation of attribute merging.
Reimplemented in GT_PrimSubdivisionMesh, GT_PrimCurveMesh, GT_PrimPolygonMesh, GT_PrimPolygon, GT_PrimPatchMesh, GT_PrimPatch, GT_PrimNuPatch, GT_PrimPointMesh, and GT_PrimCurve.
|
virtual |
Hardening the primitive will return a copy of the primitive, but without any dangling references. The default implementation returns a NULL ptr.
Reimplemented in GT_PrimSubdivisionMesh, GT_PrimCurveMesh, GT_GEOPrimPacked, GT_PrimPolygonMesh, GT_PrimPolygon, GT_PrimPatchMesh, GT_PrimPatch, GT_PrimAgentShape, GT_PrimNuPatch, GT_PrimTube, GT_PrimPointMesh, GT_PrimHyperboloid, GT_PrimCurve, GT_PrimFragments, GT_PrimSphere, GT_PrimInstance, GT_GEOPrimCaptureRegions, GT_PrimCircle, GT_PrimTubeMesh, GT_PrimCollect, GT_GEODetail, GT_GEOPrimList, GT_PrimSphereMesh, GT_PrimCircleMesh, GT_PrimPackedDetail, and GT_PrimChannel.
|
pure virtual |
Create a copy of the primitive, referencing all the source data This can return a NULL pointer, but it would be better to implement it properly.
Implemented in GT_PrimSubdivisionMesh, GT_PrimCurveMesh, GT_PrimPolygonMesh, GT_PackedAlembicMesh, GT_PrimPolygon, GT_PrimPatchMesh, GusdGT_PackedUSDMesh, GT_PrimPatch, GT_GEOPackedAgent, GABC_NAMESPACE::GABC_PackedAlembic, GT_PrimAgentShape, GT_GEOPrimitive, GT_PrimMeshSplitChild, GT_PrimNuPatch, GT_PrimNURBSCurveMesh, GABC_NAMESPACE::GABC_PackedArchive, GT_PrimTube, GT_PrimVolume, GT_PrimPointMesh, GT_PrimHyperboloid, GusdGT_PackedUSD, GT_PrimCurve, GusdXformWrapper, GusdMeshWrapper, GusdInstancerWrapper, GT_GEOPrimPacked, GT_PrimFragments, GusdPointsWrapper, GusdScopeWrapper, GT_PrimTetMesh, GT_PrimVDB, GusdCurvesWrapper, GusdNURBSCurvesWrapper, GT_PrimInstance, GT_PrimSphere, GusdPackedUsdWrapper, GT_GEOPrimCaptureRegions, GT_PrimCircle, GT_PrimTubeMesh, GT_GEODetail, GT_PrimCollect, GT_GEOPrimMetaBall, GT_GEOPrimList, GT_PrimSphereMesh, GT_GEOPrimTPSurf, GusdCylinderWrapper, GT_PrimCircleMesh, GusdNurbsPatchWrapper, GT_PrimMultiSegment, GusdConeWrapper, GusdCubeWrapper, GusdSphereWrapper, GT_PrimPackedDetail, GusdTetMeshWrapper, GT_GEOPrimCurve, GT_PrimChannel, and GT_PrimNull.
void GT_Primitive::dumpAttributeLists | ( | const char * | label, |
bool | data_too | ||
) | const |
print out all attribute lists
void GT_Primitive::dumpPrimitive | ( | ) | const |
Dump the primitive. If the primitive's save() method isn't implemented (i.e. returns false), the attributes will be dumped.
|
pure virtual |
An array of bounding boxes is passed in. There is a bounding box for each segement. Each bounding box should be enlarged appropriately.
Implemented in GT_PackedAlembicMesh, GusdGT_PackedUSDMesh, GT_GEOPackedAgent, GT_PrimCurveMesh, GT_PrimMeshSplitChild, GT_GEOPrimitive, GT_PrimAgentShape, GT_PrimPatchMesh, GT_PrimPolygonMesh, GT_PrimNURBSCurveMesh, GT_PrimTube, GT_PrimVolume, GusdGT_PackedUSD, GT_PrimPointMesh, GT_PrimPolygon, GusdXformWrapper, GusdMeshWrapper, GT_PrimNuPatch, GusdInstancerWrapper, GT_PrimPatch, GusdPointsWrapper, GT_PrimVDB, GusdScopeWrapper, GusdCurvesWrapper, GusdNURBSCurvesWrapper, GT_PackedAlembicArchive, GT_PrimQuadric, GT_PrimTetMesh, GusdPackedUsdWrapper, GT_PrimQuadricMesh, GT_GEOPrimPacked, GT_PrimFragments, GT_PrimInstance, GT_GEOPrimMetaBall, GT_GEODetail, GusdCylinderWrapper, GT_PrimCollect, GT_PrimMeshSplitParent, GT_PrimChannel, GusdNurbsPatchWrapper, GT_GEOPrimList, GT_PrimCurve, GusdConeWrapper, GusdCubeWrapper, GusdSphereWrapper, GT_PrimMultiSegment, GusdTetMeshWrapper, and GT_PrimNull.
|
protected |
Convenience function to compute the point bounding box given an attribute list. This tests whether "P" is in homogeneous coordinates or not.
|
protected |
Convenience method to enlarge a bounding box given a position attribute.
|
protected |
Convenience method to enlarge a bounding box given P in homogeneous coordinates.
|
virtual |
This is used when computing bounds for rendering (not just geometric bounds). This normally just calls enlargeBounds()
, but for some primitives, their bounds can be influenced by attribute values (i.e. the "width" in point mesh primitives). This allows proper bounds to be passed to mantra. Users may want to call enlargeWidth()
Reimplemented in GT_PrimCurveMesh, GT_PrimAgentShape, GT_PrimPointMesh, GT_GEOPrimPacked, GT_PrimFragments, GT_PrimInstance, GT_PrimCollect, GT_GEOPrimList, GT_PrimCurve, and GT_PrimMultiSegment.
bool GT_Primitive::enlargeWidth | ( | UT_BoundingBox | boxes[], |
int | nsegments, | ||
fpreal | defwidth = -1 |
||
) | const |
Search attributes for a "width" or "pscale" attribute. If one is found, enlarge the bounding boxes by the maximum value of the attribute. If no attributes are found, use the defwidth
. Returns true
if an attribute was found
defwidth
is less than 0, the "mantra" default width will be used. Pass in 0 to leave the boxes unchanged. GT_DataArrayHandle GT_Primitive::findAttribute | ( | const UT_StringRef & | name, |
GT_Owner & | owner, | ||
int | segment | ||
) | const |
Find an attribute of a given name. The search order is:
const GT_AttributeListHandle& GT_Primitive::getAttributeList | ( | GT_Owner | owner | ) | const |
Virtual methods to access the attribute data for primitives Some primitives may not implement these methods, in which case, the returned value will be an empty list.
bool GT_Primitive::getDataIdHash | ( | int64 & | hash, |
int | segment = 0 , |
||
bool | cache_data_id = false |
||
) | const |
Return the data ID hash derived from attribute lists. If cache_data_id is true, cache the result for future calls. This should only be done if the primitive and its attributes will not change (such as packed primitive contents).
|
virtual |
Virtual methods to access the attribute data for primitives Some primitives may not implement these methods, in which case, the returned value will be an empty list.
Reimplemented in GT_PrimCurveMesh, GT_PrimPolygonMesh, GT_PrimNURBSCurveMesh, GT_PrimPatch, GT_PackedAlembic, GT_PrimPatchMesh, GT_PrimNuPatch, GusdGT_PackedUSD, GT_PrimTube, GT_PrimQuadricMesh, GT_PrimQuadric, GT_PrimInstance, GT_GEOPrimTPSurf, GT_PrimPointMesh, and GT_PrimTetMesh.
|
pure virtual |
Return an approximate memory usage. Since data may be shared, this will always be an over-estimation.
Implemented in GT_PackedAlembicMesh, GusdGT_PackedUSDMesh, GT_GEOPackedAgent, GT_PrimCurveMesh, GT_PrimAgentShape, GT_PrimSubdivisionMesh, GT_GEOPrimitive, GT_PrimMeshSplitChild, GT_PrimPolygonMesh, GT_PrimPatchMesh, GT_PrimNURBSCurveMesh, GT_PrimTube, GT_PrimVolume, GusdGT_PackedUSD, GT_PrimPointMesh, GT_PrimPolygon, GusdXformWrapper, GusdMeshWrapper, GT_PrimNuPatch, GT_PrimPatch, GusdInstancerWrapper, GT_GEOPrimPacked, GusdPointsWrapper, GT_PrimTetMesh, GusdScopeWrapper, GT_GEODetail, GT_PrimVDB, GusdCurvesWrapper, GusdNURBSCurvesWrapper, GT_PackedAlembicArchive, GT_PrimFragments, GT_PrimQuadric, GusdPackedUsdWrapper, GT_PrimQuadricMesh, GT_PrimInstance, GT_PrimCollect, GT_GEOPrimMetaBall, GT_GEOPrimList, GusdCylinderWrapper, GT_PrimMeshSplitParent, GT_PrimCurve, GusdNurbsPatchWrapper, GT_PrimChannel, GT_PrimMultiSegment, GusdConeWrapper, GusdCubeWrapper, GusdSphereWrapper, GT_PrimPackedDetail, GusdTetMeshWrapper, and GT_PrimNull.
|
pure virtual |
Return the number of motion segments defined on the geometry By default, this simply returns the number of segments on P.
Implemented in GT_PackedAlembicMesh, GusdGT_PackedUSDMesh, GT_GEOPackedAgent, GT_PrimCurveMesh, GT_PrimAgentShape, GT_PrimMeshSplitChild, GT_GEOPrimitive, GT_PrimPolygonMesh, GT_PrimPatchMesh, GT_PrimNURBSCurveMesh, GT_PrimTube, GT_PrimVolume, GusdGT_PackedUSD, GT_PrimPointMesh, GT_PrimPolygon, GusdXformWrapper, GusdMeshWrapper, GT_PrimNuPatch, GT_GEODetail, GT_PrimPatch, GusdInstancerWrapper, GT_GEOPrimPacked, GT_PrimTetMesh, GusdPointsWrapper, GT_PrimVDB, GusdScopeWrapper, GusdCurvesWrapper, GusdNURBSCurvesWrapper, GT_PackedAlembicArchive, GT_PrimFragments, GT_PrimQuadric, GusdPackedUsdWrapper, GT_PrimQuadricMesh, GT_PrimInstance, GT_PrimCollect, GT_GEOPrimMetaBall, GT_GEOPrimList, GusdCylinderWrapper, GT_PrimMeshSplitParent, GT_PrimCurve, GT_PrimChannel, GT_PrimMultiSegment, GusdNurbsPatchWrapper, GusdConeWrapper, GusdCubeWrapper, GusdSphereWrapper, GusdTetMeshWrapper, and GT_PrimNull.
|
virtual |
Virtual methods to access the attribute data for primitives Some primitives may not implement these methods, in which case, the returned value will be an empty list.
Reimplemented in GT_PrimPolygonMesh, GusdGT_PackedUSD, GT_GEOPrimPacked, GT_GEOPrimMetaBall, GT_GEOPrimTPSurf, GT_PrimPointMesh, and GT_PrimTetMesh.
|
inline |
Return a transform applied to the entire primitive. By default, this returns an identity transform.
Definition at line 111 of file GT_Primitive.h.
|
virtual |
Return the primitive type. By default this returns GT_PRIM_UNDEFINED,
Reimplemented in GT_AlembicInstance, GusdPrimWrapper, GT_PackedAlembicMesh, GusdGT_PackedUSDMesh, GT_GEOPackedAgent, GT_PrimCurveMesh, GT_PrimSubdivisionMesh, GT_GEOPrimitive, GT_PrimAgentShape, GT_PackedAlembic, GT_PrimPatchMesh, GT_PrimPolygonMesh, GT_PrimNURBSCurveMesh, GT_PrimVolume, GT_PrimPointMesh, GusdGT_PackedUSD, GT_PrimHyperboloid, GT_PrimPolygon, GT_PrimNuPatch, GT_PrimCircle, GT_PrimPatch, GT_PrimQuadricMesh, GT_PrimSphere, GT_GEOPrimCaptureRegions, GusdGT_PointInstancer, GT_PrimTube, GT_GEOPrimPacked, GT_PrimTubeMesh, GT_PrimCollect, GT_PrimCircleMesh, GT_GEODetail, GT_PrimFragments, GT_PrimSphereMesh, GT_PrimChannel, GT_PrimSubdivisionCurves, GT_GEOPrimTPSurf, GT_PrimInstance, GT_GEOPrimMetaBall, GT_PrimCurve, GT_PrimTetMesh, GT_GEOPrimList, GT_PackedAlembicArchive, and GT_PrimVDB.
|
virtual |
Returns the topology version for the primitive.
Reimplemented in GT_PrimAgentShape.
|
virtual |
Virtual methods to access the attribute data for primitives Some primitives may not implement these methods, in which case, the returned value will be an empty list.
Reimplemented in GT_PrimCurveMesh, GT_PrimPolygonMesh, GT_PrimVolume, GT_PrimNURBSCurveMesh, GT_PrimPatch, GT_PrimPatchMesh, GusdGT_PackedUSD, GT_PrimVDB, GT_PrimPolygon, GT_PrimFragments, GT_GEOPrimMetaBall, GT_PrimInstance, GT_GEOPrimTPSurf, GT_PrimCurve, and GT_PrimTetMesh.
|
virtual |
Return a unique primitive ID and true, if an ID can be generated (false otherwise).
Reimplemented in GT_PackedAlembicMesh, GusdGT_PackedUSDMesh, and GT_PackedAlembic.
|
virtual |
This method is used to find the minimum/maximum velocity bounds. By default, the shared/vertex attributes are scanned for the attribute and its range is used. Only the first segment is queried.
If unable to compute the velocity range, the min
and max
should be set to 0.
Reimplemented in GT_GEOPrimPacked, GT_PrimFragments, GT_PrimInstance, GT_PrimCollect, GT_GEODetail, and GT_GEOPrimList.
|
virtual |
Virtual methods to access the attribute data for primitives Some primitives may not implement these methods, in which case, the returned value will be an empty list.
Reimplemented in GT_PrimCurveMesh, GT_PrimPolygonMesh, GT_PrimNURBSCurveMesh, GT_PrimPatch, GT_PrimPatchMesh, GT_PrimNuPatch, GusdGT_PackedUSD, GT_PrimQuadricMesh, GT_PrimPolygon, GT_PrimCurve, and GT_PrimTetMesh.
|
virtual |
Methods defined on GT_Primitive which are a short-cut to avoid a static/dynamic cast of the primitive when we know that the primitive is a polygon mesh. These are not part of the interface of GT_Primitive per se.
Reimplemented in GT_PrimPolygonMesh, and GT_PrimTetMesh.
|
inline |
The harden method will return a NULL pointer if hardening isn't implemented for the primitive in question. Otherwise, any references will be hardened into local data for the primitive.
Definition at line 234 of file GT_Primitive.h.
|
virtual |
Returns true if a data array with 'name' is found in 'owner_scope', and optionally its storage and tuple_size.
Reimplemented in GT_GEOPackedAgent.
|
inline |
Definition at line 149 of file GT_Primitive.h.
|
inline |
Definition at line 148 of file GT_Primitive.h.
|
static |
This method will "merge" two attribute lists given The changed
variable will be set to true if there are modifications, otherwise, it will remain unchanged.
For memory tracking, we override the new/delete operators
|
static |
For memory tracking, we override the new/delete operators
For memory tracking, we override the new/delete operators
|
virtual |
Refine the primitive.
refiner
Reimplemented in GT_PackedAlembicMesh, GusdGT_PackedUSDMesh, GABC_NAMESPACE::GABC_PackedAlembic, GT_GEOPackedAgent, GT_GEOPrimitive, GT_PrimAgentShape, GT_PrimCurveMesh, GT_PrimSubdivisionMesh, GT_PrimMeshSplitChild, GT_PrimNURBSCurveMesh, GT_PrimPatchMesh, GT_PrimPolygonMesh, GT_PrimVolume, GT_PrimTube, GT_PrimQuadric, GusdXformWrapper, GusdMeshWrapper, GusdInstancerWrapper, GT_GEOPrimPacked, GusdPointsWrapper, GusdScopeWrapper, GusdCurvesWrapper, GusdNURBSCurvesWrapper, GT_PrimNuPatch, GT_PrimPatch, GT_GEOPrimCaptureRegions, GT_GEODetail, GT_PrimQuadricMesh, GT_PrimTetMesh, GT_PrimFragments, GT_PrimVDB, GT_PrimInstance, GT_GEOPrimList, GT_PrimSubdivisionCurves, GusdCylinderWrapper, GT_PrimCollect, GusdNurbsPatchWrapper, GT_GEOPrimMetaBall, GusdConeWrapper, GusdCubeWrapper, GusdSphereWrapper, GusdTetMeshWrapper, GT_GEOPrimTPSurf, GT_PrimMeshSplitParent, GT_PrimMultiSegment, and GT_GEOPrimCurve.
void GT_Primitive::refineCopyTransformFrom | ( | const GT_Primitive & | src | ) |
Copy the transform from the source primitive for transforming. This is only required when you're not using a copy c-tor on the primitive (which automatically copies the transform).
|
static |
Refine a detail or primitive. The refine parms may be NULL. If the refinement fails, the returned handle will be NULL.
|
static |
Refine a detail or primitive. The refine parms may be NULL. If the refinement fails, the returned handle will be NULL.
|
virtual |
Save the primitive to a JSON stream. The default method does nothing and returns false.
Reimplemented in GT_PrimCurveMesh, GT_PrimSubdivisionMesh, GT_GEODetail, GT_PrimPolygonMesh, GT_PrimPatchMesh, GT_PrimHyperboloid, GT_GEOPrimPacked, GT_PrimFragments, GT_PrimNuPatch, GT_PrimInstance, GT_PrimPatch, GT_PrimSphere, GT_PrimCircle, GT_PrimTube, GT_PrimTubeMesh, GT_GEOPrimList, GT_PrimPolygon, GT_PrimCircleMesh, GT_PrimMultiSegment, GT_PrimSphereMesh, GT_PrimPointMesh, GT_PrimPackedDetail, GT_PrimCollect, and GT_PrimCurve.
bool GT_Primitive::saveAttributeLists | ( | UT_JSONWriter & | w | ) | const |
Save all attribute lists to a JSON stream. The attribute lists are saved as a dictionary/map, keyed on the class name.
|
inline |
Set the transform for a the primitive.
Definition at line 114 of file GT_Primitive.h.
|
inline |
Return true if the primitive represents geometry at frame 'fr'.
Definition at line 146 of file GT_Primitive.h.
|
virtual |
update any cached data for geometry and its attributes
Reimplemented in GT_PrimPolygonMesh, GABC_NAMESPACE::GABC_PackedInstance, GT_PrimVolume, GT_PrimNURBSCurveMesh, GABC_NAMESPACE::GABC_PackedAlembic, GT_GEOPackedAgent, GT_PrimInstance, GT_GEOPrimitive, GT_PrimQuadricMesh, GT_GEOPrimMetaBall, GT_PackedAlembicArchive, GT_GEOPrimTPSurf, GT_PrimVDB, and GT_PrimCollect.
|
virtual |
This method is used to pass information about refinement to the Houdini viewport. This returns a default GT_ViewportRefineOptions.
Reimplemented in GT_PrimCurveMesh, GT_PrimNURBSCurveMesh, GT_PrimQuadric, GT_PrimFragments, GT_GEOPrimPacked, GT_PrimInstance, GT_PrimVDB, GT_GEOPrimMetaBall, GT_GEOPrimCurve, and GT_GEOPrimTPSurf.