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;
133 return GA_Offset(myList ? getMyListSize() : myVertexLists.size());
138 void clear(
bool for_deletion);
141 void destroyStashed();
148 return myList !=
nullptr;
155 return !myList && myVertexLists.isPageConstant(
UT_PageNum(pagenum));
166 UT_ASSERT_P(myVertexLists.isPageConstant(pagenum));
167 auto p = myVertexLists.getPageData(pagenum);
189 if (!isFullRepresentation())
190 myVertexLists.hardenTable();
194 void hardenAllVertexListPages();
249 {
return myTracker.contains(type); }
253 {
return myTracker.containsOnly(types); }
256 {
return myTracker.count(type); }
259 {
return myTracker.countFamily(family); }
263 {
return myTracker.hasLocalTransform(factory); }
276 {
return myTracker; }
282 void rebuildTracker();
287 bool validate(
const GA_Detail &detail)
const;
293 void getPrimitiveTypeCounts(
294 UT_Array<std::pair<int,exint>> &type_count_pairs,
303 class ga_ParallelCreateForMerge;
304 class ga_ParallelCreatePagedForMerge;
305 class ga_ReplacePrimitiveBlockParallel;
307 void initVertexLists(
312 bool closed =
false);
313 void initVertexLists(
317 bool closed =
false);
321 void initVertexLists(
325 const exint *closed_span_lengths =
nullptr,
326 const exint ncopies = 1);
340 void sortVertexMapByPrimitiveUse(
GA_IndexMap &vertex_map);
348 bool loadPolyOrTetRun(
362 exint getMyListSize()
const
364 return getMyPrimPtrSize(myList);
367 exint getMyStashedSize()
const
369 return getMyPrimPtrSize(myStashedPrims);
375 return ((
const exint*)p)[-1];
377 void reallocMyList(
exint newsize);
381 void clearVertexLists();
389 GA_Primitive *
const*hardenPrimitivesImpl(
bool parallel)
const;
390 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
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.