diff options
author | Siddhartha Jejurkar <f20180617@goa.bits-pilani.ac.in> | 2021-12-17 16:01:32 +0300 |
---|---|---|
committer | Siddhartha Jejurkar <f20180617@goa.bits-pilani.ac.in> | 2021-12-17 16:01:32 +0300 |
commit | dbc41b30f88b96f7d8c6e995b17f5930eb55cc77 (patch) | |
tree | c6c495328443ea3621e5df2ef483b0e0dd504496 /source/blender/blenlib/intern/index_mask.cc | |
parent | 99a2af76d10e05a18987be5d554ada197b1ca086 (diff) | |
parent | 7c9e4099854a4fc8eab4db97173c1aacd25f9e08 (diff) |
Merge branch 'master' into soc-2021-uv-edge-select-supportsoc-2021-uv-edge-select-support
Diffstat (limited to 'source/blender/blenlib/intern/index_mask.cc')
-rw-r--r-- | source/blender/blenlib/intern/index_mask.cc | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/source/blender/blenlib/intern/index_mask.cc b/source/blender/blenlib/intern/index_mask.cc index cba985b8a44..a73e6caf313 100644 --- a/source/blender/blenlib/intern/index_mask.cc +++ b/source/blender/blenlib/intern/index_mask.cc @@ -18,21 +18,11 @@ namespace blender { -/** - * Create a sub-mask that is also shifted to the beginning. The shifting to the beginning allows - * code to work with smaller indices, which is more memory efficient. - * - * \return New index mask with the size of #slice. It is either empty or starts with 0. It might - * reference indices that have been appended to #r_new_indices. - * - * Example: - * this: [2, 3, 5, 7, 8, 9, 10] - * slice: ^--------^ - * output: [0, 2, 4, 5] - * - * All the indices in the sub-mask are shifted by 3 towards zero, so that the first index in the - * output is zero. - */ +IndexMask IndexMask::slice(IndexRange slice) const +{ + return IndexMask(indices_.slice(slice)); +} + IndexMask IndexMask::slice_and_offset(const IndexRange slice, Vector<int64_t> &r_new_indices) const { const int slice_size = slice.size(); |