23#ifndef VCL_MESH_COMPONENTS_QUALITY_H
24#define VCL_MESH_COMPONENTS_QUALITY_H
26#include "bases/component.h"
28#include <vclib/concepts/mesh/components/quality.h>
29#include <vclib/io/serialization.h>
57template<
typename Scalar,
typename ParentElemType =
void,
bool OPT = false>
60 Quality<Scalar, ParentElemType, OPT>,
64 !std::is_same_v<ParentElemType, void>,
67 using Base = Component<
72 !std::is_same_v<ParentElemType, void>,
104 template<
typename Element>
105 void importFrom(
const Element& e,
bool =
true)
108 if (isQualityAvailableOn(e)) {
114 void serialize(std::ostream& os)
const { vcl::serialize(os,
quality()); }
116 void deserialize(std::istream& is) { vcl::deserialize(is,
quality()); }
133bool isQualityAvailableOn(
const ElementOrMeshConcept
auto& element)
135 return isComponentAvailableOn<CompId::QUALITY>(element);
152template<
typename ElementType =
void,
bool OPT = false>
167template<
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 Quality class represents a component that stores the quality of a mesh element,...
Definition quality.h:66
const QualityType & quality() const
Returns a const reference of the quality of the element.
Definition quality.h:94
Scalar QualityType
Exposes the scalar used as Quality type.
Definition quality.h:79
Quality()=default
Initilizes the Quality value to 0.
QualityType & quality()
Returns a reference of the quality of the element.
Definition quality.h:100
HasQuality concept is satisfied only if a Element class provides the types and member functions speci...
Definition quality.h:47