\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \) \( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \) \( \def\ccSum #1#2#3{ \sum_{#1}^{#2}{#3} } \def\ccProd #1#2#3{ \sum_{#1}^{#2}{#3} }\)
CGAL 4.10.1 - Polygon Mesh Processing
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Geometric Measure Functions

Functions to compute lengths of edges and borders, areas of faces and patches, as well as volumes of closed meshes.

Functions

template<typename PolygonMesh , typename NamedParameters >
FT CGAL::Polygon_mesh_processing::edge_length (typename boost::graph_traits< PolygonMesh >::halfedge_descriptor h, const PolygonMesh &pmesh, const NamedParameters &np)
 computes the length of an edge of a given polygon mesh. More...
 
template<typename PolygonMesh , typename NamedParameters >
FT CGAL::Polygon_mesh_processing::face_border_length (typename boost::graph_traits< PolygonMesh >::halfedge_descriptor h, const PolygonMesh &pmesh, const NamedParameters &np)
 computes the length of the border polyline that contains a given halfedge. More...
 
template<typename TriangleMesh , typename NamedParameters >
FT CGAL::Polygon_mesh_processing::face_area (typename boost::graph_traits< TriangleMesh >::face_descriptor f, const TriangleMesh &tmesh, const NamedParameters &np)
 computes the area of a face of a given triangulated surface mesh. More...
 
template<typename FaceRange , typename TriangleMesh , typename NamedParameters >
FT CGAL::Polygon_mesh_processing::area (FaceRange face_range, const TriangleMesh &tmesh, const NamedParameters &np)
 computes the area of a range of faces of a given triangulated surface mesh. More...
 
template<typename TriangleMesh , typename NamedParameters >
FT CGAL::Polygon_mesh_processing::area (const TriangleMesh &tmesh, const NamedParameters &np)
 computes the surface area of a triangulated surface mesh. More...
 
template<typename TriangleMesh , typename NamedParameters >
FT CGAL::Polygon_mesh_processing::volume (const TriangleMesh &tmesh, const NamedParameters &np)
 computes the volume of the domain bounded by a closed triangulated surface mesh. More...
 

Function Documentation

template<typename FaceRange , typename TriangleMesh , typename NamedParameters >
FT CGAL::Polygon_mesh_processing::area ( FaceRange  face_range,
const TriangleMesh &  tmesh,
const NamedParameters &  np 
)

computes the area of a range of faces of a given triangulated surface mesh.

Template Parameters
FaceRangerange of boost::graph_traits<PolygonMesh>::face_descriptor, model of Range. Its iterator type is InputIterator.
TriangleMesha model of HalfedgeGraph
NamedParametersa sequence of Named Parameters
Parameters
face_rangethe range of faces of which the area is computed
tmeshthe triangulated surface mesh to which the faces of face_range belong
npoptional sequence of Named Parameters among the ones listed below
Named Parameters
vertex_point_mapthe property map with the points associated to the vertices of pmesh. If this parameter is omitted, an internal property map for CGAL::vertex_point_t should be available in TriangleMesh
geom_traitsan instance of a geometric traits class, model of Kernel
Returns
sum of face areas of faces. The return type FT is a number type. It is either deduced from the geom_traits Named Parameters if provided, or the geometric traits class deduced from the point property map of tmesh.
Warning
This function involves a square root computation. If Kernel::FT does not have a sqrt() operation, the square root computation will be done approximately.
See Also
face_area()

#include <CGAL/Polygon_mesh_processing/measure.h>

template<typename TriangleMesh , typename NamedParameters >
FT CGAL::Polygon_mesh_processing::area ( const TriangleMesh &  tmesh,
const NamedParameters &  np 
)

computes the surface area of a triangulated surface mesh.

Template Parameters
TriangleMesha model of HalfedgeGraph
NamedParametersa sequence of Named Parameters
Parameters
tmeshthe triangulated surface mesh
npoptional sequence of Named Parameters among the ones listed below
Named Parameters
vertex_point_mapthe property map with the points associated to the vertices of pmesh. If this parameter is omitted, an internal property map for CGAL::vertex_point_t should be available in TriangleMesh
geom_traitsan instance of a geometric traits class, model of Kernel
Returns
the surface area of tmesh. The return type FT is a number type. It is either deduced from the geom_traits Named Parameters if provided, or the geometric traits class deduced from the point property map of tmesh.
Warning
This function involves a square root computation. If Kernel::FT does not have a sqrt() operation, the square root computation will be done approximately.
See Also
face_area()

#include <CGAL/Polygon_mesh_processing/measure.h>

template<typename PolygonMesh , typename NamedParameters >
FT CGAL::Polygon_mesh_processing::edge_length ( typename boost::graph_traits< PolygonMesh >::halfedge_descriptor  h,
const PolygonMesh &  pmesh,
const NamedParameters &  np 
)

computes the length of an edge of a given polygon mesh.

The edge is given by one of its halfedges, or the edge itself.

Template Parameters
PolygonMesha model of HalfedgeGraph
NamedParametersa sequence of Named Parameters
Parameters
hone halfedge of the edge to compute the length
pmeshthe polygon mesh to which h belongs
npoptional sequence of Named Parameters among the ones listed below
Named Parameters
vertex_point_mapthe property map with the points associated to the vertices of pmesh. If this parameter is omitted, an internal property map for CGAL::vertex_point_t should be available in PolygonMesh
geom_traitsan instance of a geometric traits class, model of Kernel
Returns
the length of h. The return type FT is a number type. It is either deduced from the geom_traits Named Parameters if provided, or the geometric traits class deduced from the point property map of pmesh.
Warning
This function involves a square root computation. If FT does not have a sqrt() operation, the square root computation will be done approximately.
See Also
face_border_length()

#include <CGAL/Polygon_mesh_processing/measure.h>

template<typename TriangleMesh , typename NamedParameters >
FT CGAL::Polygon_mesh_processing::face_area ( typename boost::graph_traits< TriangleMesh >::face_descriptor  f,
const TriangleMesh &  tmesh,
const NamedParameters &  np 
)

computes the area of a face of a given triangulated surface mesh.

Template Parameters
TriangleMesha model of HalfedgeGraph
NamedParametersa sequence of Named Parameters
Parameters
fthe face of which the area is computed
tmeshthe triangulated surface mesh to which f belongs
npoptional sequence of Named Parameters among the ones listed below
Named Parameters
vertex_point_mapthe property map with the points associated to the vertices of pmesh. If this parameter is omitted, an internal property map for CGAL::vertex_point_t should be available in TriangleMesh
geom_traitsan instance of a geometric traits class, model of Kernel
Precondition
f != boost::graph_traits<TriangleMesh>::null_face()
Returns
the area of f. The return type FT is a number type. It is either deduced from the geom_traits Named Parameters if provided, or the geometric traits class deduced from the point property map of tmesh.
See Also
area()

#include <CGAL/Polygon_mesh_processing/measure.h>

template<typename PolygonMesh , typename NamedParameters >
FT CGAL::Polygon_mesh_processing::face_border_length ( typename boost::graph_traits< PolygonMesh >::halfedge_descriptor  h,
const PolygonMesh &  pmesh,
const NamedParameters &  np 
)

computes the length of the border polyline that contains a given halfedge.

Template Parameters
PolygonMesha model of HalfedgeGraph
NamedParametersa sequence of Named Parameters
Parameters
ha halfedge of the border polyline of which the length is computed
pmeshthe polygon mesh to which h belongs
npoptional sequence of Named Parameters among the ones listed below
Named Parameters
vertex_point_mapthe property map with the points associated to the vertices of pmesh. If this parameter is omitted, an internal property map for CGAL::vertex_point_t should be available in PolygonMesh
geom_traitsan instance of a geometric traits class, model of Kernel
Returns
the length of the sequence of border edges of face(h, pmesh). The return type FT is a number type. It is either deduced from the geom_traits Named Parameters if provided, or the geometric traits class deduced from the point property map of pmesh.
Warning
This function involves a square root computation. If Kernel::FT does not have a sqrt() operation, the square root computation will be done approximately.
See Also
edge_length()

#include <CGAL/Polygon_mesh_processing/measure.h>

template<typename TriangleMesh , typename NamedParameters >
FT CGAL::Polygon_mesh_processing::volume ( const TriangleMesh &  tmesh,
const NamedParameters &  np 
)

computes the volume of the domain bounded by a closed triangulated surface mesh.

Template Parameters
TriangleMesha model of HalfedgeGraph
NamedParametersa sequence of Named Parameters
Parameters
tmeshthe closed triangulated surface mesh bounding the volume
npoptional sequence of Named Parameters among the ones listed below
Precondition
tmesh is closed
Named Parameters
vertex_point_mapthe property map with the points associated to the vertices of pmesh. If this parameter is omitted, an internal property map for CGAL::vertex_point_t should be available in TriangleMesh
geom_traitsan instance of a geometric traits class, model of Kernel
Returns
the volume bounded by tmesh. The return type FT is a number type. It is either deduced from the geom_traits Named Parameters if provided, or the geometric traits class deduced from the point property map of tmesh.

#include <CGAL/Polygon_mesh_processing/measure.h>