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); }
734 GA_Size countUnusedPoints()
const;
742 ->getIndexMap(owner));
767 : myPointMarker(detail.getPointMap())
768 , myVertexMarker(detail.getVertexMap())
769 , myPrimitiveMarker(detail.getPrimitiveMap())
772 {
return myPointMarker.getRange(); }
774 {
return myVertexMarker.getRange(); }
776 {
return myPrimitiveMarker.getRange(); }
778 {
return myPointMarker.getBegin(); }
780 {
return myVertexMarker.getBegin(); }
782 {
return myPrimitiveMarker.getBegin(); }
784 {
return myPointMarker.getEnd(); }
786 {
return myVertexMarker.getEnd(); }
788 {
return myPrimitiveMarker.getEnd(); }
796 {
return myPrimitiveList; }
798 {
return myPrimitiveList; }
803 bool checkValidTopology()
const;
804 void createTopologyAttributes();
805 void clearTopologyAttributes();
810 void bumpAllDataIds();
821 void bumpDataIdsForRewire();
827 void bumpDataIdsForAddOrRemove(
828 bool added_or_removed_points,
829 bool added_or_removed_vertices,
830 bool added_or_removed_primitives);
836 {
return myAttributes.getDict(owner); }
853 bool defragment(
const UT_Options *options =
nullptr);
858 void sortVertexMapByPrimitiveUse();
874 return myAttributes.createAttribute(
875 owner, scope, name, create_args,
876 attribute_options, attribtype);
884 return myAttributes.createAttribute(
885 owner, name, create_args,
886 attribute_options, attribtype);
902 return myAttributes.createDetachedTupleAttribute(
903 owner, storage, tuple_size,
904 defaults, attribute_options);
914 return myAttributes.createDetachedAttribute(
915 owner, attribtype, create_args,
926 return myAttributes.createDetachedAttribute(
927 owner, attribtype, create_args,
937 return myAttributes.destroyAttribute(owner,
944 return myAttributes.destroyAttribute(owner, name);
952 return myAttributes.renameAttribute(owner, scope,
966 return myAttributes.createTupleAttribute(
967 owner, scope, name, storage,
968 tuple_size, defaults,
980 return myAttributes.createTupleAttribute(
981 owner, name, storage,
982 tuple_size, defaults,
992 return myAttributes.createStringAttribute(
993 owner, scope, name, 1,
1002 return myAttributes.createStringAttribute(
1003 owner, name, 1, create_args,
1013 int search_size)
const
1015 return myAttributes.findAttribute(
1016 scope, name, search_order,
1022 int search_size)
const
1024 return myAttributes.findAttribute(
1025 name, search_order, search_size);
1031 {
return findAttribute(scope, name, &owner, 1); }
1035 {
return findAttribute(name, &owner, 1); }
1073 return myAttributes.findAttribute(
1074 scope, name, search_order,
1082 return myAttributes.findAttribute(
1083 name, search_order, search_size);
1089 {
return findAttribute(scope, name, &owner, 1); }
1093 {
return findAttribute(name, &owner, 1); }
1132 template <
typename T>
1133 bool getAttributeAsArray(
1144 template <
typename T>
1145 bool setAttributeFromArray(
1154 bool ordered=
false);
1156 bool ordered=
false);
1170 ->getElementGroupTable(owner));
1180 {
return myPointGroups; }
1182 {
return myPointGroups; }
1184 {
return myPrimitiveGroups; }
1186 {
return myPrimitiveGroups; }
1188 {
return myVertexGroups; }
1190 {
return myVertexGroups; }
1192 {
return myEdgeGroups; }
1194 {
return myEdgeGroups; }
1197 template <GA_AttributeOwner OWNER>
1204 createElementGroup(OWNER, name, ordered));
1207 template <GA_AttributeOwner OWNER>
1213 createInternalElementGroup(OWNER,ordered));
1216 template <GA_AttributeOwner OWNER>
1222 findElementGroup(OWNER, name));
1224 template <GA_AttributeOwner OWNER>
1230 findElementGroup(OWNER, name));
1240 {
return getElementGroupTable(owner).destroy(name); }
1244 {
return getElementGroupTable(owner).destroy(name); }
1246 bool destroyGroup(
GA_Group *group);
1251 {
return findElementGroup<GA_ATTRIB_POINT>(
name); }
1254 {
return findElementGroup<GA_ATTRIB_VERTEX>(
name); }
1257 {
return findElementGroup<GA_ATTRIB_PRIMITIVE>(
name); }
1261 {
return findElementGroup<GA_ATTRIB_POINT>(
name); }
1264 {
return findElementGroup<GA_ATTRIB_VERTEX>(
name); }
1267 {
return findElementGroup<GA_ATTRIB_PRIMITIVE>(
name); }
1273 void getEdgeGroupList(
1275 void getEdgeGroupList(
1279 {
return myEdgeGroups.destroy(name); }
1282 {
return g ? myEdgeGroups.destroy(g) :
false; }
1286 GA_Size destroyAllEmptyGroups();
1293 return static_cast<GA_PointGroup *
>(pointGroups().newGroup(name));
1297 return static_cast<GA_VertexGroup *
>(vertexGroups().newGroup(name));
1305 return static_cast<GA_EdgeGroup *
>(edgeGroups().newGroup(name));
1316 return static_cast<GA_PointGroup *
>(pointGroups().newInternalGroup());
1320 return static_cast<GA_VertexGroup *
>(vertexGroups().newInternalGroup());
1328 return static_cast<GA_EdgeGroup *
>(edgeGroups().newInternalGroup());
1363 return UTmakeUnique<GA_PointGroup>(*this);
1367 return UTmakeUnique<GA_PrimitiveGroup>(*this);
1371 return UTmakeUnique<GA_VertexGroup>(*this);
1375 return UTmakeUnique<GA_EdgeGroup>(*this);
1383 return static_cast<GA_PointGroup *
>(pointGroups().newGroup(name,
internal));
1387 return static_cast<GA_PrimitiveGroup *
>(primitiveGroups().newGroup(name,
internal));
1391 return static_cast<GA_VertexGroup *
>(vertexGroups().newGroup(name,
internal));
1395 return static_cast<GA_EdgeGroup *
>(edgeGroups().newGroup(name,
internal));
1422 {
return myPrimitiveFactory.getDetailIntrinsics(); }
1431 {
return getIntrinsicManager().getLocalHandle(nm); }
1433 {
return getIntrinsicManager().getLocalHandle(h); }
1435 {
return getIntrinsicManager().getGlobalHandle(h); }
1438 {
return getIntrinsicManager().getName(h); }
1442 {
return getIntrinsicManager().getCollapseSingletons(h); }
1444 {
return getIntrinsicManager().getStorage(h); }
1446 {
return getIntrinsicManager().getReadOnly(h); }
1448 {
return getIntrinsicManager().getOptions(h); }
1505 template<
typename FUNCTOR>
1509 myPointMap.forEachOffset(functor);
1517 template<
typename FUNCTOR>
1521 forEachOffset(functor, myPointMap, group);
1526 template<
typename FUNCTOR>
1530 forEachOffset(functor, myPointMap, group, complement);
1536 template<
typename FUNCTOR>
1540 myPointMap.forEachOffsetBreak(functor);
1542 template<
typename FUNCTOR>
1546 forEachOffset(functor, myPointMap, group);
1548 template<
typename FUNCTOR>
1552 forEachOffset(functor, myPointMap, group, complement);
1565 template<
typename FUNCTOR>
1569 myPrimitiveMap.forEachOffset(functor);
1581 template<
typename FUNCTOR>
1585 forEachOffset(functor, myPrimitiveMap, group);
1590 template<
typename FUNCTOR>
1594 forEachOffset(functor, myPrimitiveMap, group, complement);
1600 template<
typename FUNCTOR>
1604 myPrimitiveMap.forEachOffsetBreak(functor);
1606 template<
typename FUNCTOR>
1610 forEachOffsetBreak(functor, myPrimitiveMap, group);
1612 template<
typename FUNCTOR>
1616 forEachOffsetBreak(functor, myPrimitiveMap, group, complement);
1620 template<
typename FUNCTOR>
1653 group->getConstantSpan(off, veryend, span_size, value);
1656 if (value == complement)
1661 const GA_Offset span_end = off+span_size;
1672 }
while (off != end);
1677 template<
typename FUNCTOR>
1711 group->getConstantSpan(off, veryend, span_size, value);
1714 if (value == complement)
1719 const GA_Offset span_end = off+span_size;
1731 }
while (off != end);
1739 {
return GA_Range(getPointMap(), group); }
1742 {
return GA_Range(getPrimitiveMap(), group); }
1751 end_ptnum =
GA_Index(getNumPoints());
1752 return GA_Range(getPointMap(), begin_ptnum, end_ptnum,
1762 end_prim =
GA_Index(getNumPrimitives());
1764 begin_prim, end_prim, ordered);
1769 {
return GA_Range(getVertexMap(), group); }
1772 {
return GA_Range(getGlobalMap()); }
1776 virtual int64 getMemoryUsage(
bool inclusive)
const;
1824 virtual GA_Detail *cloneEmptyDetail(
bool clone_attributes)
const = 0;
1830 void cloneCopyGroupsAndAttributes(
const GA_Detail &
src,
1831 bool copydetailattribs =
false);
1844 void copyAttributes(
1849 void copyAttributes(
1880 bool ref_point_dont_copy,
1883 GA_Offset srcptoff = vertexPoint(srcvtxoff);
1884 if (ref_point_dont_copy)
1885 setVertexPoint(destvtxoff, srcptoff);
1887 copyPoint(vertexPoint(destvtxoff), srcptoff,
filter);
1910 bool full_copy =
false);
1933 clearInstanceMatrix();
1934 getPrimitiveList().destroyStashed();
1956 {
return myPrimitiveFactory.registerIO(io); }
1960 const GA_IO *
findIO(
const char *name =
nullptr)
const
1961 {
return myPrimitiveFactory.findIO(name); }
1966 {
return myPrimitiveFactory.getIONames(names); }
1974 : mySuccess(success)
1977 : mySuccess(src.mySuccess)
1984 mySuccess = src.mySuccess;
2008 IOStatus save(
const char *
filename,
2021 IOStatus save(std::ostream &os,
bool binary,
2026 IOStatus saveClassic(
const char *,
const GA_SaveOptions *)
const;
2027 IOStatus saveClassic(std::ostream &os,
bool,
const GA_SaveOptions *)
const;
2133 IOStatus load(
const char *
filename,
2177 { myAttributes.constructElementBlock(owner, offset, nelements); }
2180 { myAttributes.destructElement(owner, offset); }
2205 bool include_total=
true,
2207 const char *title=
"Geometry Memory Tracking");
2218 template <
typename T>
static inline const typename T::GB_MACRO_PRIM_TYPE *
2220 {
return static_cast<const typename T::GB_MACRO_PRIM_TYPE *
>(prim);}
2221 template <
typename T>
static inline typename T::GB_MACRO_PRIM_TYPE *
2223 {
return static_cast<typename T::GB_MACRO_PRIM_TYPE *
>(prim); }
2231 bool loadVertexPointReferenceH9(
UT_IStream &is,
2233 bool saveVertexPointReferenceH9(std::ostream &os,
2238 static bool saveAttribDataH9(std::ostream &os,
int binary,
2241 char delim_ch =
'(');
2247 bool saveVertexH9(std::ostream &os,
int binary,
2256 {
return myPrimitiveFactory; }
2260 virtual void refreshCachedHandles();
2262 void refreshCachedAttributes();
2291 if (myTailInitializers)
2292 doConstructTailInitializers(owner, start,
size);
2296 {
return myPrimitiveList.containsType(type); }
2298 {
return myPrimitiveList.containsOnlyTypes(type); }
2300 {
return myPrimitiveList.countType(type); }
2302 {
return myPrimitiveList.countTypeFamily(family); }
2304 {
return myPrimitiveList.
2305 hasLocalTransform(myPrimitiveFactory); }
2308 {
return myPrimitiveList.getPrimitivesOfType(type, prims); }
2327 void clearInstanceMatrix();
2333 return myPrimitiveFactory.isForPrimaryDetail();
2343 bool read,
bool write);
2353 bool read,
bool write)
const;
2357 void flushCEWriteCaches();
2361 void flushCECaches();
2368 void stealCEBuffers(
const GA_Detail &srcdetail);
2375 static const int64 INVALID_CACHE_COUNT = -1;
2389 class GA_API MantraGeometry
2393 virtual ~MantraGeometry() {}
2394 virtual void refreshCachedHandles();
2397 {
return myMantraGeometry; }
2399 {
return myMantraGeometry; }
2401 { myMantraGeometry = m; }
2412 bool savePrimitivesH9(std::ostream &os,
int binary,
2451 static void finishLoadH9(
2461 const float cuspangledegrees,
2462 const int method)
const
2468 void splitAnyFloat4P();
2478 void init(
GA_Storage Pstore,
bool isprimary,
bool full_topology);
2482 void clearData(
bool for_deletion);
2488 GA_DestroyPointMode
mode=GA_LEAVE_PRIMITIVES,
2489 bool guarantee_no_vertex_point_references=
false);
2493 GA_DestroyPointMode
mode=GA_LEAVE_PRIMITIVES);
2499 bool dereferencePoints(
const GA_Range &point_range,
2501 GA_DestroyPointMode
mode=GA_LEAVE_PRIMITIVES);
2524 ga_TailInitializeTable *myTailInitializers;
2525 MantraGeometry *myMantraGeometry;
2544 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)
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 setVertexPoint(GA_Offset vertex, GA_Offset ptoff)
Given a vertex, set the corresponding point offset.
SYS_FORCE_INLINE bool GAisValid(GA_Size v)
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...
bool getIntrinsicCollapseSingletons(GA_LocalIntrinsic h) const
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 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