13 #ifndef __GA_ATIGroupBool__
14 #define __GA_ATIGroupBool__
73 static void registerType();
77 {
return theAttributeType->getTypeName(); }
84 return attrib && &attrib->
getType() == theAttributeType;
89 if (attrib && &attrib->
getType() == theAttributeType)
90 return static_cast<GA_ATIGroupBool *>(attrib);
96 if (attrib && &attrib->
getType() == theAttributeType)
97 return static_cast<const GA_ATIGroupBool *>(attrib);
158 if (getOrdered()->mixedEntries())
169 if (getOrdered() && !getOrdered()->mixedEntries())
180 bool copy_ordering =
true);
197 setMembership<true>(ai);
199 setMembership<false>(ai);
207 setMembership<true>(it);
209 setMembership<false>(it);
218 void toggleElement(
const GA_Range &it);
226 void toggleAll(
GA_Size numelements);
254 copyMembership(g,
true);
262 return myData.get(offset);
278 return myData.isAnySet(range);
283 return (getGroupEntries() == 0);
289 return (getGroupEntries() == 0);
294 return (entriesMix() == 0);
298 {
return getGroupEntries(); }
303 return getOrdered()->entries();
305 return getGroupEntries();
309 if (myGroupEntries >= 0)
310 return myGroupEntries;
312 return computeGroupEntries();
314 GA_Size computeGroupEntries()
const;
362 setElement(ai,
true);
374 setElement(ai,
false);
386 setMembership<true>(it);
396 setMembership<false>(it);
406 return myData.getConstantSpan(start, end,
410 void clear()
override;
411 void makeConstant(
bool value);
413 { myGroupEntries = -1; }
436 invalidateGroupEntries();
446 {
return myAIFCopyData;}
448 {
return myAIFTuple; }
450 {
return myAIFInterp; }
452 {
return myAIFMerge; }
454 {
return myAIFCompare; }
465 bool loadGroupByIndexOrderH9(
const UT_BitArray &array);
466 bool saveGroupH9(std::ostream &os,
bool binary)
const;
548 {
return myData.getArraySize(); }
573 return myData.isPageConstant(pagenum);
579 return myData.getPageCVal(pagenum);
584 myData.makePageConstant(pagenum, value);
626 setElement(desti, UTverify_cast<const GA_ATIGroupBool *>(&
src)->
contains(srci));
631 setElement(desti, src.
contains(srci));
639 const GA_Range &srcrange)
override final
641 return tupleSet(destrange, *
this, srcrange);
648 return tupleSet(destrange, *UTverify_cast<const GA_ATIGroupBool*>(&
src), srcrange);
652 return tupleSet(destrange, src, srcrange);
660 setElement(destrange,
contains(srci));
668 setElement(destrange, UTverify_cast<const GA_ATIGroupBool *>(&
src)->
contains(srci));
673 setElement(destrange, src.
contains(srci));
695 if (myGroupEntries >= 0)
696 myGroupEntries +=
ADD ? +1 : -1;
709 setMembership<ADD>(*it);
736 UT_ASSERT_MSG_P(0,
"Writing to detached group out of range! Note that they don't update when you add or remove elements from the detail!");
739 myData.set(range,
ADD);
740 invalidateGroupEntries();
763 mutable GA_Size myGroupEntries;
764 mutable UT_Lock myGroupEntriesConstLock;
768 static GA_AIFInterp *myAIFInterp;
779 class ga_GroupBoolCopyData;
780 class ga_GroupBoolTuple;
781 class ga_GroupBoolMerge;
void setEntries()
Add all elements to the group, only writing to real elements' offsets.
bool isMixed() const overridefinal
Query if the group contains any mixed elements.
static SYS_FORCE_INLINE bool isType(const GA_Attribute *attrib)
A class to manage an ordered array which has fixed offset handles.
bool fill(const GA_Range &destrange, GA_Offset srci) overridefinal
SYS_FORCE_INLINE const GA_Detail & getDetail() const
Definition of a geometry attribute.
static SYS_FORCE_INLINE const GA_ATIGroupBool * cast(const GA_Attribute *attrib)
bool setOrdered(bool ordered)
GA_ElementGroup * getGroup()
Used to pass options and map offset values during saving.
Iteration over a range of elements.
SYS_FORCE_INLINE bool containsAny(const GA_Range &range) const
const GA_AIFInterp * getAIFInterp() const override
Return the attribute's interpolation interface or NULL.
OrtDmlDeviceFilter & operator^=(OrtDmlDeviceFilter &a, OrtDmlDeviceFilter b)
virtual bool setName(const UT_StringHolder &n)
SYS_FORCE_INLINE const GA_IndexMap & getIndexMap() const
GA_GroupMaskType classMaskType() const
GA_Size entries() const overridefinal
Will return the number of primary elements.
#define SYS_DEPRECATED_HDK_REPLACE(__V__, __R__)
const GLuint GLenum const void * binary
Matrix44< T > addOffset(const Matrix44< T > &inMat, const Vec3< T > &tOffset, const Vec3< T > &rOffset, const Vec3< T > &sOffset, const Vec3< T > &ref)
The merge map keeps track of information when merging details.
friend class GA_ElementGroup
SYS_FORCE_INLINE void setOffset(GA_Offset ai, bool v)
virtual void reconstructElementBlock(GA_Offset offset, GA_Offset nelements)=0
void getConstantSpan(GA_Offset start, GA_Offset end, GA_Size &size, bool &value) const
static SYS_FORCE_INLINE const GA_ElementGroup * cast(const GA_Group *group)
SYS_FORCE_INLINE void toggleOffset(GA_Offset ai)
JSON reader class which handles parsing of JSON or bJSON files.
virtual bool setArraySize(GA_Offset size)=0
GA_Offset getArraySize() const
void toggleEntries()
Toggle membership of all elements.
Class which writes ASCII or binary JSON streams.
SYS_FORCE_INLINE TO_T UTverify_cast(FROM_T from)
#define UT_ASSERT_MSG_P(ZZ,...)
virtual void countMemory(UT_MemoryCounter &counter, bool inclusive) const =0
static SYS_FORCE_INLINE GA_ATIGroupBool * cast(GA_Attribute *attrib)
virtual int64 getMemoryUsage(bool inclusive) const =0
#define UT_IF_ASSERT_P(ZZ)
bool containsIndex(GA_Index ai) const
GA_Size getGroupEntries() const
SYS_FORCE_INLINE void removeOffset(GA_Offset ai)
SYS_FORCE_INLINE bool GAisValid(GA_Size v)
virtual void tryCompressAllPages(GA_Offset start_offset=GA_Offset(0), GA_Offset end_offset=GA_INVALID_OFFSET)=0
void addAll() overridefinal
Add all elements to the group.
exint GA_Size
Defines the bit width for index and offset types in GA.
SYS_FORCE_INLINE void setPageConstant(GA_PageNum pagenum, const bool value)
Sets all elements of the specified page to the given value.
bool copy(const GA_Range &destrange, const GA_ATIGroupBool &src, const GA_Range &srcrange)
SYS_FORCE_INLINE const GA_AttributeType & getType() const
No concurrent writes supported.
#define GA_INVALID_OFFSET
SYS_FORCE_INLINE void addRange(const GA_Range &it)
A range of elements in an index-map.
SYS_FORCE_INLINE const UT_StringHolder & getName() const
bool fill(const GA_Range &destrange, const GA_ATIGroupBool &src, GA_Offset srci)
const GA_Detail & getDetail() const overridefinal
SYS_FORCE_INLINE void toggleIndex(GA_Index ai)
static SYS_FORCE_INLINE const GA_AttributeType & getType()
virtual bool isOrdered() const =0
virtual bool needDestruction() const
Methods which can be overridden from GA_Attribute.
bool canContainDuplicates() const
virtual bool jsonSaveData(UT_JSONWriter &w, const GA_SaveMap &map) const =0
Save the private group data.
SYS_FORCE_INLINE void addIndex(GA_Index ai)
SYS_FORCE_INLINE void setElement(GA_Offset ai, bool v)
virtual void replace(const GA_Attribute &src)=0
Attribute Interface for merging attribute data between details.
SYS_FORCE_INLINE void setElement(const GA_Range &it, bool v)
NOTE: This cannot be used in parallel on an ordered group.
bool fill(const GA_Range &destrange, const GA_Attribute &src, GA_Offset srci) overridefinal
SYS_FORCE_INLINE void toggleRange(const GA_Range &it)
virtual bool stat(UT_WorkBuffer &info, uint level) const
static SYS_FORCE_INLINE bool isType(const GA_Group *group)
Attribute Interface class to perform comparisons on attributes.
GA_ElementGroup * getAttribute()
Defragmentation of IndexMaps.
bool isOrdered() const overridefinal
Returns true if the group is currently ordered.
GLuint const GLchar * name
bool isEmptyMix() const
Query whether the group is empty of elements, primary or mixed.
SYS_FORCE_INLINE void removeIndex(GA_Index ai)
GA_Size GA_Index
Define the strictness of GA_Offset/GA_Index.
virtual void copyNonStorageMetadata(const GA_Attribute *that)
WriteConcurrence getSupportedWriteConcurrence() const override
const GA_ElementGroup * getGroup() const
SYS_FORCE_INLINE bool isPageConstant(GA_PageNum pagenum) const
SYS_FORCE_INLINE GA_DataBitArray & getData()
bool copy(GA_Offset desti, GA_Offset srci) overridefinal
GT_API const UT_StringHolder version
virtual bool combine(const GA_Group *input_group)
SYS_FORCE_INLINE bool containsOffset(GA_Offset offset) const
OrtDmlDeviceFilter & operator&=(OrtDmlDeviceFilter &a, OrtDmlDeviceFilter b)
SYS_FORCE_INLINE bool isGroupEmpty() const
bool copy(const GA_Range &destrange, const GA_Range &srcrange) overridefinal
bool isOffsetActive(GA_Offset offset) const
Returns true if the specified offset is referenced by an ordered element.
const GA_ElementGroupOrder * getOrdered() const
virtual bool jsonLoadData(UT_JSONParser &p, const GA_LoadMap &map)=0
Load the private group data.
GA_ElementGroupOrder * getOrdered()
static SYS_FORCE_INLINE const UT_StringHolder & getTypeName()
GA_ElementGroup GA_ATIGroupBool
const GA_AIFTuple * getAIFTuple() const override
Return the attribute's tuple interface or NULL.
SYS_FORCE_INLINE GA_Offset offsetFromIndex(GA_Index ordered_index) const
bool copy(GA_Offset desti, const GA_Attribute &src, GA_Offset srci) overridefinal
bool copy(GA_Offset desti, const GA_ATIGroupBool &src, GA_Offset srci)
OIIO_FORCEINLINE const vint4 & operator-=(vint4 &a, const vint4 &b)
Container class for all geometry.
virtual void destructElement(GA_Offset offset)
Callback invoked if needsDestruction() returns true.
Attribute Interface class to copy attribute data.
GLubyte GLubyte GLubyte GLubyte w
const GA_ElementGroup * getAttribute() const
bool copy(const GA_Range &destrange, const GA_Attribute &src, const GA_Range &srcrange) overridefinal
SYS_FORCE_INLINE void removeRange(const GA_Range &it)
SYS_FORCE_INLINE bool isEmpty() const
Query whether the group is empty of primary elements.
const GA_AIFCompare * getAIFCompare() const override
Return the attribute's comparison interface or NULL.
virtual bool debugValidateArrayCapacity(GA_Offset sz) const
Debug validation of allocated array size.
const GA_AIFCopyData * getAIFCopyData() const override
Return the attribute's copy interface or NULL.
bool OIIO_UTIL_API contains(string_view a, string_view b)
Does 'a' contain the string 'b' within it?
virtual GA_Size entriesMix() const final
Will return the total number of elements, primary and mixed.
virtual void hardenAllPages(GA_Offset start_offset=GA_Offset(0), GA_Offset end_offset=GA_INVALID_OFFSET)=0
const GA_AIFMerge * getAIFMerge() const override
Return the attribute's merge interface or NULL.
virtual void defragment(const GA_Defragment &defrag)=0
Generic Attribute Interface class to access an attribute as a tuple.
SYS_FORCE_INLINE void addOffset(GA_Offset ai)
SYS_FORCE_INLINE const GA_DataBitArray & getData() const
Returns the read-only raw bit array.
void invalidateGroupEntries()
static SYS_FORCE_INLINE GA_ElementGroup * cast(GA_Group *group)
OrtDmlDeviceFilter & operator|=(OrtDmlDeviceFilter &a, OrtDmlDeviceFilter b)
SYS_FORCE_INLINE bool getPageValue(GA_PageNum pagenum) const
SYS_FORCE_INLINE bool contains(GA_Offset offset) const