67 template <
typename T>
class UT_Array;
95 class ga_TailInitializeTable;
122 bool full_topology=
true);
141 bool isEmpty()
const;
151 getPrimitiveList().stashAll();
160 incrementMetaCacheCount();
167 getPrimitiveList().destroyStashed();
196 return myHandlePV3.get(ptoff);
203 template <
typename T>
207 if constexpr (SYSisSame<T, float>())
208 return getPos3(ptoff);
210 return getPos3D(ptoff);
215 template <
typename T>
220 return getAttributeAsArray(getP(), ptrange, positions);
225 template <
typename T>
230 return setAttributeFromArray(getP(), ptrange, positions);
237 myHandlePV3.set(ptoff,
v3);
248 myHandlePV3.set(ptoff, pos);
267 myHandlePV3.add(ptoff, delta);
303 return UT_Vector4(getPos3(ptoff), getPw(ptoff));
314 setPw(ptoff, pos.
w());
319 setPw(ptoff, pos.
w());
325 setPos3(ptoff, x, y, z);
336 {
return appendPointBlock(1); }
340 {
return myPointMap.addElementBlock(npoints); }
344 {
return myPointMap.indexSize(); }
351 {
return myPointMap.offsetSize(); }
355 {
return myPointMap.offsetFromIndex(index); }
359 {
return myPointMap.indexFromOffset(offset); }
389 bool closed_flag =
false);
406 bool closed_flag =
false);
409 const std::pair<int,exint> *primtype_count_pairs,
412 const exint *closed_span_length =
nullptr,
418 {
return myPrimitiveMap.indexSize(); }
425 {
return myPrimitiveMap.offsetSize(); }
429 {
return myPrimitiveMap.offsetFromIndex(index); }
433 {
return myPrimitiveMap.indexFromOffset(offset); }
439 {
return myPrimitiveList.get(prim_off); }
442 {
return myPrimitiveList.get(prim_off); }
448 {
return myPrimitiveList.get(primitiveOffset(prim_idx)); }
450 {
return myPrimitiveList.get(primitiveOffset(prim_idx)); }
478 int getPrimitiveTypeId(
GA_Offset primoff)
const;
484 bool getPrimitiveClosedFlag(
GA_Offset primoff)
const;
491 void setPrimitiveClosedFlag(
GA_Offset primoff,
bool closed);
501 bool swapPrimitiveOrder(
GA_Offset offset1,
510 {
return myVertexMap.addElementBlock(nvertices); }
514 {
return myVertexMap.indexSize(); }
521 {
return myVertexMap.offsetSize(); }
525 {
return myVertexMap.offsetFromIndex(index); }
529 {
return myVertexMap.indexFromOffset(offset); }
541 return myTopology.getPointRef()->getLink(vertex);
548 myTopology.wireVertexPoint(vertex, ptoff);
559 return pref->getLink(vertex);
573 return ref->getLink(point);
585 return ref->getLink(vtx);
597 return ref->getLink(vtx);
613 GA_Size getVerticesReferencingPoint(
624 GA_Size getPrimitivesReferencingPoint(
633 bool hasNoSharedPoints()
const;
666 GA_DestroyPointMode
mode=GA_LEAVE_PRIMITIVES,
667 bool guarantee_no_vertex_references=
false);
669 GA_DestroyPointMode
mode=GA_LEAVE_PRIMITIVES,
670 bool guarantee_no_vertex_references=
false);
678 bool and_points =
false);
680 bool and_points =
false);
682 bool and_points =
false);
688 bool and_points =
false);
690 bool and_points =
false)
691 {
return destroyPrimitiveOffsets(it, and_points); }
693 bool and_points =
false);
700 return destroyUnusedPoints(getPointRange(ptgrp));
707 bool guarantee_no_vertex_references=
false)
709 return destroyElements(range,
mode,
710 guarantee_no_vertex_references);
714 bool guarantee_no_vertex_references=
false)
716 return destroyPointOffsets(range,
mode,
717 guarantee_no_vertex_references);
723 {
return destroyElements(range); }
725 {
return destroyVertexOffsets(range); }
743 GA_Size countUnusedPoints()
const;
751 ->getIndexMap(owner));
776 : myPointMarker(detail.getPointMap())
777 , myVertexMarker(detail.getVertexMap())
778 , myPrimitiveMarker(detail.getPrimitiveMap())
781 {
return myPointMarker.getRange(); }
783 {
return myVertexMarker.getRange(); }
785 {
return myPrimitiveMarker.getRange(); }
787 {
return myPointMarker.getBegin(); }
789 {
return myVertexMarker.getBegin(); }
791 {
return myPrimitiveMarker.getBegin(); }
793 {
return myPointMarker.getEnd(); }
795 {
return myVertexMarker.getEnd(); }
797 {
return myPrimitiveMarker.getEnd(); }
805 {
return myPrimitiveList; }
807 {
return myPrimitiveList; }
812 bool checkValidTopology()
const;
813 void createTopologyAttributes();
814 void clearTopologyAttributes();
819 void bumpAllDataIds();
830 void bumpDataIdsForRewire();
836 void bumpDataIdsForAddOrRemove(
837 bool added_or_removed_points,
838 bool added_or_removed_vertices,
839 bool added_or_removed_primitives);
850 void markDirty(
bool bumpalldataid);
856 {
return myAttributes.getDict(owner); }
873 bool defragment(
const UT_Options *options =
nullptr);
878 void sortVertexMapByPrimitiveUse();
894 return myAttributes.createAttribute(
895 owner, scope, name, create_args,
896 attribute_options, attribtype);
904 return myAttributes.createAttribute(
905 owner, name, create_args,
906 attribute_options, attribtype);
922 return myAttributes.createDetachedTupleAttribute(
923 owner, storage, tuple_size,
924 defaults, attribute_options);
934 return myAttributes.createDetachedAttribute(
935 owner, attribtype, create_args,
946 return myAttributes.createDetachedAttribute(
947 owner, attribtype, create_args,
957 return myAttributes.destroyAttribute(owner,
964 return myAttributes.destroyAttribute(owner, name);
972 return myAttributes.renameAttribute(owner, scope,
986 return myAttributes.createTupleAttribute(
987 owner, scope, name, storage,
988 tuple_size, defaults,
1000 return myAttributes.createTupleAttribute(
1001 owner, name, storage,
1002 tuple_size, defaults,
1012 return myAttributes.createStringAttribute(
1013 owner, scope, name, 1,
1022 return myAttributes.createStringAttribute(
1023 owner, name, 1, create_args,
1033 int search_size)
const
1035 return myAttributes.findAttribute(
1036 scope, name, search_order,
1042 int search_size)
const
1044 return myAttributes.findAttribute(
1045 name, search_order, search_size);
1051 {
return findAttribute(scope, name, &owner, 1); }
1055 {
return findAttribute(name, &owner, 1); }
1093 return myAttributes.findAttribute(
1094 scope, name, search_order,
1102 return myAttributes.findAttribute(
1103 name, search_order, search_size);
1109 {
return findAttribute(scope, name, &owner, 1); }
1113 {
return findAttribute(name, &owner, 1); }
1152 template <
typename T>
1153 bool getAttributeAsArray(
1164 template <
typename T>
1165 bool setAttributeFromArray(
1174 bool ordered=
false);
1176 bool ordered=
false);
1190 ->getElementGroupTable(owner));
1200 {
return myPointGroups; }
1202 {
return myPointGroups; }
1204 {
return myPrimitiveGroups; }
1206 {
return myPrimitiveGroups; }
1208 {
return myVertexGroups; }
1210 {
return myVertexGroups; }
1212 {
return myEdgeGroups; }
1214 {
return myEdgeGroups; }
1217 template <GA_AttributeOwner OWNER>
1224 createElementGroup(OWNER, name, ordered));
1227 template <GA_AttributeOwner OWNER>
1233 createInternalElementGroup(OWNER,ordered));
1236 template <GA_AttributeOwner OWNER>
1242 findElementGroup(OWNER, name));
1244 template <GA_AttributeOwner OWNER>
1250 findElementGroup(OWNER, name));
1260 {
return getElementGroupTable(owner).destroy(name); }
1264 {
return getElementGroupTable(owner).destroy(name); }
1266 bool destroyGroup(
GA_Group *group);
1271 {
return findElementGroup<GA_ATTRIB_POINT>(
name); }
1274 {
return findElementGroup<GA_ATTRIB_VERTEX>(
name); }
1277 {
return findElementGroup<GA_ATTRIB_PRIMITIVE>(
name); }
1281 {
return findElementGroup<GA_ATTRIB_POINT>(
name); }
1284 {
return findElementGroup<GA_ATTRIB_VERTEX>(
name); }
1287 {
return findElementGroup<GA_ATTRIB_PRIMITIVE>(
name); }
1293 void getEdgeGroupList(
1295 void getEdgeGroupList(
1299 {
return myEdgeGroups.destroy(name); }
1302 {
return g ? myEdgeGroups.destroy(g) :
false; }
1306 GA_Size destroyAllEmptyGroups();
1313 return static_cast<GA_PointGroup *
>(pointGroups().newGroup(name));
1317 return static_cast<GA_VertexGroup *
>(vertexGroups().newGroup(name));
1325 return static_cast<GA_EdgeGroup *
>(edgeGroups().newGroup(name));
1336 return static_cast<GA_PointGroup *
>(pointGroups().newInternalGroup());
1340 return static_cast<GA_VertexGroup *
>(vertexGroups().newInternalGroup());
1348 return static_cast<GA_EdgeGroup *
>(edgeGroups().newInternalGroup());
1383 return UTmakeUnique<GA_PointGroup>(*this);
1387 return UTmakeUnique<GA_PrimitiveGroup>(*this);
1391 return UTmakeUnique<GA_VertexGroup>(*this);
1395 return UTmakeUnique<GA_EdgeGroup>(*this);
1403 return static_cast<GA_PointGroup *
>(pointGroups().newGroup(name,
internal));
1407 return static_cast<GA_PrimitiveGroup *
>(primitiveGroups().newGroup(name,
internal));
1411 return static_cast<GA_VertexGroup *
>(vertexGroups().newGroup(name,
internal));
1415 return static_cast<GA_EdgeGroup *
>(edgeGroups().newGroup(name,
internal));
1442 {
return myPrimitiveFactory.getDetailIntrinsics(); }
1451 {
return getIntrinsicManager().getLocalHandle(nm); }
1453 {
return getIntrinsicManager().getLocalHandle(h); }
1455 {
return getIntrinsicManager().getGlobalHandle(h); }
1458 {
return getIntrinsicManager().getName(h); }
1462 {
return getIntrinsicManager().getCollapseSingletons(h); }
1464 {
return getIntrinsicManager().getStorage(h); }
1466 {
return getIntrinsicManager().getReadOnly(h); }
1468 {
return getIntrinsicManager().getOptions(h); }
1525 template<
typename FUNCTOR>
1529 myPointMap.forEachOffset(functor);
1537 template<
typename FUNCTOR>
1541 forEachOffset(functor, myPointMap, group);
1546 template<
typename FUNCTOR>
1550 forEachOffset(functor, myPointMap, group, complement);
1556 template<
typename FUNCTOR>
1560 myPointMap.forEachOffsetBreak(functor);
1562 template<
typename FUNCTOR>
1566 forEachOffset(functor, myPointMap, group);
1568 template<
typename FUNCTOR>
1572 forEachOffset(functor, myPointMap, group, complement);
1585 template<
typename FUNCTOR>
1589 myPrimitiveMap.forEachOffset(functor);
1601 template<
typename FUNCTOR>
1605 forEachOffset(functor, myPrimitiveMap, group);
1610 template<
typename FUNCTOR>
1614 forEachOffset(functor, myPrimitiveMap, group, complement);
1620 template<
typename FUNCTOR>
1624 myPrimitiveMap.forEachOffsetBreak(functor);
1626 template<
typename FUNCTOR>
1630 forEachOffsetBreak(functor, myPrimitiveMap, group);
1632 template<
typename FUNCTOR>
1636 forEachOffsetBreak(functor, myPrimitiveMap, group, complement);
1640 template<
typename FUNCTOR>
1673 group->getConstantSpan(off, veryend, span_size, value);
1676 if (value == complement)
1681 const GA_Offset span_end = off+span_size;
1692 }
while (off != end);
1697 template<
typename FUNCTOR>
1731 group->getConstantSpan(off, veryend, span_size, value);
1734 if (value == complement)
1739 const GA_Offset span_end = off+span_size;
1751 }
while (off != end);
1759 {
return GA_Range(getPointMap(), group); }
1762 {
return GA_Range(getPrimitiveMap(), group); }
1771 end_ptnum =
GA_Index(getNumPoints());
1772 return GA_Range(getPointMap(), begin_ptnum, end_ptnum,
1782 end_prim =
GA_Index(getNumPrimitives());
1784 begin_prim, end_prim, ordered);
1789 {
return GA_Range(getVertexMap(), group); }
1792 {
return GA_Range(getGlobalMap()); }
1796 virtual int64 getMemoryUsage(
bool inclusive)
const;
1797 virtual int64 getDeviceMemoryUsage()
const;
1845 virtual GA_Detail *cloneEmptyDetail(
bool clone_attributes)
const = 0;
1851 void cloneCopyGroupsAndAttributes(
const GA_Detail &
src,
1852 bool copydetailattribs =
false);
1865 void copyAttributes(
1870 void copyAttributes(
1901 bool ref_point_dont_copy,
1904 GA_Offset srcptoff = vertexPoint(srcvtxoff);
1905 if (ref_point_dont_copy)
1906 setVertexPoint(destvtxoff, srcptoff);
1908 copyPoint(vertexPoint(destvtxoff), srcptoff,
filter);
1931 bool full_copy =
false);
1954 clearInstanceMatrix();
1955 getPrimitiveList().destroyStashed();
1978 {
return myPrimitiveFactory.registerIO(io); }
1982 const GA_IO *
findIO(
const char *name =
nullptr)
const
1983 {
return myPrimitiveFactory.findIO(name); }
1988 {
return myPrimitiveFactory.getIONames(names); }
1996 : mySuccess(success)
1999 : mySuccess(src.mySuccess)
2006 mySuccess = src.mySuccess;
2015 explicit operator bool()
const {
return mySuccess; }
2030 IOStatus save(
const char *
filename,
2043 IOStatus save(std::ostream &os,
bool binary,
2048 IOStatus saveClassic(
const char *,
const GA_SaveOptions *)
const;
2049 IOStatus saveClassic(std::ostream &os,
bool,
const GA_SaveOptions *)
const;
2155 IOStatus load(
const char *
filename,
2199 { myAttributes.constructElementBlock(owner, offset, nelements); }
2202 { myAttributes.destructElement(owner, offset); }
2227 bool include_total=
true,
2229 const char *title=
"Geometry Memory Tracking");
2240 template <
typename T>
static inline const typename T::GB_MACRO_PRIM_TYPE *
2242 {
return static_cast<const typename T::GB_MACRO_PRIM_TYPE *
>(prim);}
2243 template <
typename T>
static inline typename T::GB_MACRO_PRIM_TYPE *
2245 {
return static_cast<typename T::GB_MACRO_PRIM_TYPE *
>(prim); }
2253 bool loadVertexPointReferenceH9(
UT_IStream &is,
2255 bool saveVertexPointReferenceH9(std::ostream &os,
2260 static bool saveAttribDataH9(std::ostream &os,
int binary,
2263 char delim_ch =
'(');
2269 bool saveVertexH9(std::ostream &os,
int binary,
2278 {
return myPrimitiveFactory; }
2282 virtual void refreshCachedHandles();
2284 void refreshCachedAttributes();
2313 if (myTailInitializers)
2314 doConstructTailInitializers(owner, start,
size);
2318 {
return myPrimitiveList.containsType(type); }
2320 {
return myPrimitiveList.containsOnlyTypes(type); }
2322 {
return myPrimitiveList.countType(type); }
2324 {
return myPrimitiveList.countTypeFamily(family); }
2326 {
return myPrimitiveList.
2327 hasLocalTransform(myPrimitiveFactory); }
2330 {
return myPrimitiveList.getPrimitivesOfType(type, prims); }
2349 void clearInstanceMatrix();
2355 return myPrimitiveFactory.isForPrimaryDetail();
2365 bool read,
bool write);
2372 bool read,
bool write);
2379 {
return getTopologyCEAttributeAccessor(topotype, storage, precision, tuplesize, isarray,
true,
false); }
2389 bool read,
bool write)
const;
2393 void flushCEWriteCaches();
2397 void flushCECaches();
2401 void clearCECaches();
2408 void stealCEBuffers(
const GA_Detail &srcdetail);
2412 void copyCEAttributes(
const GA_Detail &srcdetail,
2413 bool include_topology =
true);
2420 static const int64 INVALID_CACHE_COUNT = -1;
2434 class GA_API MantraGeometry
2438 virtual ~MantraGeometry() {}
2439 virtual void refreshCachedHandles();
2442 {
return myMantraGeometry; }
2444 {
return myMantraGeometry; }
2446 { myMantraGeometry = m; }
2457 bool savePrimitivesH9(std::ostream &os,
int binary,
2496 static void finishLoadH9(
2506 const float cuspangledegrees,
2507 const int method)
const
2513 void splitAnyFloat4P();
2523 void init(
GA_Storage Pstore,
bool isprimary,
bool full_topology);
2527 void clearData(
bool for_deletion);
2533 GA_DestroyPointMode
mode=GA_LEAVE_PRIMITIVES,
2534 bool guarantee_no_vertex_point_references=
false);
2538 GA_DestroyPointMode
mode=GA_LEAVE_PRIMITIVES);
2544 bool dereferencePoints(
const GA_Range &point_range,
2546 GA_DestroyPointMode
mode=GA_LEAVE_PRIMITIVES);
2569 ga_TailInitializeTable *myTailInitializers;
2570 MantraGeometry *myMantraGeometry;
2589 int64 myMetaCacheCount;
2593 bool GA_Detail::getAttributeAsArray<UT_StringHolder>(
2600 GA_Detail::setAttributeFromArray<UT_StringHolder>(
2606 bool GA_Detail::getAttributeAsArray<UT_OptionsHolder>(
2612 bool GA_Detail::setAttributeFromArray<UT_OptionsHolder>(
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.
UT_SharedPtr< GA_CEAttribute > GA_CEAttributePtr
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_CEAttributeAccessorPtr getTopologyCEAttributeAccessorR(GA_Topology::TopologyCE topotype, GA_StorageClass storage, GA_Precision precision, int &tuplesize, bool isarray)
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()
GLint GLint GLsizei GLint GLenum GLenum type
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
UT_SharedPtr< GA_CEAttributeAccessor > GA_CEAttributeAccessorPtr
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