23#ifndef VCL_VIEWS_MESH_COMPONENTS_PRINCIPAL_CURVATURES_H
24#define VCL_VIEWS_MESH_COMPONENTS_PRINCIPAL_CURVATURES_H
26#include <vclib/concepts/pointers.h>
27#include <vclib/types.h>
35inline constexpr auto principalCurvature = [](
auto&& p) ->
decltype(
auto) {
36 if constexpr (IsPointer<
decltype(p)>)
37 return p->principalCurvature();
39 return p.principalCurvature();
42struct PrincipalCurvaturesView
44 constexpr PrincipalCurvaturesView() =
default;
46 template<std::ranges::range R>
47 friend constexpr auto operator|(R&& r, PrincipalCurvaturesView)
49 return std::forward<R>(r) | std::views::transform(principalCurvature);
55inline constexpr detail::PrincipalCurvaturesView principalCurvatures;