23#ifndef VCL_VIEWS_MESH_COMPONENTS_TEX_COORDS_H
24#define VCL_VIEWS_MESH_COMPONENTS_TEX_COORDS_H
26#include <vclib/concepts/mesh.h>
27#include <vclib/concepts/pointers.h>
28#include <vclib/types.h>
36inline constexpr auto texCoord = [](
auto&& p) ->
decltype(
auto) {
37 if constexpr (IsPointer<
decltype(p)>)
45 constexpr TexCoordsView() =
default;
47 template<std::ranges::range R>
48 friend constexpr auto operator|(R&& r, TexCoordsView)
50 using ElemType = std::ranges::range_value_t<R>;
51 return std::forward<R>(r) | std::views::transform(texCoord);
54 template<comp::HasWedgeTexCoords R>
55 friend constexpr auto operator|(R&& r, TexCoordsView)
57 if constexpr (IsPointer<R>)
58 return r->wedgeTexCoords();
60 return r.wedgeTexCoords();
66inline constexpr detail::TexCoordsView texCoords;