Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenlib/BLI_index_mask.hh
| Show First 20 Lines • Show All 172 Lines • ▼ Show 20 Lines | template<typename CallbackT> void foreach_index(const CallbackT &callback) const | ||||
| else { | else { | ||||
| for (int64_t i : indices_) { | for (int64_t i : indices_) { | ||||
| callback(i); | callback(i); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| /** | /** | ||||
| * Returns an IndexRange that can be used to index this IndexMask. | |||||
| * | |||||
| * The range is [0, number of indices - 1]. | |||||
| * | |||||
| * This is not to be confused with the `as_range` method. | |||||
| */ | |||||
| IndexRange index_range() const | |||||
| { | |||||
| return indices_.index_range(); | |||||
| } | |||||
| /** | |||||
| * Returns the largest index that is referenced by this IndexMask. | * Returns the largest index that is referenced by this IndexMask. | ||||
| */ | */ | ||||
| int64_t last() const | int64_t last() const | ||||
| { | { | ||||
| return indices_.last(); | return indices_.last(); | ||||
| } | } | ||||
| /** | /** | ||||
| Show All 9 Lines | |||||