23#ifndef VCL_MESH_VIEWS_COMPONENTS_TEX_COORDS_H
24#define VCL_MESH_VIEWS_COMPONENTS_TEX_COORDS_H
26#include <vclib/mesh/components/wedge_tex_coords.h>
28#include <vclib/base.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;