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();
250 {
return myTracker.contains(type); }
254 {
return myTracker.containsOnly(types); }
257 {
return myTracker.count(type); }
260 {
return myTracker.countFamily(family); }
264 {
return myTracker.hasLocalTransform(factory); }
277 {
return myTracker; }
283 void rebuildTracker();
288 bool validate(
const GA_Detail &detail)
const;
294 void getPrimitiveTypeCounts(
295 UT_Array<std::pair<int,exint>> &type_count_pairs,
304 class ga_ParallelCreateForMerge;
305 class ga_ParallelCreatePagedForMerge;
306 class ga_ReplacePrimitiveBlockParallel;
308 void initVertexLists(
313 bool closed =
false);
314 void initVertexLists(
318 bool closed =
false);
322 void initVertexLists(
326 const exint *closed_span_lengths =
nullptr,
327 const exint ncopies = 1);
341 void sortVertexMapByPrimitiveUse(
GA_IndexMap &vertex_map);
349 bool loadPolyOrTetRun(
363 exint getMyListSize()
const
365 return getMyPrimPtrSize(myList);
368 exint getMyStashedSize()
const
370 return getMyPrimPtrSize(myStashedPrims);
376 return ((
const exint*)p)[-1];
378 void reallocMyList(
exint newsize);
382 void clearVertexLists();
390 GA_Primitive *
const*hardenPrimitivesImpl(
bool parallel)
const;
391 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.