11 #ifndef __GT_ElementSet__
12 #define __GT_ElementSet__
47 return sizeof(*this) + myOffsets.getMemoryUsage();
52 if (myOffsets.entries() && myOffsets.last() >=
offset)
54 if (myOffsets.last() ==
offset)
58 myOffsets.append(offset);
74 myOffsets.setCapacity(end);
75 myOffsets.entries(end);
76 for (
exint i = start; i <
end; ++i, ++list)
77 myOffsets(i) = list[0];
82 return findOffset(idx) >= 0 ? 1 : 0;
86 exint idx = findOffset(item);
88 myOffsets.removeIndex(idx);
96 return myOffsets.begin();
101 template <
typename T>
void
105 for (
exint i = 0; i < myOffsets.entries(); ++i)
106 list[i] = myOffsets(i);
110 inline void ensureSorted()
const
120 myOffsets.sortedRemoveDuplicates();
126 return myOffsets.uniqueSortedFind(item, std::less<exint>());
130 bool myDirty =
false;
143 exint getMemoryUsage()
const;
148 {
return myMembers.count(element) > 0; }
173 bool anyIntersect(
const UT_Set<int> &elements)
const;
187 { addElement(face_index); }
193 { addElements(indices, count); }
196 { addElements(indices, count); }
202 { removeElement(face_index); }
211 {
return deleteElements(faces, mapping); }
215 bool my64bit =
false;
GLsizei GLenum const void * indices
SetType::const_iterator begin() const
void fillOrderedArray(T *list) const
SYS_FORCE_INLINE T * SYSconst_cast(const T *foo)
const_iterator end() const
A set of element indices in a GT_Primitive, e.g. points / faces / tets.
Class which writes ASCII or binary JSON streams.
A reference counter base class for use with UT_IntrusivePtr.
OIIO_FORCEINLINE vbool4 insert(const vbool4 &a, bool val)
Helper: substitute val for a[i].
exint getMemoryUsage() const
int count(GT_Offset idx) const
#define SYS_DEPRECATED_REPLACE(__V__, __R__)
#define UT_NON_COPYABLE(CLASS)
Define deleted copy constructor and assignment operator inside a class.
Wrapper around hboost::intrusive_ptr.
void multipleInsert(const T *list, exint size)
ArrayType::const_iterator const_iterator
void insert(GT_Offset offset)
const_iterator begin() const
SetType::const_iterator end() const
base_iterator< const GT_Offset, true > const_iterator
bool contains(GT_Offset element) const
Test whether an element is in the set.
An array of numeric values (int32, int64, fpreal16, fpreal32, fpreal64)
void erase(GT_Offset item)
GLubyte GLubyte GLubyte GLubyte w