Blender V5.0
blender::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()

blender::index_mask::IndexMaskSegment::IndexMaskSegment ( const OffsetSpan< int64_t, int16_t > span)
inlineexplicit

Definition at line 623 of file BLI_index_mask.hh.

Member Function Documentation

◆ shift()

IndexMaskSegment blender::index_mask::IndexMaskSegment::shift ( const int64_t shift) const
inline

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.

◆ slice() [1/2]

IndexMaskSegment blender::index_mask::IndexMaskSegment::slice ( const IndexRange & range) const
inline

Definition at line 628 of file BLI_index_mask.hh.

◆ slice() [2/2]

IndexMaskSegment blender::index_mask::IndexMaskSegment::slice ( const int64_t start,
const int64_t size ) const
inline

Definition at line 633 of file BLI_index_mask.hh.


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