23#ifndef VCL_VIEWS_MESH_COMPONENTS_COLORS_H
24#define VCL_VIEWS_MESH_COMPONENTS_COLORS_H
26#include <vclib/concepts/mesh.h>
27#include <vclib/concepts/pointers.h>
28#include <vclib/types.h>
36inline constexpr auto color = [](
auto&& p) ->
decltype(
auto) {
37 if constexpr (IsPointer<
decltype(p)>)
45 constexpr ColorsView() =
default;
47 template<std::ranges::range R>
48 friend constexpr auto operator|(R&& r, ColorsView)
50 return std::forward<R>(r) | std::views::transform(color);
53 template<comp::HasWedgeColors R>
54 friend constexpr auto operator|(R&& r, ColorsView)
56 if constexpr (IsPointer<R>)
57 return r->wedgeColors();
59 return r.wedgeColors();
65inline constexpr detail::ColorsView colors;