19 explicit constexpr
ViewportId(
unsigned i ) noexcept : id_( i ) { }
21 constexpr unsigned value()
const {
return id_; }
22 bool valid()
const {
return id_ > 0; }
23 explicit operator bool()
const {
return id_ > 0; }
41 explicit constexpr
ViewportMask(
unsigned i ) noexcept : mask_( i ) { }
48 constexpr unsigned value()
const {
return mask_; }
49 constexpr bool empty()
const {
return mask_ == 0; }
62 void set(
ViewportId id,
bool on =
true ) { on ? ( mask_ |=
id.value() ) : ( mask_ &= ~id.value() ); }
103 assert( id_.
valid() );
108 ViewportMask mask_{0};
Definition MRViewportId.h:16
ViewportId next() const
Definition MRViewportId.h:29
ViewportId() noexcept=default
bool operator!=(ViewportId b) const
Definition MRViewportId.h:26
bool valid() const
Definition MRViewportId.h:22
bool operator<(ViewportId b) const
Definition MRViewportId.h:27
constexpr unsigned value() const
Definition MRViewportId.h:21
bool operator==(ViewportId b) const
Definition MRViewportId.h:25
ViewportId prev() const
Definition MRViewportId.h:30
iterates over all ViewportIds in given ViewportMask
Definition MRViewportId.h:74
ViewportIterator()=default
constructs end iterator
ViewportMask mask() const
Definition MRViewportId.h:92
ViewportIterator & operator++()
Definition MRViewportId.h:87
ViewportId operator*() const
Definition MRViewportId.h:93
ViewportIterator(ViewportMask mask)
constructs begin iterator
Definition MRViewportId.h:82
std::forward_iterator_tag iterator_category
Definition MRViewportId.h:76
stores mask of viewport unique identifiers
Definition MRViewportId.h:38
static ViewportMask any()
Definition MRViewportId.h:46
ViewportMask & operator&=(ViewportMask b)
Definition MRViewportId.h:58
bool contains(ViewportId id) const
Definition MRViewportId.h:50
ViewportMask & operator^=(ViewportMask b)
Definition MRViewportId.h:60
ViewportMask & operator|=(ViewportMask b)
Definition MRViewportId.h:59
ViewportMask operator~() const
Definition MRViewportId.h:56
bool operator==(ViewportMask b) const
Definition MRViewportId.h:52
void set(ViewportId id, bool on=true)
Definition MRViewportId.h:62
static ViewportMask all()
mask meaning all or any viewports
Definition MRViewportId.h:45
constexpr ViewportMask(ViewportId i) noexcept
Definition MRViewportId.h:42
bool operator<(ViewportMask b) const
Definition MRViewportId.h:54
ViewportMask() noexcept=default
bool operator!=(ViewportMask b) const
Definition MRViewportId.h:53
constexpr bool empty() const
Definition MRViewportId.h:49
constexpr unsigned value() const
Definition MRViewportId.h:48
auto begin(const BitSet &a)
Definition MRMesh/MRBitSet.h:263
MRMESH_API bool operator==(const BitSet &a, const BitSet &b)
compare that two bit sets have the same set bits (they can be equal even if sizes are distinct but la...
auto end(const BitSet &)
Definition MRMesh/MRBitSet.h:265
BitSet operator&(const BitSet &a, const BitSet &b)
Definition MRMesh/MRBitSet.h:322
BitSet operator|(const BitSet &a, const BitSet &b)
Definition MRMesh/MRBitSet.h:323
BitSet operator^(const BitSet &a, const BitSet &b)
Definition MRMesh/MRBitSet.h:324
Definition MRCameraOrientationPlugin.h:7