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

The PrincipalCurvature class represents a component that stores the principal curvature directions and values at a point on a surface. This component could be part of Vertices or Faces. More...

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

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

Public Types

using PrincipalCurvatureType = vcl::PrincipalCurvature< Scalar >
 Expose the type of the principal curvature object.
 

Public Member Functions

 PrincipalCurvature ()=default
 Initilizes the PrincipalCurvature values to 0.
 
const PrincipalCurvatureTypeprincipalCurvature () const
 Returns a const reference of the principal curvature of the element.
 
PrincipalCurvatureTypeprincipalCurvature ()
 Returns a reference of the principal curvature 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< PrincipalCurvature< Scalar, ParentElemType, OPT >, CompId::PRINCIPAL_CURVATURE, vcl::PrincipalCurvature< Scalar >, ParentElemType, !std::is_same_v< ParentElemType, void >, OPT >
 

Detailed Description

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

The PrincipalCurvature class represents a component that stores the principal curvature directions and values at a point on a surface. This component could be part of Vertices or Faces.

It exposes a vcl::PrincipalCurvature object, that stores the two principal curvature directions (maxDir() and minDir(), also note as k1 and k2 respectively) and the maximum and minimum values of the curvature (maxValue() and minValue()).

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

auto k1 = v.principalCurvature().maxDir();
auto maxv = v.principalCurvature().maxValue();
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 principal curvature values.
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

◆ principalCurvature() [1/2]

template<typename Scalar , typename ParentElemType = void, bool OPT = false>
PrincipalCurvatureType & vcl::comp::PrincipalCurvature< Scalar, ParentElemType, OPT >::principalCurvature ( )
inline

Returns a reference of the principal curvature of the element.

Returns
a reference of the principal curvature of the element.

◆ principalCurvature() [2/2]

template<typename Scalar , typename ParentElemType = void, bool OPT = false>
const PrincipalCurvatureType & vcl::comp::PrincipalCurvature< Scalar, ParentElemType, OPT >::principalCurvature ( ) const
inline

Returns a const reference of the principal curvature of the element.

Returns
a const reference of the principal curvature of the element.

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