23#ifndef VCL_MESH_VIEWS_COMPONENTS_PRINCIPAL_CURVATURES_H
24#define VCL_MESH_VIEWS_COMPONENTS_PRINCIPAL_CURVATURES_H
26#include <vclib/mesh/components/principal_curvature.h>
28#include <vclib/base.h>
36inline constexpr auto principalCurvature = [](
auto&& p) ->
decltype(
auto) {
37 if constexpr (IsPointer<
decltype(p)>)
38 return p->principalCurvature();
40 return p.principalCurvature();
43struct PrincipalCurvaturesView
45 constexpr PrincipalCurvaturesView() =
default;
47 template<std::ranges::range R>
48 friend constexpr auto operator|(R&& r, PrincipalCurvaturesView)
50 return std::forward<R>(r) | std::views::transform(principalCurvature);
56inline constexpr detail::PrincipalCurvaturesView principalCurvatures;