|
Blender V5.3
|
#include <bmesh_polygon.hh>
Inherited by blender::MutableVArraySpan< T >.
Public Types | |
| using | value_type = T |
| using | pointer = T * |
| using | const_pointer = const T * |
| using | reference = T & |
| using | const_reference = const T & |
| using | iterator = T * |
| using | size_type = int64_t |
Public Member Functions | |
| constexpr | MutableSpan ()=default |
| constexpr | MutableSpan (T *start, const int64_t size) |
| constexpr | MutableSpan (std::vector< T > &vector) |
| template<std::size_t N> | |
| constexpr | MutableSpan (std::array< T, N > &array) |
| template<typename U> requires (is_span_convertible_pointer_v<U, T>) | |
| constexpr | MutableSpan (MutableSpan< U > span) |
| constexpr | operator Span< T > () const |
| template<typename U> requires (is_span_convertible_pointer_v<T, U>) | |
| constexpr | operator Span< U > () const |
| constexpr int64_t | size () const |
| constexpr int64_t | size_in_bytes () const |
| constexpr bool | is_empty () const |
| constexpr void | fill (const T &value) const |
| template<typename IndexT> | |
| constexpr void | fill_indices (Span< IndexT > indices, const T &value) const |
| constexpr T * | data () const |
| constexpr T * | begin () const |
| constexpr T * | end () const |
| constexpr std::reverse_iterator< T * > | rbegin () const |
| constexpr std::reverse_iterator< T * > | rend () const |
| constexpr T & | operator[] (const int64_t index) const |
| constexpr MutableSpan | slice (const int64_t start, const int64_t size) const |
| constexpr MutableSpan | slice (IndexRange range) const |
| constexpr MutableSpan | slice_safe (const int64_t start, const int64_t size) const |
| constexpr MutableSpan | slice_safe (IndexRange range) const |
| constexpr MutableSpan | drop_front (const int64_t n) const |
| constexpr MutableSpan | drop_back (const int64_t n) const |
| constexpr MutableSpan | take_front (const int64_t n) const |
| constexpr MutableSpan | take_back (const int64_t n) const |
| constexpr void | reverse () const |
| constexpr Span< T > | as_span () const |
| constexpr IndexRange | index_range () const |
| constexpr T & | first () const |
| constexpr T & | last (const int64_t n=0) const |
| constexpr int64_t | count (const T &value) const |
| constexpr bool | contains (const T &value) const |
| constexpr bool | contains_ptr (const T *ptr) const |
| constexpr void | copy_from (Span< T > values) const |
| template<typename NewT> | |
| constexpr MutableSpan< NewT > | cast () const |
Protected Attributes | |
| T * | data_ = nullptr |
| int64_t | size_ = 0 |
Mostly the same as Span, except that one can change the array elements through a MutableSpan.
Definition at line 447 of file bmesh_polygon.hh.
| using blender::blender::MutableSpan< T >::const_pointer = const T * |
Definition at line 451 of file bmesh_polygon.hh.
| using blender::blender::MutableSpan< T >::const_reference = const T & |
Definition at line 453 of file bmesh_polygon.hh.
| using blender::blender::MutableSpan< T >::iterator = T * |
Definition at line 454 of file bmesh_polygon.hh.
| using blender::blender::MutableSpan< T >::pointer = T * |
Definition at line 450 of file bmesh_polygon.hh.
| using blender::blender::MutableSpan< T >::reference = T & |
Definition at line 452 of file bmesh_polygon.hh.
| using blender::blender::MutableSpan< T >::size_type = int64_t |
Definition at line 455 of file bmesh_polygon.hh.
| using blender::blender::MutableSpan< T >::value_type = T |
Definition at line 449 of file bmesh_polygon.hh.
|
constexprdefault |
Referenced by blender::MutableVArraySpan< T >::MutableVArraySpan().
|
inlineconstexpr |
Definition at line 464 of file bmesh_polygon.hh.
|
inlineconstexpr |
Definition at line 466 of file bmesh_polygon.hh.
|
inlineconstexpr |
Definition at line 469 of file bmesh_polygon.hh.
|
inlineconstexpr |
Support implicit conversions like the one below: MutableSpan<T *> -> MutableSpan<const T *>
Definition at line 478 of file bmesh_polygon.hh.
|
inlineconstexpr |
Returns an (immutable) Span that references the same array. This is usually not needed, due to implicit conversions. However, sometimes automatic type deduction needs some help.
Definition at line 667 of file bmesh_polygon.hh.
|
inlineconstexpr |
Definition at line 550 of file bmesh_polygon.hh.
|
inlineconstexpr |
Returns a new span to the same underlying memory buffer. No conversions are done. The caller is responsible for making sure that the type cast is valid.
Definition at line 755 of file bmesh_polygon.hh.
|
inlineconstexpr |
Does a linear search to see of the value is in the array. Returns true if it is, otherwise false.
Definition at line 721 of file bmesh_polygon.hh.
|
inlineconstexpr |
Does a constant time check to see if the pointer points to a value in the referenced array. Return true if it is, otherwise false.
Definition at line 735 of file bmesh_polygon.hh.
|
inlineconstexpr |
Copy all values from another span into this span. This invokes undefined behavior when the destination contains uninitialized data and T is not trivially copy constructible. The size of both spans is expected to be the same.
Definition at line 745 of file bmesh_polygon.hh.
Referenced by blender::arrayModifier_doArray(), blender::BKE_keyblock_convert_to_mesh(), blender::BKE_mesh_mirror_apply_mirror_on_axis_for_modifier(), blender::build_sequential(), blender::create_envelope_strokes(), blender::MOD_solidify_extrude_modifyMesh(), blender::selectbuffer_ret_hits_5(), blender::selectbuffer_ret_hits_5(), and blender::selectbuffer_ret_hits_9().
|
inlineconstexpr |
Does a linear search to count how often the value is in the array. Returns the number of occurrences.
Definition at line 706 of file bmesh_polygon.hh.
|
inlineconstexpr |
Returns a pointer to the beginning of the referenced array. This may be nullptr, when the size is zero.
Definition at line 545 of file bmesh_polygon.hh.
|
inlineconstexpr |
Returns a new MutableSpan with n elements removed from the end. This invokes undefined behavior when n is negative.
Definition at line 624 of file bmesh_polygon.hh.
|
inlineconstexpr |
Returns a new MutableSpan with n elements removed from the beginning. This invokes undefined behavior when n is negative.
Definition at line 613 of file bmesh_polygon.hh.
Referenced by blender::measure_chain().
|
inlineconstexpr |
Definition at line 554 of file bmesh_polygon.hh.
|
inlineconstexpr |
Replace all elements in the referenced array with the given value.
Definition at line 523 of file bmesh_polygon.hh.
|
inlineconstexpr |
Replace a subset of all elements with the given value. This invokes undefined behavior when one of the indices is out of bounds.
Definition at line 532 of file bmesh_polygon.hh.
|
inlineconstexpr |
Return a reference to the first element in the array. This invokes undefined behavior when the array is empty.
Definition at line 685 of file bmesh_polygon.hh.
Referenced by blender::BPy_GeometrySet_static_from_evaluated_object().
|
inlineconstexpr |
Utility to make it more convenient to iterate over all indices that can be used with this array.
Definition at line 676 of file bmesh_polygon.hh.
Referenced by blender::BKE_mesh_material_index_remove().
|
inlineconstexpr |
Returns true if the size is zero.
Definition at line 515 of file bmesh_polygon.hh.
Referenced by blender::tests::TEST_F().
|
inlineconstexpr |
Returns a reference to the nth last element. This invokes undefined behavior when the span is too short.
Definition at line 695 of file bmesh_polygon.hh.
Referenced by blender::create_envelope_strokes().
|
inlineconstexpr |
Definition at line 484 of file bmesh_polygon.hh.
|
inlineconstexpr |
Definition at line 490 of file bmesh_polygon.hh.
|
inlineconstexpr |
Definition at line 568 of file bmesh_polygon.hh.
|
inlineconstexpr |
Definition at line 559 of file bmesh_polygon.hh.
|
inlineconstexpr |
Definition at line 563 of file bmesh_polygon.hh.
|
inlineconstexpr |
Reverse the data in the MutableSpan.
Definition at line 656 of file bmesh_polygon.hh.
Referenced by blender::faces_check_flip().
|
inlineconstexpr |
Returns the number of elements in the array.
Definition at line 499 of file bmesh_polygon.hh.
|
inlineconstexpr |
Returns the number of bytes referenced by this Span.
Definition at line 507 of file bmesh_polygon.hh.
|
inlineconstexpr |
Returns a contiguous part of the array. This invokes undefined behavior when the start or size is negative.
Definition at line 579 of file bmesh_polygon.hh.
Referenced by blender::create_envelope_strokes().
|
inlineconstexpr |
Definition at line 587 of file bmesh_polygon.hh.
|
inlineconstexpr |
Returns a contiguous part of the array. This invokes undefined behavior when the start or size is negative. Clamps the size of the new span so it fits in the current one.
Definition at line 596 of file bmesh_polygon.hh.
|
inlineconstexpr |
Definition at line 604 of file bmesh_polygon.hh.
|
inlineconstexpr |
Return a new MutableSpan that only contains the last n elements. This invokes undefined behavior when n is negative.
Definition at line 646 of file bmesh_polygon.hh.
|
inlineconstexpr |
Returns a new MutableSpan that only contains the first n elements. This invokes undefined behavior when n is negative.
Definition at line 635 of file bmesh_polygon.hh.
|
protected |
Definition at line 458 of file bmesh_polygon.hh.
|
protected |
Definition at line 459 of file bmesh_polygon.hh.
Referenced by blender::MutableVArraySpan< T >::MutableVArraySpan(), and blender::MutableVArraySpan< T >::MutableVArraySpan().