Visual Computing Library
Loading...
Searching...
No Matches
vcl::comp::Quality< Scalar, ParentElemType, OPT > Class Template Reference

The Quality class represents a component that stores the quality of a mesh element, that is represented by a scalar. More...

#include <vclib/mesh/components/quality.h>

Inheritance diagram for vcl::comp::Quality< Scalar, ParentElemType, OPT >:

Public Types

using QualityType = Scalar
 Exposes the scalar used as Quality type.
 

Public Member Functions

 Quality ()=default
 Initilizes the Quality value to 0.
 
const QualityTypequality () const
 Returns a const reference of the quality of the element.
 
QualityTypequality ()
 Returns a reference of the quality of the element.
 

Protected Member Functions

template<typename Element >
void importFrom (const Element &e, bool=true)
 
void serialize (std::ostream &os) const
 
void deserialize (std::istream &is)
 

Private Types

using Base = Component< Quality< Scalar, ParentElemType, OPT >, CompId::QUALITY, Scalar, ParentElemType, !std::is_same_v< ParentElemType, void >, OPT >
 

Detailed Description

template<typename Scalar, typename ParentElemType = void, bool OPT = false>
class vcl::comp::Quality< Scalar, ParentElemType, OPT >

The Quality class represents a component that stores the quality of a mesh element, that is represented by a scalar.

This scalar is actually used for a lot of different purposes, depending on the applications.

For example, if you have a Vertex Element v with the Quality component, you'll be able to access to this component member functions from v:

auto q = v.quality();
A class representing a line segment in n-dimensional space. The class is parameterized by a PointConc...
Definition segment.h:43
Template Parameters
ScalarThe scalar type of the Quality value.
ParentElemTypeThis template argument must be void if the component needs to be stored horizontally, or the type of the parent element that will contain this component if the component needs to be stored vertically.
OPTIf true, the component will be optional. This argument is considered only if the component is stored vertically.

Member Function Documentation

◆ quality() [1/2]

template<typename Scalar , typename ParentElemType = void, bool OPT = false>
QualityType & vcl::comp::Quality< Scalar, ParentElemType, OPT >::quality ( )
inline

Returns a reference of the quality of the element.

Returns
a reference of the quality of the element.

◆ quality() [2/2]

template<typename Scalar , typename ParentElemType = void, bool OPT = false>
const QualityType & vcl::comp::Quality< Scalar, ParentElemType, OPT >::quality ( ) const
inline

Returns a const reference of the quality of the element.

Returns
a const reference of the quality of the element.

The documentation for this class was generated from the following file: