23#ifndef VCL_MESH_COMPONENTS_QUALITY_H
24#define VCL_MESH_COMPONENTS_QUALITY_H
26#include "base/component.h"
27#include "base/predicates.h"
29#include <vclib/base.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);
107 void serialize(std::ostream&
os)
const { vcl::serialize(
os,
quality()); }
109 void deserialize(std::istream& is) { vcl::deserialize(is,
quality()); }
132concept HasQuality = TTB::IsDerivedFromSpecializationOfV<T, Quality>;
149template<
typename Scalar,
typename ParentElemType,
bool OPT>
150template<
typename Element>
151void Quality<Scalar, ParentElemType, OPT>::importFrom(
const Element& e,
bool)
154 if (isQualityAvailableOn(e)) {
155 quality() = e.quality();
173bool isQualityAvailableOn(
const auto& element)
192template<
typename ElementType =
void,
bool OPT = false>
207template<
typename ElementType =
void,
bool OPT = false>
A class representing a box in N-dimensional space.
Definition box.h:46
The Element class.
Definition element.h:75
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
A concept that checks whether a type T (that should be a Element or a Mesh) has the Quality component...
Definition quality.h:144
A concept that checks whether a type T (that should be a Element or a Mesh) has the Quality component...
Definition quality.h:132
Evaluates to true if the type T is a component that is stored vertically in its element container,...
Definition component.h:74