24 using U32PtrOrU16Ptr = std::variant<const uint16_t*, const uint32_t*>;
75 U32PtrOrU16Ptr ptr_{
static_cast<const uint16_t*
>(
nullptr)};
100 template<std::ranges::contiguous_range Range>
108 return std::holds_alternative<const uint16_t*>(ptr_);
113 return std::holds_alternative<const uint32_t*>(ptr_);
128 return {std::get<const uint16_t*>(ptr_), size_};
133 return {std::get<const uint32_t*>(ptr_), size_};
144 throw std::out_of_range{
"attempted to access a MeshIndicesView with an invalid index"};
162 U32PtrOrU16Ptr ptr_{
static_cast<const uint16_t*
>(
nullptr)};
Definition mesh_indices_view.h:26
Iterator & operator+=(difference_type n)
Definition mesh_indices_view.h:60
value_type reference
Definition mesh_indices_view.h:31
Iterator & operator++()
Definition mesh_indices_view.h:48
ptrdiff_t difference_type
Definition mesh_indices_view.h:28
void pointer
Definition mesh_indices_view.h:30
uint32_t value_type
Definition mesh_indices_view.h:29
std::forward_iterator_tag iterator_category
Definition mesh_indices_view.h:32
friend bool operator==(const Iterator &, const Iterator &)=default
value_type operator[](difference_type pos) const
Definition mesh_indices_view.h:68
value_type operator*() const
Definition mesh_indices_view.h:39
Iterator(U32PtrOrU16Ptr ptr)
Definition mesh_indices_view.h:36
Iterator operator++(int)
Definition mesh_indices_view.h:53
Definition mesh_indices_view.h:22
value_type reference
Definition mesh_indices_view.h:81
MeshIndicesView(const uint16_t *ptr, size_t size)
Definition mesh_indices_view.h:90
std::span< const uint32_t > to_uint32_span() const
Definition mesh_indices_view.h:131
MeshIndicesView(const uint32_t *ptr, size_t size)
Definition mesh_indices_view.h:95
std::span< const uint16_t > to_uint16_span() const
Definition mesh_indices_view.h:126
void const_pointer
Definition mesh_indices_view.h:84
size_type size() const
Definition mesh_indices_view.h:121
bool is_uint32() const
Definition mesh_indices_view.h:111
ptrdiff_t difference_type
Definition mesh_indices_view.h:80
bool is_uint16() const
Definition mesh_indices_view.h:106
size_t size_type
Definition mesh_indices_view.h:79
MeshIndicesView(const Range &range)
Definition mesh_indices_view.h:102
MeshIndicesView()=default
value_type const_reference
Definition mesh_indices_view.h:82
value_type at(size_type pos) const
Definition mesh_indices_view.h:141
bool empty() const
Definition mesh_indices_view.h:116
void pointer
Definition mesh_indices_view.h:83
Iterator end() const
Definition mesh_indices_view.h:154
uint32_t value_type
Definition mesh_indices_view.h:78
Iterator begin() const
Definition mesh_indices_view.h:149
value_type operator[](size_type pos) const
Definition mesh_indices_view.h:136
Definition same_as_any_of.h:9
Definition custom_decoration_generator.h:5
constexpr U to(T &&value)
Definition conversion.h:56
Definition std_variant_helpers.h:35