HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GA_Detail Class Referenceabstract

Container class for all geometry. More...

#include <GA_Detail.h>

+ Inheritance diagram for GA_Detail:

Classes

class  IOStatus
 
class  OffsetMarker
 

Public Types

enum  GA_DestroyPointMode { GA_LEAVE_PRIMITIVES, GA_DESTROY_DEGENERATE, GA_DESTROY_DEGENERATE_INCOMPATIBLE }
 
typedef GA_Primitive GB_MACRO_PRIM_TYPE
 

Public Member Functions

 GA_Detail (GA_PrimitiveFactory &factory, GA_Storage Pstorage=GA_STORE_REAL32, bool isprimary=true, bool full_topology=true)
 
virtual ~GA_Detail ()
 Destructor. More...
 
exint getUniqueId () const
 
void clear ()
 
bool isEmpty () const
 
GA_AttributegetP ()
 Convenience method to access the P attribute. More...
 
const GA_AttributegetP () const
 
SYS_FORCE_INLINE bool isPDouble () const
 
UT_Vector2 getPos2 (GA_Offset ptoff) const
 The ptoff passed is the point offset. More...
 
UT_Vector2D getPos2D (GA_Offset ptoff) const
 
SYS_FORCE_INLINE UT_Vector3 getPos3 (GA_Offset ptoff) const
 The ptoff passed is the point offset. More...
 
SYS_FORCE_INLINE UT_Vector3D getPos3D (GA_Offset ptoff) const
 
template<typename T >
UT_Vector3T< TgetPos3T (GA_Offset ptoff) const
 
template<typename T >
bool getPos3AsArray (const GA_Range &ptrange, UT_Array< UT_Vector3T< T > > &positions) const
 
template<typename T >
bool setPos3FromArray (const GA_Range &ptrange, const UT_Array< UT_Vector3T< T > > &positions)
 
void setPos2 (GA_Offset ptoff, const UT_Vector2 &pos)
 Set P from a UT_Vector2. More...
 
void setPos2 (GA_Offset ptoff, const UT_Vector2D &pos)
 
SYS_FORCE_INLINE void setPos3 (GA_Offset ptoff, const UT_Vector3 &pos)
 Set P from a UT_Vector3. More...
 
SYS_FORCE_INLINE void setPos3 (GA_Offset ptoff, const UT_Vector3D &pos)
 
SYS_FORCE_INLINE void setPos3 (GA_Offset ptoff, fpreal x, fpreal y, fpreal z)
 Set P given the x, y, z components. More...
 
SYS_FORCE_INLINE void translatePoint (GA_Offset ptoff, const UT_Vector3 &delta)
 
SYS_FORCE_INLINE void translatePoint (GA_Offset ptoff, const UT_Vector3D &delta)
 
fpreal getPw (GA_Offset ptoff) const
 Get the homogeneous coordinate for a point. More...
 
void setPw (GA_Offset ptoff, fpreal w)
 Set the homogeneous coordinate for a point. More...
 
UT_Vector4 getPos4 (GA_Offset ptoff) const
 The ptoff passed is the point offset. More...
 
UT_Vector4D getPos4D (GA_Offset ptoff) const
 
void setPos4 (GA_Offset ptoff, const UT_Vector4 &pos)
 Set P from a UT_Vector4. More...
 
void setPos4 (GA_Offset ptoff, const UT_Vector4D &pos)
 
void setPos4 (GA_Offset ptoff, fpreal x, fpreal y, fpreal z, fpreal w)
 Set P given the x, y, z, w components. More...
 
SYS_FORCE_INLINE GA_Offset appendPoint ()
 Append a new point, returning its new data offset. More...
 
SYS_FORCE_INLINE GA_Offset appendPointBlock (GA_Size npoints)
 Append new points, returning the first offset of the contiguous block. More...
 
SYS_FORCE_INLINE GA_Size getNumPoints () const
 Return the number of points. More...
 
SYS_FORCE_INLINE GA_Offset getNumPointOffsets () const
 
SYS_FORCE_INLINE GA_Offset pointOffset (GA_Index index) const
 Given a point's index (in append order), return its data offset. More...
 
SYS_FORCE_INLINE GA_Index pointIndex (GA_Offset offset) const
 Given a point's data offset, return its index. More...
 
GA_Index reorderPoint (GA_Offset ptoff, GA_Index new_order)
 
GA_PrimitiveappendPrimitive (const GA_PrimitiveTypeId &type)
 Append a primitive by GA_PrimitiveTypeId. More...
 
GA_PrimitiveappendPrimitive (const UT_StringRef &type)
 Append a primitive by type name string. More...
 
GA_Offset appendPrimitiveBlock (const GA_PrimitiveTypeId &type, GA_Size nprimitives)
 Append a contiguous block of primitives by GA_PrimitiveTypeId. More...
 
GA_Offset appendPrimitivesAndVertices (const GA_PrimitiveTypeId &type, GA_Size nprimitives, GA_Size nvertices_each, GA_Offset &vertex_block_start, bool closed_flag=false)
 
GA_Offset appendPrimitivesAndVertices (const GA_PrimitiveTypeId &type, const GA_PolyCounts &vertex_counts, GA_Offset &vertex_block_start, bool closed_flag=false)
 
GA_Offset appendPrimitivesAndVertices (const std::pair< int, exint > *primtype_count_pairs, const GA_PolyCounts &vertex_counts, GA_Offset &vertex_block_start, const exint *closed_span_length=nullptr, exint ncopies=1)
 
SYS_FORCE_INLINE GA_Size getNumPrimitives () const
 Return the number of primitives. More...
 
SYS_FORCE_INLINE GA_Offset getNumPrimitiveOffsets () const
 
SYS_FORCE_INLINE GA_Offset primitiveOffset (GA_Index index) const
 Given a primitive's index (in append order), return its data offset. More...
 
SYS_FORCE_INLINE GA_Index primitiveIndex (GA_Offset offset) const
 Given a primitive's data offset, return its index. More...
 
SYS_FORCE_INLINE GA_OffsetListRef getPrimitiveVertexList (GA_Offset primoff) const
 
SYS_FORCE_INLINE GA_Size getPrimitiveVertexCount (GA_Offset primoff) const
 
SYS_FORCE_INLINE GA_Offset getPrimitiveVertexOffset (GA_Offset primoff, GA_Size i) const
 
SYS_FORCE_INLINE int getPrimitiveTypeId (GA_Offset primoff) const
 
SYS_FORCE_INLINE bool getPrimitiveClosedFlag (GA_Offset primoff) const
 
SYS_FORCE_INLINE void setPrimitiveClosedFlag (GA_Offset primoff, bool closed)
 
GA_Index reorderPrimitive (GA_Offset offset, GA_Index new_order)
 
bool swapPrimitiveOrder (GA_Offset offset1, GA_Offset offset2)
 Swap the order of the two specified primitive data offsets. More...
 
SYS_FORCE_INLINE GA_Offset appendVertex ()
 Append a vertex (for the entire detail) More...
 
SYS_FORCE_INLINE GA_Offset appendVertexBlock (GA_Size nvertices)
 Append new vertices, returning the first offset of the contiguous block. More...
 
SYS_FORCE_INLINE GA_Size getNumVertices () const
 Return the number verticies in the entire detail. More...
 
SYS_FORCE_INLINE GA_Offset getNumVertexOffsets () const
 
SYS_FORCE_INLINE GA_Offset vertexOffset (GA_Index index) const
 Given a vertex's index (in append order), return its data offset. More...
 
SYS_FORCE_INLINE GA_Index vertexIndex (GA_Offset offset) const
 Given a vertex's data offset, return its index. More...
 
SYS_FORCE_INLINE GA_Offset vertexPoint (GA_Offset vertex) const
 Given a vertex, return the point it references. More...
 
void setVertexPoint (GA_Offset vertex, GA_Offset ptoff)
 Given a vertex, set the corresponding point offset. More...
 
SYS_FORCE_INLINE GA_Offset vertexPrimitive (GA_Offset vertex) const
 
SYS_FORCE_INLINE GA_Offset pointVertex (GA_Offset point) const
 
SYS_FORCE_INLINE GA_Offset vertexToNextVertex (GA_Offset vtx) const
 
SYS_FORCE_INLINE GA_Offset vertexToPrevVertex (GA_Offset vtx) const
 
GA_Offset getVertexReferencingPoint (GA_Offset ptoff, GA_Offset primoff=GA_INVALID_OFFSET) const
 
GA_Size getVerticesReferencingPoint (GA_OffsetArray &vertices, GA_Offset point_offset) const
 
GA_Size getPrimitivesReferencingPoint (GA_OffsetArray &primitives, GA_Offset point_offset) const
 
bool hasNoSharedPoints () const
 
bool destroyVertexOffset (GA_Offset offset)
 
virtual bool destroyPrimitiveOffset (GA_Offset offset, bool and_points=false)
 
bool destroyPrimitiveIndex (GA_Index index, bool and_points=false)
 
bool destroyPrimitive (GA_Primitive &prim, bool and_points=false)
 
virtual GA_Size destroyPrimitiveOffsets (const GA_Range &it, bool and_points=false)
 
GA_Size destroyPrimitives (const GA_Range &it, bool and_points=false)
 
GA_Size destroyDegeneratePrimitives (const GA_Range &it, bool and_points=false)
 
GA_Size destroyDegeneratePrimitives (const GA_PrimitiveGroup *prims=0, bool and_points=false)
 
GA_Size destroyUnusedPoints (const GA_PointGroup *ptgrp=0)
 Destroy unused points. If ptgrp is given, then only within the group. More...
 
GA_Size destroyVertexOffsets (const GA_Range &range)
 
GA_Size destroyVertices (const GA_Range &range)
 
bool isPointUsed (GA_Offset point) const
 
bool isPointUsedFast (GA_Offset point) const
 
bool findUnusedPoints (GA_OffsetList *unused=nullptr) const
 
const GA_IndexMapgetIndexMap (GA_AttributeOwner owner) const
 
GA_IndexMapgetIndexMap (GA_AttributeOwner owner)
 
const GA_IndexMapgetPointMap () const
 
const GA_IndexMapgetVertexMap () const
 
const GA_IndexMapgetPrimitiveMap () const
 
const GA_IndexMapgetGlobalMap () const
 
const GA_PrimitiveListgetPrimitiveList () const
 
GA_PrimitiveListgetPrimitiveList ()
 
GA_AttributeSetgetAttributes ()
 
const GA_AttributeSetgetAttributes () const
 
GA_TopologygetTopology ()
 
const GA_TopologygetTopology () const
 
bool checkValidTopology () const
 
void createTopologyAttributes ()
 
void clearTopologyAttributes ()
 
void bumpAllDataIds ()
 
void bumpDataIdsForRewire ()
 
void bumpDataIdsForAddOrRemove (bool added_or_removed_points, bool added_or_removed_vertices, bool added_or_removed_primitives)
 
bool defragment (GA_AttributeOwner owner, const UT_Options *options=nullptr)
 
bool defragment (const UT_Options *options=nullptr)
 
void sortVertexMapByPrimitiveUse ()
 
SYS_FORCE_INLINE bool destroyAttribute (GA_AttributeOwner owner, GA_AttributeScope scope, const UT_StringRef &name)
 
SYS_FORCE_INLINE bool destroyAttribute (GA_AttributeOwner owner, const UT_StringRef &name)
 
SYS_FORCE_INLINE bool renameAttribute (GA_AttributeOwner owner, GA_AttributeScope scope, const UT_StringRef &from_name, const UT_StringHolder &to_name)
 
GA_AttributecreateTupleAttribute (GA_AttributeOwner owner, GA_AttributeScope scope, const UT_StringHolder &name, GA_Storage storage, int tuple_size, const GA_Defaults &defaults=GA_Defaults(0.0f), const UT_Options *create_args=nullptr, const GA_AttributeOptions *attribute_options=nullptr)
 
GA_AttributecreateTupleAttribute (GA_AttributeOwner owner, const UT_StringHolder &name, GA_Storage storage, int tuple_size, const GA_Defaults &defaults=GA_Defaults(0.0f), const UT_Options *create_args=nullptr, const GA_AttributeOptions *attribute_options=nullptr)
 
GA_AttributecreateStringAttribute (GA_AttributeOwner owner, GA_AttributeScope scope, const UT_StringHolder &name, const UT_Options *create_args=nullptr, const GA_AttributeOptions *attribute_options=nullptr)
 
GA_AttributecreateStringAttribute (GA_AttributeOwner owner, const UT_StringHolder &name, const UT_Options *create_args=nullptr, const GA_AttributeOptions *attribute_options=nullptr)
 
SYS_FORCE_INLINE const
GA_Attribute
findAttribute (GA_AttributeScope scope, const UT_StringRef &name, const GA_AttributeOwner search_order[], int search_size) const
 
SYS_FORCE_INLINE const
GA_Attribute
findAttribute (const UT_StringRef &name, const GA_AttributeOwner search_order[], int search_size) const
 
SYS_FORCE_INLINE const
GA_Attribute
findAttribute (GA_AttributeOwner owner, GA_AttributeScope scope, const UT_StringRef &name) const
 
SYS_FORCE_INLINE const
GA_Attribute
findAttribute (GA_AttributeOwner owner, const UT_StringRef &name) const
 
SYS_FORCE_INLINE const
GA_Attribute
findPointAttribute (GA_AttributeScope s, const UT_StringRef &name) const
 
SYS_FORCE_INLINE const
GA_Attribute
findPointAttribute (const UT_StringRef &name) const
 
SYS_FORCE_INLINE const
GA_Attribute
findVertexAttribute (GA_AttributeScope s, const UT_StringRef &name) const
 
SYS_FORCE_INLINE const
GA_Attribute
findVertexAttribute (const UT_StringRef &name) const
 
SYS_FORCE_INLINE const
GA_Attribute
findPrimitiveAttribute (GA_AttributeScope s, const UT_StringRef &name) const
 
SYS_FORCE_INLINE const
GA_Attribute
findPrimitiveAttribute (const UT_StringRef &name) const
 
SYS_FORCE_INLINE const
GA_Attribute
findGlobalAttribute (GA_AttributeScope s, const UT_StringRef &name) const
 
SYS_FORCE_INLINE const
GA_Attribute
findGlobalAttribute (const UT_StringRef &name) const
 
SYS_FORCE_INLINE GA_AttributefindAttribute (GA_AttributeScope scope, const UT_StringRef &name, const GA_AttributeOwner search_order[], int search_size)
 
SYS_FORCE_INLINE GA_AttributefindAttribute (const UT_StringRef &name, const GA_AttributeOwner search_order[], int search_size)
 
SYS_FORCE_INLINE GA_AttributefindAttribute (GA_AttributeOwner owner, GA_AttributeScope scope, const UT_StringRef &name)
 
SYS_FORCE_INLINE GA_AttributefindAttribute (GA_AttributeOwner owner, const UT_StringRef &name)
 
SYS_FORCE_INLINE GA_AttributefindPointAttribute (GA_AttributeScope s, const UT_StringRef &name)
 
SYS_FORCE_INLINE GA_AttributefindPointAttribute (const UT_StringRef &name)
 
SYS_FORCE_INLINE GA_AttributefindVertexAttribute (GA_AttributeScope s, const UT_StringRef &name)
 
SYS_FORCE_INLINE GA_AttributefindVertexAttribute (const UT_StringRef &name)
 
SYS_FORCE_INLINE GA_AttributefindPrimitiveAttribute (GA_AttributeScope s, const UT_StringRef &name)
 
SYS_FORCE_INLINE GA_AttributefindPrimitiveAttribute (const UT_StringRef &name)
 
SYS_FORCE_INLINE GA_AttributefindGlobalAttribute (GA_AttributeScope s, const UT_StringRef &name)
 
SYS_FORCE_INLINE GA_AttributefindGlobalAttribute (const UT_StringRef &name)
 
GA_ElementGroupcreateElementGroup (GA_AttributeOwner owner, const UT_StringHolder &name, bool ordered=false)
 
GA_ElementGroupcreateInternalElementGroup (GA_AttributeOwner owner, bool ordered=false)
 
GA_ElementGroupfindElementGroup (GA_AttributeOwner owner, const UT_StringRef &name)
 
const GA_ElementGroupfindElementGroup (GA_AttributeOwner owner, const UT_StringRef &name) const
 
const GA_ElementGroupTablegetElementGroupTable (GA_AttributeOwner owner) const
 
SYS_FORCE_INLINE
GA_ElementGroupTable
getElementGroupTable (GA_AttributeOwner owner)
 
GA_GroupTablegetGroupTable (GA_GroupType group_type)
 
const GA_GroupTablegetGroupTable (GA_GroupType group_type) const
 
template<GA_AttributeOwner OWNER>
SYS_FORCE_INLINE
GA_ElementGroupTableT< OWNER >
::GROUP_TYPE * 
createElementGroup (const UT_StringHolder &name, bool ordered=false)
 
template<GA_AttributeOwner OWNER>
SYS_FORCE_INLINE
GA_ElementGroupTableT< OWNER >
::GROUP_TYPE * 
createInternalElementGroup (bool ordered=false)
 
template<GA_AttributeOwner OWNER>
SYS_FORCE_INLINE
GA_ElementGroupTableT< OWNER >
::GROUP_TYPE * 
findElementGroup (const UT_StringRef &name)
 
template<GA_AttributeOwner OWNER>
SYS_FORCE_INLINE const
GA_ElementGroupTableT< OWNER >
::GROUP_TYPE * 
findElementGroup (const UT_StringRef &name) const
 
void getElementGroupList (GA_AttributeOwner owner, UT_Array< const GA_ElementGroup * > &list) const
 
void getElementGroupList (GA_AttributeOwner owner, UT_Array< GA_ElementGroup * > &list)
 
SYS_FORCE_INLINE bool destroyElementGroup (GA_AttributeOwner owner, const UT_StringRef &name)
 
SYS_FORCE_INLINE bool destroyElementGroup (GA_AttributeOwner owner, const char *name)
 
bool destroyElementGroup (GA_ElementGroup *group)
 
bool destroyGroup (GA_Group *group)
 
SYS_FORCE_INLINE const
GA_PointGroup
findPointGroup (const UT_StringRef &name) const
 
SYS_FORCE_INLINE const
GA_VertexGroup
findVertexGroup (const UT_StringRef &name) const
 
SYS_FORCE_INLINE const
GA_PrimitiveGroup
findPrimitiveGroup (const UT_StringRef &name) const
 
SYS_FORCE_INLINE GA_PointGroupfindPointGroup (const UT_StringRef &name)
 
SYS_FORCE_INLINE GA_VertexGroupfindVertexGroup (const UT_StringRef &name)
 
SYS_FORCE_INLINE
GA_PrimitiveGroup
findPrimitiveGroup (const UT_StringRef &name)
 
GA_EdgeGroupcreateEdgeGroup (const UT_StringHolder &name)
 
GA_EdgeGroupcreateInternalEdgeGroup ()
 
const GA_EdgeGroupfindEdgeGroup (const UT_StringRef &name) const
 
GA_EdgeGroupfindEdgeGroup (const UT_StringRef &name)
 
void getEdgeGroupList (UT_Array< const GA_EdgeGroup * > &list) const
 
void getEdgeGroupList (UT_Array< GA_EdgeGroup * > &list)
 
SYS_FORCE_INLINE bool destroyEdgeGroup (const UT_StringRef &name)
 
SYS_FORCE_INLINE bool destroyEdgeGroup (GA_EdgeGroup *g)
 
GA_Size destroyEmptyGroups (GA_AttributeOwner owner)
 
GA_Size destroyAllEmptyGroups ()
 
const GA_IntrinsicManagergetIntrinsicManager () const
 
template<typename FUNCTOR >
SYS_FORCE_INLINE void forEachPoint (FUNCTOR &&functor) const
 
template<typename FUNCTOR >
SYS_FORCE_INLINE void forEachPoint (const GA_PointGroup *group, FUNCTOR &&functor) const
 
template<typename FUNCTOR >
SYS_FORCE_INLINE void forEachPoint (const GA_PointGroup *group, bool complement, FUNCTOR &&functor) const
 
template<typename FUNCTOR >
SYS_FORCE_INLINE void forEachPrimitive (FUNCTOR &&functor) const
 
template<typename FUNCTOR >
SYS_FORCE_INLINE void forEachPrimitive (const GA_PrimitiveGroup *group, FUNCTOR &&functor) const
 
template<typename FUNCTOR >
SYS_FORCE_INLINE void forEachPrimitive (const GA_PrimitiveGroup *group, bool complement, FUNCTOR &&functor) const
 
GA_Range getPointRange (const GA_PointGroup *group=0) const
 Get a range of all points in the detail. More...
 
GA_Range getPrimitiveRange (const GA_PrimitiveGroup *group=0) const
 Get a range of all primitives in the detail. More...
 
GA_Range getPointRangeSlice (GA_Index begin_ptnum, GA_Index end_ptnum=GA_INVALID_INDEX) const
 Get ordered point range from base_ptnum to end_ptnum, or the end. More...
 
GA_Range getPrimitiveRangeSlice (GA_Index begin_prim, GA_Index end_prim=GA_INVALID_INDEX) const
 Get ordered primitive range from base_prim to end_prim, or the end. More...
 
GA_Range getVertexRange (const GA_VertexGroup *group=0) const
 Get a range of all vertices in the detail. More...
 
GA_Range getGlobalRange () const
 Get a range representing the global (detail) data. More...
 
virtual int64 getMemoryUsage (bool inclusive) const
 Compute memory usage (includes all shared memory) More...
 
virtual void countMemory (UT_MemoryCounter &counter, bool inclusive) const
 
bool enlargeBoundingBox (UT_BoundingRect &box, const GA_Range &range) const
 
bool enlargeBoundingBox (UT_BoundingRect &box, const GA_Range &range, const GA_Attribute *P) const
 
bool enlargeBoundingBox (UT_BoundingBox &box, const GA_Range &range) const
 
bool enlargeBoundingBox (UT_BoundingBox &box, const GA_Range &range, const GA_Attribute *P) const
 
void computeQuickBounds (UT_BoundingBox &box) const
 
void computeQuickBounds (UT_BoundingBox &box, GA_Size counts[], GA_Size count_buf_size) const
 
virtual GA_DetailcloneEmptyDetail (bool clone_attributes) const =0
 
void cloneCopyGroupsAndAttributes (const GA_Detail &src, bool copydetailattribs=false)
 
SYS_FORCE_INLINE void copyPoint (GA_Offset destptoff, GA_Offset srcptoff, const GA_AttributeFilter *filter=nullptr)
 
void copyVertex (GA_Offset destvtxoff, GA_Offset srcvtxoff, bool ref_point_dont_copy, const GA_AttributeFilter *filter=nullptr)
 
void baseMerge (const GA_Detail &src)
 Merge the source detail into this detail (using default options) More...
 
void baseMerge (const GA_Detail &src, GA_MergeOptions &options)
 Merge the source detail into this detail with options. More...
 
void replaceWith (const GA_Detail &src, const GA_AttributeFilter *skip=nullptr, bool full_copy=false)
 
void replaceWithPoints (const GA_Detail &src, const GA_AttributeFilter *skip=nullptr)
 
virtual void clearCaches ()
 
void mergeGlobalAttributes (const GA_Detail &src)
 Merge global attributes (using default options) More...
 
void mergeGlobalAttributes (const GA_Detail &src, GA_MergeOptions &options)
 Merge source global attributes using options. More...
 
void cloneMissingAttributes (const GA_Detail &src, GA_AttributeOwner owner, const GA_AttributeFilter &filter)
 
void cloneMissingGroups (const GA_Detail &src, GA_AttributeOwner owner, const GA_AttributeFilter &filter)
 Clone any missing groups from the source detail. More...
 
bool registerIO (GA_IO *io) const
 Register an IO file format. More...
 
const GA_IOfindIO (const char *name=nullptr) const
 
void getIONames (UT_StringArray &names) const
 
IOStatus save (const char *filename, const GA_SaveOptions *options, UT_StringArray *errors=0) const
 
IOStatus save (std::ostream &os, bool binary, const GA_SaveOptions *options, UT_StringArray *errors=0) const
 
IOStatus save (UT_JSONWriter &w, const GA_SaveOptions *opts=0) const
 
IOStatus load (const char *filename, const GA_LoadOptions *opts=0, UT_StringArray *errors=0)
 Load a geometry file. More...
 
IOStatus load (UT_IStream &is, const GA_LoadOptions *opts=0, UT_StringArray *errors=0)
 Load a geometry file given a UT_IStream. More...
 
IOStatus load (UT_JSONParser &p, const GA_LoadOptions *opts=0, UT_StringArray *errors=0)
 
bool stat (GA_Stat &stat, uint level=0xffff) const
 
void statAttributes (GA_Stat &stat, uint level=0xffff) const
 Fill out only the attribute information on the stat. More...
 
void statGroups (GA_Stat &stat, uint level=0xffff) const
 Fill out only the group information on the stat. More...
 
virtual void statVolumes (GA_Stat &stat, uint level=0xffff) const
 Fill out only the volume information. More...
 
const GA_PrimitiveFactorygetPrimitiveFactory () const
 
virtual void refreshCachedHandles ()
 
void refreshCachedAttributes ()
 Refreshes the cached myP attribute. More...
 
void constructTailInitializers (GA_AttributeOwner owner, GA_Offset start, GA_Offset size=GA_Offset(1))
 
bool containsPrimitiveType (const GA_PrimitiveTypeId &type) const
 
bool containsOnlyPrimitiveTypes (const UT_Array< GA_PrimitiveTypeId > &type) const
 
GA_Size countPrimitiveType (const GA_PrimitiveTypeId &type) const
 
GA_Size countPrimitiveTypeFamily (GA_PrimitiveFamilyMask family) const
 
bool containsLocalTransformPrimitive () const
 
bool getPrimitivesOfType (const GA_PrimitiveTypeId &type, UT_Array< const GA_Primitive * > &prims) const
 
GA_PrimitiveTypeMask getPrimitiveTypeMaskAll () const
 
GA_PrimitiveTypeMask getPrimitiveTypeMask (const GA_PrimitiveGroup *group=0) const
 
const GA_AttributeInstanceMatrixgetInstanceMatrix () const
 Return cached attribute instance matrix pointer. More...
 
void clearInstanceMatrix ()
 
bool isPrimary () const
 
GA_CEAttributegetTopologyCEAttribute (GA_Topology::TopologyCE topotype, GA_StorageClass storage, GA_Precision precision, int &tuplesize, bool isarray, bool read, bool write)
 Builds & acquires GPU backed buffers for topology attributes. More...
 
virtual UT_UniquePtr
< GA_CEAttribute
buildTopologyCEAttribute (GA_Topology::TopologyCE topotype, GA_StorageClass storage, GA_Precision precision, int &tuplesize, bool isarray, bool read, bool write) const
 
void flushCEWriteCaches ()
 
void flushCECaches ()
 
void stealCEBuffers (const GA_Detail &srcdetail)
 
void copyChangedNonTransforming (const GA_Detail *inputgeo, GA_AttributeOwner owner)
 
void incrementMetaCacheCount ()
 
int64 getMetaCacheCount () const
 
GA_Precision getPreferredPrecision () const
 
void setPreferredPrecision (GA_Precision prec)
 
void stashAll ()
 
void destroyStashed ()
 
const GA_AttributegetPwAttribute () const
 
GA_AttributegetPwAttribute ()
 
SYS_FORCE_INLINE GA_PrimitivegetPrimitive (GA_Offset prim_off)
 
SYS_FORCE_INLINE const
GA_Primitive
getPrimitive (GA_Offset prim_off) const
 
GA_PrimitivegetPrimitiveByIndex (GA_Index prim_idx)
 
const GA_PrimitivegetPrimitiveByIndex (GA_Index prim_idx) const
 
bool destroyPointOffset (GA_Offset ptoff, GA_DestroyPointMode mode=GA_LEAVE_PRIMITIVES, bool guarantee_no_vertex_references=false)
 
bool destroyPointIndex (GA_Index index, GA_DestroyPointMode mode=GA_LEAVE_PRIMITIVES, bool guarantee_no_vertex_references=false)
 
GA_Size destroyUnusedPoints (const GA_Range &point_range)
 
GA_Size destroyPointOffsets (const GA_Range &range, GA_DestroyPointMode mode=GA_LEAVE_PRIMITIVES, bool guarantee_no_vertex_references=false)
 
GA_Size destroyPoints (const GA_Range &range, GA_DestroyPointMode mode=GA_LEAVE_PRIMITIVES, bool guarantee_no_vertex_references=false)
 
GA_AttributeOwner getAttributeOwner (const GA_AttributeDict &dict) const
 
const GA_AttributeDictgetAttributeDict (GA_AttributeOwner owner) const
 
GA_AttributecreateAttribute (GA_AttributeOwner owner, GA_AttributeScope scope, const UT_StringHolder &name, const UT_Options *create_args, const GA_AttributeOptions *attribute_options, const UT_StringRef &attribtype)
 
GA_AttributecreateAttribute (GA_AttributeOwner owner, const UT_StringHolder &name, const UT_Options *create_args, const GA_AttributeOptions *attribute_options, const UT_StringRef &attribtype)
 
SYS_FORCE_INLINE GA_ATINumericUPtr createDetachedTupleAttribute (GA_AttributeOwner owner, GA_Storage storage, int tuple_size, const GA_Defaults &defaults=GA_Defaults(0.0f), const GA_AttributeOptions *attribute_options=nullptr) const
 
SYS_FORCE_INLINE GA_AttributeUPtr createDetachedAttribute (GA_AttributeOwner owner, const UT_StringRef &attribtype, const UT_Options *create_args=nullptr, const GA_AttributeOptions *attribute_options=nullptr) const
 
SYS_FORCE_INLINE GA_AttributeUPtr createDetachedAttribute (GA_AttributeOwner owner, const GA_AttributeType &attribtype, const UT_Options *create_args=nullptr, const GA_AttributeOptions *attribute_options=nullptr) const
 
template<typename T >
bool getAttributeAsArray (const GA_Attribute *atr, const GA_Range &range, UT_Array< T > &result) const
 Get/set all the point attribute data from/to a contiguous array. More...
 
template<typename T >
bool setAttributeFromArray (GA_Attribute *atr, const GA_Range &range, const UT_Array< T > &src)
 
GA_PointGroupTablepointGroups ()
 
const GA_PointGroupTablepointGroups () const
 
GA_PrimitiveGroupTableprimitiveGroups ()
 
const GA_PrimitiveGroupTableprimitiveGroups () const
 
GA_VertexGroupTablevertexGroups ()
 
const GA_VertexGroupTablevertexGroups () const
 
GA_EdgeGroupTableedgeGroups ()
 
const GA_EdgeGroupTableedgeGroups () const
 
GA_PointGroupnewPointGroup (const UT_StringHolder &name)
 
GA_VertexGroupnewVertexGroup (const UT_StringHolder &name)
 
GA_PrimitiveGroupnewPrimitiveGroup (const UT_StringHolder &name)
 
GA_EdgeGroupnewEdgeGroup (const UT_StringHolder &name)
 
GA_PointGroupnewInternalPointGroup ()
 
GA_VertexGroupnewInternalVertexGroup ()
 
GA_PrimitiveGroupnewInternalPrimitiveGroup ()
 
GA_EdgeGroupnewInternalEdgeGroup ()
 
GA_PointGroupnewDetachedPointGroup () const
 
GA_PrimitiveGroupnewDetachedPrimitiveGroup () const
 Be sure to do "delete group;" to clean it up. More...
 
GA_VertexGroupnewDetachedVertexGroup () const
 Be sure to do "delete group;" to clean it up. More...
 
GA_EdgeGroupnewDetachedEdgeGroup () const
 Be sure to do "delete group;" to clean it up. More...
 
GA_PointGroupUPtr createDetachedPointGroup () const
 
GA_PrimitiveGroupUPtr createDetachedPrimitiveGroup () const
 
GA_VertexGroupUPtr createDetachedVertexGroup () const
 
GA_EdgeGroupUPtr createDetachedEdgeGroup () const
 
GA_PointGroupnewPointGroup (const UT_StringHolder &name, bool internal)
 
GA_PrimitiveGroupnewPrimitiveGroup (const UT_StringHolder &name, bool internal)
 
GA_VertexGroupnewVertexGroup (const UT_StringHolder &name, bool internal)
 
GA_EdgeGroupnewEdgeGroup (const UT_StringHolder &name, bool internal)
 
GA_LocalIntrinsic findIntrinsic (const UT_StringRef &nm) const
 
GA_LocalIntrinsic findIntrinsic (GA_GlobalIntrinsic h) const
 
GA_GlobalIntrinsic findGlobalIntrinsic (GA_LocalIntrinsic h) const
 
const char * getIntrinsicName (GA_LocalIntrinsic h) const
 
GA_Size getIntrinsicTupleSize (GA_LocalIntrinsic h) const
 
GA_StorageClass getIntrinsicStorage (GA_LocalIntrinsic h) const
 
bool getIntrinsicReadOnly (GA_LocalIntrinsic h) const
 
const UT_OptionsgetIntrinsicOptions (GA_LocalIntrinsic h) const
 
GA_Size getIntrinsic (GA_LocalIntrinsic h, UT_String &val) const
 
GA_Size getIntrinsic (GA_LocalIntrinsic h, UT_StringArray &val) const
 
GA_Size getIntrinsic (GA_LocalIntrinsic h, UT_OptionsHolder &val) const
 
GA_Size getIntrinsic (GA_LocalIntrinsic h, UT_Array< UT_OptionsHolder > &val) const
 
GA_Size getIntrinsic (GA_LocalIntrinsic h, int64 *v, GA_Size size) const
 
GA_Size getIntrinsic (GA_LocalIntrinsic h, fpreal64 *v, GA_Size sz) const
 
bool getIntrinsic (GA_LocalIntrinsic h, float &v) const
 
bool getIntrinsic (GA_LocalIntrinsic h, int &v) const
 
bool getIntrinsic (GA_LocalIntrinsic h, UT_Vector2 &v) const
 
bool getIntrinsic (GA_LocalIntrinsic h, UT_Vector3 &v) const
 
bool getIntrinsic (GA_LocalIntrinsic h, UT_Vector4 &v) const
 
bool getIntrinsic (GA_LocalIntrinsic h, UT_Matrix2 &v) const
 
bool getIntrinsic (GA_LocalIntrinsic h, UT_Matrix3 &v) const
 
bool getIntrinsic (GA_LocalIntrinsic h, UT_Matrix4 &v) const
 
bool getIntrinsic (GA_LocalIntrinsic h, double &v) const
 
bool getIntrinsic (GA_LocalIntrinsic h, int64 &v) const
 
bool getIntrinsic (GA_LocalIntrinsic h, UT_Vector2D &v) const
 
bool getIntrinsic (GA_LocalIntrinsic h, UT_Vector3D &v) const
 
bool getIntrinsic (GA_LocalIntrinsic h, UT_Vector4D &v) const
 
bool getIntrinsic (GA_LocalIntrinsic h, UT_Matrix2D &v) const
 
bool getIntrinsic (GA_LocalIntrinsic h, UT_Matrix3D &v) const
 
bool getIntrinsic (GA_LocalIntrinsic h, UT_Matrix4D &v) const
 
GA_Size setIntrinsic (GA_LocalIntrinsic h, const char *value)
 
GA_Size setIntrinsic (GA_LocalIntrinsic h, const UT_StringArray &value)
 
GA_Size setIntrinsic (GA_LocalIntrinsic h, const char **val, GA_Size s)
 
GA_Size setIntrinsic (GA_LocalIntrinsic h, const UT_OptionsHolder &val)
 
GA_Size setIntrinsic (GA_LocalIntrinsic h, const UT_Array< UT_OptionsHolder > &value)
 
GA_Size setIntrinsic (GA_LocalIntrinsic h, const UT_OptionsHolder *val, GA_Size s)
 
GA_Size setIntrinsic (GA_LocalIntrinsic h, const int64 val)
 
GA_Size setIntrinsic (GA_LocalIntrinsic h, const fpreal64 val)
 
GA_Size setIntrinsic (GA_LocalIntrinsic h, const int64 *val, GA_Size sz)
 
GA_Size setIntrinsic (GA_LocalIntrinsic h, const fpreal64 *v, GA_Size sz)
 
template<typename FUNCTOR >
SYS_FORCE_INLINE void forEachPointBreak (FUNCTOR &&functor) const
 
template<typename FUNCTOR >
SYS_FORCE_INLINE void forEachPointBreak (const GA_PointGroup *group, FUNCTOR &&functor) const
 
template<typename FUNCTOR >
SYS_FORCE_INLINE void forEachPointBreak (const GA_PointGroup *group, bool complement, FUNCTOR &&functor) const
 
template<typename FUNCTOR >
SYS_FORCE_INLINE void forEachPrimitiveBreak (FUNCTOR &&functor) const
 
template<typename FUNCTOR >
SYS_FORCE_INLINE void forEachPrimitiveBreak (const GA_PrimitiveGroup *group, FUNCTOR &&functor) const
 
template<typename FUNCTOR >
SYS_FORCE_INLINE void forEachPrimitiveBreak (const GA_PrimitiveGroup *group, bool complement, FUNCTOR &&functor) const
 
void copyAttributes (GA_AttributeOwner owner, GA_Offset destoff, GA_Offset srcoff, const GA_AttributeFilter *filter=nullptr)
 
void copyAttributes (GA_AttributeOwner owner, GA_Offset destoff, const GA_Detail &srcdetail, GA_Offset srcoff, const GA_AttributeFilter *filter=nullptr)
 
IOStatus saveClassic (const char *, const GA_SaveOptions *) const
 
IOStatus saveClassic (std::ostream &os, bool, const GA_SaveOptions *) const
 
IOStatus statFile (const char *filename, GA_Stat &stat, uint level=0xffff, const GA_LoadOptions *opts=nullptr) const
 
IOStatus stat (UT_JSONParser &p, GA_Stat &stat, uint level) const
 
void addTailInitializer (GA_Attribute *attrib)
 
bool removeTailInitializer (GA_Attribute *attrib)
 
MantraGeometry * mantraGeometry ()
 
const MantraGeometry * mantraGeometry () const
 
void setMantraGeometry (MantraGeometry *m)
 

Static Public Member Functions

static
GA_IntrinsicManager::Registrar 
registerIntrinsics (GA_PrimitiveFactory &factory)
 
template<typename FUNCTOR >
static void forEachOffset (FUNCTOR &&functor, const GA_IndexMap &index_map, const GA_ElementGroup *group=nullptr, bool complement=false)
 
template<typename FUNCTOR >
static void forEachOffsetBreak (FUNCTOR &&functor, const GA_IndexMap &index_map, const GA_ElementGroup *group=nullptr, bool complement=false)
 
static int64 printMemory (UT_WorkBuffer &buffer, bool include_total=true, int indent=3, const char *title="Geometry Memory Tracking")
 Debugging output of detail. More...
 
template<typename T >
static const
T::GB_MACRO_PRIM_TYPE * 
GB_MACRO_CAST (const T *, const GA_Primitive *prim)
 
template<typename T >
static T::GB_MACRO_PRIM_TYPE * GB_MACRO_CAST (const T *, GA_Primitive *prim)
 

Static Public Attributes

static const int64 INVALID_CACHE_COUNT = -1
 

Protected Member Functions

void doConstructTailInitializers (GA_AttributeOwner owner, GA_Offset start, GA_Offset size)
 
bool loadPrimitivesH9 (UT_IStream &is, int count, const GA_FileFormatH9::PrimTypeXlate &type_map, const UT_Array< GA_AttribLoadDataH9 > &prim_attribs, const UT_Array< GA_AttribLoadDataH9 > &vtx_attribs)
 
bool savePrimitivesH9 (std::ostream &os, int binary, const UT_Array< const GA_Primitive * > &list, const GA_FileFormatH9::PrimTypeXlate &type_map, const UT_Array< GA_AttribSaveDataH9 > &prim_attribs, const UT_Array< GA_AttribSaveDataH9 > &vx_attribs) const
 
virtual void privateComputeNormal (const GA_RWHandleV3 &normalattrib, const GA_Group *group, const float cuspangledegrees, const int method) const
 
void splitAnyFloat4P ()
 
void setUniqueId (exint i)
 
void setMetaCacheCount (int64 i)
 
virtual GA_Size localIntrinsicTupleSize (GA_IntrinsicEval &eval) const
 
virtual GA_Size localGetIntrinsicS (GA_IntrinsicEval &eval, UT_String &value) const
 
virtual GA_Size localGetIntrinsicSA (GA_IntrinsicEval &eval, UT_StringArray &value) const
 
virtual GA_Size localGetIntrinsicD (GA_IntrinsicEval &eval, UT_OptionsHolder &value) const
 
virtual GA_Size localGetIntrinsicDA (GA_IntrinsicEval &eval, UT_Array< UT_OptionsHolder > &value) const
 
virtual GA_Size localGetIntrinsicI (GA_IntrinsicEval &eval, int64 *value, GA_Size size) const
 
virtual GA_Size localGetIntrinsicF (GA_IntrinsicEval &eval, fpreal64 *value, GA_Size size) const
 
virtual GA_Size localSetIntrinsicS (GA_IntrinsicEval &eval, const char *value)
 
virtual GA_Size localSetIntrinsicSA (GA_IntrinsicEval &eval, const UT_StringArray &value)
 
virtual GA_Size localSetIntrinsicSS (GA_IntrinsicEval &eval, const char **value, GA_Size size)
 
virtual GA_Size localSetIntrinsicDA (GA_IntrinsicEval &eval, const UT_Array< UT_OptionsHolder > &value)
 
virtual GA_Size localSetIntrinsicDS (GA_IntrinsicEval &eval, const UT_OptionsHolder *value, GA_Size size)
 
virtual GA_Size localSetIntrinsicI (GA_IntrinsicEval &eval, const int64 *value, GA_Size size)
 
virtual GA_Size localSetIntrinsicF (GA_IntrinsicEval &eval, const fpreal64 *value, GA_Size size)
 

Static Protected Member Functions

static void finishLoadH9 (const UT_Array< GA_AttribLoadDataH9 > &attribs)
 

Friends

class GA_AttributeSet
 
class GA_IO
 
class GA_PrimitiveList
 
bool saveVertexPointReferenceH9 (std::ostream &os, int binary, GA_Offset vertex_offset) const
 
bool loadVertexH9 (UT_IStream &is, GA_Offset vertex_offset, const UT_Array< GA_AttribLoadDataH9 > &vtx_l)
 
bool saveVertexH9 (std::ostream &os, int binary, GA_Offset vertex_offset, const UT_Array< GA_AttribSaveDataH9 > &vtx_l) const
 
static bool loadAttribDataH9 (UT_IStream &is, GA_Offset offset, const UT_Array< GA_AttribLoadDataH9 > &l)
 
static bool saveAttribDataH9 (std::ostream &os, int binary, GA_Offset offset, const UT_Array< GA_AttribSaveDataH9 > &l, char delim_ch= '(')
 

Detailed Description

Container class for all geometry.

All Houdini geometry is stored in a GA_Detail class. The detail stores lists of attributes (GA_Attribute) which are maintained in GA_AttributeSet collections. The attribute set contains 4 separate classes of attribute based on the GA_AttributeOwner enum.

Examples:
RAY/RAY_DemoSprite.C, tetprim/GEO_PrimTetra.C, and tetprim/GEO_PrimTetra.h.

Definition at line 96 of file GA_Detail.h.

Member Typedef Documentation

Definition at line 2218 of file GA_Detail.h.

Member Enumeration Documentation

When destroying points, there are three different modes when dealing with primitives that reference the points. These modes cause different behaviours when notifying primitives about point deletion. The behaviour is determined by the result of primitive->dereferencePoint() or primitive->dereferencePoints().

  • GA_LEAVE_PRIMITIVES
    Primitive is destroyed if it returns GA_DEREFERENCE_DESTROY. Point will not be destroyed if prim returns GA_DEREFERENCE_FAIL.
  • GA_DESTROY_DEGENERATE
    Primitive is destroyed if it returns GA_DEREFERENCE_DEGENERATE or GA_DEREFERENCE_DESTROY. Point is not destroyed if prim returns GA_DEREFERENCE_FAIL.
  • GA_DESTROY_DEGENERATE_INCOMPATIBLE
    Primitive is destroyed if it returns GA_DEREFERENCE_DEGENERATE, GA_DEREFERENCE_DESTROY, or GA_DEREFERENCE_FAIL. The point will always be destroyed.
Enumerator
GA_LEAVE_PRIMITIVES 
GA_DESTROY_DEGENERATE 
GA_DESTROY_DEGENERATE_INCOMPATIBLE 

Definition at line 642 of file GA_Detail.h.

Constructor & Destructor Documentation

GA_Detail::GA_Detail ( GA_PrimitiveFactory factory,
GA_Storage  Pstorage = GA_STORE_REAL32,
bool  isprimary = true,
bool  full_topology = true 
)
Parameters
Pstoragedetermines the precision of the P attribute.
isprimarydetermines the default value of the P attribute. true yields (0,0,0) as the default, and false yields (0,0,1), for use by GD_Detail, where the z component is actually the point weight for NURBS/Bezier trim/profile curves. P will have typeinfo "hpoint" if secondary, and "point" if primary.
full_topologyindicates whether the detail should maintain additional attributes which make it easy to lookup
  • Primitives using a shared point
  • The primitive containing a unique point (vertex)
  • The list of vertices referencing a shared point
See Also
typedef::GA_Storage.
virtual GA_Detail::~GA_Detail ( )
virtual

Destructor.

Member Function Documentation

void GA_Detail::addTailInitializer ( GA_Attribute attrib)

Add/Remove an attribute to the tail-initialization list.

When attributes grow in size, they usually initialize their values to the default value. However, some attributes may not adhere to this rule, or due to space optimizations, may have the values set to non-default values. In this case, they should be added to the tail-initialization list. When new elements are appended to the detail, they will be told to re-initialize the new element. Otherwise, the detail will assume that the element values are at their default value.

When removing, the method will return true if the attribute was a tail initializer.

Note
These methods are thread-safe
DO NOT CALL THESE: Use the GA_Attribute::setTailInitialization instead.
SYS_FORCE_INLINE GA_Offset GA_Detail::appendPoint ( )
inline

Append a new point, returning its new data offset.

Examples:
mocapstream/MocapStreamRokokoHDK.C, and SIM/SNOW_Solver.C.

Definition at line 326 of file GA_Detail.h.

SYS_FORCE_INLINE GA_Offset GA_Detail::appendPointBlock ( GA_Size  npoints)
inline

Append new points, returning the first offset of the contiguous block.

Examples:
mocapstream/MocapStreamRokokoHDK.C, RAY/RAY_DemoSprite.C, SIM/SIM_ForceOrbit.C, SOP/SOP_BouncyAgent.C, SOP/SOP_BrushHairLen.C, SOP/SOP_Cop2Raster.C, and tetprim/GEO_PrimTetra.C.

Definition at line 330 of file GA_Detail.h.

GA_Primitive* GA_Detail::appendPrimitive ( const GA_PrimitiveTypeId type)

Append a primitive by GA_PrimitiveTypeId.

Examples:
tetprim/GEO_PrimTetra.C.
GA_Primitive* GA_Detail::appendPrimitive ( const UT_StringRef type)

Append a primitive by type name string.

GA_Offset GA_Detail::appendPrimitiveBlock ( const GA_PrimitiveTypeId type,
GA_Size  nprimitives 
)

Append a contiguous block of primitives by GA_PrimitiveTypeId.

Examples:
RAY/RAY_DemoSprite.C, and tetprim/GEO_PrimTetra.C.
GA_Offset GA_Detail::appendPrimitivesAndVertices ( const GA_PrimitiveTypeId type,
GA_Size  nprimitives,
GA_Size  nvertices_each,
GA_Offset vertex_block_start,
bool  closed_flag = false 
)

Append a contiguous block of primitives and a contiguous block of vertices, with each primitive having nvertices_each vertices, though the vertices will be unwired, so the caller is responsible for wiring the vertices to points. Make absolutely sure you know what you're doing if you call this! It's used by GEO_PrimPoly::buildBlock() and GEO_PrimTetrahedron:: buildBlock(). The return value is the start offset of the primitive block, and vertex_block_start is filled with the start offset of the vertex block.

Examples:
mocapstream/MocapStreamRokokoHDK.C.
GA_Offset GA_Detail::appendPrimitivesAndVertices ( const GA_PrimitiveTypeId type,
const GA_PolyCounts vertex_counts,
GA_Offset vertex_block_start,
bool  closed_flag = false 
)

Append a contiguous block of primitives and a contiguous block of vertices, with vertex_counts being a run-length encoded array indicating the number of vertices in each primitive, though the vertices will be unwired, so the caller is responsible for wiring the vertices to points. Make absolutely sure you know what you're doing if you call this! It's used by GEO_PrimPoly::buildBlock() and GEO_PrimTetrahedron:: buildBlock(). The return value is the start offset of the primitive block, and vertex_block_start is filled with the start offset of the vertex block.

GA_Offset GA_Detail::appendPrimitivesAndVertices ( const std::pair< int, exint > *  primtype_count_pairs,
const GA_PolyCounts vertex_counts,
GA_Offset vertex_block_start,
const exint closed_span_length = nullptr,
exint  ncopies = 1 
)
SYS_FORCE_INLINE GA_Offset GA_Detail::appendVertex ( )
inline

Append a vertex (for the entire detail)

Definition at line 497 of file GA_Detail.h.

SYS_FORCE_INLINE GA_Offset GA_Detail::appendVertexBlock ( GA_Size  nvertices)
inline

Append new vertices, returning the first offset of the contiguous block.

Examples:
tetprim/GEO_PrimTetra.C.

Definition at line 500 of file GA_Detail.h.

void GA_Detail::baseMerge ( const GA_Detail src)

Merge the source detail into this detail (using default options)

void GA_Detail::baseMerge ( const GA_Detail src,
GA_MergeOptions options 
)

Merge the source detail into this detail with options.

virtual UT_UniquePtr<GA_CEAttribute> GA_Detail::buildTopologyCEAttribute ( GA_Topology::TopologyCE  topotype,
GA_StorageClass  storage,
GA_Precision  precision,
int tuplesize,
bool  isarray,
bool  read,
bool  write 
) const
virtual

Builds a new CEAttribute for the given topology. This is not cached internally anywhere, nor does it use any existing cache.

Reimplemented in GU_Detail.

void GA_Detail::bumpAllDataIds ( )

This bumps all data IDs in this detail, including point, vertex, primitive, and detail attribute data IDs, the primitive list data ID, and edge group data IDs.

void GA_Detail::bumpDataIdsForAddOrRemove ( bool  added_or_removed_points,
bool  added_or_removed_vertices,
bool  added_or_removed_primitives 
)

Call this to bump the appropriate data IDs when points, vertices, or primitives have been added or removed. If you're not 100% sure whether an element type has been added or removed, it's better to err on the side of safety and pass true for it.

Examples:
mocapstream/MocapStreamRokokoHDK.C.
void GA_Detail::bumpDataIdsForRewire ( )

Call this to bump the appropriate topology data IDs when vertices have been rewired to different points.

If vertices have been added or removed, or if they've been "stolen" by a different primitive, just call bumpDataIdsForAddOrRemove(____,true,____) instead. If points have been added or removed, but vertices have only been rewired, call bumpDataIdsForAddOrRemove(true,false,false) in addition to this.

bool GA_Detail::checkValidTopology ( ) const
void GA_Detail::clear ( )
inline

Re-initialize:

  • Clears all attributes
  • Clears all geometry elements (points, primitives, vertices, etc.)
  • Clears all groups NOTE: Does NOT clear caches like the primitive stash or selections, though it does clear the attribute instance matrix. It has to keep the stash, because it's used by stashAll(). Use clearAndDestroy() to clear everything.

Definition at line 127 of file GA_Detail.h.

virtual void GA_Detail::clearCaches ( )
inlinevirtual

This clears any caches that subclasses of GA_Detail may have, so that replacing the content of the detail doesn't cause crashes. NOTE: You may or may not also have to call refreshCachedHandles later if P or Pw might be replaced or change storage.

Reimplemented in GU_Detail.

Definition at line 1923 of file GA_Detail.h.

void GA_Detail::clearInstanceMatrix ( )

Clear the attribute instance matrix pointer. This is called automatically when point attributes are added or deleted.

void GA_Detail::clearTopologyAttributes ( )
void GA_Detail::cloneCopyGroupsAndAttributes ( const GA_Detail src,
bool  copydetailattribs = false 
)

Copy groups and attribute definitions from the source detail.

The caller should ensure that all attributes are cleared before calling this method (i.e. call clear())

virtual GA_Detail* GA_Detail::cloneEmptyDetail ( bool  clone_attributes) const
pure virtual

Create a new detail that has all the same attributes, groups, etc. but has no elements. Subclasses should look at: cloneCopyGroupsAndAttributes()

Implemented in GU_Detail, and GEO_Profiles.

void GA_Detail::cloneMissingAttributes ( const GA_Detail src,
GA_AttributeOwner  owner,
const GA_AttributeFilter filter 
)

Clone any missing attributes from the source detail, skipping P, any topology, and any group attributes.

void GA_Detail::cloneMissingGroups ( const GA_Detail src,
GA_AttributeOwner  owner,
const GA_AttributeFilter filter 
)

Clone any missing groups from the source detail.

void GA_Detail::computeQuickBounds ( UT_BoundingBox box) const

Compute the bounding box quickly by:

  • Computing the point bounding box of "P"
  • Computing the maximum extents of all primitives This requires a single pass through the P attribute along with a single pass through primitives.
void GA_Detail::computeQuickBounds ( UT_BoundingBox box,
GA_Size  counts[],
GA_Size  count_buf_size 
) const

Compute the bounding box quickly by:

  • Computing the point bounding box of "P"
  • Computing the maximum extents of all primitives
  • Count the number of each type of primitive in the detail This requires a single pass through the P attribute along with a single pass through primitives. The counts buffer will be filled with the count of each primitive type in the detail. The count_buf_size should be set to getPrimitiveFactory().getPrimTypeCount();
void GA_Detail::constructTailInitializers ( GA_AttributeOwner  owner,
GA_Offset  start,
GA_Offset  size = GA_Offset(1) 
)
inline

Tell all tail initialization attributes to initialize the given offset

Note
This method is not thread-safe

Definition at line 2280 of file GA_Detail.h.

bool GA_Detail::containsLocalTransformPrimitive ( ) const
inline

Definition at line 2295 of file GA_Detail.h.

bool GA_Detail::containsOnlyPrimitiveTypes ( const UT_Array< GA_PrimitiveTypeId > &  type) const
inline

Definition at line 2289 of file GA_Detail.h.

bool GA_Detail::containsPrimitiveType ( const GA_PrimitiveTypeId type) const
inline

Definition at line 2287 of file GA_Detail.h.

void GA_Detail::copyAttributes ( GA_AttributeOwner  owner,
GA_Offset  destoff,
GA_Offset  srcoff,
const GA_AttributeFilter filter = nullptr 
)

Copy all attribute values from srcoff to destoff for attributes accepted by filter. If no filter is specified, all public attributes and non-internal groups are copied.

NOTE: If you're copying multiple offsets, it's much faster to do: For each attribute, copy data for all offsets; rather than: For each offset, copy data in all attributes. These functions are only for if the former is too awkward to do in some case.

void GA_Detail::copyAttributes ( GA_AttributeOwner  owner,
GA_Offset  destoff,
const GA_Detail srcdetail,
GA_Offset  srcoff,
const GA_AttributeFilter filter = nullptr 
)

Copy all attribute values from srcoff to destoff for attributes accepted by filter. If no filter is specified, all public attributes and non-internal groups are copied.

NOTE: If you're copying multiple offsets, it's much faster to do: For each attribute, copy data for all offsets; rather than: For each offset, copy data in all attributes. These functions are only for if the former is too awkward to do in some case.

void GA_Detail::copyChangedNonTransforming ( const GA_Detail inputgeo,
GA_AttributeOwner  owner 
)

Copy changed/non transforming attribute values from inputgeo owner specifies the attribute class to act upon This is used by SOP_Deform/SOP_AttribVop to speed up the duplication of input gdp.

SYS_FORCE_INLINE void GA_Detail::copyPoint ( GA_Offset  destptoff,
GA_Offset  srcptoff,
const GA_AttributeFilter filter = nullptr 
)
inline

Copy all attribute values from srcptoff to destptoff for point attributes accepted by filter. If no filter is specified, all public attributes and non-internal groups are copied.

Definition at line 1853 of file GA_Detail.h.

void GA_Detail::copyVertex ( GA_Offset  destvtxoff,
GA_Offset  srcvtxoff,
bool  ref_point_dont_copy,
const GA_AttributeFilter filter = nullptr 
)
inline

Copy all attribute values from srcvtxoff to destvtxoff for vertex attributes accepted by filter. If no filter is specified, all public attributes and non-internal groups are copied. If ref_point_dont_copy is true, the point of srcvtxoff is referenced by destvtxoff, otherwise point attributes are also copied. NOTE: If you only want to copy vertex attributes, and not the point, call copyAttributes(GA_ATTRIB_VERTEX, ...)

Definition at line 1869 of file GA_Detail.h.

virtual void GA_Detail::countMemory ( UT_MemoryCounter counter,
bool  inclusive 
) const
virtual

Count memory usage using a UT_MemoryCounter in order to count shared memory correctly. If inclusive is true, the size of this object is counted, else only memory owned by this object is counted. If this is pointed to by the calling object, inclusive should be true. If this is contained in the calling object, inclusive should be false. (Its memory was already counted in the size of the calling object.)

Reimplemented in GEO_Detail, GD_Detail, GU_Detail, and GEO_Profiles.

GA_Size GA_Detail::countPrimitiveType ( const GA_PrimitiveTypeId type) const
inline

Definition at line 2291 of file GA_Detail.h.

GA_Size GA_Detail::countPrimitiveTypeFamily ( GA_PrimitiveFamilyMask  family) const
inline

Definition at line 2293 of file GA_Detail.h.

GA_Attribute* GA_Detail::createAttribute ( GA_AttributeOwner  owner,
GA_AttributeScope  scope,
const UT_StringHolder name,
const UT_Options create_args,
const GA_AttributeOptions attribute_options,
const UT_StringRef attribtype 
)
inline

createAttribute is very general purpose method, requiring some knowledge about ATIs, etc. Unless you are creating your own user-defined attributes, it would likely be better to use something at the GEO_Detail level, like addFloatTuple.

Definition at line 864 of file GA_Detail.h.

GA_Attribute* GA_Detail::createAttribute ( GA_AttributeOwner  owner,
const UT_StringHolder name,
const UT_Options create_args,
const GA_AttributeOptions attribute_options,
const UT_StringRef attribtype 
)
inline

createAttribute is very general purpose method, requiring some knowledge about ATIs, etc. Unless you are creating your own user-defined attributes, it would likely be better to use something at the GEO_Detail level, like addFloatTuple.

Definition at line 875 of file GA_Detail.h.

SYS_FORCE_INLINE GA_AttributeUPtr GA_Detail::createDetachedAttribute ( GA_AttributeOwner  owner,
const UT_StringRef attribtype,
const UT_Options create_args = nullptr,
const GA_AttributeOptions attribute_options = nullptr 
) const
inline

This will create detached attributes. They will have the right number of elements at the moment of creation, but will not update with changes to the detail. These attributes will have no name.

Definition at line 905 of file GA_Detail.h.

SYS_FORCE_INLINE GA_AttributeUPtr GA_Detail::createDetachedAttribute ( GA_AttributeOwner  owner,
const GA_AttributeType attribtype,
const UT_Options create_args = nullptr,
const GA_AttributeOptions attribute_options = nullptr 
) const
inline

This will create detached attributes. They will have the right number of elements at the moment of creation, but will not update with changes to the detail. These attributes will have no name.

Definition at line 917 of file GA_Detail.h.

GA_EdgeGroupUPtr GA_Detail::createDetachedEdgeGroup ( ) const
inline

Creates a detached group with no name, owned by the caller. NOTE: The detail knows nothing about any detached groups that are created so these become invalid if the detail is modified.

Be sure to do "delete group;" to clean it up.

Definition at line 1370 of file GA_Detail.h.

GA_PointGroupUPtr GA_Detail::createDetachedPointGroup ( ) const
inline

Creates a detached group with no name, owned by the caller. NOTE: The detail knows nothing about any detached groups that are created so these become invalid if the detail is modified.

Be sure to do "delete group;" to clean it up.

Definition at line 1358 of file GA_Detail.h.

GA_PrimitiveGroupUPtr GA_Detail::createDetachedPrimitiveGroup ( ) const
inline

Creates a detached group with no name, owned by the caller. NOTE: The detail knows nothing about any detached groups that are created so these become invalid if the detail is modified.

Be sure to do "delete group;" to clean it up.

Definition at line 1362 of file GA_Detail.h.

SYS_FORCE_INLINE GA_ATINumericUPtr GA_Detail::createDetachedTupleAttribute ( GA_AttributeOwner  owner,
GA_Storage  storage,
int  tuple_size,
const GA_Defaults defaults = GA_Defaults(0.0f),
const GA_AttributeOptions attribute_options = nullptr 
) const
inline

This will create detached attributes. They will have the right number of elements at the moment of creation, but will not update with changes to the detail. These attributes will have no name.

Definition at line 892 of file GA_Detail.h.

GA_VertexGroupUPtr GA_Detail::createDetachedVertexGroup ( ) const
inline

Creates a detached group with no name, owned by the caller. NOTE: The detail knows nothing about any detached groups that are created so these become invalid if the detail is modified.

Be sure to do "delete group;" to clean it up.

Definition at line 1366 of file GA_Detail.h.

GA_EdgeGroup* GA_Detail::createEdgeGroup ( const UT_StringHolder name)
GA_ElementGroup* GA_Detail::createElementGroup ( GA_AttributeOwner  owner,
const UT_StringHolder name,
bool  ordered = false 
)
template<GA_AttributeOwner OWNER>
SYS_FORCE_INLINE GA_ElementGroupTableT<OWNER>::GROUP_TYPE* GA_Detail::createElementGroup ( const UT_StringHolder name,
bool  ordered = false 
)
inline

Definition at line 1197 of file GA_Detail.h.

GA_EdgeGroup* GA_Detail::createInternalEdgeGroup ( )
GA_ElementGroup* GA_Detail::createInternalElementGroup ( GA_AttributeOwner  owner,
bool  ordered = false 
)
template<GA_AttributeOwner OWNER>
SYS_FORCE_INLINE GA_ElementGroupTableT<OWNER>::GROUP_TYPE* GA_Detail::createInternalElementGroup ( bool  ordered = false)
inline

Definition at line 1207 of file GA_Detail.h.

GA_Attribute* GA_Detail::createStringAttribute ( GA_AttributeOwner  owner,
GA_AttributeScope  scope,
const UT_StringHolder name,
const UT_Options create_args = nullptr,
const GA_AttributeOptions attribute_options = nullptr 
)
inline

Definition at line 983 of file GA_Detail.h.

GA_Attribute* GA_Detail::createStringAttribute ( GA_AttributeOwner  owner,
const UT_StringHolder name,
const UT_Options create_args = nullptr,
const GA_AttributeOptions attribute_options = nullptr 
)
inline

Definition at line 994 of file GA_Detail.h.

void GA_Detail::createTopologyAttributes ( )
GA_Attribute* GA_Detail::createTupleAttribute ( GA_AttributeOwner  owner,
GA_AttributeScope  scope,
const UT_StringHolder name,
GA_Storage  storage,
int  tuple_size,
const GA_Defaults defaults = GA_Defaults(0.0f),
const UT_Options create_args = nullptr,
const GA_AttributeOptions attribute_options = nullptr 
)
inline

Definition at line 954 of file GA_Detail.h.

GA_Attribute* GA_Detail::createTupleAttribute ( GA_AttributeOwner  owner,
const UT_StringHolder name,
GA_Storage  storage,
int  tuple_size,
const GA_Defaults defaults = GA_Defaults(0.0f),
const UT_Options create_args = nullptr,
const GA_AttributeOptions attribute_options = nullptr 
)
inline

Definition at line 969 of file GA_Detail.h.

bool GA_Detail::defragment ( GA_AttributeOwner  owner,
const UT_Options options = nullptr 
)

Defragment index maps NOTE: To make sure that it actually defragments when there is even just one hole, you must pass a UT_Options with a "removeholes" bool option set to true. NOTE: If any defragmenting occurs, this bumps data IDs for everything that is modified.

bool GA_Detail::defragment ( const UT_Options options = nullptr)

Defragment everything. NOTE: To make sure that it actually defragments when there is even just one hole, you must pass a UT_Options with a "removeholes" bool option set to true. NOTE: If any defragmenting occurs, this bumps data IDs for everything that is modified.

GA_Size GA_Detail::destroyAllEmptyGroups ( )
SYS_FORCE_INLINE bool GA_Detail::destroyAttribute ( GA_AttributeOwner  owner,
GA_AttributeScope  scope,
const UT_StringRef name 
)
inline

Definition at line 930 of file GA_Detail.h.

SYS_FORCE_INLINE bool GA_Detail::destroyAttribute ( GA_AttributeOwner  owner,
const UT_StringRef name 
)
inline

Definition at line 938 of file GA_Detail.h.

GA_Size GA_Detail::destroyDegeneratePrimitives ( const GA_Range it,
bool  and_points = false 
)
GA_Size GA_Detail::destroyDegeneratePrimitives ( const GA_PrimitiveGroup prims = 0,
bool  and_points = false 
)
SYS_FORCE_INLINE bool GA_Detail::destroyEdgeGroup ( const UT_StringRef name)
inline

Definition at line 1275 of file GA_Detail.h.

SYS_FORCE_INLINE bool GA_Detail::destroyEdgeGroup ( GA_EdgeGroup g)
inline

Definition at line 1278 of file GA_Detail.h.

SYS_FORCE_INLINE bool GA_Detail::destroyElementGroup ( GA_AttributeOwner  owner,
const UT_StringRef name 
)
inline

Definition at line 1235 of file GA_Detail.h.

SYS_FORCE_INLINE bool GA_Detail::destroyElementGroup ( GA_AttributeOwner  owner,
const char *  name 
)
inline

Definition at line 1239 of file GA_Detail.h.

bool GA_Detail::destroyElementGroup ( GA_ElementGroup group)
GA_Size GA_Detail::destroyEmptyGroups ( GA_AttributeOwner  owner)
bool GA_Detail::destroyGroup ( GA_Group group)
bool GA_Detail::destroyPointIndex ( GA_Index  index,
GA_DestroyPointMode  mode = GA_LEAVE_PRIMITIVES,
bool  guarantee_no_vertex_references = false 
)

Destroy the given point. This may leave dangling vertex references if there is no full topology.

If the guarantee_no_vertex_references flag is true, the operation will be more efficient, but you must truly guarantee that there are no vertices referring to the point.

bool GA_Detail::destroyPointOffset ( GA_Offset  ptoff,
GA_DestroyPointMode  mode = GA_LEAVE_PRIMITIVES,
bool  guarantee_no_vertex_references = false 
)

Destroy the given point. This may leave dangling vertex references if there is no full topology.

If the guarantee_no_vertex_references flag is true, the operation will be more efficient, but you must truly guarantee that there are no vertices referring to the point.

GA_Size GA_Detail::destroyPointOffsets ( const GA_Range range,
GA_DestroyPointMode  mode = GA_LEAVE_PRIMITIVES,
bool  guarantee_no_vertex_references = false 
)
inline

Destroy unused points in given point range

Definition at line 696 of file GA_Detail.h.

GA_Size GA_Detail::destroyPoints ( const GA_Range range,
GA_DestroyPointMode  mode = GA_LEAVE_PRIMITIVES,
bool  guarantee_no_vertex_references = false 
)
inline

Destroy unused points in given point range

Definition at line 703 of file GA_Detail.h.

bool GA_Detail::destroyPrimitive ( GA_Primitive prim,
bool  and_points = false 
)
bool GA_Detail::destroyPrimitiveIndex ( GA_Index  index,
bool  and_points = false 
)
virtual bool GA_Detail::destroyPrimitiveOffset ( GA_Offset  offset,
bool  and_points = false 
)
virtual

Destroy the given primitive. Optionally destroy any referenced points that will no longer be in use after this operation. Note that this option requires full topology.

Reimplemented in GD_Detail.

virtual GA_Size GA_Detail::destroyPrimitiveOffsets ( const GA_Range it,
bool  and_points = false 
)
virtual

Destroy the given primitives. Optionally destroy any referenced points that will no longer be in use after this operation. Note that this option requires full topology.

Reimplemented in GD_Detail.

GA_Size GA_Detail::destroyPrimitives ( const GA_Range it,
bool  and_points = false 
)
inline
Examples:
SOP/SOP_BouncyAgent.C.

Definition at line 680 of file GA_Detail.h.

void GA_Detail::destroyStashed ( )
inline

These two functions should be used instead of the more destructive clearAndDestroy() when it it likely the geometry it relatively stable between operations

Examples:
SOP/SOP_Surface.C.

Definition at line 156 of file GA_Detail.h.

GA_Size GA_Detail::destroyUnusedPoints ( const GA_PointGroup ptgrp = 0)
inline

Destroy unused points. If ptgrp is given, then only within the group.

Definition at line 689 of file GA_Detail.h.

GA_Size GA_Detail::destroyUnusedPoints ( const GA_Range point_range)

Destroy unused points in given point range

bool GA_Detail::destroyVertexOffset ( GA_Offset  offset)

Destroy the given vertex

GA_Size GA_Detail::destroyVertexOffsets ( const GA_Range range)
inline

Definition at line 713 of file GA_Detail.h.

GA_Size GA_Detail::destroyVertices ( const GA_Range range)
inline

Definition at line 715 of file GA_Detail.h.

void GA_Detail::doConstructTailInitializers ( GA_AttributeOwner  owner,
GA_Offset  start,
GA_Offset  size 
)
protected
GA_EdgeGroupTable& GA_Detail::edgeGroups ( )
inline

Access point, primitive, vertex, or edge group tables

Definition at line 1188 of file GA_Detail.h.

const GA_EdgeGroupTable& GA_Detail::edgeGroups ( ) const
inline

Access point, primitive, vertex, or edge group tables

Definition at line 1190 of file GA_Detail.h.

bool GA_Detail::enlargeBoundingBox ( UT_BoundingRect box,
const GA_Range range 
) const
bool GA_Detail::enlargeBoundingBox ( UT_BoundingRect box,
const GA_Range range,
const GA_Attribute P 
) const
bool GA_Detail::enlargeBoundingBox ( UT_BoundingBox box,
const GA_Range range 
) const
bool GA_Detail::enlargeBoundingBox ( UT_BoundingBox box,
const GA_Range range,
const GA_Attribute P 
) const
SYS_FORCE_INLINE const GA_Attribute* GA_Detail::findAttribute ( GA_AttributeScope  scope,
const UT_StringRef name,
const GA_AttributeOwner  search_order[],
int  search_size 
) const
inline

Find an existing attribute, returning a read-only reference.

Examples:
field3d/f3d_io.C, SOP/SOP_CPPWave.C, and SOP/SOP_TimeCompare.C.

Definition at line 1007 of file GA_Detail.h.

SYS_FORCE_INLINE const GA_Attribute* GA_Detail::findAttribute ( const UT_StringRef name,
const GA_AttributeOwner  search_order[],
int  search_size 
) const
inline

Definition at line 1017 of file GA_Detail.h.

SYS_FORCE_INLINE const GA_Attribute* GA_Detail::findAttribute ( GA_AttributeOwner  owner,
GA_AttributeScope  scope,
const UT_StringRef name 
) const
inline

Definition at line 1025 of file GA_Detail.h.

SYS_FORCE_INLINE const GA_Attribute* GA_Detail::findAttribute ( GA_AttributeOwner  owner,
const UT_StringRef name 
) const
inline

Definition at line 1030 of file GA_Detail.h.

SYS_FORCE_INLINE GA_Attribute* GA_Detail::findAttribute ( GA_AttributeScope  scope,
const UT_StringRef name,
const GA_AttributeOwner  search_order[],
int  search_size 
)
inline

Find an existing attribute, returning a read-write reference.

Definition at line 1065 of file GA_Detail.h.

SYS_FORCE_INLINE GA_Attribute* GA_Detail::findAttribute ( const UT_StringRef name,
const GA_AttributeOwner  search_order[],
int  search_size 
)
inline

Definition at line 1075 of file GA_Detail.h.

SYS_FORCE_INLINE GA_Attribute* GA_Detail::findAttribute ( GA_AttributeOwner  owner,
GA_AttributeScope  scope,
const UT_StringRef name 
)
inline

Definition at line 1083 of file GA_Detail.h.

SYS_FORCE_INLINE GA_Attribute* GA_Detail::findAttribute ( GA_AttributeOwner  owner,
const UT_StringRef name 
)
inline

Definition at line 1088 of file GA_Detail.h.

const GA_EdgeGroup* GA_Detail::findEdgeGroup ( const UT_StringRef name) const
GA_EdgeGroup* GA_Detail::findEdgeGroup ( const UT_StringRef name)
GA_ElementGroup* GA_Detail::findElementGroup ( GA_AttributeOwner  owner,
const UT_StringRef name 
)
const GA_ElementGroup* GA_Detail::findElementGroup ( GA_AttributeOwner  owner,
const UT_StringRef name 
) const
template<GA_AttributeOwner OWNER>
SYS_FORCE_INLINE GA_ElementGroupTableT<OWNER>::GROUP_TYPE* GA_Detail::findElementGroup ( const UT_StringRef name)
inline

Definition at line 1216 of file GA_Detail.h.

template<GA_AttributeOwner OWNER>
SYS_FORCE_INLINE const GA_ElementGroupTableT<OWNER>::GROUP_TYPE* GA_Detail::findElementGroup ( const UT_StringRef name) const
inline

Definition at line 1224 of file GA_Detail.h.

SYS_FORCE_INLINE const GA_Attribute* GA_Detail::findGlobalAttribute ( GA_AttributeScope  s,
const UT_StringRef name 
) const
inline

Definition at line 1055 of file GA_Detail.h.

SYS_FORCE_INLINE const GA_Attribute* GA_Detail::findGlobalAttribute ( const UT_StringRef name) const
inline

Definition at line 1059 of file GA_Detail.h.

SYS_FORCE_INLINE GA_Attribute* GA_Detail::findGlobalAttribute ( GA_AttributeScope  s,
const UT_StringRef name 
)
inline

Definition at line 1113 of file GA_Detail.h.

SYS_FORCE_INLINE GA_Attribute* GA_Detail::findGlobalAttribute ( const UT_StringRef name)
inline

Definition at line 1117 of file GA_Detail.h.

GA_GlobalIntrinsic GA_Detail::findGlobalIntrinsic ( GA_LocalIntrinsic  h) const
inline

Query properties of the global/detail intrinsic Note that the tuple size calls the virtual method since the tuple size may be dynamic (i.e. basis knot vector)

Definition at line 1429 of file GA_Detail.h.

GA_LocalIntrinsic GA_Detail::findIntrinsic ( const UT_StringRef nm) const
inline

Query properties of the global/detail intrinsic Note that the tuple size calls the virtual method since the tuple size may be dynamic (i.e. basis knot vector)

Definition at line 1425 of file GA_Detail.h.

GA_LocalIntrinsic GA_Detail::findIntrinsic ( GA_GlobalIntrinsic  h) const
inline

Query properties of the global/detail intrinsic Note that the tuple size calls the virtual method since the tuple size may be dynamic (i.e. basis knot vector)

Definition at line 1427 of file GA_Detail.h.

const GA_IO* GA_Detail::findIO ( const char *  name = nullptr) const
inline

Find an IO class. If no name is specified, the "default" IO class will be returned (the one specified by HOUDINI_GEOMETRY_FORMAT).

Definition at line 1952 of file GA_Detail.h.

SYS_FORCE_INLINE const GA_Attribute* GA_Detail::findPointAttribute ( GA_AttributeScope  s,
const UT_StringRef name 
) const
inline
Examples:
SIM/SNOW_Solver.C.

Definition at line 1034 of file GA_Detail.h.

SYS_FORCE_INLINE const GA_Attribute* GA_Detail::findPointAttribute ( const UT_StringRef name) const
inline

Definition at line 1038 of file GA_Detail.h.

SYS_FORCE_INLINE GA_Attribute* GA_Detail::findPointAttribute ( GA_AttributeScope  s,
const UT_StringRef name 
)
inline

Definition at line 1092 of file GA_Detail.h.

SYS_FORCE_INLINE GA_Attribute* GA_Detail::findPointAttribute ( const UT_StringRef name)
inline

Definition at line 1096 of file GA_Detail.h.

SYS_FORCE_INLINE const GA_PointGroup* GA_Detail::findPointGroup ( const UT_StringRef name) const
inline

Definition at line 1247 of file GA_Detail.h.

SYS_FORCE_INLINE GA_PointGroup* GA_Detail::findPointGroup ( const UT_StringRef name)
inline

Definition at line 1257 of file GA_Detail.h.

SYS_FORCE_INLINE const GA_Attribute* GA_Detail::findPrimitiveAttribute ( GA_AttributeScope  s,
const UT_StringRef name 
) const
inline
SYS_FORCE_INLINE const GA_Attribute* GA_Detail::findPrimitiveAttribute ( const UT_StringRef name) const
inline

Definition at line 1052 of file GA_Detail.h.

SYS_FORCE_INLINE GA_Attribute* GA_Detail::findPrimitiveAttribute ( GA_AttributeScope  s,
const UT_StringRef name 
)
inline

Definition at line 1106 of file GA_Detail.h.

SYS_FORCE_INLINE GA_Attribute* GA_Detail::findPrimitiveAttribute ( const UT_StringRef name)
inline

Definition at line 1110 of file GA_Detail.h.

SYS_FORCE_INLINE const GA_PrimitiveGroup* GA_Detail::findPrimitiveGroup ( const UT_StringRef name) const
inline

Definition at line 1253 of file GA_Detail.h.

SYS_FORCE_INLINE GA_PrimitiveGroup* GA_Detail::findPrimitiveGroup ( const UT_StringRef name)
inline

Definition at line 1263 of file GA_Detail.h.

bool GA_Detail::findUnusedPoints ( GA_OffsetList unused = nullptr) const

Returns true if there are any unused points. If the offset list is given, it is set to all of the found unused points.

SYS_FORCE_INLINE const GA_Attribute* GA_Detail::findVertexAttribute ( GA_AttributeScope  s,
const UT_StringRef name 
) const
inline

Definition at line 1041 of file GA_Detail.h.

SYS_FORCE_INLINE const GA_Attribute* GA_Detail::findVertexAttribute ( const UT_StringRef name) const
inline

Definition at line 1045 of file GA_Detail.h.

SYS_FORCE_INLINE GA_Attribute* GA_Detail::findVertexAttribute ( GA_AttributeScope  s,
const UT_StringRef name 
)
inline

Definition at line 1099 of file GA_Detail.h.

SYS_FORCE_INLINE GA_Attribute* GA_Detail::findVertexAttribute ( const UT_StringRef name)
inline

Definition at line 1103 of file GA_Detail.h.

SYS_FORCE_INLINE const GA_VertexGroup* GA_Detail::findVertexGroup ( const UT_StringRef name) const
inline

Definition at line 1250 of file GA_Detail.h.

SYS_FORCE_INLINE GA_VertexGroup* GA_Detail::findVertexGroup ( const UT_StringRef name)
inline

Definition at line 1260 of file GA_Detail.h.

static void GA_Detail::finishLoadH9 ( const UT_Array< GA_AttribLoadDataH9 > &  attribs)
staticprotected
void GA_Detail::flushCECaches ( )

Flush all GPU-backed CE attributes, clearing them from this geometry.

void GA_Detail::flushCEWriteCaches ( )

All GPU buffers that have been written to will be copied back to the CPU & marked clean.

template<typename FUNCTOR >
static void GA_Detail::forEachOffset ( FUNCTOR &&  functor,
const GA_IndexMap index_map,
const GA_ElementGroup group = nullptr,
bool  complement = false 
)
inlinestatic

Definition at line 1613 of file GA_Detail.h.

template<typename FUNCTOR >
static void GA_Detail::forEachOffsetBreak ( FUNCTOR &&  functor,
const GA_IndexMap index_map,
const GA_ElementGroup group = nullptr,
bool  complement = false 
)
inlinestatic

Definition at line 1670 of file GA_Detail.h.

template<typename FUNCTOR >
SYS_FORCE_INLINE void GA_Detail::forEachPoint ( FUNCTOR &&  functor) const
inline

Calls functor on every active point offset. This is easiest to use with C++ lambdas, e.g.: detail.forEachPoint([&vec,&detail](GA_Offset ptoff) { vec += detail.getPos3(ptoff); });

Definition at line 1499 of file GA_Detail.h.

template<typename FUNCTOR >
SYS_FORCE_INLINE void GA_Detail::forEachPoint ( const GA_PointGroup group,
FUNCTOR &&  functor 
) const
inline

Calls functor on every point offset in a group. This is easiest to use with C++ lambdas, e.g.: detail.forEachPoint(group, [&vec,&detail](GA_Offset ptoff) { vec += detail.getPos3(ptoff); });

Definition at line 1511 of file GA_Detail.h.

template<typename FUNCTOR >
SYS_FORCE_INLINE void GA_Detail::forEachPoint ( const GA_PointGroup group,
bool  complement,
FUNCTOR &&  functor 
) const
inline

Calls functor on every point offset in a group, (or not in a group if complement is true).

Definition at line 1520 of file GA_Detail.h.

template<typename FUNCTOR >
SYS_FORCE_INLINE void GA_Detail::forEachPointBreak ( FUNCTOR &&  functor) const
inline

Like forEachPoint, except taking a functor that returns true to continue, and false to break.

Definition at line 1530 of file GA_Detail.h.

template<typename FUNCTOR >
SYS_FORCE_INLINE void GA_Detail::forEachPointBreak ( const GA_PointGroup group,
FUNCTOR &&  functor 
) const
inline

Like forEachPoint, except taking a functor that returns true to continue, and false to break.

Definition at line 1536 of file GA_Detail.h.

template<typename FUNCTOR >
SYS_FORCE_INLINE void GA_Detail::forEachPointBreak ( const GA_PointGroup group,
bool  complement,
FUNCTOR &&  functor 
) const
inline

Like forEachPoint, except taking a functor that returns true to continue, and false to break.

Definition at line 1542 of file GA_Detail.h.

template<typename FUNCTOR >
SYS_FORCE_INLINE void GA_Detail::forEachPrimitive ( FUNCTOR &&  functor) const
inline

Calls functor on every active primitive offset. This is easiest to use with C++ lambdas, e.g.: detail.forEachPrimitive([&tris,&detail](GA_Offset primoff) { if (detail.getPrimitiveMap().getTypeId(primoff) != GA_PRIMPOLY) return; GA_OffsetListRef vertices = detail.getPrimitiveMap().getVertexList(primoff); if (vertices.size() == 3 && vertices.getExtraFlag()) tris.addOffset(primoff); });

Definition at line 1559 of file GA_Detail.h.

template<typename FUNCTOR >
SYS_FORCE_INLINE void GA_Detail::forEachPrimitive ( const GA_PrimitiveGroup group,
FUNCTOR &&  functor 
) const
inline

Calls functor on every primitive offset in a group. This is easiest to use with C++ lambdas, e.g.: detail.forEachPrimitive(group, [&tris,&detail](GA_Offset primoff) { if (detail.getPrimitiveMap().getTypeId(primoff) != GA_PRIMPOLY) return; GA_OffsetListRef vertices = detail.getPrimitiveMap().getVertexList(primoff); if (vertices.size() == 3 && vertices.getExtraFlag()) tris.addOffset(primoff); });

Definition at line 1575 of file GA_Detail.h.

template<typename FUNCTOR >
SYS_FORCE_INLINE void GA_Detail::forEachPrimitive ( const GA_PrimitiveGroup group,
bool  complement,
FUNCTOR &&  functor 
) const
inline

Calls functor on every primitive offset in a group, (or not in a group if complement is true).

Definition at line 1584 of file GA_Detail.h.

template<typename FUNCTOR >
SYS_FORCE_INLINE void GA_Detail::forEachPrimitiveBreak ( FUNCTOR &&  functor) const
inline

Like forEachPrimitive, except taking a functor that returns true to continue, and false to break.

Definition at line 1594 of file GA_Detail.h.

template<typename FUNCTOR >
SYS_FORCE_INLINE void GA_Detail::forEachPrimitiveBreak ( const GA_PrimitiveGroup group,
FUNCTOR &&  functor 
) const
inline

Like forEachPrimitive, except taking a functor that returns true to continue, and false to break.

Definition at line 1600 of file GA_Detail.h.

template<typename FUNCTOR >
SYS_FORCE_INLINE void GA_Detail::forEachPrimitiveBreak ( const GA_PrimitiveGroup group,
bool  complement,
FUNCTOR &&  functor 
) const
inline

Like forEachPrimitive, except taking a functor that returns true to continue, and false to break.

Definition at line 1606 of file GA_Detail.h.

template<typename T >
static const T::GB_MACRO_PRIM_TYPE* GA_Detail::GB_MACRO_CAST ( const T ,
const GA_Primitive prim 
)
inlinestatic

Utility casting functions used by GA_GBMacros.h to maintain (source code) type compatibility with the old implementations that used the derived GD/GEO_PrimList objects.

The first argument is used solely to infer the templatized type. Derived classes (GD_Detail/GEO_Detail) should contain embedded GB_MACRO_PRIM_TYPE typedef to specify the proper derived type to use for the cast.

Definition at line 2211 of file GA_Detail.h.

template<typename T >
static T::GB_MACRO_PRIM_TYPE* GA_Detail::GB_MACRO_CAST ( const T ,
GA_Primitive prim 
)
inlinestatic

Utility casting functions used by GA_GBMacros.h to maintain (source code) type compatibility with the old implementations that used the derived GD/GEO_PrimList objects.

The first argument is used solely to infer the templatized type. Derived classes (GD_Detail/GEO_Detail) should contain embedded GB_MACRO_PRIM_TYPE typedef to specify the proper derived type to use for the cast.

Definition at line 2214 of file GA_Detail.h.

template<typename T >
bool GA_Detail::getAttributeAsArray ( const GA_Attribute atr,
const GA_Range range,
UT_Array< T > &  result 
) const

Get/set all the point attribute data from/to a contiguous array.

Valid types for T are: int32, int64, fpreal32, fpreal64, UT_Vector2T<S>, UT_Vector3T<S>, UT_Vector4T<S>, UT_QuaternionT<S>, UT_Matrix3T<S>, UT_Matrix4T<S> where S is one of: fpreal, fpreal32, fpreal64, For the UT_Vector classes, S can also be one of: int, int32, int64

const GA_AttributeDict& GA_Detail::getAttributeDict ( GA_AttributeOwner  owner) const
inline

Get access to the attributes for one element type

Definition at line 832 of file GA_Detail.h.

GA_AttributeOwner GA_Detail::getAttributeOwner ( const GA_AttributeDict dict) const

Get access to the attributes for one element type

GA_AttributeSet& GA_Detail::getAttributes ( )
inline
const GA_AttributeSet& GA_Detail::getAttributes ( ) const
inline

Definition at line 797 of file GA_Detail.h.

void GA_Detail::getEdgeGroupList ( UT_Array< const GA_EdgeGroup * > &  list) const
void GA_Detail::getEdgeGroupList ( UT_Array< GA_EdgeGroup * > &  list)
void GA_Detail::getElementGroupList ( GA_AttributeOwner  owner,
UT_Array< const GA_ElementGroup * > &  list 
) const
void GA_Detail::getElementGroupList ( GA_AttributeOwner  owner,
UT_Array< GA_ElementGroup * > &  list 
)
const GA_ElementGroupTable& GA_Detail::getElementGroupTable ( GA_AttributeOwner  owner) const
SYS_FORCE_INLINE GA_ElementGroupTable& GA_Detail::getElementGroupTable ( GA_AttributeOwner  owner)
inline

Definition at line 1163 of file GA_Detail.h.

const GA_IndexMap& GA_Detail::getGlobalMap ( ) const
inline

Definition at line 744 of file GA_Detail.h.

GA_Range GA_Detail::getGlobalRange ( ) const
inline

Get a range representing the global (detail) data.

Definition at line 1763 of file GA_Detail.h.

GA_GroupTable* GA_Detail::getGroupTable ( GA_GroupType  group_type)
const GA_GroupTable* GA_Detail::getGroupTable ( GA_GroupType  group_type) const
const GA_IndexMap& GA_Detail::getIndexMap ( GA_AttributeOwner  owner) const
GA_IndexMap& GA_Detail::getIndexMap ( GA_AttributeOwner  owner)
inline

Definition at line 735 of file GA_Detail.h.

const GA_AttributeInstanceMatrix& GA_Detail::getInstanceMatrix ( ) const

Return cached attribute instance matrix pointer.

GA_Size GA_Detail::getIntrinsic ( GA_LocalIntrinsic  h,
UT_String val 
) const

Get the value of a global/detail intrinsic. These methods return the number of items retrieved.

GA_Size GA_Detail::getIntrinsic ( GA_LocalIntrinsic  h,
UT_StringArray val 
) const

Get the value of a global/detail intrinsic. These methods return the number of items retrieved.

GA_Size GA_Detail::getIntrinsic ( GA_LocalIntrinsic  h,
UT_OptionsHolder val 
) const

Get the value of a global/detail intrinsic. These methods return the number of items retrieved.

GA_Size GA_Detail::getIntrinsic ( GA_LocalIntrinsic  h,
UT_Array< UT_OptionsHolder > &  val 
) const

Get the value of a global/detail intrinsic. These methods return the number of items retrieved.

GA_Size GA_Detail::getIntrinsic ( GA_LocalIntrinsic  h,
int64 v,
GA_Size  size 
) const

Get the value of a global/detail intrinsic. These methods return the number of items retrieved.

GA_Size GA_Detail::getIntrinsic ( GA_LocalIntrinsic  h,
fpreal64 v,
GA_Size  sz 
) const

Get the value of a global/detail intrinsic. These methods return the number of items retrieved.

bool GA_Detail::getIntrinsic ( GA_LocalIntrinsic  h,
float v 
) const

Get the value of a global/detail intrinsic. Returns false if not the right type or not found. Always will clear out the provided value.

bool GA_Detail::getIntrinsic ( GA_LocalIntrinsic  h,
int v 
) const

Get the value of a global/detail intrinsic. Returns false if not the right type or not found. Always will clear out the provided value.

bool GA_Detail::getIntrinsic ( GA_LocalIntrinsic  h,
UT_Vector2 v 
) const

Get the value of a global/detail intrinsic. Returns false if not the right type or not found. Always will clear out the provided value.

bool GA_Detail::getIntrinsic ( GA_LocalIntrinsic  h,
UT_Vector3 v 
) const

Get the value of a global/detail intrinsic. Returns false if not the right type or not found. Always will clear out the provided value.

bool GA_Detail::getIntrinsic ( GA_LocalIntrinsic  h,
UT_Vector4 v 
) const

Get the value of a global/detail intrinsic. Returns false if not the right type or not found. Always will clear out the provided value.

bool GA_Detail::getIntrinsic ( GA_LocalIntrinsic  h,
UT_Matrix2 v 
) const

Get the value of a global/detail intrinsic. Returns false if not the right type or not found. Always will clear out the provided value.

bool GA_Detail::getIntrinsic ( GA_LocalIntrinsic  h,
UT_Matrix3 v 
) const

Get the value of a global/detail intrinsic. Returns false if not the right type or not found. Always will clear out the provided value.

bool GA_Detail::getIntrinsic ( GA_LocalIntrinsic  h,
UT_Matrix4 v 
) const

Get the value of a global/detail intrinsic. Returns false if not the right type or not found. Always will clear out the provided value.

bool GA_Detail::getIntrinsic ( GA_LocalIntrinsic  h,
double &  v 
) const

Get the value of a global/detail intrinsic. Returns false if not the right type or not found. Always will clear out the provided value.

bool GA_Detail::getIntrinsic ( GA_LocalIntrinsic  h,
int64 v 
) const

Get the value of a global/detail intrinsic. Returns false if not the right type or not found. Always will clear out the provided value.

bool GA_Detail::getIntrinsic ( GA_LocalIntrinsic  h,
UT_Vector2D v 
) const

Get the value of a global/detail intrinsic. Returns false if not the right type or not found. Always will clear out the provided value.

bool GA_Detail::getIntrinsic ( GA_LocalIntrinsic  h,
UT_Vector3D v 
) const

Get the value of a global/detail intrinsic. Returns false if not the right type or not found. Always will clear out the provided value.

bool GA_Detail::getIntrinsic ( GA_LocalIntrinsic  h,
UT_Vector4D v 
) const

Get the value of a global/detail intrinsic. Returns false if not the right type or not found. Always will clear out the provided value.

bool GA_Detail::getIntrinsic ( GA_LocalIntrinsic  h,
UT_Matrix2D v 
) const

Get the value of a global/detail intrinsic. Returns false if not the right type or not found. Always will clear out the provided value.

bool GA_Detail::getIntrinsic ( GA_LocalIntrinsic  h,
UT_Matrix3D v 
) const

Get the value of a global/detail intrinsic. Returns false if not the right type or not found. Always will clear out the provided value.

bool GA_Detail::getIntrinsic ( GA_LocalIntrinsic  h,
UT_Matrix4D v 
) const

Get the value of a global/detail intrinsic. Returns false if not the right type or not found. Always will clear out the provided value.

const GA_IntrinsicManager& GA_Detail::getIntrinsicManager ( ) const
inline

Get the intrinsic manager for global/detail intrinsics.

At the current time, these include:

  • "string globaltokens[]"
    List of all global/detail intrinsics
  • "string primitivetokens[]"
    List of all primitive intrinsics
  • "int vertexcount"
    Number of vertices in the detail
  • "int pointcount"
    Number of points in the detail
  • "int primitivecount"
    Number of primitives in the detail

Definition at line 1418 of file GA_Detail.h.

const char* GA_Detail::getIntrinsicName ( GA_LocalIntrinsic  h) const
inline

Query properties of the global/detail intrinsic Note that the tuple size calls the virtual method since the tuple size may be dynamic (i.e. basis knot vector)

Definition at line 1432 of file GA_Detail.h.

const UT_Options* GA_Detail::getIntrinsicOptions ( GA_LocalIntrinsic  h) const
inline

Query properties of the global/detail intrinsic Note that the tuple size calls the virtual method since the tuple size may be dynamic (i.e. basis knot vector)

Definition at line 1439 of file GA_Detail.h.

bool GA_Detail::getIntrinsicReadOnly ( GA_LocalIntrinsic  h) const
inline

Query properties of the global/detail intrinsic Note that the tuple size calls the virtual method since the tuple size may be dynamic (i.e. basis knot vector)

Definition at line 1437 of file GA_Detail.h.

GA_StorageClass GA_Detail::getIntrinsicStorage ( GA_LocalIntrinsic  h) const
inline

Query properties of the global/detail intrinsic Note that the tuple size calls the virtual method since the tuple size may be dynamic (i.e. basis knot vector)

Definition at line 1435 of file GA_Detail.h.

GA_Size GA_Detail::getIntrinsicTupleSize ( GA_LocalIntrinsic  h) const

Query properties of the global/detail intrinsic Note that the tuple size calls the virtual method since the tuple size may be dynamic (i.e. basis knot vector)

void GA_Detail::getIONames ( UT_StringArray names) const
inline

Get a list of all the IO names registered. Returns the number of names in the array.

Definition at line 1957 of file GA_Detail.h.

virtual int64 GA_Detail::getMemoryUsage ( bool  inclusive) const
virtual

Compute memory usage (includes all shared memory)

Reimplemented in GEO_Detail, GD_Detail, GU_Detail, GEO_Profiles, and GOP_Guide.

int64 GA_Detail::getMetaCacheCount ( ) const
inline

Definition at line 2370 of file GA_Detail.h.

SYS_FORCE_INLINE GA_Offset GA_Detail::getNumPointOffsets ( ) const
inline

This will be an exclusive, possibly loose, upper bound when iterating over point offsets. Every point offset in this detail will be strictly less than this.

Note
(getNumPoints() <= getNumPointOffsets()) is always true.
Examples:
SOP/SOP_BrushHairLen.C.

Definition at line 341 of file GA_Detail.h.

SYS_FORCE_INLINE GA_Size GA_Detail::getNumPoints ( ) const
inline
SYS_FORCE_INLINE GA_Offset GA_Detail::getNumPrimitiveOffsets ( ) const
inline

This will be an exclusive, possibly loose, upper bound when iterating over primitive offsets. Every primitive offset in this detail will be strictly less than this.

Note
(getNumPrimitives() <= getNumPrimitiveOffsets()) is always true.

Definition at line 415 of file GA_Detail.h.

SYS_FORCE_INLINE GA_Size GA_Detail::getNumPrimitives ( ) const
inline

Return the number of primitives.

Examples:
RAY/RAY_DemoSprite.C, SOP/SOP_NURBS.C, SOP/SOP_PrimVOP.C, SOP/SOP_Surface.C, and tetprim/SOP_Tetra.C.

Definition at line 408 of file GA_Detail.h.

SYS_FORCE_INLINE GA_Offset GA_Detail::getNumVertexOffsets ( ) const
inline

This will be an exclusive, possibly loose, upper bound when iterating over vertex offsets. Every vertex offset in this detail will be strictly less than this.

Note
(getNumVertices() <= getNumVertexOffsets()) is always true.

Definition at line 511 of file GA_Detail.h.

SYS_FORCE_INLINE GA_Size GA_Detail::getNumVertices ( ) const
inline

Return the number verticies in the entire detail.

Examples:
SOP/SOP_PrimVOP.C.

Definition at line 504 of file GA_Detail.h.

GA_Attribute* GA_Detail::getP ( )
inline

Convenience method to access the P attribute.

Examples:
mocapstream/MocapStreamRokokoHDK.C, SOP/SOP_BrushHairLen.C, SOP/SOP_Cop2Raster.C, SOP/SOP_IKSample.C, SOP/SOP_PointWave.C, and tetprim/SOP_Tetra.C.

Definition at line 164 of file GA_Detail.h.

const GA_Attribute* GA_Detail::getP ( ) const
inline

Definition at line 165 of file GA_Detail.h.

const GA_IndexMap& GA_Detail::getPointMap ( ) const
inline
GA_Range GA_Detail::getPointRange ( const GA_PointGroup group = 0) const
inline

Get a range of all points in the detail.

Examples:
SOP/SOP_BouncyAgent.C, and SOP/SOP_Flatten.C.

Definition at line 1730 of file GA_Detail.h.

GA_Range GA_Detail::getPointRangeSlice ( GA_Index  begin_ptnum,
GA_Index  end_ptnum = GA_INVALID_INDEX 
) const
inline

Get ordered point range from base_ptnum to end_ptnum, or the end.

Definition at line 1737 of file GA_Detail.h.

UT_Vector2 GA_Detail::getPos2 ( GA_Offset  ptoff) const
inline

The ptoff passed is the point offset.

See Also
vertexPoint()

Definition at line 173 of file GA_Detail.h.

UT_Vector2D GA_Detail::getPos2D ( GA_Offset  ptoff) const
inline

Definition at line 178 of file GA_Detail.h.

template<typename T >
bool GA_Detail::getPos3AsArray ( const GA_Range ptrange,
UT_Array< UT_Vector3T< T > > &  positions 
) const
inline

Get an array of all positions from the given point range. The template parameter T is must be one of: fpreal, fpreal32, or fpreal64.

Definition at line 207 of file GA_Detail.h.

SYS_FORCE_INLINE UT_Vector3D GA_Detail::getPos3D ( GA_Offset  ptoff) const
inline

Definition at line 190 of file GA_Detail.h.

template<typename T >
UT_Vector3T<T> GA_Detail::getPos3T ( GA_Offset  ptoff) const
inline

Definition at line 196 of file GA_Detail.h.

UT_Vector4 GA_Detail::getPos4 ( GA_Offset  ptoff) const
inline

The ptoff passed is the point offset.

See Also
vertexPoint()

Definition at line 292 of file GA_Detail.h.

UT_Vector4D GA_Detail::getPos4D ( GA_Offset  ptoff) const
inline

Definition at line 296 of file GA_Detail.h.

GA_Precision GA_Detail::getPreferredPrecision ( ) const

The preferred precision for both computation and creation of attributes. Default precision is 32bit.

SYS_FORCE_INLINE GA_Primitive* GA_Detail::getPrimitive ( GA_Offset  prim_off)
inline

Get the primitive by offset

Examples:
field3d/f3d_io.C.

Definition at line 429 of file GA_Detail.h.

SYS_FORCE_INLINE const GA_Primitive* GA_Detail::getPrimitive ( GA_Offset  prim_off) const
inline

Get the primitive by offset

Definition at line 432 of file GA_Detail.h.

GA_Primitive* GA_Detail::getPrimitiveByIndex ( GA_Index  prim_idx)
inline

Get the primitive by index

Examples:
SOP/SOP_NURBS.C, and tetprim/SOP_Tetra.C.

Definition at line 438 of file GA_Detail.h.

const GA_Primitive* GA_Detail::getPrimitiveByIndex ( GA_Index  prim_idx) const
inline

Get the primitive by index

Definition at line 440 of file GA_Detail.h.

SYS_FORCE_INLINE bool GA_Detail::getPrimitiveClosedFlag ( GA_Offset  primoff) const

Returns the "closed" flag for polygon, NURBS curve, or Bezier curve primitives, or false for other primitive types. You must include GA_Primitive.h to use this.

Definition at line 914 of file GA_Primitive.h.

const GA_PrimitiveFactory& GA_Detail::getPrimitiveFactory ( ) const
inline

Provide access to the factory. This allows users to query information about factories.

Definition at line 2247 of file GA_Detail.h.

const GA_PrimitiveList& GA_Detail::getPrimitiveList ( ) const
inline
GA_PrimitiveList& GA_Detail::getPrimitiveList ( )
inline

Definition at line 794 of file GA_Detail.h.

const GA_IndexMap& GA_Detail::getPrimitiveMap ( ) const
inline
Examples:
SOP/SOP_HDKObject.C.

Definition at line 743 of file GA_Detail.h.

GA_Range GA_Detail::getPrimitiveRange ( const GA_PrimitiveGroup group = 0) const
inline

Get a range of all primitives in the detail.

Examples:
packedprim/packedprim.C, SIM/SIM_SolverHair.C, and SOP/SOP_BouncyAgent.C.

Definition at line 1733 of file GA_Detail.h.

GA_Range GA_Detail::getPrimitiveRangeSlice ( GA_Index  begin_prim,
GA_Index  end_prim = GA_INVALID_INDEX 
) const
inline

Get ordered primitive range from base_prim to end_prim, or the end.

Definition at line 1748 of file GA_Detail.h.

bool GA_Detail::getPrimitivesOfType ( const GA_PrimitiveTypeId type,
UT_Array< const GA_Primitive * > &  prims 
) const
inline

Definition at line 2298 of file GA_Detail.h.

GA_Size GA_Detail::getPrimitivesReferencingPoint ( GA_OffsetArray primitives,
GA_Offset  point_offset 
) const

Given a point offset, return a list of all primitives which reference it. The primitive offsets will be in ascending order and have no duplicates, so you can do: detail.getPrimitivesReferencingPoint(prims0, p0off); detail.getPrimitivesReferencingPoint(prims1, p1off); prims0.sortedIntersection(prims1); to quickly get a list of primitives that contain both p0off and p1off, (not necessarily as an edge, but this can be used as a first pass check.)

SYS_FORCE_INLINE int GA_Detail::getPrimitiveTypeId ( GA_Offset  primoff) const

Returns the type ID of the primitive at the specified primitive offset. You must include GA_Primitive.h to use this.

Definition at line 907 of file GA_Primitive.h.

GA_PrimitiveTypeMask GA_Detail::getPrimitiveTypeMask ( const GA_PrimitiveGroup group = 0) const

Returns the primitive typemask that represents all primitives in this detail.

GA_PrimitiveTypeMask GA_Detail::getPrimitiveTypeMaskAll ( ) const

Returns a primitive typemask that represents all known primitive type by the primitive factory that is associated with this detail.

SYS_FORCE_INLINE GA_Size GA_Detail::getPrimitiveVertexCount ( GA_Offset  primoff) const

Returns the number of vertices in the primitive at the specified primitive offset. You must include GA_Primitive.h to use this.

Definition at line 893 of file GA_Primitive.h.

SYS_FORCE_INLINE GA_OffsetListRef GA_Detail::getPrimitiveVertexList ( GA_Offset  primoff) const

Returns a shallow copy of the vertex list of the primitive at the specified primitive offset. You must include GA_Primitive.h to use this.

Definition at line 886 of file GA_Primitive.h.

SYS_FORCE_INLINE GA_Offset GA_Detail::getPrimitiveVertexOffset ( GA_Offset  primoff,
GA_Size  i 
) const

Returns the vertex offset in the primitive at the specified primitive offset in vertex list position i. If you're accessing all vertex offsets, it'll be faster to call getVertexList() once and either read from that or call forEach(fucntor) on it. You must include GA_Primitive.h to use this.

Definition at line 900 of file GA_Primitive.h.

fpreal GA_Detail::getPw ( GA_Offset  ptoff) const

Get the homogeneous coordinate for a point.

const GA_Attribute* GA_Detail::getPwAttribute ( ) const
inline

NOTE: This will usually return nullptr, because very few things actually set the homogenous coordinate to anything other than 1.0, in which case, the attribute won't be created.

Definition at line 281 of file GA_Detail.h.

GA_Attribute* GA_Detail::getPwAttribute ( )
inline

NOTE: This will usually return nullptr, because very few things actually set the homogenous coordinate to anything other than 1.0, in which case, the attribute won't be created.

Definition at line 285 of file GA_Detail.h.

GA_Topology& GA_Detail::getTopology ( )
inline
Examples:
tetprim/GEO_PrimTetra.C.

Definition at line 798 of file GA_Detail.h.

const GA_Topology& GA_Detail::getTopology ( ) const
inline

Definition at line 799 of file GA_Detail.h.

GA_CEAttribute* GA_Detail::getTopologyCEAttribute ( GA_Topology::TopologyCE  topotype,
GA_StorageClass  storage,
GA_Precision  precision,
int tuplesize,
bool  isarray,
bool  read,
bool  write 
)

Builds & acquires GPU backed buffers for topology attributes.

exint GA_Detail::getUniqueId ( ) const
inline

Definition at line 117 of file GA_Detail.h.

const GA_IndexMap& GA_Detail::getVertexMap ( ) const
inline
Examples:
tetprim/GEO_PrimTetra.C.

Definition at line 742 of file GA_Detail.h.

GA_Range GA_Detail::getVertexRange ( const GA_VertexGroup group = 0) const
inline

Get a range of all vertices in the detail.

Definition at line 1760 of file GA_Detail.h.

GA_Offset GA_Detail::getVertexReferencingPoint ( GA_Offset  ptoff,
GA_Offset  primoff = GA_INVALID_OFFSET 
) const

Given a point and primitive, find the corresponding vertex. Note that this is O(N) on the number of vertices which share the point. If the primitive offset is -1, then the "first" vertex which references the point will be returned. The order of the "first" vertex is arbitrary, though it will likely be the same for each call.

Returns -1 if no topology attributes exist.

GA_Size GA_Detail::getVerticesReferencingPoint ( GA_OffsetArray vertices,
GA_Offset  point_offset 
) const

Given a point offset, return a list of all vertices which reference it. NOTE: The vertex offsets might be in ANY order, and may even be different from run to run, so DO NOT rely on the order!

bool GA_Detail::hasNoSharedPoints ( ) const

Returns false if any point is shared, ie, more than one vertex points to the same point. This being true means each point has at most one vertex and belongs to at most one primitive. Note that points can belong to zero vertices and zero primitives still. Requires topology.

void GA_Detail::incrementMetaCacheCount ( )
inline

Definition at line 2369 of file GA_Detail.h.

bool GA_Detail::isEmpty ( ) const

Returns true if the detail is empty. This is not just having zero points/primitives, but also only having trivial attributes.

SYS_FORCE_INLINE bool GA_Detail::isPDouble ( ) const
inline

Determine if we've bound 64-bit position. Relies on double being alternate binding of our handle. Esoteric position attribute types will confuse this

Definition at line 170 of file GA_Detail.h.

bool GA_Detail::isPointUsed ( GA_Offset  point) const

Returns whether a point is referenced by any vertices This may be a slow operation if there is no topology allocated

bool GA_Detail::isPointUsedFast ( GA_Offset  point) const
inline

Returns if a point is referenced. Fails catastrophically if you do not have full topology.

Definition at line 723 of file GA_Detail.h.

bool GA_Detail::isPrimary ( ) const
inline

This function is entirely here so that GA has a way to check if a GA_Detail is a GEO_Detail (true) or GD_Detail (false).

Definition at line 2323 of file GA_Detail.h.

IOStatus GA_Detail::load ( const char *  filename,
const GA_LoadOptions opts = 0,
UT_StringArray errors = 0 
)

Load a geometry file.

Examples:
RAY/RAY_DemoFile.C, and standalone/geo2voxel.C.
IOStatus GA_Detail::load ( UT_IStream is,
const GA_LoadOptions opts = 0,
UT_StringArray errors = 0 
)

Load a geometry file given a UT_IStream.

IOStatus GA_Detail::load ( UT_JSONParser p,
const GA_LoadOptions opts = 0,
UT_StringArray errors = 0 
)

Load geometry from a JSON stream.

Note
This method uses findIO(GA_IOTable::getJSONToken()) and uses a dynamic cast to GA_IOJSON to actually do the loading.
static bool GA_Detail::loadAttribDataH9 ( UT_IStream is,
GA_Offset  offset,
const UT_Array< GA_AttribLoadDataH9 > &  l 
)
static

Convenience methods for saving/loading both a vertex's point reference and its attribute values in a Houdini9 compatible style. Note that the load wires the vertex to the loaded point.

bool GA_Detail::loadPrimitivesH9 ( UT_IStream is,
int  count,
const GA_FileFormatH9::PrimTypeXlate type_map,
const UT_Array< GA_AttribLoadDataH9 > &  prim_attribs,
const UT_Array< GA_AttribLoadDataH9 > &  vtx_attribs 
)
protected
bool GA_Detail::loadVertexH9 ( UT_IStream is,
GA_Offset  vertex_offset,
const UT_Array< GA_AttribLoadDataH9 > &  vtx_l 
)

Convenience methods for saving/loading both a vertex's point reference and its attribute values in a Houdini9 compatible style. Note that the load wires the vertex to the loaded point.

virtual GA_Size GA_Detail::localGetIntrinsicD ( GA_IntrinsicEval eval,
UT_OptionsHolder value 
) const
protectedvirtual

Virtual implementation of intrinsic attributes. See GA_IntrinsicEval for further details.

Reimplemented in GEO_Detail.

virtual GA_Size GA_Detail::localGetIntrinsicDA ( GA_IntrinsicEval eval,
UT_Array< UT_OptionsHolder > &  value 
) const
protectedvirtual

Virtual implementation of intrinsic attributes. See GA_IntrinsicEval for further details.

Reimplemented in GEO_Detail.

virtual GA_Size GA_Detail::localGetIntrinsicF ( GA_IntrinsicEval eval,
fpreal64 value,
GA_Size  size 
) const
protectedvirtual

Virtual implementation of intrinsic attributes. See GA_IntrinsicEval for further details.

Reimplemented in GEO_Detail.

virtual GA_Size GA_Detail::localGetIntrinsicI ( GA_IntrinsicEval eval,
int64 value,
GA_Size  size 
) const
protectedvirtual

Virtual implementation of intrinsic attributes. See GA_IntrinsicEval for further details.

Reimplemented in GEO_Detail.

virtual GA_Size GA_Detail::localGetIntrinsicS ( GA_IntrinsicEval eval,
UT_String value 
) const
protectedvirtual

Virtual implementation of intrinsic attributes. See GA_IntrinsicEval for further details.

Reimplemented in GEO_Detail.

virtual GA_Size GA_Detail::localGetIntrinsicSA ( GA_IntrinsicEval eval,
UT_StringArray value 
) const
protectedvirtual

Virtual implementation of intrinsic attributes. See GA_IntrinsicEval for further details.

Reimplemented in GEO_Detail.

virtual GA_Size GA_Detail::localIntrinsicTupleSize ( GA_IntrinsicEval eval) const
protectedvirtual

Virtual implementation of intrinsic attributes. See GA_IntrinsicEval for further details.

Reimplemented in GEO_Detail.

virtual GA_Size GA_Detail::localSetIntrinsicDA ( GA_IntrinsicEval eval,
const UT_Array< UT_OptionsHolder > &  value 
)
protectedvirtual

Virtual implementation of intrinsic attributes. See GA_IntrinsicEval for further details.

Reimplemented in GEO_Detail.

virtual GA_Size GA_Detail::localSetIntrinsicDS ( GA_IntrinsicEval eval,
const UT_OptionsHolder value,
GA_Size  size 
)
protectedvirtual

Virtual implementation of intrinsic attributes. See GA_IntrinsicEval for further details.

Reimplemented in GEO_Detail.

virtual GA_Size GA_Detail::localSetIntrinsicF ( GA_IntrinsicEval eval,
const fpreal64 value,
GA_Size  size 
)
protectedvirtual

Virtual implementation of intrinsic attributes. See GA_IntrinsicEval for further details.

Reimplemented in GEO_Detail.

virtual GA_Size GA_Detail::localSetIntrinsicI ( GA_IntrinsicEval eval,
const int64 value,
GA_Size  size 
)
protectedvirtual

Virtual implementation of intrinsic attributes. See GA_IntrinsicEval for further details.

Reimplemented in GEO_Detail.

virtual GA_Size GA_Detail::localSetIntrinsicS ( GA_IntrinsicEval eval,
const char *  value 
)
protectedvirtual

Virtual implementation of intrinsic attributes. See GA_IntrinsicEval for further details.

Reimplemented in GEO_Detail.

virtual GA_Size GA_Detail::localSetIntrinsicSA ( GA_IntrinsicEval eval,
const UT_StringArray value 
)
protectedvirtual

Virtual implementation of intrinsic attributes. See GA_IntrinsicEval for further details.

Reimplemented in GEO_Detail.

virtual GA_Size GA_Detail::localSetIntrinsicSS ( GA_IntrinsicEval eval,
const char **  value,
GA_Size  size 
)
protectedvirtual

Virtual implementation of intrinsic attributes. See GA_IntrinsicEval for further details.

Reimplemented in GEO_Detail.

MantraGeometry* GA_Detail::mantraGeometry ( )
inline

Definition at line 2388 of file GA_Detail.h.

const MantraGeometry* GA_Detail::mantraGeometry ( ) const
inline

Definition at line 2390 of file GA_Detail.h.

void GA_Detail::mergeGlobalAttributes ( const GA_Detail src)

Merge global attributes (using default options)

void GA_Detail::mergeGlobalAttributes ( const GA_Detail src,
GA_MergeOptions options 
)

Merge source global attributes using options.

GA_EdgeGroup* GA_Detail::newDetachedEdgeGroup ( ) const
inline

Be sure to do "delete group;" to clean it up.

Definition at line 1353 of file GA_Detail.h.

GA_PointGroup* GA_Detail::newDetachedPointGroup ( ) const
inline

Creates a detached group with no name, owned by the caller. NOTE: The detail knows nothing about any detached groups that are created so these become invalid if the detail is modified.

Be sure to do "delete group;" to clean it up.

Definition at line 1335 of file GA_Detail.h.

GA_PrimitiveGroup* GA_Detail::newDetachedPrimitiveGroup ( ) const
inline

Be sure to do "delete group;" to clean it up.

Definition at line 1341 of file GA_Detail.h.

GA_VertexGroup* GA_Detail::newDetachedVertexGroup ( ) const
inline

Be sure to do "delete group;" to clean it up.

Definition at line 1347 of file GA_Detail.h.

GA_EdgeGroup* GA_Detail::newEdgeGroup ( const UT_StringHolder name)
inline

Creates a non-internal group with the specified name, owned by this detail.

Definition at line 1300 of file GA_Detail.h.

GA_EdgeGroup* GA_Detail::newEdgeGroup ( const UT_StringHolder name,
bool  internal 
)
inline

TODO: Deprecate internal groups with user-specified names.

Definition at line 1390 of file GA_Detail.h.

GA_EdgeGroup* GA_Detail::newInternalEdgeGroup ( )
inline

Creates an internal group with a unique name, owned by this detail. Be sure to call GA_Detail::destroyGroup (or destroyElementGroup) with this group to clean it up.

Definition at line 1323 of file GA_Detail.h.

GA_PointGroup* GA_Detail::newInternalPointGroup ( )
inline

Creates an internal group with a unique name, owned by this detail. Be sure to call GA_Detail::destroyGroup (or destroyElementGroup) with this group to clean it up.

Definition at line 1311 of file GA_Detail.h.

GA_PrimitiveGroup* GA_Detail::newInternalPrimitiveGroup ( )
inline

Creates an internal group with a unique name, owned by this detail. Be sure to call GA_Detail::destroyGroup (or destroyElementGroup) with this group to clean it up.

Definition at line 1319 of file GA_Detail.h.

GA_VertexGroup* GA_Detail::newInternalVertexGroup ( )
inline

Creates an internal group with a unique name, owned by this detail. Be sure to call GA_Detail::destroyGroup (or destroyElementGroup) with this group to clean it up.

Definition at line 1315 of file GA_Detail.h.

GA_PointGroup* GA_Detail::newPointGroup ( const UT_StringHolder name)
inline

Creates a non-internal group with the specified name, owned by this detail.

Definition at line 1288 of file GA_Detail.h.

GA_PointGroup* GA_Detail::newPointGroup ( const UT_StringHolder name,
bool  internal 
)
inline

TODO: Deprecate internal groups with user-specified names.

Definition at line 1378 of file GA_Detail.h.

GA_PrimitiveGroup* GA_Detail::newPrimitiveGroup ( const UT_StringHolder name)
inline

Creates a non-internal group with the specified name, owned by this detail.

Examples:
SIM/SNOW_Solver.C.

Definition at line 1296 of file GA_Detail.h.

GA_PrimitiveGroup* GA_Detail::newPrimitiveGroup ( const UT_StringHolder name,
bool  internal 
)
inline

TODO: Deprecate internal groups with user-specified names.

Definition at line 1382 of file GA_Detail.h.

GA_VertexGroup* GA_Detail::newVertexGroup ( const UT_StringHolder name)
inline

Creates a non-internal group with the specified name, owned by this detail.

Definition at line 1292 of file GA_Detail.h.

GA_VertexGroup* GA_Detail::newVertexGroup ( const UT_StringHolder name,
bool  internal 
)
inline

TODO: Deprecate internal groups with user-specified names.

Definition at line 1386 of file GA_Detail.h.

GA_PointGroupTable& GA_Detail::pointGroups ( )
inline

Access point, primitive, vertex, or edge group tables

Definition at line 1176 of file GA_Detail.h.

const GA_PointGroupTable& GA_Detail::pointGroups ( ) const
inline

Access point, primitive, vertex, or edge group tables

Definition at line 1178 of file GA_Detail.h.

SYS_FORCE_INLINE GA_Index GA_Detail::pointIndex ( GA_Offset  offset) const
inline

Given a point's data offset, return its index.

Examples:
SOP/SOP_ArrayAttrib.C, SOP/SOP_CustomBrush.C, and SOP/SOP_TimeCompare.C.

Definition at line 349 of file GA_Detail.h.

SYS_FORCE_INLINE GA_Offset GA_Detail::pointOffset ( GA_Index  index) const
inline

Given a point's index (in append order), return its data offset.

Examples:
RAY/RAY_DemoSprite.C, SOP/SOP_BouncyAgent.C, SOP/SOP_Cop2Raster.C, SOP/SOP_CustomBrush.C, SOP/SOP_IKSample.C, SOP/SOP_SParticle.C, and SOP/SOP_TimeCompare.C.

Definition at line 345 of file GA_Detail.h.

SYS_FORCE_INLINE GA_Offset GA_Detail::pointVertex ( GA_Offset  point) const
inline

Given a point, returns a vertex that it references. More than one vertex may refer to a single point, and it is quite possible that no vertices refer to the point. GA_INVALID_OFFSET is returned if no vertices match. See getVerticesReferencingPoint() for methods to get all the points.

Definition at line 559 of file GA_Detail.h.

GA_PrimitiveGroupTable& GA_Detail::primitiveGroups ( )
inline

Access point, primitive, vertex, or edge group tables

Definition at line 1180 of file GA_Detail.h.

const GA_PrimitiveGroupTable& GA_Detail::primitiveGroups ( ) const
inline

Access point, primitive, vertex, or edge group tables

Definition at line 1182 of file GA_Detail.h.

SYS_FORCE_INLINE GA_Index GA_Detail::primitiveIndex ( GA_Offset  offset) const
inline

Given a primitive's data offset, return its index.

Definition at line 423 of file GA_Detail.h.

SYS_FORCE_INLINE GA_Offset GA_Detail::primitiveOffset ( GA_Index  index) const
inline

Given a primitive's index (in append order), return its data offset.

Examples:
SOP/SOP_PrimVOP.C, and SOP/SOP_Surface.C.

Definition at line 419 of file GA_Detail.h.

static int64 GA_Detail::printMemory ( UT_WorkBuffer buffer,
bool  include_total = true,
int  indent = 3,
const char *  title = "Geometry Memory Tracking" 
)
static

Debugging output of detail.

virtual void GA_Detail::privateComputeNormal ( const GA_RWHandleV3 normalattrib,
const GA_Group group,
const float  cuspangledegrees,
const int  method 
) const
inlineprotectedvirtual

This is here just so that GA_AttributeSet::jsonSave() can call GEOcomputeNormals()

Reimplemented in GEO_Detail.

Definition at line 2450 of file GA_Detail.h.

void GA_Detail::refreshCachedAttributes ( )

Refreshes the cached myP attribute.

virtual void GA_Detail::refreshCachedHandles ( )
virtual

Refreshes handles cached in the detail. This method must be called after changing the storage of the P attribute.

static GA_IntrinsicManager::Registrar GA_Detail::registerIntrinsics ( GA_PrimitiveFactory factory)
static

Register global intrinsics. Each subclass should have registration which looks like:

SubClass::registerIntrinsics(GA_PrimitiveFactory &factory)
{
GA_LocalIntrinsicMap map(factory.getDetailIntrinsics());
BaseClass::registerIntrinsics(factory);
map.addAttribute(...);
map.addAttribute(...);
}
bool GA_Detail::registerIO ( GA_IO io) const
inline

Register an IO file format.

Definition at line 1947 of file GA_Detail.h.

bool GA_Detail::removeTailInitializer ( GA_Attribute attrib)

Add/Remove an attribute to the tail-initialization list.

When attributes grow in size, they usually initialize their values to the default value. However, some attributes may not adhere to this rule, or due to space optimizations, may have the values set to non-default values. In this case, they should be added to the tail-initialization list. When new elements are appended to the detail, they will be told to re-initialize the new element. Otherwise, the detail will assume that the element values are at their default value.

When removing, the method will return true if the attribute was a tail initializer.

Note
These methods are thread-safe
DO NOT CALL THESE: Use the GA_Attribute::setTailInitialization instead.
SYS_FORCE_INLINE bool GA_Detail::renameAttribute ( GA_AttributeOwner  owner,
GA_AttributeScope  scope,
const UT_StringRef from_name,
const UT_StringHolder to_name 
)
inline

Definition at line 944 of file GA_Detail.h.

GA_Index GA_Detail::reorderPoint ( GA_Offset  ptoff,
GA_Index  new_order 
)

Reorder a point. The index of the point at the given data offset will be changed to the new order (provided that the ordered position is in a valid range).

Returns
The new index of the point, or -1 if there was an error
GA_Index GA_Detail::reorderPrimitive ( GA_Offset  offset,
GA_Index  new_order 
)

Reorder a primitive. The index of the primitive at the given data offset will be changed to the new order (provided that the ordered position is in a valid range).

Returns
The new index of the primitive, or -1 if there was an error
void GA_Detail::replaceWith ( const GA_Detail src,
const GA_AttributeFilter skip = nullptr,
bool  full_copy = false 
)

Fast version of merge for the common case of completely replacing all of this detail with the source detail, using data IDs to avoid copying things that are the same. This does not copy private scope attributes (except topology) or internal groups. When skip is given, all processing of attributes matching the filter will be skipped. The result is that skipped attributes may or may not exist afterwards, and they also won't be initialized in any expected way. The assumption is that the caller will fully handle creation, initialization, or deletion of skipped attributes. If 'full_copy is true, internal groups and private attribute are also considered.'

void GA_Detail::replaceWithPoints ( const GA_Detail src,
const GA_AttributeFilter skip = nullptr 
)

Fast version of merge for the case of completely replacing all of this detail with the points from the source detail, using data IDs to avoid copying things that are the same. This does not copy private scope attributes (except topology) or internal groups. It will act as if replaceWith was called and then all primitives were deleted, so vertex/primitive attributes will be transferred, but there will be no vertices or primitives. When skip is given, all processing of attributes matching the filter will be skipped. The result is that skipped attributes may or may not exist afterwards, and they also won't be initialized in any expected way. The assumption is that the caller will fully handle creation, initialization, or deletion of skipped attributes.

IOStatus GA_Detail::save ( const char *  filename,
const GA_SaveOptions options,
UT_StringArray errors = 0 
) const

Save to a given filename. An extension of .gz will enable zlib compression (for JSON format only) Options include:

  • string geo:format
    Use the IO format specified by the string See also the options for the stream save
Examples:
packedprim/packedprim.C, packedshareddata/packedshareddata.C, packedsphere/packedsphere.C, standalone/gengeovolume.C, standalone/geo2voxel.C, and standalone/geoisosurface.C.
IOStatus GA_Detail::save ( std::ostream &  os,
bool  binary,
const GA_SaveOptions options,
UT_StringArray errors = 0 
) const

Save to an existing ostream. JSON format will check the options for:

  • bool geo:gzip
    Enable gzip compression for JSON (false)
  • bool geo:saveinfo
    Output optional "info" section [true]
    • string info:software - Software
    • string info:artist - Artist
    • string info:hostname - Hostname comment
    • string info:comment - Arbitrary Comment
    • any info:token - Saved in the "info" section
  • bool group:saveinternal
    Save "internal" groups (debugging)
IOStatus GA_Detail::save ( UT_JSONWriter w,
const GA_SaveOptions opts = 0 
) const

JSON Schema: GA_Detail

The JSON schema for a detail can be broken down into 5 major sections

  • Header: The global information about the detail
  • References: Topological references
  • Attributes: Attribute data for elements
  • Primitives: List of primitives in the detail
  • Groups: Groups
{
"name" : "GA_Detail-Header",
"description" : "Storage for an entire geometry object",
"type" : "orderedmap",
"properties": {
// Header section
"file_version": {
"type" : "string",
"description" : "File Version",
"optional" : true,
},
"info": {
"type" : "object",
"description" :
"Optional tags including:
'software' : Software used to create geometry,
'artist' : Artist name,
'hostname' : Computer name,
'comment' : Arbitrary comment
etc.",
"optional" : true,
}
"pointcount": {
"type" : "integer",
"description" : "The number of points in the geometry",
},
"vertexcount": {
"type" : "integer",
"description" : "The number of vertices in the geometry",
},
"primitivecount": {
"type" : "integer",
"description" : "The number of primitives in the geometry",
},
// Topology section
"topology" : {
"type" : "orderedmap",
"description" : "Topological information",
"properties" : {
"pointref" : {
"type" : [{ "$ref" : "GA_ATITopology" }],
"description" :
"An list of points referenced by each
vertex. The array of 'vertexcount' items
must contain integer values in the range of
(0,pointcount-1)"
}
}
},
// Attributes section
"attributes": {
"type" : { "$ref" : "GA_AttributeSet" } ,
"description" : "Vertex attributes",
}
// Primitives section
"primitives": {
"type" : { "$ref" : "GA_PrimitiveList" } ,
"description" : "An array of primitives",
}
// Groups section
"pointgroups": {
"type" : { "$ref" : "GA_GroupTable" },
"description" : "The list of point groups",
"optional" : true,
},
"primitivegroups": {
"type" : { "$ref" : "GA_GroupTable" },
"description" : "The list of primitive groups",
"optional" : true,
},
"vertexgroups": {
"type" : { "$ref" : "GA_GroupTable" },
"description" : "The list of vertex groups",
"optional" : true,
},
"edgegroups": {
"type" : { "$ref" : "GA_GroupTable" },
"description" : "The list of edge groups",
"optional" : true,
},
},
}
See Also
JSON_FileFormat
Note
This method uses findIO(GA_IOTable::getJSONToken()) and uses a dynamic cast to GA_IOJSON to actually do the writing.
static bool GA_Detail::saveAttribDataH9 ( std::ostream &  os,
int  binary,
GA_Offset  offset,
const UT_Array< GA_AttribSaveDataH9 > &  l,
char  delim_ch = '(' 
)
static

Convenience methods for saving/loading both a vertex's point reference and its attribute values in a Houdini9 compatible style. Note that the load wires the vertex to the loaded point.

IOStatus GA_Detail::saveClassic ( const char *  ,
const GA_SaveOptions  
) const

Save in "hclassic" format.

IOStatus GA_Detail::saveClassic ( std::ostream &  os,
bool  ,
const GA_SaveOptions  
) const

Save in "hclassic" format.

bool GA_Detail::savePrimitivesH9 ( std::ostream &  os,
int  binary,
const UT_Array< const GA_Primitive * > &  list,
const GA_FileFormatH9::PrimTypeXlate type_map,
const UT_Array< GA_AttribSaveDataH9 > &  prim_attribs,
const UT_Array< GA_AttribSaveDataH9 > &  vx_attribs 
) const
protected
bool GA_Detail::saveVertexH9 ( std::ostream &  os,
int  binary,
GA_Offset  vertex_offset,
const UT_Array< GA_AttribSaveDataH9 > &  vtx_l 
) const

Convenience methods for saving/loading both a vertex's point reference and its attribute values in a Houdini9 compatible style. Note that the load wires the vertex to the loaded point.

bool GA_Detail::saveVertexPointReferenceH9 ( std::ostream &  os,
int  binary,
GA_Offset  vertex_offset 
) const

Convenience methods for saving/loading both a vertex's point reference and its attribute values in a Houdini9 compatible style. Note that the load wires the vertex to the loaded point.

template<typename T >
bool GA_Detail::setAttributeFromArray ( GA_Attribute atr,
const GA_Range range,
const UT_Array< T > &  src 
)

Valid types for T are: int32, int64, fpreal32, fpreal64, UT_Vector2T<S>, UT_Vector3T<S>, UT_Vector4T<S>, UT_QuaternionT<S>, UT_Matrix3T<S>, UT_Matrix4T<S> where S is one of: fpreal, fpreal32, fpreal64, For the UT_Vector classes, S can also be one of: int, int32, int64

GA_Size GA_Detail::setIntrinsic ( GA_LocalIntrinsic  h,
const char *  value 
)

Set intrinsic. This will fail if the intrinsic is read-only. These methods return the number of items set.

GA_Size GA_Detail::setIntrinsic ( GA_LocalIntrinsic  h,
const UT_StringArray value 
)

Set intrinsic. This will fail if the intrinsic is read-only. These methods return the number of items set.

GA_Size GA_Detail::setIntrinsic ( GA_LocalIntrinsic  h,
const char **  val,
GA_Size  s 
)

Set intrinsic. This will fail if the intrinsic is read-only. These methods return the number of items set.

GA_Size GA_Detail::setIntrinsic ( GA_LocalIntrinsic  h,
const UT_OptionsHolder val 
)

Set intrinsic. This will fail if the intrinsic is read-only. These methods return the number of items set.

GA_Size GA_Detail::setIntrinsic ( GA_LocalIntrinsic  h,
const UT_Array< UT_OptionsHolder > &  value 
)

Set intrinsic. This will fail if the intrinsic is read-only. These methods return the number of items set.

GA_Size GA_Detail::setIntrinsic ( GA_LocalIntrinsic  h,
const UT_OptionsHolder val,
GA_Size  s 
)

Set intrinsic. This will fail if the intrinsic is read-only. These methods return the number of items set.

GA_Size GA_Detail::setIntrinsic ( GA_LocalIntrinsic  h,
const int64  val 
)

Set intrinsic. This will fail if the intrinsic is read-only. These methods return the number of items set.

GA_Size GA_Detail::setIntrinsic ( GA_LocalIntrinsic  h,
const fpreal64  val 
)

Set intrinsic. This will fail if the intrinsic is read-only. These methods return the number of items set.

GA_Size GA_Detail::setIntrinsic ( GA_LocalIntrinsic  h,
const int64 val,
GA_Size  sz 
)

Set intrinsic. This will fail if the intrinsic is read-only. These methods return the number of items set.

GA_Size GA_Detail::setIntrinsic ( GA_LocalIntrinsic  h,
const fpreal64 v,
GA_Size  sz 
)

Set intrinsic. This will fail if the intrinsic is read-only. These methods return the number of items set.

void GA_Detail::setMantraGeometry ( MantraGeometry *  m)
inline

Definition at line 2392 of file GA_Detail.h.

void GA_Detail::setMetaCacheCount ( int64  i)
inlineprotected

Definition at line 2467 of file GA_Detail.h.

void GA_Detail::setPos2 ( GA_Offset  ptoff,
const UT_Vector2 pos 
)
inline

Set P from a UT_Vector2.

Definition at line 225 of file GA_Detail.h.

void GA_Detail::setPos2 ( GA_Offset  ptoff,
const UT_Vector2D pos 
)
inline

Definition at line 230 of file GA_Detail.h.

SYS_FORCE_INLINE void GA_Detail::setPos3 ( GA_Offset  ptoff,
const UT_Vector3D pos 
)
inline

Definition at line 242 of file GA_Detail.h.

SYS_FORCE_INLINE void GA_Detail::setPos3 ( GA_Offset  ptoff,
fpreal  x,
fpreal  y,
fpreal  z 
)
inline

Set P given the x, y, z components.

Definition at line 248 of file GA_Detail.h.

template<typename T >
bool GA_Detail::setPos3FromArray ( const GA_Range ptrange,
const UT_Array< UT_Vector3T< T > > &  positions 
)
inline

Get an array of all positions from the given point range. The template parameter T is must be one of: fpreal, fpreal32, or fpreal64.

Definition at line 217 of file GA_Detail.h.

void GA_Detail::setPos4 ( GA_Offset  ptoff,
const UT_Vector4 pos 
)
inline

Set P from a UT_Vector4.

Examples:
SOP/SOP_NURBS.C.

Definition at line 302 of file GA_Detail.h.

void GA_Detail::setPos4 ( GA_Offset  ptoff,
const UT_Vector4D pos 
)
inline

Definition at line 307 of file GA_Detail.h.

void GA_Detail::setPos4 ( GA_Offset  ptoff,
fpreal  x,
fpreal  y,
fpreal  z,
fpreal  w 
)
inline

Set P given the x, y, z, w components.

Definition at line 313 of file GA_Detail.h.

void GA_Detail::setPreferredPrecision ( GA_Precision  prec)

Override the preferred precision. Currently will accept 32 and 64bit.

SYS_FORCE_INLINE void GA_Detail::setPrimitiveClosedFlag ( GA_Offset  primoff,
bool  closed 
)

Sets the "closed" flag for polygon primitives. For NURBS curve or Bezier curve primitives, use GEO_Face::close() or GEO_Face::open(). You must include GA_Primitive.h to use this.

Definition at line 921 of file GA_Primitive.h.

void GA_Detail::setPw ( GA_Offset  ptoff,
fpreal  w 
)

Set the homogeneous coordinate for a point.

void GA_Detail::setUniqueId ( exint  i)
inlineprotected

Definition at line 2466 of file GA_Detail.h.

void GA_Detail::setVertexPoint ( GA_Offset  vertex,
GA_Offset  ptoff 
)
inline

Given a vertex, set the corresponding point offset.

Examples:
mocapstream/MocapStreamRokokoHDK.C.

Definition at line 536 of file GA_Detail.h.

void GA_Detail::sortVertexMapByPrimitiveUse ( )

Optimized layout of vertex index map. This sorts the vertex index map by the primitive order use. The map will be defragmented after this function is called.

void GA_Detail::splitAnyFloat4P ( )
protected

This is here so that GA_AttributeSet::jsonLoad() can call it after loading attributes, since VDB primitive loading tries to write to P, and we might as well have it correctly split up before anything might read/write it.

void GA_Detail::stashAll ( )
inline

These two functions should be used instead of the more destructive clearAndDestroy() when it it likely the geometry it relatively stable between operations

Examples:
SOP/SOP_Surface.C.

Definition at line 138 of file GA_Detail.h.

IOStatus GA_Detail::stat ( UT_JSONParser p,
GA_Stat stat,
uint  level 
) const

Stat a disk file rather than loading the entire geometry. (see GA_STAT_LEVEL) The method cannot be static since the primitive factory is required. The primitive factory stores the IO table for the geometry.

When performing a stat on a disk file, if the format supports it, only the header of the file is loaded. This means that the full information for the geometry isn't available. Thus, this will give you different information than if you run stat() on geometry that's fully loaded into memory.

If you inspect a .geo file, you can see the information that's available. For example, you can get the "primcount_summary" using the GA_Stat::getInfoOptions() method.

bool GA_Detail::stat ( GA_Stat stat,
uint  level = 0xffff 
) const

Get information about the detail.

Parameters
stat
- Information about detail
level
- Mask of information to retrieve (see GA_STAT_LEVEL) Note that since this method queries the geometry that's fully loaded into memory, you will get different information than the statFile() method.
void GA_Detail::statAttributes ( GA_Stat stat,
uint  level = 0xffff 
) const

Fill out only the attribute information on the stat.

IOStatus GA_Detail::statFile ( const char *  filename,
GA_Stat stat,
uint  level = 0xffff,
const GA_LoadOptions opts = nullptr 
) const

Stat a disk file rather than loading the entire geometry. (see GA_STAT_LEVEL) The method cannot be static since the primitive factory is required. The primitive factory stores the IO table for the geometry.

When performing a stat on a disk file, if the format supports it, only the header of the file is loaded. This means that the full information for the geometry isn't available. Thus, this will give you different information than if you run stat() on geometry that's fully loaded into memory.

If you inspect a .geo file, you can see the information that's available. For example, you can get the "primcount_summary" using the GA_Stat::getInfoOptions() method.

void GA_Detail::statGroups ( GA_Stat stat,
uint  level = 0xffff 
) const

Fill out only the group information on the stat.

virtual void GA_Detail::statVolumes ( GA_Stat stat,
uint  level = 0xffff 
) const
virtual

Fill out only the volume information.

Reimplemented in GU_Detail.

void GA_Detail::stealCEBuffers ( const GA_Detail srcdetail)

Steal all GPU-backed CE buffers from the source detail, including attributes, VDBs, and volumes. NOTE: this is only safe to call immediately after flushing the source detail's write cache with flushCEWriteCache, then calling replaceWith.

bool GA_Detail::swapPrimitiveOrder ( GA_Offset  offset1,
GA_Offset  offset2 
)

Swap the order of the two specified primitive data offsets.

SYS_FORCE_INLINE void GA_Detail::translatePoint ( GA_Offset  ptoff,
const UT_Vector3 delta 
)
inline

Apply a translation to the specified point index.

See Also
vertexPoint() Effectively setPos3(offset, getPos3(offset) + delta)

Definition at line 256 of file GA_Detail.h.

SYS_FORCE_INLINE void GA_Detail::translatePoint ( GA_Offset  ptoff,
const UT_Vector3D delta 
)
inline

Definition at line 261 of file GA_Detail.h.

GA_VertexGroupTable& GA_Detail::vertexGroups ( )
inline

Access point, primitive, vertex, or edge group tables

Definition at line 1184 of file GA_Detail.h.

const GA_VertexGroupTable& GA_Detail::vertexGroups ( ) const
inline

Access point, primitive, vertex, or edge group tables

Definition at line 1186 of file GA_Detail.h.

SYS_FORCE_INLINE GA_Index GA_Detail::vertexIndex ( GA_Offset  offset) const
inline

Given a vertex's data offset, return its index.

Definition at line 519 of file GA_Detail.h.

SYS_FORCE_INLINE GA_Offset GA_Detail::vertexOffset ( GA_Index  index) const
inline

Given a vertex's index (in append order), return its data offset.

Definition at line 515 of file GA_Detail.h.

SYS_FORCE_INLINE GA_Offset GA_Detail::vertexPoint ( GA_Offset  vertex) const
inline

Given a vertex, return the point it references.

Examples:
SOP/SOP_SParticle.C, and tetprim/GR_PrimTetra.C.

Definition at line 529 of file GA_Detail.h.

SYS_FORCE_INLINE GA_Offset GA_Detail::vertexPrimitive ( GA_Offset  vertex) const
inline

Given a vertex, return primitive it references Returns -1 if no topology attributes exist.

Definition at line 545 of file GA_Detail.h.

SYS_FORCE_INLINE GA_Offset GA_Detail::vertexToNextVertex ( GA_Offset  vtx) const
inline

Given a vertex, returns the next one that shares the same point as this vertex. GA_INVALID_OFFSET if no further vertices match

Definition at line 571 of file GA_Detail.h.

SYS_FORCE_INLINE GA_Offset GA_Detail::vertexToPrevVertex ( GA_Offset  vtx) const
inline

Given a vertex, returns the previous one that shares the same point as this vertex. GA_INVALID_OFFSET if no further vertices match

Definition at line 583 of file GA_Detail.h.

Friends And Related Function Documentation

friend class GA_AttributeSet
friend

Definition at line 2447 of file GA_Detail.h.

friend class GA_IO
friend

Definition at line 2500 of file GA_Detail.h.

friend class GA_PrimitiveList
friend

Definition at line 2501 of file GA_Detail.h.

Member Data Documentation

const int64 GA_Detail::INVALID_CACHE_COUNT = -1
static

Definition at line 2367 of file GA_Detail.h.


The documentation for this class was generated from the following files: