12 #ifndef __GA_Topology__
13 #define __GA_Topology__
46 myStorage(store), myLowWater(lo_water), myHighWater(hi_water)
52 return size <= myLowWater;
56 return size >= myHighWater;
69 #define NUM_STORAGE_LEVELS 3
75 while (storage_level > 0
76 && theStorageLevels[storage_level].downShift(size))
90 && theStorageLevels[storage_level].upShift(size))
102 return theStorageLevels[
level].getStorage();
121 if (!myVertexRef || !myVertexPrevRef || !myVertexNextRef)
130 bool support_hedge =
false);
142 bool checkStorageChange();
159 {
return addVertexBlock(vtx, 1); }
161 {
return addPointBlock(pt, 1); }
215 void makePrimitiveRef();
218 void makeVertexRef();
248 void mergeGrowCheckStorageChange(
GA_Size sz,
bool cloned_data_id);
252 bool validate()
const;
261 void getAdjacentBoundaryVertices(
GA_Offset vtx,
280 {
return (myHedgePrevRef != 0); }
287 if (!myHedgePrevRef || !myHedgeNextRef || !mySecondaryHedges)
297 void createHedgeTopologyLinks();
300 void destroyHedgeTopologyLinks();
314 bool isValidHedge(
GA_Offset src_vtx)
const;
331 {
return !mySecondaryHedges->containsOffset(src_vtx); }
344 {
return myHedgePrevRef->getLink(src_vtx); }
349 {
return myHedgeNextRef->getLink(src_vtx); }
375 void rebuildHedgeTopologyLinks();
386 {
return myStorageLevel; }
389 void cloneDataId(
const GA_Topology &
src,
bool allow_clear=
false);
408 static TopologyCE nameToTopologyCE(
const char *
name);
409 static const char *topologyCEToName(TopologyCE topotype);
426 bool read,
bool write);
431 bool leave_on_gpu=
false);
435 void flushCEWriteCaches(
bool clearwriteback=
true);
436 bool hasPendingCEWriteBack()
const;
439 void flushCECaches();
511 bool checkStorageChange(
GA_Size nvertex,
514 void rebuildTopologyLinks(
bool do_prim,
bool do_vertex);
515 void mergeResolvePendingVertexRefs(
const GA_MergeMap &map);
519 void shiftStorage(
int change,
bool cloned_data_id=
false);
524 void replaceStorageLevel(
const int storage_level)
526 myStorageLevel = storage_level;
560 mutable GA_DataId myCEAttributeDataId[NUM_TOPO_CE];;
SIM_API const UT_StringHolder vertex
Definition of a geometry attribute.
Used to pass options and map offset values during saving.
int getStorageLevel() const
bool downShift(GA_Size size) const
getFileOption("OpenEXR:storage") storage
GA_Storage getStorage() const
GA_Offset hedgeToNextHedge(GA_Offset src_vtx) const
The merge map keeps track of information when merging details.
SYS_FORCE_INLINE GA_ATITopology * getPrimitiveRef()
void addPoint(GA_Offset pt)
GLboolean GLboolean GLboolean GLboolean a
JSON reader class which handles parsing of JSON or bJSON files.
Class which writes ASCII or binary JSON streams.
SYS_FORCE_INLINE GA_ATITopology * getPointRef()
#define UT_IF_ASSERT_P(ZZ)
exint GA_Size
Defines the bit width for index and offset types in GA.
#define GA_INVALID_OFFSET
#define NUM_STORAGE_LEVELS
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
static int computeStorageDownShift(int storage_level, GA_Size size)
static GA_Storage getStorage(int level)
SYS_FORCE_INLINE GA_ATITopology * getVertexPrevRef()
static int computeStorageUpShift(int storage_level, GA_Size size)
SYS_FORCE_INLINE const GA_ATITopology * getVertexNextRef() const
bool upShift(GA_Size size) const
SYS_FORCE_INLINE GA_ATITopology * getVertexNextRef()
Defragmentation of IndexMaps.
GLuint const GLchar * name
GLboolean GLboolean GLboolean b
SYS_FORCE_INLINE const GA_ATITopology * getPrimitiveRef() const
void addVertex(GA_Offset vtx)
Functions to maintain topological information.
GA_Offset hedgeToPrevHedge(GA_Offset src_vtx) const
GLenum GLint GLint * precision
bool rebuildTopology(GA_Detail &gdp, bool create_attributes=false) const
SYS_FORCE_INLINE const GA_ATITopology * getVertexPrevRef() const
SYS_FORCE_INLINE const GA_ATITopology * getVertexRef() const
SYS_FORCE_INLINE GA_ATITopology * getVertexRef()
Container class for all geometry.
GLubyte GLubyte GLubyte GLubyte w
bool isPrimaryHedge(GA_Offset src_vtx) const
SYS_FORCE_INLINE const GA_ATITopology * getPointRef() const
ga_StorageSwitch(GA_Storage store, GA_Size lo_water, GA_Size hi_water)