CGAL 5.1.5 - Triangulated Surface Mesh Approximation
CGAL::Surface_mesh_approximation::L2_metric_plane_proxy< TriangleMesh, VertexPointMap, GeomTraits > Class Template Reference

#include <CGAL/Surface_mesh_approximation/L2_metric_plane_proxy.h>

Definition

template<typename TriangleMesh, typename VertexPointMap = typename boost::property_map<TriangleMesh, boost::vertex_point_t>::type, typename GeomTraits = typename Kernel_traits<typename boost::property_traits<VertexPointMap>::value_type>::Kernel>
class CGAL::Surface_mesh_approximation::L2_metric_plane_proxy< TriangleMesh, VertexPointMap, GeomTraits >

Approximation L2 metric of plane proxy.

Is Model Of:
ErrorMetricProxy
Template Parameters
TriangleMesha triangle FaceGraph
VertexPointMapa class model of ReadablePropertyMap with boost::graph_traits<TriangleMesh>::vertex_descriptor as key type, GeomTraits::Point_3 as value type
GeomTraitsa model of Kernel

Public Member Functions

FT compute_error (const face_descriptor f, const TriangleMesh &tm, const Proxy &px) const
 computes the L21 error from a face to a proxy, using integral (closed-form) computation. More...
 
template<typename FaceRange >
Proxy fit_proxy (const FaceRange &faces, const TriangleMesh &tm) const
 fits a proxy from a range of faces, in the L2 sense, with an integral (closed-form) formulation. More...
 

Types

typedef GeomTraits::Plane_3 Proxy
 Proxy type.
 

Constructor

 L2_metric_plane_proxy (const TriangleMesh &tm, const VertexPointMap &vpmap)
 Constructor. More...
 

Constructor & Destructor Documentation

◆ L2_metric_plane_proxy()

template<typename TriangleMesh , typename VertexPointMap = typename boost::property_map<TriangleMesh, boost::vertex_point_t>::type, typename GeomTraits = typename Kernel_traits<typename boost::property_traits<VertexPointMap>::value_type>::Kernel>
CGAL::Surface_mesh_approximation::L2_metric_plane_proxy< TriangleMesh, VertexPointMap, GeomTraits >::L2_metric_plane_proxy ( const TriangleMesh &  tm,
const VertexPointMap &  vpmap 
)

Constructor.

Parameters
tmtriangle mesh
vpmapvertex point map

Member Function Documentation

◆ compute_error()

template<typename TriangleMesh , typename VertexPointMap = typename boost::property_map<TriangleMesh, boost::vertex_point_t>::type, typename GeomTraits = typename Kernel_traits<typename boost::property_traits<VertexPointMap>::value_type>::Kernel>
FT CGAL::Surface_mesh_approximation::L2_metric_plane_proxy< TriangleMesh, VertexPointMap, GeomTraits >::compute_error ( const face_descriptor  f,
const TriangleMesh &  tm,
const Proxy px 
) const

computes the L21 error from a face to a proxy, using integral (closed-form) computation.

Parameters
tminput triangle mesh
fface_descriptor of a face
pxproxy
Returns
computed error

◆ fit_proxy()

template<typename TriangleMesh , typename VertexPointMap = typename boost::property_map<TriangleMesh, boost::vertex_point_t>::type, typename GeomTraits = typename Kernel_traits<typename boost::property_traits<VertexPointMap>::value_type>::Kernel>
template<typename FaceRange >
Proxy CGAL::Surface_mesh_approximation::L2_metric_plane_proxy< TriangleMesh, VertexPointMap, GeomTraits >::fit_proxy ( const FaceRange &  faces,
const TriangleMesh &  tm 
) const

fits a proxy from a range of faces, in the L2 sense, with an integral (closed-form) formulation.

The best-fit plane passes through the center of mass and is defined by the two principal components of the integral covariance matrix.

Template Parameters
FaceRangerange of face descriptors, model of Range.
Parameters
facesthe range of faces to be fitted
tminput triangle mesh
Returns
fitted proxy