CGAL 6.3 - Feature Graph
Loading...
Searching...
No Matches
CGAL::Feature_graph::Surface_normal_estimator< Vector_3 > Struct Template Reference

#include <CGAL/Feature_graph/Surface_normal_estimator.h>

Definition

template<typename Vector_3>
struct CGAL::Feature_graph::Surface_normal_estimator< Vector_3 >

Estimator that assign a normal on elements of a surface.

Template Parameters
Vector_3the type of the normal vector model of Kernel::Vector_3.
Is model of
NormalEstimator

Types

typedef Vector_3 Normal_type
 The type of the normal vector.

Constructor

template<typename PolygonMesh>
 Surface_normal_estimator (const PolygonMesh &pmesh)
 Constructor that pre-computes the normals on the surface.

Estimator

template<typename DimensionTag, typename Descriptor, typename Domain>
Normal_type operator() (const Descriptor &element_descriptor, const Domain &domain) const
 returns the normal vector of the surface element identified by a dimension and a descriptor.

Constructor & Destructor Documentation

◆ Surface_normal_estimator()

template<typename Vector_3>
template<typename PolygonMesh>
CGAL::Feature_graph::Surface_normal_estimator< Vector_3 >::Surface_normal_estimator ( const PolygonMesh & pmesh)

Constructor that pre-computes the normals on the surface.

Template Parameters
PolygonMesha model of FaceListGraph that represents a surface mesh.
Parameters
pmeshthe surface where the normals are evaluated.

Member Function Documentation

◆ operator()()

template<typename Vector_3>
template<typename DimensionTag, typename Descriptor, typename Domain>
Normal_type CGAL::Feature_graph::Surface_normal_estimator< Vector_3 >::operator() ( const Descriptor & element_descriptor,
const Domain & domain ) const

returns the normal vector of the surface element identified by a dimension and a descriptor.

Template Parameters
DimensionTaga tag that represent the element type. Can be CGAL::Dimension_tag<0>, CGAL::Dimension_tag<1> or CGAL::Dimension_tag<2>
Descriptorthe type of descriptor used to identify the element to evaluate, which can be a vertex, an edge, or a facet according to the DimensionTag. If the domain is of type CGAL::Image_3, it is a std::size_t for element with dimension 0, 1 and 2. If the domain is a model of FaceListGraph, it is a vertex_descriptor (resp. halfedge_descriptor; face_descriptor ) for element with dimension 0 (resp. 1 ; 2).
Domainthe type of the surface where the element is embedded. Can be a CGAL::Image_3, or a model of FaceListGraph that represents a surface mesh.
Parameters
element_descriptorthe descriptor of the element on the surface.
domainthe domain that contains the elements.