60 template <
typename T>
class UT_Array;
85 class ga_TailInitializeTable;
112 bool full_topology=
true);
131 bool isEmpty()
const;
141 getPrimitiveList().stashAll();
150 incrementMetaCacheCount();
157 getPrimitiveList().destroyStashed();
186 return myHandlePV3.get(ptoff);
193 template <
typename T>
198 return getPos3(ptoff);
200 return getPos3D(ptoff);
205 template <
typename T>
210 return getAttributeAsArray(getP(), ptrange, positions);
215 template <
typename T>
220 return setAttributeFromArray(getP(), ptrange, positions);
227 myHandlePV3.set(ptoff, v3);
238 myHandlePV3.set(ptoff, P);
257 myHandlePV3.add(ptoff, delta);
293 return UT_Vector4(getPos3(ptoff), getPw(ptoff));
315 setPos3(ptoff, x, y, z);
326 {
return appendPointBlock(1); }
330 {
return myPointMap.addElementBlock(npoints); }
334 {
return myPointMap.indexSize(); }
341 {
return myPointMap.offsetSize(); }
345 {
return myPointMap.offsetFromIndex(index); }
349 {
return myPointMap.indexFromOffset(offset); }
379 bool closed_flag =
false);
396 bool closed_flag =
false);
399 const std::pair<int,exint> *primtype_count_pairs,
402 const exint *closed_span_length =
nullptr,
408 {
return myPrimitiveMap.indexSize(); }
415 {
return myPrimitiveMap.offsetSize(); }
419 {
return myPrimitiveMap.offsetFromIndex(index); }
423 {
return myPrimitiveMap.indexFromOffset(offset); }
429 {
return myPrimitiveList.get(prim_off); }
432 {
return myPrimitiveList.get(prim_off); }
438 {
return myPrimitiveList.get(primitiveOffset(prim_idx)); }
440 {
return myPrimitiveList.get(primitiveOffset(prim_idx)); }
468 int getPrimitiveTypeId(
GA_Offset primoff)
const;
474 bool getPrimitiveClosedFlag(
GA_Offset primoff)
const;
481 void setPrimitiveClosedFlag(
GA_Offset primoff,
bool closed);
491 bool swapPrimitiveOrder(
GA_Offset offset1,
500 {
return myVertexMap.addElementBlock(nvertices); }
504 {
return myVertexMap.indexSize(); }
511 {
return myVertexMap.offsetSize(); }
515 {
return myVertexMap.offsetFromIndex(index); }
519 {
return myVertexMap.indexFromOffset(offset); }
531 return myTopology.getPointRef()->getLink(vertex);
538 myTopology.wireVertexPoint(vertex, ptoff);
549 return pref->getLink(vertex);
563 return ref->getLink(point);
575 return ref->getLink(vtx);
587 return ref->getLink(vtx);
603 GA_Size getVerticesReferencingPoint(
614 GA_Size getPrimitivesReferencingPoint(
623 bool hasNoSharedPoints()
const;
656 GA_DestroyPointMode
mode=GA_LEAVE_PRIMITIVES,
657 bool guarantee_no_vertex_references=
false);
659 GA_DestroyPointMode
mode=GA_LEAVE_PRIMITIVES,
660 bool guarantee_no_vertex_references=
false);
668 bool and_points =
false);
670 bool and_points =
false);
672 bool and_points =
false);
678 bool and_points =
false);
680 bool and_points =
false)
681 {
return destroyPrimitiveOffsets(it, and_points); }
683 bool and_points =
false);
690 return destroyUnusedPoints(getPointRange(ptgrp));
697 bool guarantee_no_vertex_references=
false)
699 return destroyElements(range,
mode,
700 guarantee_no_vertex_references);
704 bool guarantee_no_vertex_references=
false)
706 return destroyPointOffsets(range,
mode,
707 guarantee_no_vertex_references);
713 {
return destroyElements(range); }
715 {
return destroyVertexOffsets(range); }
738 ->getIndexMap(owner));
763 : myPointMarker(detail.getPointMap())
764 , myVertexMarker(detail.getVertexMap())
765 , myPrimitiveMarker(detail.getPrimitiveMap())
768 {
return myPointMarker.getRange(); }
770 {
return myVertexMarker.getRange(); }
772 {
return myPrimitiveMarker.getRange(); }
774 {
return myPointMarker.getBegin(); }
776 {
return myVertexMarker.getBegin(); }
778 {
return myPrimitiveMarker.getBegin(); }
780 {
return myPointMarker.getEnd(); }
782 {
return myVertexMarker.getEnd(); }
784 {
return myPrimitiveMarker.getEnd(); }
792 {
return myPrimitiveList; }
794 {
return myPrimitiveList; }
799 bool checkValidTopology()
const;
800 void createTopologyAttributes();
801 void clearTopologyAttributes();
806 void bumpAllDataIds();
817 void bumpDataIdsForRewire();
823 void bumpDataIdsForAddOrRemove(
824 bool added_or_removed_points,
825 bool added_or_removed_vertices,
826 bool added_or_removed_primitives);
832 {
return myAttributes.getDict(owner); }
849 bool defragment(
const UT_Options *options =
nullptr);
854 void sortVertexMapByPrimitiveUse();
870 return myAttributes.createAttribute(
871 owner, scope, name, create_args,
872 attribute_options, attribtype);
880 return myAttributes.createAttribute(
881 owner, name, create_args,
882 attribute_options, attribtype);
898 return myAttributes.createDetachedTupleAttribute(
899 owner, storage, tuple_size,
900 defaults, attribute_options);
910 return myAttributes.createDetachedAttribute(
911 owner, attribtype, create_args,
922 return myAttributes.createDetachedAttribute(
923 owner, attribtype, create_args,
933 return myAttributes.destroyAttribute(owner,
940 return myAttributes.destroyAttribute(owner, name);
948 return myAttributes.renameAttribute(owner, scope,
962 return myAttributes.createTupleAttribute(
963 owner, scope, name, storage,
964 tuple_size, defaults,
976 return myAttributes.createTupleAttribute(
977 owner, name, storage,
978 tuple_size, defaults,
988 return myAttributes.createStringAttribute(
989 owner, scope, name, 1,
998 return myAttributes.createStringAttribute(
999 owner, name, 1, create_args,
1009 int search_size)
const
1011 return myAttributes.findAttribute(
1012 scope, name, search_order,
1018 int search_size)
const
1020 return myAttributes.findAttribute(
1021 name, search_order, search_size);
1027 {
return findAttribute(scope, name, &owner, 1); }
1031 {
return findAttribute(name, &owner, 1); }
1069 return myAttributes.findAttribute(
1070 scope, name, search_order,
1078 return myAttributes.findAttribute(
1079 name, search_order, search_size);
1085 {
return findAttribute(scope, name, &owner, 1); }
1089 {
return findAttribute(name, &owner, 1); }
1128 template <
typename T>
1129 bool getAttributeAsArray(
1140 template <
typename T>
1141 bool setAttributeFromArray(
1150 bool ordered=
false);
1152 bool ordered=
false);
1166 ->getElementGroupTable(owner));
1176 {
return myPointGroups; }
1178 {
return myPointGroups; }
1180 {
return myPrimitiveGroups; }
1182 {
return myPrimitiveGroups; }
1184 {
return myVertexGroups; }
1186 {
return myVertexGroups; }
1188 {
return myEdgeGroups; }
1190 {
return myEdgeGroups; }
1193 template <GA_AttributeOwner OWNER>
1200 createElementGroup(OWNER, name, ordered));
1203 template <GA_AttributeOwner OWNER>
1209 createInternalElementGroup(OWNER,ordered));
1212 template <GA_AttributeOwner OWNER>
1218 findElementGroup(OWNER, name));
1220 template <GA_AttributeOwner OWNER>
1226 findElementGroup(OWNER, name));
1236 {
return getElementGroupTable(owner).destroy(name); }
1240 {
return getElementGroupTable(owner).destroy(name); }
1247 {
return findElementGroup<GA_ATTRIB_POINT>(
name); }
1250 {
return findElementGroup<GA_ATTRIB_VERTEX>(
name); }
1253 {
return findElementGroup<GA_ATTRIB_PRIMITIVE>(
name); }
1257 {
return findElementGroup<GA_ATTRIB_POINT>(
name); }
1260 {
return findElementGroup<GA_ATTRIB_VERTEX>(
name); }
1263 {
return findElementGroup<GA_ATTRIB_PRIMITIVE>(
name); }
1269 void getEdgeGroupList(
1271 void getEdgeGroupList(
1275 {
return myEdgeGroups.destroy(name); }
1278 {
return g ? myEdgeGroups.destroy(g) :
false; }
1282 GA_Size destroyAllEmptyGroups();
1289 return static_cast<GA_PointGroup *
>(pointGroups().newGroup(name));
1293 return static_cast<GA_VertexGroup *
>(vertexGroups().newGroup(name));
1301 return static_cast<GA_EdgeGroup *
>(edgeGroups().newGroup(name));
1312 return static_cast<GA_PointGroup *
>(pointGroups().newInternalGroup());
1316 return static_cast<GA_VertexGroup *
>(vertexGroups().newInternalGroup());
1324 return static_cast<GA_EdgeGroup *
>(edgeGroups().newInternalGroup());
1352 return UTmakeUnique<GA_PointGroup>(*this);
1356 return UTmakeUnique<GA_PrimitiveGroup>(*this);
1360 return UTmakeUnique<GA_VertexGroup>(*this);
1364 return UTmakeUnique<GA_EdgeGroup>(*this);
1372 return static_cast<GA_PointGroup *
>(pointGroups().newGroup(name,
internal));
1376 return static_cast<GA_PrimitiveGroup *
>(primitiveGroups().newGroup(name,
internal));
1380 return static_cast<GA_VertexGroup *
>(vertexGroups().newGroup(name,
internal));
1384 return static_cast<GA_EdgeGroup *
>(edgeGroups().newGroup(name,
internal));
1411 {
return myPrimitiveFactory.getDetailIntrinsics(); }
1418 {
return getIntrinsicManager().getLocalHandle(nm); }
1420 {
return getIntrinsicManager().getLocalHandle(h); }
1422 {
return getIntrinsicManager().getGlobalHandle(h); }
1425 {
return getIntrinsicManager().getName(h); }
1428 {
return getIntrinsicManager().getStorage(h); }
1430 {
return getIntrinsicManager().getReadOnly(h); }
1432 {
return getIntrinsicManager().getOptions(h); }
1489 template<
typename FUNCTOR>
1493 myPointMap.forEachOffset(functor);
1501 template<
typename FUNCTOR>
1505 forEachOffset(functor, myPointMap, group);
1510 template<
typename FUNCTOR>
1514 forEachOffset(functor, myPointMap, group, complement);
1520 template<
typename FUNCTOR>
1524 myPointMap.forEachOffsetBreak(functor);
1526 template<
typename FUNCTOR>
1530 forEachOffset(functor, myPointMap, group);
1532 template<
typename FUNCTOR>
1536 forEachOffset(functor, myPointMap, group, complement);
1549 template<
typename FUNCTOR>
1553 myPrimitiveMap.forEachOffset(functor);
1565 template<
typename FUNCTOR>
1569 forEachOffset(functor, myPrimitiveMap, group);
1574 template<
typename FUNCTOR>
1578 forEachOffset(functor, myPrimitiveMap, group, complement);
1584 template<
typename FUNCTOR>
1588 myPrimitiveMap.forEachOffsetBreak(functor);
1590 template<
typename FUNCTOR>
1594 forEachOffsetBreak(functor, myPrimitiveMap, group);
1596 template<
typename FUNCTOR>
1600 forEachOffsetBreak(functor, myPrimitiveMap, group, complement);
1604 template<
typename FUNCTOR>
1637 group->getConstantSpan(off, veryend, span_size, value);
1640 if (value == complement)
1645 const GA_Offset span_end = off+span_size;
1656 }
while (off != end);
1661 template<
typename FUNCTOR>
1695 group->getConstantSpan(off, veryend, span_size, value);
1698 if (value == complement)
1703 const GA_Offset span_end = off+span_size;
1715 }
while (off != end);
1735 end_ptnum =
GA_Index(getNumPoints());
1736 return GA_Range(getPointMap(), begin_ptnum, end_ptnum,
1746 end_prim =
GA_Index(getNumPrimitives());
1748 begin_prim, end_prim, ordered);
1756 {
return GA_Range(getGlobalMap()); }
1760 virtual int64 getMemoryUsage(
bool inclusive)
const;
1808 virtual GA_Detail *cloneEmptyDetail(
bool clone_attributes)
const = 0;
1814 void cloneCopyGroupsAndAttributes(
const GA_Detail &
src,
1815 bool copydetailattribs =
false);
1828 void copyAttributes(
1833 void copyAttributes(
1864 bool ref_point_dont_copy,
1867 GA_Offset srcptoff = vertexPoint(srcvtxoff);
1868 if (ref_point_dont_copy)
1869 setVertexPoint(destvtxoff, srcptoff);
1871 copyPoint(vertexPoint(destvtxoff), srcptoff,
filter);
1894 bool full_copy =
false);
1917 clearInstanceMatrix();
1918 getPrimitiveList().destroyStashed();
1940 {
return myPrimitiveFactory.registerIO(io); }
1944 const GA_IO *
findIO(
const char *name =
nullptr)
const
1945 {
return myPrimitiveFactory.findIO(name); }
1950 {
return myPrimitiveFactory.getIONames(names); }
1958 : mySuccess(success)
1961 : mySuccess(src.mySuccess)
1968 mySuccess = src.mySuccess;
1992 IOStatus save(
const char *
filename,
2005 IOStatus save(std::ostream &os,
bool binary,
2010 IOStatus saveClassic(
const char *,
const GA_SaveOptions *)
const;
2011 IOStatus saveClassic(std::ostream &os,
bool,
const GA_SaveOptions *)
const;
2117 IOStatus load(
const char *
filename,
2161 { myAttributes.constructElementBlock(owner, offset, nelements); }
2164 { myAttributes.destructElement(owner, offset); }
2189 bool include_total=
true,
2191 const char *title=
"Geometry Memory Tracking");
2202 template <
typename T>
static inline const typename T::GB_MACRO_PRIM_TYPE *
2204 {
return static_cast<const typename T::GB_MACRO_PRIM_TYPE *
>(prim);}
2205 template <
typename T>
static inline typename T::GB_MACRO_PRIM_TYPE *
2207 {
return static_cast<typename T::GB_MACRO_PRIM_TYPE *
>(prim); }
2215 bool loadVertexPointReferenceH9(
UT_IStream &is,
2217 bool saveVertexPointReferenceH9(std::ostream &os,
2222 static bool saveAttribDataH9(std::ostream &os,
int binary,
2225 char delim_ch =
'(');
2231 bool saveVertexH9(std::ostream &os,
int binary,
2240 {
return myPrimitiveFactory; }
2244 virtual void refreshCachedHandles();
2246 void refreshCachedAttributes();
2275 if (myTailInitializers)
2276 doConstructTailInitializers(owner, start,
size);
2280 {
return myPrimitiveList.containsType(type); }
2282 {
return myPrimitiveList.containsOnlyTypes(type); }
2284 {
return myPrimitiveList.countType(type); }
2286 {
return myPrimitiveList.countTypeFamily(family); }
2288 {
return myPrimitiveList.
2289 hasLocalTransform(myPrimitiveFactory); }
2292 {
return myPrimitiveList.getPrimitivesOfType(type, prims); }
2311 void clearInstanceMatrix();
2317 return myPrimitiveFactory.isForPrimaryDetail();
2322 void flushCEWriteCaches();
2326 void flushCECaches();
2333 void stealCEBuffers(
const GA_Detail &srcdetail);
2340 static const int64 INVALID_CACHE_COUNT = -1;
2354 class GA_API MantraGeometry
2358 virtual ~MantraGeometry() {}
2359 virtual void refreshCachedHandles();
2362 {
return myMantraGeometry; }
2364 {
return myMantraGeometry; }
2366 { myMantraGeometry =
m; }
2377 bool savePrimitivesH9(std::ostream &os,
int binary,
2416 static void finishLoadH9(
2426 const float cuspangledegrees,
2427 const int method)
const
2433 void splitAnyFloat4P();
2443 void init(
GA_Storage Pstore,
bool isprimary,
bool full_topology);
2447 void clearData(
bool for_deletion);
2453 GA_DestroyPointMode
mode=GA_LEAVE_PRIMITIVES,
2454 bool guarantee_no_vertex_point_references=
false);
2458 GA_DestroyPointMode
mode=GA_LEAVE_PRIMITIVES);
2464 bool dereferencePoints(
const GA_Range &point_range,
2466 GA_DestroyPointMode
mode=GA_LEAVE_PRIMITIVES);
2489 ga_TailInitializeTable *myTailInitializers;
2490 MantraGeometry *myMantraGeometry;
2509 int64 myMetaCacheCount;
GA_Size countPrimitiveTypeFamily(GA_PrimitiveFamilyMask family) const
UT_Vector2 getPos2(GA_Offset ptoff) const
The ptoff passed is the point offset.
virtual void clearCaches()
A class to manage an ordered array which has fixed offset handles.
GA_PointGroup * newDetachedPointGroup() const
SYS_FORCE_INLINE void forEachPrimitiveBreak(const GA_PrimitiveGroup *group, FUNCTOR &&functor) const
SYS_FORCE_INLINE void setPos3(GA_Offset ptoff, const UT_Vector3 &P)
Set P from a UT_Vector3.
GA_PointGroupTable & pointGroups()
bool isPointUsedFast(GA_Offset point) const
SYS_FORCE_INLINE const GA_PrimitiveGroup * findPrimitiveGroup(const UT_StringRef &name) const
Definition of a geometry attribute.
GA_Range primitiveRange() const
const UT_Options * getIntrinsicOptions(GA_LocalIntrinsic h) const
void incrementMetaCacheCount()
bool containsLocalTransformPrimitive() const
GT_API const UT_StringHolder filename
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.
SYS_FORCE_INLINE const GA_Attribute * findGlobalAttribute(GA_AttributeScope s, const UT_StringRef &name) const
const GA_VertexGroupTable & vertexGroups() const
SYS_FORCE_INLINE GA_Primitive * getPrimitive(GA_Offset prim_off)
GA_PrimitiveGroupUPtr createDetachedPrimitiveGroup() const
SYS_FORCE_INLINE void copyPoint(GA_Offset destptoff, GA_Offset srcptoff, const GA_AttributeFilter *filter=nullptr)
GA_Attribute * createAttribute(GA_AttributeOwner owner, const UT_StringHolder &name, const UT_Options *create_args, const GA_AttributeOptions *attribute_options, const UT_StringRef &attribtype)
bool setLoadCounts(GA_Detail &gdp, GA_Size npoints, GA_Size nvertex, GA_Size nprimitive, GA_LoadMap &loadmap) const
SYS_FORCE_INLINE const GA_Attribute * findVertexAttribute(const UT_StringRef &name) const
GA_Primitive GB_MACRO_PRIM_TYPE
GLuint GLdouble GLdouble GLint GLint order
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
GA_Primitive * getPrimitiveByIndex(GA_Index prim_idx)
GA_Range getVertexRange(const GA_VertexGroup *group=0) const
Get a range of all vertices in the detail.
SYS_FORCE_INLINE void forEachPointBreak(const GA_PointGroup *group, bool complement, FUNCTOR &&functor) const
void getIONames(UT_StringArray &names) const
const GA_IndexMap & getPrimitiveMap() const
SYS_FORCE_INLINE GA_Attribute * findGlobalAttribute(const UT_StringRef &name)
static T::GB_MACRO_PRIM_TYPE * GB_MACRO_CAST(const T *, GA_Primitive *prim)
GA_Size destroyVertexOffsets(const GA_Range &range)
GA_PointGroup * newInternalPointGroup()
SYS_FORCE_INLINE bool isPDouble() const
void constructTailInitializers(GA_AttributeOwner owner, GA_Offset start, GA_Offset size=GA_Offset(1))
Class which stores the default values for a GA_Attribute.
UT_Vector2T< float > UT_Vector2
const GA_IO * findIO(const char *name=nullptr) const
SYS_FORCE_INLINE const GA_Attribute * findVertexAttribute(GA_AttributeScope s, const UT_StringRef &name) const
UT_UniquePtr< GA_VertexGroup > GA_VertexGroupUPtr
UT_Vector4 getPos4(GA_Offset ptoff) const
The ptoff passed is the point offset.
UT_Vector2T< fpreal64 > UT_Vector2D
GA_IndexMap & getIndexMap(GA_AttributeOwner owner)
bool GAisValid(GA_Size v)
OffsetMarker(const GA_Detail &detail)
SYS_FORCE_INLINE void setPos3(GA_Offset ptoff, fpreal x, fpreal y, fpreal z)
Set P given the x, y, z components.
GA_EdgeGroup * newEdgeGroup(const UT_StringHolder &name, bool internal)
void setMantraGeometry(MantraGeometry *m)
const GLuint GLenum const void * binary
UT_Vector3T< float > UT_Vector3
GA_VertexGroup * newInternalVertexGroup()
const GA_IndexMap & getGlobalMap() const
constexpr UT_FixedVector< SYS_FixedArrayElement_t< TS >, SYS_FixedArraySize_v< TS > > UTmakeFixedVector(const TS &as) noexcept
const MantraGeometry * mantraGeometry() const
The merge map keeps track of information when merging details.
GA_Attribute * getP()
Convenience method to access the P attribute.
const GA_Primitive * getPrimitiveByIndex(GA_Index prim_idx) const
GA_Range pointRange() const
GA_StorageClass getIntrinsicStorage(GA_LocalIntrinsic h) const
const GA_Attribute * getP() const
void setPos2(GA_Offset ptoff, const UT_Vector2D &P)
SYS_FORCE_INLINE const GA_Attribute * findAttribute(GA_AttributeOwner owner, GA_AttributeScope scope, const UT_StringRef &name) const
SYS_FORCE_INLINE GA_Attribute * findAttribute(GA_AttributeOwner owner, const UT_StringRef &name)
SYS_FORCE_INLINE GA_ElementGroupTableT< OWNER >::GROUP_TYPE * createElementGroup(const UT_StringHolder &name, bool ordered=false)
JSON reader class which handles parsing of JSON or bJSON files.
SYS_FORCE_INLINE const GA_Attribute * findGlobalAttribute(const UT_StringRef &name) const
SYS_FORCE_INLINE GA_Attribute * findPointAttribute(GA_AttributeScope s, const UT_StringRef &name)
Class used to map H9 geometry files to a form used by GA.
Manager to keep track of global handle to name mappings.
SYS_FORCE_INLINE void forEachOffset(FUNCTOR &&functor) const
Calls functor on every active offset in this index map.
Class which writes ASCII or binary JSON streams.
GA_Range vertexRange() const
Abstract base class for a range membership query object.
GA_PrimitiveGroup * newInternalPrimitiveGroup()
GA_EdgeGroupTable & edgeGroups()
IOStatus & operator=(const IOStatus &src)
GLuint const GLchar * name
SYS_FORCE_INLINE UT_Vector3 getPos3(GA_Offset ptoff) const
The ptoff passed is the point offset.
void setMetaCacheCount(int64 i)
static const T::GB_MACRO_PRIM_TYPE * GB_MACRO_CAST(const T *, const GA_Primitive *prim)
GA_PointGroup * newPointGroup(const UT_StringHolder &name)
SYS_FORCE_INLINE const GA_ElementGroupTableT< OWNER >::GROUP_TYPE * findElementGroup(const UT_StringRef &name) const
SYS_FORCE_INLINE void forEachPointBreak(const GA_PointGroup *group, FUNCTOR &&functor) const
SYS_FORCE_INLINE GA_PrimitiveGroup * findPrimitiveGroup(const UT_StringRef &name)
GA_Offset pointBegin() const
SYS_FORCE_INLINE GA_Attribute * findPrimitiveAttribute(GA_AttributeScope s, const UT_StringRef &name)
void setVertexPoint(GA_Offset vertex, GA_Offset ptoff)
Given a vertex, set the corresponding point offset.
exint GA_Size
Defines the bit width for index and offset types in GA.
bool setPos3FromArray(const GA_Range &ptrange, const UT_Array< UT_Vector3T< T > > &positions)
GA_Size destroyPrimitives(const GA_Range &it, bool and_points=false)
SYS_FORCE_INLINE GA_Offset vertexToPrevVertex(GA_Offset vtx) const
#define GA_INVALID_OFFSET
GA_Size countPrimitiveType(const GA_PrimitiveTypeId &type) const
SYS_FORCE_INLINE void setPos3(GA_Offset ptoff, const UT_Vector3D &P)
SYS_FORCE_INLINE GA_Offset findActiveOffset(GA_Offset start, GA_Offset end) const
A range of elements in an index-map.
GA_PrimitiveGroup * newPrimitiveGroup(const UT_StringHolder &name)
A string map of attributes to ease backward compatibility In the GB/GEO/GU library code would often p...
GLubyte GLubyte GLubyte GLubyte w
SYS_FORCE_INLINE const GA_Attribute * findPointAttribute(const UT_StringRef &name) const
SYS_FORCE_INLINE GA_VertexGroup * findVertexGroup(const UT_StringRef &name)
GA_VertexGroup * newVertexGroup(const UT_StringHolder &name, bool internal)
GA_PointGroupUPtr createDetachedPointGroup() const
SYS_FORCE_INLINE void forEachPrimitiveBreak(FUNCTOR &&functor) const
GA_EdgeGroup * newInternalEdgeGroup()
GA_VertexGroupTable & vertexGroups()
SYS_FORCE_INLINE const GA_Attribute * findAttribute(GA_AttributeOwner owner, const UT_StringRef &name) const
MantraGeometry * mantraGeometry()
SYS_FORCE_INLINE GA_Index primitiveIndex(GA_Offset offset) const
Given a primitive's data offset, return its index.
void setPos4(GA_Offset ptoff, fpreal x, fpreal y, fpreal z, fpreal w)
Set P given the x, y, z, w components.
UT_Vector4T< float > UT_Vector4
GA_Range getPointRange(const GA_PointGroup *group=0) const
Get a range of all points in the detail.
const GA_IndexMap & getPointMap() const
GA_Offset primitiveEnd() const
const GA_Topology & getTopology() const
GA_Range getGlobalRange() const
Get a range representing the global (detail) data.
const GA_AttributeSet & getAttributes() const
static void forEachOffsetBreak(FUNCTOR &&functor, const GA_IndexMap &index_map, const GA_ElementGroup *group=nullptr, bool complement=false)
GA_PointGroup * newPointGroup(const UT_StringHolder &name, bool internal)
GA_Offset pointEnd() const
ElementType< OWNER, true >::Class GROUP_TYPE
SYS_FORCE_INLINE const GA_Primitive * getPrimitive(GA_Offset prim_off) const
GA_Size GA_ElementGroupOrderIndex
Class used to keep track of inheritance of intrinsic attribute evaluation.
SYS_FORCE_INLINE GA_Offset appendPointBlock(GA_Size npoints)
Append new points, returning the first offset of the contiguous block.
SYS_FORCE_INLINE void forEachPoint(FUNCTOR &&functor) const
SYS_FORCE_INLINE bool destroyElementGroup(GA_AttributeOwner owner, const UT_StringRef &name)
GA_EdgeGroup * newEdgeGroup(const UT_StringHolder &name)
GA_EdgeGroupUPtr createDetachedEdgeGroup() const
bool registerIO(GA_IO *io) const
Register an IO file format.
SYS_FORCE_INLINE const GA_PointGroup * findPointGroup(const UT_StringRef &name) const
SYS_FORCE_INLINE void forEachPrimitive(FUNCTOR &&functor) const
GA_PrimitiveGroup * newDetachedPrimitiveGroup() const
SYS_FORCE_INLINE void translatePoint(GA_Offset ptoff, const UT_Vector3D &delta)
SYS_FORCE_INLINE GA_Offset appendVertex()
Append a vertex (for the entire detail)
const GA_EdgeGroupTable & edgeGroups() const
GA_Size destroyUnusedPoints(const GA_PointGroup *ptgrp=0)
Destroy unused points. If ptgrp is given, then only within the group.
SYS_FORCE_INLINE GA_Offset appendPoint()
Append a new point, returning its new data offset.
GA_AttributeSet & getAttributes()
bool getIntrinsicReadOnly(GA_LocalIntrinsic h) const
SYS_FORCE_INLINE void translatePoint(GA_Offset ptoff, const UT_Vector3 &delta)
GA_Attribute * createStringAttribute(GA_AttributeOwner owner, GA_AttributeScope scope, const UT_StringHolder &name, const UT_Options *create_args=nullptr, const GA_AttributeOptions *attribute_options=nullptr)
SYS_FORCE_INLINE GA_Attribute * findPrimitiveAttribute(const UT_StringRef &name)
SYS_FORCE_INLINE GA_Offset pointVertex(GA_Offset point) const
UT_UniquePtr< GA_PrimitiveGroup > GA_PrimitiveGroupUPtr
GLdouble GLdouble GLdouble z
SYS_FORCE_INLINE GA_Offset findInactiveOffset(GA_Offset start, GA_Offset end) const
void setUniqueId(exint i)
SYS_FORCE_INLINE GA_Attribute * findPointAttribute(const UT_StringRef &name)
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
IOStatus(const IOStatus &src)
const GA_PointGroupTable & pointGroups() const
SYS_FORCE_INLINE GA_Offset getNumPointOffsets() const
SYS_FORCE_INLINE GA_Attribute * findAttribute(const UT_StringRef &name, const GA_AttributeOwner search_order[], int search_size)
GA_EdgeGroup * newDetachedEdgeGroup() const
SYS_FORCE_INLINE GA_Index vertexIndex(GA_Offset offset) const
Given a vertex's data offset, return its index.
SYS_FORCE_INLINE GA_Offset getNumVertexOffsets() const
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
GLuint const GLuint * names
SYS_FORCE_INLINE GA_ElementGroupTableT< OWNER >::GROUP_TYPE * findElementGroup(const UT_StringRef &name)
SYS_FORCE_INLINE GA_Attribute * findAttribute(GA_AttributeScope scope, const UT_StringRef &name, const GA_AttributeOwner search_order[], int search_size)
UT_Vector3T< fpreal64 > UT_Vector3D
const GA_IndexMap & getVertexMap() const
HUSD_API bool eval(VtValue &val, T &ret_val)
SYS_FORCE_INLINE GA_Offset vertexPoint(GA_Offset vertex) const
Given a vertex, return the point it references.
SYS_FORCE_INLINE GA_Attribute * findGlobalAttribute(GA_AttributeScope s, const UT_StringRef &name)
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.
SYS_FORCE_INLINE GA_PointGroup * findPointGroup(const UT_StringRef &name)
GLfloat GLfloat GLfloat GLfloat v3
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 bool destroyEdgeGroup(const UT_StringRef &name)
GA_Size GA_Index
Define the strictness of GA_Offset/GA_Index.
GA_PrimitiveList & getPrimitiveList()
SYS_FORCE_INLINE bool destroyEdgeGroup(GA_EdgeGroup *g)
SYS_FORCE_INLINE const GA_Attribute * findPrimitiveAttribute(const UT_StringRef &name) const
GA_GlobalIntrinsic findGlobalIntrinsic(GA_LocalIntrinsic h) const
SYS_FORCE_INLINE GA_Offset vertexToNextVertex(GA_Offset vtx) const
UT_Vector2D getPos2D(GA_Offset ptoff) const
UT_UniquePtr< GA_Attribute > GA_AttributeUPtr
exint getUniqueId() const
GA_Topology & getTopology()
SYS_FORCE_INLINE void forEachPoint(const GA_PointGroup *group, FUNCTOR &&functor) const
GA_Offset getElement(GA_ElementGroupOrderIndex i) const
Will return -1 if the i'th entry is a mixed entry.
SYS_FORCE_INLINE void forEachPrimitiveBreak(const GA_PrimitiveGroup *group, bool complement, FUNCTOR &&functor) const
SYS_FORCE_INLINE const GA_Attribute * findPrimitiveAttribute(GA_AttributeScope s, const UT_StringRef &name) const
GA_LocalIntrinsic findIntrinsic(const char *nm) const
GA_Size destroyPointOffsets(const GA_Range &range, GA_DestroyPointMode mode=GA_LEAVE_PRIMITIVES, bool guarantee_no_vertex_references=false)
GA_Attribute * 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)
SYS_FORCE_INLINE GA_Index pointIndex(GA_Offset offset) const
Given a point's data offset, return its index.
GA_VertexGroupUPtr createDetachedVertexGroup() const
SYS_FORCE_INLINE GA_ElementGroupTable & getElementGroupTable(GA_AttributeOwner owner)
UT_Vector3T< T > getPos3T(GA_Offset ptoff) const
SYS_FORCE_INLINE GA_Size getNumVertices() const
Return the number verticies in the entire detail.
GA_Size entries() const
Return the total number of entries, mixed or not.
GLfloat GLfloat GLfloat GLfloat h
SYS_FORCE_INLINE GA_Offset vertexPrimitive(GA_Offset vertex) const
static const GROUP_TYPE * castGroup(const GA_ElementGroup *group)
GA_Offset vertexEnd() const
GA_VertexGroup * newDetachedVertexGroup() const
A map of string to various well defined value types.
Class to return information about a GA_Detail.
GA_LocalIntrinsic findIntrinsic(GA_GlobalIntrinsic h) const
GLsizei const GLint box[]
GA_Offset vertexBegin() 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
SYS_FORCE_INLINE GA_Offset getNumPrimitiveOffsets() const
constexpr UT_Vector3T< SYS_FixedArrayElement_t< TS > > UTmakeVector3T(const TS &as) noexcept
void copyVertex(GA_Offset destvtxoff, GA_Offset srcvtxoff, bool ref_point_dont_copy, const GA_AttributeFilter *filter=nullptr)
SYS_FORCE_INLINE GA_Offset primitiveOffset(GA_Index index) const
Given a primitive's index (in append order), return its data offset.
SYS_FORCE_INLINE GA_ElementGroupTableT< OWNER >::GROUP_TYPE * createInternalElementGroup(bool ordered=false)
SYS_FORCE_INLINE bool destroyAttribute(GA_AttributeOwner owner, const UT_StringRef &name)
GA_GroupType
An ordinal enum for the different types of groups in GA.
bool containsPrimitiveType(const GA_PrimitiveTypeId &type) const
SYS_FORCE_INLINE GA_Size getNumPrimitives() const
Return the number of primitives.
SYS_FORCE_INLINE void forEachPoint(const GA_PointGroup *group, bool complement, FUNCTOR &&functor) const
Class used to map the GA attribute into a form for H9 geometry files.
Compute an instance transform given a set of attributes.
GA_PrimitiveGroup * newPrimitiveGroup(const UT_StringHolder &name, bool internal)
int64 getMetaCacheCount() const
SYS_FORCE_INLINE bool renameAttribute(GA_AttributeOwner owner, GA_AttributeScope scope, const UT_StringRef &fromName, const UT_StringHolder &toName)
SYS_FORCE_INLINE void forEachPointBreak(FUNCTOR &&functor) const
GLsizei const GLfloat * value
const GA_PrimitiveList & getPrimitiveList() const
const GA_Attribute * getPwAttribute() const
Provide options when performing a merge operation.
IOStatus(bool success=false)
SYS_FORCE_INLINE UT_Vector3D getPos3D(GA_Offset ptoff) const
GA_Size destroyPoints(const GA_Range &range, GA_DestroyPointMode mode=GA_LEAVE_PRIMITIVES, bool guarantee_no_vertex_references=false)
SYS_FORCE_INLINE GA_Attribute * findAttribute(GA_AttributeOwner owner, GA_AttributeScope scope, const UT_StringRef &name)
bool getPos3AsArray(const GA_Range &ptrange, UT_Array< UT_Vector3T< T > > &positions) const
SYS_FORCE_INLINE void forEachPrimitive(const GA_PrimitiveGroup *group, bool complement, FUNCTOR &&functor) const
getOption("OpenEXR.storage") storage
GA_PrimitiveGroupTable & primitiveGroups()
Container class for all geometry.
GA_Size destroyVertices(const GA_Range &range)
SYS_FORCE_INLINE bool destroyAttribute(GA_AttributeOwner owner, GA_AttributeScope scope, const UT_StringRef &name)
SYS_FORCE_INLINE void forEachPrimitive(const GA_PrimitiveGroup *group, FUNCTOR &&functor) const
SYS_FORCE_INLINE GA_Attribute * findVertexAttribute(GA_AttributeScope s, const UT_StringRef &name)
UT_UniquePtr< GA_PointGroup > GA_PointGroupUPtr
virtual void privateComputeNormal(const GA_RWHandleV3 &normalattrib, const GA_Group *group, const float cuspangledegrees, const int method) const
const GA_AttributeDict & getAttributeDict(GA_AttributeOwner owner) const
SYS_FORCE_INLINE GA_Offset vertexOffset(GA_Index index) const
Given a vertex's index (in append order), return its data offset.
const GA_PrimitiveGroupTable & primitiveGroups() const
UT_Vector4T< fpreal64 > UT_Vector4D
GA_VertexGroup * newVertexGroup(const UT_StringHolder &name)
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 * findPointAttribute(GA_AttributeScope s, const UT_StringRef &name) const
constexpr SYS_FORCE_INLINE T & y() noexcept
GA_Range getPrimitiveRange(const GA_PrimitiveGroup *group=0) const
Get a range of all primitives in the detail.
SYS_FORCE_INLINE const GA_VertexGroup * findVertexGroup(const UT_StringRef &name) const
void setPos2(GA_Offset ptoff, const UT_Vector2 &P)
Set P from a UT_Vector2.
Class to specify options for loading geometry.
SYS_FORCE_INLINE bool destroyElementGroup(GA_AttributeOwner owner, const char *name)
static void forEachOffset(FUNCTOR &&functor, const GA_IndexMap &index_map, const GA_ElementGroup *group=nullptr, bool complement=false)
SYS_FORCE_INLINE void forEachOffsetBreak(FUNCTOR &&functor) const
SYS_FORCE_INLINE GA_Offset pointOffset(GA_Index index) const
Given a point's index (in append order), return its data offset.
bool getPrimitivesOfType(const GA_PrimitiveTypeId &type, UT_Array< const GA_Primitive * > &prims) const
void setPos4(GA_Offset ptoff, const UT_Vector4 &P)
Set P from a UT_Vector4.
UT_UniquePtr< GA_ATINumeric > GA_ATINumericUPtr
const GA_PrimitiveFactory & getPrimitiveFactory() const
SYS_FORCE_INLINE GA_Attribute * findVertexAttribute(const UT_StringRef &name)
void setPos4(GA_Offset ptoff, const UT_Vector4D &P)
GA_Attribute * 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)
GA_Attribute * getPwAttribute()
UT_UniquePtr< GA_EdgeGroup > GA_EdgeGroupUPtr
bool containsOnlyPrimitiveTypes(const UT_Array< GA_PrimitiveTypeId > &type) const
GA_Attribute * 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)
const GA_IntrinsicManager & getIntrinsicManager() const
SYS_FORCE_INLINE GA_Offset offsetSize() const
const char * getIntrinsicName(GA_LocalIntrinsic h) const
SYS_FORCE_INLINE GA_Offset appendVertexBlock(GA_Size nvertices)
Append new vertices, returning the first offset of the contiguous block.
GA_Offset primitiveBegin() const
GA_Attribute * createStringAttribute(GA_AttributeOwner owner, const UT_StringHolder &name, const UT_Options *create_args=nullptr, const GA_AttributeOptions *attribute_options=nullptr)
SYS_FORCE_INLINE GA_Size getNumPoints() const
Return the number of points.
constexpr SYS_FORCE_INLINE T & x() noexcept
UT_Vector4D getPos4D(GA_Offset ptoff) const