23#ifndef VCL_MESH_COMPONENTS_PRINCIPAL_CURVATURE_H
24#define VCL_MESH_COMPONENTS_PRINCIPAL_CURVATURE_H
26#include "bases/component.h"
28#include <vclib/concepts/mesh/components/principal_curvature.h>
29#include <vclib/space/core/principal_curvature.h>
62template<
typename Scalar,
typename ParentElemType =
void,
bool OPT = false>
65 PrincipalCurvature<Scalar, ParentElemType, OPT>,
66 CompId::PRINCIPAL_CURVATURE,
67 vcl::PrincipalCurvature<Scalar>,
69 !std::is_same_v<ParentElemType, void>,
72 using Base = Component<
74 CompId::PRINCIPAL_CURVATURE,
77 !std::is_same_v<ParentElemType, void>,
113 template<
typename Element>
114 void importFrom(
const Element& e,
bool =
true)
117 if (isPrincipalCurvatureAvailableOn(e)) {
124 void serialize(std::ostream& os)
const
147bool isPrincipalCurvatureAvailableOn(
const ElementConcept
auto& element)
149 return isComponentAvailableOn<CompId::PRINCIPAL_CURVATURE>(element);
166template<
typename ElementType =
void,
bool OPT = false>
181template<
typename ElementType =
void,
bool OPT = false>
The Element class.
Definition element.h:57
A class representing a line segment in n-dimensional space. The class is parameterized by a PointConc...
Definition segment.h:43
The PrincipalCurvature class represents a component that stores the principal curvature directions an...
Definition principal_curvature.h:71
const PrincipalCurvatureType & principalCurvature() const
Returns a const reference of the principal curvature of the element.
Definition principal_curvature.h:100
PrincipalCurvature()=default
Initilizes the PrincipalCurvature values to 0.
PrincipalCurvatureType & principalCurvature()
Returns a reference of the principal curvature of the element.
Definition principal_curvature.h:109
HasPrincipalCurvature concept is satisfied only if a Element class provides the types and member func...
Definition principal_curvature.h:48