Blender V5.0
blender::index_mask::IndexMaskSegment Class Reference

#include <BLI_index_mask.hh>

Inherits blender::OffsetSpan< int64_t, int16_t >.

Public Member Functions

#IndexMaskSegment Inline Methods
 IndexMaskSegment (const OffsetSpan< int64_t, int16_t > span)
IndexMaskSegment slice (const IndexRange &range) const
IndexMaskSegment slice (const int64_t start, const int64_t size) const
IndexMaskSegment shift (const int64_t shift) const
Public Member Functions inherited from blender::OffsetSpan< int64_t, int16_t >
 OffsetSpan ()=default
Span< int16_t > base_span () const
int64_t offset () const
bool is_empty () const
int64_t size () const
int64_t last (const int64_t n=0) const
IndexRange index_range () const
int64_t operator[] (const int64_t i) const
OffsetSpan slice (const IndexRange &range) const
Iterator begin () const
Iterator end () const

Detailed Description

A sequence of unique and ordered indices in one segment of an IndexMask. The segment as a whole has an int64_t index offset that is added to each referenced int16_t index.

Definition at line 128 of file BLI_index_mask.hh.

Constructor & Destructor Documentation

◆ IndexMaskSegment()

Definition at line 623 of file BLI_index_mask.hh.

References blender::OffsetSpan< int64_t, int16_t >::OffsetSpan().

Referenced by shift(), slice(), and slice().

Member Function Documentation

◆ shift()

Get a new segment where each index is modified by the given amount. This works in constant time, because only the offset value is changed.

Definition at line 639 of file BLI_index_mask.hh.

References blender::OffsetSpan< int64_t, int16_t >::base_span(), BLI_assert, IndexMaskSegment(), blender::OffsetSpan< int64_t, int16_t >::is_empty(), blender::OffsetSpan< int64_t, int16_t >::offset(), and shift().

Referenced by blender::index_mask::difference_index_mask_segments(), and shift().

◆ slice() [1/2]

◆ slice() [2/2]


The documentation for this class was generated from the following file: