13 #ifndef __GA_PrimitiveList__
14 #define __GA_PrimitiveList__
64 prim_array = hardenPrimitives();
66 return prim_array[off];
73 prim_array = hardenPrimitives();
75 return prim_array[off];
109 bool getClosedFlag(
GA_Offset primoff)
const;
116 void setClosedFlag(
GA_Offset primoff,
bool closed);
119 int64 getMemoryUsage(
bool inclusive)
const;
120 int64 getDeviceMemoryUsage()
const;
134 return GA_Offset(myList ? getMyListSize() : myVertexLists.size());
139 void clear(
bool for_deletion);
142 void destroyStashed();
149 return myList !=
nullptr;
156 return !myList && myVertexLists.isPageConstant(
UT_PageNum(pagenum));
167 UT_ASSERT_P(myVertexLists.isPageConstant(pagenum));
168 auto p = myVertexLists.getPageData(pagenum);
190 if (!isFullRepresentation())
191 myVertexLists.hardenTable();
195 void hardenAllVertexListPages();
257 {
return myTracker.contains(type); }
261 {
return myTracker.containsOnly(types); }
264 {
return myTracker.count(type); }
267 {
return myTracker.countFamily(family); }
271 {
return myTracker.hasLocalTransform(factory); }
284 {
return myTracker; }
290 void rebuildTracker();
295 bool validate(
const GA_Detail &detail)
const;
301 void getPrimitiveTypeCounts(
302 UT_Array<std::pair<int,exint>> &type_count_pairs,
311 class ga_ParallelCreateForMerge;
312 class ga_ParallelCreatePagedForMerge;
313 class ga_ReplacePrimitiveBlockParallel;
315 void initVertexLists(
320 bool closed =
false);
321 void initVertexLists(
325 bool closed =
false);
329 void initVertexLists(
333 const exint *closed_span_lengths =
nullptr,
334 const exint ncopies = 1);
348 void sortVertexMapByPrimitiveUse(
GA_IndexMap &vertex_map);
356 bool loadPolyOrTetRun(
370 exint getMyListSize()
const
372 return getMyPrimPtrSize(myList);
375 exint getMyStashedSize()
const
377 return getMyPrimPtrSize(myStashedPrims);
383 return ((
const exint*)p)[-1];
385 void reallocMyList(
exint newsize);
389 void clearVertexLists();
397 GA_Primitive *
const*hardenPrimitivesImpl(
bool parallel)
const;
398 class HardenPrimitivesFunctor;
A class to manage an ordered array which has fixed offset handles.
SYS_FORCE_INLINE GA_OffsetListRef getConstantVertexListPage(GA_PageNum pagenum) const
UT_ASSERT_COMPILETIME(BRAY_EVENT_MAXFLAGS<=32)
Used to pass options and map offset values during saving.
GA_DataId getDataId() const
const GA_PrimitiveTracker & getTracker() const
The merge map keeps track of information when merging details.
JSON reader class which handles parsing of JSON or bJSON files.
Class which writes ASCII or binary JSON streams.
SYS_FORCE_INLINE bool GAisValid(GA_Size v)
exint GA_Size
Defines the bit width for index and offset types in GA.
GA_Size countTypeFamily(GA_PrimitiveFamilyMask family) const
Return the number of primitives of the given family.
A range of elements in an index-map.
GA_Size countType(const GA_PrimitiveTypeId &type) const
Return the number of primitives of the given type.
bool containsType(const GA_PrimitiveTypeId &type) const
GLint GLint GLsizei GLint GLenum GLenum type
SYS_FORCE_INLINE ~GA_PrimitiveList()
Class which keeps counts of each type of primitive.
std::string OIIO_UTIL_API replace(string_view str, string_view pattern, string_view replacement, bool global=false)
Defragmentation of IndexMaps.
bool containsOnlyTypes(const UT_Array< GA_PrimitiveTypeId > &types) const
LeafData & operator=(const LeafData &)=delete
bool isFullRepresentation() const
bool hasLocalTransform(const GA_PrimitiveFactory &factory) const
Class to store JSON objects as C++ objects.
void hardenVertexListPageTable()
NOTE: This is not threadsafe. Also, this just hardens the table, not any pages.
Container class for all geometry.
GA_Offset offsetSize() const
Offset size of the list.
GLubyte GLubyte GLubyte GLubyte w
Definition of a geometric primitive.
GLsizei GLenum GLenum * types
SYS_FORCE_INLINE bool isVertexListPageConstant(GA_PageNum pagenum) const
Returns true iff the specified vertex list page is constant.