11 #ifndef __GT_FaceSet__
12 #define __GT_FaceSet__
47 : myOffsets(src.myOffsets)
48 , myDirty(src.myDirty)
55 return sizeof(*this) + myOffsets.getMemoryUsage();
60 if (myOffsets.entries() && myOffsets.last() >=
offset)
62 if (myOffsets.last() ==
offset)
66 myOffsets.append(offset);
82 myOffsets.setCapacity(end);
83 myOffsets.entries(end);
84 for (
exint i = start; i <
end; ++i, ++list)
85 myOffsets(i) = list[0];
90 return findOffset(idx) >= 0 ? 1 : 0;
94 exint idx = findOffset(item);
96 myOffsets.removeIndex(idx);
104 return myOffsets.begin();
109 template <
typename T>
void
113 for (
exint i = 0; i < myOffsets.entries(); ++i)
114 list[i] = myOffsets(i);
118 inline void ensureSorted()
const
128 myOffsets.sortedRemoveDuplicates();
134 return myOffsets.uniqueSortedFind(item, std::less<exint>());
149 exint getMemoryUsage()
const;
154 {
return myMembers.count(face_index) > 0; }
const_iterator begin() const
GLsizei GLenum const void * indices
SYS_FORCE_INLINE T * SYSconst_cast(const T *foo)
bool contains(GT_Offset face_index) const
Test whether a face is in the set.
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
void insert(GT_Offset offset)
Wrapper around hboost::intrusive_ptr.
int count(GT_Offset idx) const
void fillOrderedArray(T *list) const
ArrayType::const_iterator const_iterator
SetType::const_iterator begin() const
SetType::const_iterator end() const
base_iterator< const GT_Offset, true > const_iterator
void multipleInsert(const T *list, exint size)
SetType(const SetType &src)
An array of numeric values (int32, int64, fpreal16, fpreal32, fpreal64)
GLubyte GLubyte GLubyte GLubyte w
const_iterator end() const
Class to store "face sets" on GT mesh primitives.
void erase(GT_Offset item)