60 template <
typename T>
class UT_Array;
86 class ga_TailInitializeTable;
113 bool full_topology=
true);
132 bool isEmpty()
const;
142 getPrimitiveList().stashAll();
151 incrementMetaCacheCount();
158 getPrimitiveList().destroyStashed();
187 return myHandlePV3.get(ptoff);
194 template <
typename T>
199 return getPos3(ptoff);
201 return getPos3D(ptoff);
206 template <
typename T>
211 return getAttributeAsArray(getP(), ptrange, positions);
216 template <
typename T>
221 return setAttributeFromArray(getP(), ptrange, positions);
228 myHandlePV3.set(ptoff,
v3);
239 myHandlePV3.set(ptoff, pos);
258 myHandlePV3.add(ptoff, delta);
294 return UT_Vector4(getPos3(ptoff), getPw(ptoff));
305 setPw(ptoff, pos.
w());
310 setPw(ptoff, pos.
w());
316 setPos3(ptoff, x, y, z);
327 {
return appendPointBlock(1); }
331 {
return myPointMap.addElementBlock(npoints); }
335 {
return myPointMap.indexSize(); }
342 {
return myPointMap.offsetSize(); }
346 {
return myPointMap.offsetFromIndex(index); }
350 {
return myPointMap.indexFromOffset(offset); }
380 bool closed_flag =
false);
397 bool closed_flag =
false);
400 const std::pair<int,exint> *primtype_count_pairs,
403 const exint *closed_span_length =
nullptr,
409 {
return myPrimitiveMap.indexSize(); }
416 {
return myPrimitiveMap.offsetSize(); }
420 {
return myPrimitiveMap.offsetFromIndex(index); }
424 {
return myPrimitiveMap.indexFromOffset(offset); }
430 {
return myPrimitiveList.get(prim_off); }
433 {
return myPrimitiveList.get(prim_off); }
439 {
return myPrimitiveList.get(primitiveOffset(prim_idx)); }
441 {
return myPrimitiveList.get(primitiveOffset(prim_idx)); }
469 int getPrimitiveTypeId(
GA_Offset primoff)
const;
475 bool getPrimitiveClosedFlag(
GA_Offset primoff)
const;
482 void setPrimitiveClosedFlag(
GA_Offset primoff,
bool closed);
492 bool swapPrimitiveOrder(
GA_Offset offset1,
501 {
return myVertexMap.addElementBlock(nvertices); }
505 {
return myVertexMap.indexSize(); }
512 {
return myVertexMap.offsetSize(); }
516 {
return myVertexMap.offsetFromIndex(index); }
520 {
return myVertexMap.indexFromOffset(offset); }
532 return myTopology.getPointRef()->getLink(vertex);
539 myTopology.wireVertexPoint(vertex, ptoff);
550 return pref->getLink(vertex);
564 return ref->getLink(point);
576 return ref->getLink(vtx);
588 return ref->getLink(vtx);
604 GA_Size getVerticesReferencingPoint(
615 GA_Size getPrimitivesReferencingPoint(
624 bool hasNoSharedPoints()
const;
657 GA_DestroyPointMode
mode=GA_LEAVE_PRIMITIVES,
658 bool guarantee_no_vertex_references=
false);
660 GA_DestroyPointMode
mode=GA_LEAVE_PRIMITIVES,
661 bool guarantee_no_vertex_references=
false);
669 bool and_points =
false);
671 bool and_points =
false);
673 bool and_points =
false);
679 bool and_points =
false);
681 bool and_points =
false)
682 {
return destroyPrimitiveOffsets(it, and_points); }
684 bool and_points =
false);
691 return destroyUnusedPoints(getPointRange(ptgrp));
698 bool guarantee_no_vertex_references=
false)
700 return destroyElements(range,
mode,
701 guarantee_no_vertex_references);
705 bool guarantee_no_vertex_references=
false)
707 return destroyPointOffsets(range,
mode,
708 guarantee_no_vertex_references);
714 {
return destroyElements(range); }
716 {
return destroyVertexOffsets(range); }
739 ->getIndexMap(owner));
764 : myPointMarker(detail.getPointMap())
765 , myVertexMarker(detail.getVertexMap())
766 , myPrimitiveMarker(detail.getPrimitiveMap())
769 {
return myPointMarker.getRange(); }
771 {
return myVertexMarker.getRange(); }
773 {
return myPrimitiveMarker.getRange(); }
775 {
return myPointMarker.getBegin(); }
777 {
return myVertexMarker.getBegin(); }
779 {
return myPrimitiveMarker.getBegin(); }
781 {
return myPointMarker.getEnd(); }
783 {
return myVertexMarker.getEnd(); }
785 {
return myPrimitiveMarker.getEnd(); }
793 {
return myPrimitiveList; }
795 {
return myPrimitiveList; }
800 bool checkValidTopology()
const;
801 void createTopologyAttributes();
802 void clearTopologyAttributes();
807 void bumpAllDataIds();
818 void bumpDataIdsForRewire();
824 void bumpDataIdsForAddOrRemove(
825 bool added_or_removed_points,
826 bool added_or_removed_vertices,
827 bool added_or_removed_primitives);
833 {
return myAttributes.getDict(owner); }
850 bool defragment(
const UT_Options *options =
nullptr);
855 void sortVertexMapByPrimitiveUse();
871 return myAttributes.createAttribute(
872 owner, scope, name, create_args,
873 attribute_options, attribtype);
881 return myAttributes.createAttribute(
882 owner, name, create_args,
883 attribute_options, attribtype);
899 return myAttributes.createDetachedTupleAttribute(
900 owner, storage, tuple_size,
901 defaults, attribute_options);
911 return myAttributes.createDetachedAttribute(
912 owner, attribtype, create_args,
923 return myAttributes.createDetachedAttribute(
924 owner, attribtype, create_args,
934 return myAttributes.destroyAttribute(owner,
941 return myAttributes.destroyAttribute(owner, name);
949 return myAttributes.renameAttribute(owner, scope,
963 return myAttributes.createTupleAttribute(
964 owner, scope, name, storage,
965 tuple_size, defaults,
977 return myAttributes.createTupleAttribute(
978 owner, name, storage,
979 tuple_size, defaults,
989 return myAttributes.createStringAttribute(
990 owner, scope, name, 1,
999 return myAttributes.createStringAttribute(
1000 owner, name, 1, create_args,
1010 int search_size)
const
1012 return myAttributes.findAttribute(
1013 scope, name, search_order,
1019 int search_size)
const
1021 return myAttributes.findAttribute(
1022 name, search_order, search_size);
1028 {
return findAttribute(scope, name, &owner, 1); }
1032 {
return findAttribute(name, &owner, 1); }
1070 return myAttributes.findAttribute(
1071 scope, name, search_order,
1079 return myAttributes.findAttribute(
1080 name, search_order, search_size);
1086 {
return findAttribute(scope, name, &owner, 1); }
1090 {
return findAttribute(name, &owner, 1); }
1129 template <
typename T>
1130 bool getAttributeAsArray(
1141 template <
typename T>
1142 bool setAttributeFromArray(
1151 bool ordered=
false);
1153 bool ordered=
false);
1167 ->getElementGroupTable(owner));
1177 {
return myPointGroups; }
1179 {
return myPointGroups; }
1181 {
return myPrimitiveGroups; }
1183 {
return myPrimitiveGroups; }
1185 {
return myVertexGroups; }
1187 {
return myVertexGroups; }
1189 {
return myEdgeGroups; }
1191 {
return myEdgeGroups; }
1194 template <GA_AttributeOwner OWNER>
1201 createElementGroup(OWNER, name, ordered));
1204 template <GA_AttributeOwner OWNER>
1210 createInternalElementGroup(OWNER,ordered));
1213 template <GA_AttributeOwner OWNER>
1219 findElementGroup(OWNER, name));
1221 template <GA_AttributeOwner OWNER>
1227 findElementGroup(OWNER, name));
1237 {
return getElementGroupTable(owner).destroy(name); }
1241 {
return getElementGroupTable(owner).destroy(name); }
1243 bool destroyGroup(
GA_Group *group);
1248 {
return findElementGroup<GA_ATTRIB_POINT>(
name); }
1251 {
return findElementGroup<GA_ATTRIB_VERTEX>(
name); }
1254 {
return findElementGroup<GA_ATTRIB_PRIMITIVE>(
name); }
1258 {
return findElementGroup<GA_ATTRIB_POINT>(
name); }
1261 {
return findElementGroup<GA_ATTRIB_VERTEX>(
name); }
1264 {
return findElementGroup<GA_ATTRIB_PRIMITIVE>(
name); }
1270 void getEdgeGroupList(
1272 void getEdgeGroupList(
1276 {
return myEdgeGroups.destroy(name); }
1279 {
return g ? myEdgeGroups.destroy(g) :
false; }
1283 GA_Size destroyAllEmptyGroups();
1290 return static_cast<GA_PointGroup *
>(pointGroups().newGroup(name));
1294 return static_cast<GA_VertexGroup *
>(vertexGroups().newGroup(name));
1302 return static_cast<GA_EdgeGroup *
>(edgeGroups().newGroup(name));
1313 return static_cast<GA_PointGroup *
>(pointGroups().newInternalGroup());
1317 return static_cast<GA_VertexGroup *
>(vertexGroups().newInternalGroup());
1325 return static_cast<GA_EdgeGroup *
>(edgeGroups().newInternalGroup());
1360 return UTmakeUnique<GA_PointGroup>(*this);
1364 return UTmakeUnique<GA_PrimitiveGroup>(*this);
1368 return UTmakeUnique<GA_VertexGroup>(*this);
1372 return UTmakeUnique<GA_EdgeGroup>(*this);
1380 return static_cast<GA_PointGroup *
>(pointGroups().newGroup(name,
internal));
1384 return static_cast<GA_PrimitiveGroup *
>(primitiveGroups().newGroup(name,
internal));
1388 return static_cast<GA_VertexGroup *
>(vertexGroups().newGroup(name,
internal));
1392 return static_cast<GA_EdgeGroup *
>(edgeGroups().newGroup(name,
internal));
1419 {
return myPrimitiveFactory.getDetailIntrinsics(); }
1426 {
return getIntrinsicManager().getLocalHandle(nm); }
1428 {
return getIntrinsicManager().getLocalHandle(h); }
1430 {
return getIntrinsicManager().getGlobalHandle(h); }
1433 {
return getIntrinsicManager().getName(h); }
1436 {
return getIntrinsicManager().getStorage(h); }
1438 {
return getIntrinsicManager().getReadOnly(h); }
1440 {
return getIntrinsicManager().getOptions(h); }
1497 template<
typename FUNCTOR>
1501 myPointMap.forEachOffset(functor);
1509 template<
typename FUNCTOR>
1513 forEachOffset(functor, myPointMap, group);
1518 template<
typename FUNCTOR>
1522 forEachOffset(functor, myPointMap, group, complement);
1528 template<
typename FUNCTOR>
1532 myPointMap.forEachOffsetBreak(functor);
1534 template<
typename FUNCTOR>
1538 forEachOffset(functor, myPointMap, group);
1540 template<
typename FUNCTOR>
1544 forEachOffset(functor, myPointMap, group, complement);
1557 template<
typename FUNCTOR>
1561 myPrimitiveMap.forEachOffset(functor);
1573 template<
typename FUNCTOR>
1577 forEachOffset(functor, myPrimitiveMap, group);
1582 template<
typename FUNCTOR>
1586 forEachOffset(functor, myPrimitiveMap, group, complement);
1592 template<
typename FUNCTOR>
1596 myPrimitiveMap.forEachOffsetBreak(functor);
1598 template<
typename FUNCTOR>
1602 forEachOffsetBreak(functor, myPrimitiveMap, group);
1604 template<
typename FUNCTOR>
1608 forEachOffsetBreak(functor, myPrimitiveMap, group, complement);
1612 template<
typename FUNCTOR>
1645 group->getConstantSpan(off, veryend, span_size, value);
1648 if (value == complement)
1653 const GA_Offset span_end = off+span_size;
1664 }
while (off != end);
1669 template<
typename FUNCTOR>
1703 group->getConstantSpan(off, veryend, span_size, value);
1706 if (value == complement)
1711 const GA_Offset span_end = off+span_size;
1723 }
while (off != end);
1731 {
return GA_Range(getPointMap(), group); }
1734 {
return GA_Range(getPrimitiveMap(), group); }
1743 end_ptnum =
GA_Index(getNumPoints());
1744 return GA_Range(getPointMap(), begin_ptnum, end_ptnum,
1754 end_prim =
GA_Index(getNumPrimitives());
1756 begin_prim, end_prim, ordered);
1761 {
return GA_Range(getVertexMap(), group); }
1764 {
return GA_Range(getGlobalMap()); }
1768 virtual int64 getMemoryUsage(
bool inclusive)
const;
1816 virtual GA_Detail *cloneEmptyDetail(
bool clone_attributes)
const = 0;
1822 void cloneCopyGroupsAndAttributes(
const GA_Detail &
src,
1823 bool copydetailattribs =
false);
1836 void copyAttributes(
1841 void copyAttributes(
1872 bool ref_point_dont_copy,
1875 GA_Offset srcptoff = vertexPoint(srcvtxoff);
1876 if (ref_point_dont_copy)
1877 setVertexPoint(destvtxoff, srcptoff);
1879 copyPoint(vertexPoint(destvtxoff), srcptoff,
filter);
1902 bool full_copy =
false);
1925 clearInstanceMatrix();
1926 getPrimitiveList().destroyStashed();
1948 {
return myPrimitiveFactory.registerIO(io); }
1952 const GA_IO *
findIO(
const char *name =
nullptr)
const
1953 {
return myPrimitiveFactory.findIO(name); }
1958 {
return myPrimitiveFactory.getIONames(names); }
1966 : mySuccess(success)
1969 : mySuccess(src.mySuccess)
1976 mySuccess = src.mySuccess;
2000 IOStatus save(
const char *
filename,
2013 IOStatus save(std::ostream &os,
bool binary,
2018 IOStatus saveClassic(
const char *,
const GA_SaveOptions *)
const;
2019 IOStatus saveClassic(std::ostream &os,
bool,
const GA_SaveOptions *)
const;
2125 IOStatus load(
const char *
filename,
2169 { myAttributes.constructElementBlock(owner, offset, nelements); }
2172 { myAttributes.destructElement(owner, offset); }
2197 bool include_total=
true,
2199 const char *title=
"Geometry Memory Tracking");
2210 template <
typename T>
static inline const typename T::GB_MACRO_PRIM_TYPE *
2212 {
return static_cast<const typename T::GB_MACRO_PRIM_TYPE *
>(prim);}
2213 template <
typename T>
static inline typename T::GB_MACRO_PRIM_TYPE *
2215 {
return static_cast<typename T::GB_MACRO_PRIM_TYPE *
>(prim); }
2223 bool loadVertexPointReferenceH9(
UT_IStream &is,
2225 bool saveVertexPointReferenceH9(std::ostream &os,
2230 static bool saveAttribDataH9(std::ostream &os,
int binary,
2233 char delim_ch =
'(');
2239 bool saveVertexH9(std::ostream &os,
int binary,
2248 {
return myPrimitiveFactory; }
2252 virtual void refreshCachedHandles();
2254 void refreshCachedAttributes();
2283 if (myTailInitializers)
2284 doConstructTailInitializers(owner, start,
size);
2288 {
return myPrimitiveList.containsType(type); }
2290 {
return myPrimitiveList.containsOnlyTypes(type); }
2292 {
return myPrimitiveList.countType(type); }
2294 {
return myPrimitiveList.countTypeFamily(family); }
2296 {
return myPrimitiveList.
2297 hasLocalTransform(myPrimitiveFactory); }
2300 {
return myPrimitiveList.getPrimitivesOfType(type, prims); }
2319 void clearInstanceMatrix();
2325 return myPrimitiveFactory.isForPrimaryDetail();
2349 void flushCEWriteCaches();
2353 void flushCECaches();
2360 void stealCEBuffers(
const GA_Detail &srcdetail);
2367 static const int64 INVALID_CACHE_COUNT = -1;
2381 class GA_API MantraGeometry
2385 virtual ~MantraGeometry() {}
2386 virtual void refreshCachedHandles();
2389 {
return myMantraGeometry; }
2391 {
return myMantraGeometry; }
2393 { myMantraGeometry = m; }
2404 bool savePrimitivesH9(std::ostream &os,
int binary,
2443 static void finishLoadH9(
2453 const float cuspangledegrees,
2454 const int method)
const
2460 void splitAnyFloat4P();
2470 void init(
GA_Storage Pstore,
bool isprimary,
bool full_topology);
2474 void clearData(
bool for_deletion);
2480 GA_DestroyPointMode
mode=GA_LEAVE_PRIMITIVES,
2481 bool guarantee_no_vertex_point_references=
false);
2485 GA_DestroyPointMode
mode=GA_LEAVE_PRIMITIVES);
2491 bool dereferencePoints(
const GA_Range &point_range,
2493 GA_DestroyPointMode
mode=GA_LEAVE_PRIMITIVES);
2516 ga_TailInitializeTable *myTailInitializers;
2517 MantraGeometry *myMantraGeometry;
2536 int64 myMetaCacheCount;
SIM_API const UT_StringHolder vertex
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.
SYS_FORCE_INLINE void forEachPrimitiveBreak(const GA_PrimitiveGroup *group, FUNCTOR &&functor) const
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
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
getFileOption("OpenEXR:storage") storage
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
GLsizei const GLfloat * value
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
GLdouble GLdouble GLdouble z
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
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)
**But if you need a result
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)
GLfloat GLfloat GLfloat GLfloat v3
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 read(T &in, bool &v)
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 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)
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
A string map of attributes to ease backward compatibility In the GB/GEO/GU library code would often p...
SYS_FORCE_INLINE const GA_Attribute * findPointAttribute(const UT_StringRef &name) const
SYS_FORCE_INLINE GA_VertexGroup * findVertexGroup(const UT_StringRef &name)
#define SYS_DEPRECATED_REPLACE(__V__, __R__)
constexpr SYS_FORCE_INLINE T & x() noexcept
GA_VertexGroup * newVertexGroup(const UT_StringHolder &name, bool internal)
GA_PointGroupUPtr createDetachedPointGroup() const
SYS_FORCE_INLINE void forEachPrimitiveBreak(FUNCTOR &&functor) const
void setPos2(GA_Offset ptoff, const UT_Vector2D &pos)
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
void setPos4(GA_Offset ptoff, const UT_Vector4 &pos)
Set P from a UT_Vector4.
GA_Range getGlobalRange() const
Get a range representing the global (detail) data.
const GA_AttributeSet & getAttributes() const
SYS_FORCE_INLINE void setPos3(GA_Offset ptoff, const UT_Vector3D &pos)
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
void setPos4(GA_Offset ptoff, const UT_Vector4D &pos)
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
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
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
GLdouble GLdouble GLint GLint order
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)
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
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)
GLuint const GLchar * name
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_Size destroyPointOffsets(const GA_Range &range, GA_DestroyPointMode mode=GA_LEAVE_PRIMITIVES, bool guarantee_no_vertex_references=false)
GLenum GLint GLint * precision
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
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
SYS_FORCE_INLINE void setPos3(GA_Offset ptoff, const UT_Vector3 &pos)
Set P from a UT_Vector3.
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
constexpr SYS_FORCE_INLINE T & w() noexcept
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 void forEachPointBreak(FUNCTOR &&functor) const
const GA_PrimitiveList & getPrimitiveList() const
const GA_Attribute * getPwAttribute() const
SYS_FORCE_INLINE bool renameAttribute(GA_AttributeOwner owner, GA_AttributeScope scope, const UT_StringRef &from_name, const UT_StringHolder &to_name)
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
GA_PrimitiveGroupTable & primitiveGroups()
Container class for all geometry.
GLubyte GLubyte GLubyte GLubyte w
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
GA_LocalIntrinsic findIntrinsic(const UT_StringRef &nm) const
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 write(T &out, bool v)
void setPos2(GA_Offset ptoff, const UT_Vector2 &pos)
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
UT_UniquePtr< GA_ATINumeric > GA_ATINumericUPtr
const GA_PrimitiveFactory & getPrimitiveFactory() const
SYS_FORCE_INLINE GA_Attribute * findVertexAttribute(const UT_StringRef &name)
constexpr SYS_FORCE_INLINE T & y() noexcept
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.
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
constexpr SYS_FORCE_INLINE T & x() noexcept
UT_Vector4D getPos4D(GA_Offset ptoff) const