Functions to compute unit normals for individual/all vertices or faces.
|
template<typename PolygonMesh , typename NamedParameters > |
Vector_3 | CGAL::Polygon_mesh_processing::compute_face_normal (typename boost::graph_traits< PolygonMesh >::face_descriptor f, const PolygonMesh &pmesh, const NamedParameters &np) |
| computes the outward unit vector normal to face f . More...
|
|
template<typename PolygonMesh , typename FaceNormalMap , typename NamedParameters > |
void | CGAL::Polygon_mesh_processing::compute_face_normals (const PolygonMesh &pmesh, FaceNormalMap fnm, const NamedParameters &np) |
| computes the outward unit vector normal for all faces of the polygon mesh. More...
|
|
template<typename PolygonMesh , typename NamedParameters > |
Vector_3 | CGAL::Polygon_mesh_processing::compute_vertex_normal (typename boost::graph_traits< PolygonMesh >::vertex_descriptor v, const PolygonMesh &pmesh, const NamedParameters &np) |
| computes the unit normal at vertex v as the average of the normals of incident faces. More...
|
|
template<typename PolygonMesh , typename VertexNormalMap , typename NamedParameters > |
void | CGAL::Polygon_mesh_processing::compute_vertex_normals (const PolygonMesh &pmesh, VertexNormalMap vnm, const NamedParameters &np) |
| computes the outward unit vector normal for all vertices of the polygon mesh. More...
|
|
template<typename PolygonMesh , typename VertexNormalMap , typename FaceNormalMap , typename NamedParameters > |
void | CGAL::Polygon_mesh_processing::compute_normals (const PolygonMesh &pmesh, VertexNormalMap vnm, FaceNormalMap fnm, const NamedParameters &np) |
| computes the outward unit vector normal for all vertices and faces of the polygon mesh. More...
|
|
template<typename PolygonMesh , typename NamedParameters >
Vector_3 CGAL::Polygon_mesh_processing::compute_face_normal |
( |
typename boost::graph_traits< PolygonMesh >::face_descriptor |
f, |
|
|
const PolygonMesh & |
pmesh, |
|
|
const NamedParameters & |
np |
|
) |
| |
computes the outward unit vector normal to face f
.
- Template Parameters
-
PolygonMesh | a model of FaceGraph that has an internal property map for CGAL::vertex_point_t |
NamedParameters | a sequence of Named Parameters |
- Parameters
-
f | the face on which the normal is computed |
pmesh | the polygon mesh containing f |
np | optional sequence of Named Parameters among the ones listed below |
- Named Parameters
-
- Returns
- the computed normal. The return type is a 3D vector type. It is either deduced from the
geom_traits
Named Parameters if provided, or from the geometric traits class deduced from the point property map of pmesh
.
#include <CGAL/Polygon_mesh_processing/compute_normal.h>
template<typename PolygonMesh , typename FaceNormalMap , typename NamedParameters >
void CGAL::Polygon_mesh_processing::compute_face_normals |
( |
const PolygonMesh & |
pmesh, |
|
|
FaceNormalMap |
fnm, |
|
|
const NamedParameters & |
np |
|
) |
| |
computes the outward unit vector normal for all faces of the polygon mesh.
- Template Parameters
-
PolygonMesh | a model of FaceGraph that has an internal property map for CGAL::vertex_point_t |
FaceNormalMap | a model of WritablePropertyMap with boost::graph_traits<PolygonMesh>::face_descriptor as key type and Kernel::Vector_3 as value type. |
- Parameters
-
pmesh | the polygon mesh |
fnm | the property map in which the normals are written |
np | optional sequence of Named Parameters among the ones listed below |
- Named Parameters
-
#include <CGAL/Polygon_mesh_processing/compute_normal.h>
template<typename PolygonMesh , typename VertexNormalMap , typename FaceNormalMap , typename NamedParameters >
void CGAL::Polygon_mesh_processing::compute_normals |
( |
const PolygonMesh & |
pmesh, |
|
|
VertexNormalMap |
vnm, |
|
|
FaceNormalMap |
fnm, |
|
|
const NamedParameters & |
np |
|
) |
| |
computes the outward unit vector normal for all vertices and faces of the polygon mesh.
- Template Parameters
-
- Parameters
-
pmesh | the polygon mesh |
vnm | the property map in which the vertex normals are written |
fnm | the property map in which the face normals are written |
np | optional sequence of Named Parameters among the ones listed below |
- Named Parameters
-
#include <CGAL/Polygon_mesh_processing/compute_normal.h>
- Examples:
- Polygon_mesh_processing/compute_normals_example.cpp.
template<typename PolygonMesh , typename NamedParameters >
Vector_3 CGAL::Polygon_mesh_processing::compute_vertex_normal |
( |
typename boost::graph_traits< PolygonMesh >::vertex_descriptor |
v, |
|
|
const PolygonMesh & |
pmesh, |
|
|
const NamedParameters & |
np |
|
) |
| |
computes the unit normal at vertex v
as the average of the normals of incident faces.
- Template Parameters
-
PolygonMesh | a model of FaceGraph that has an internal property map for CGAL::vertex_point_t |
- Parameters
-
v | the vertex at which the normal is computed |
pmesh | the polygon mesh containing v |
np | optional sequence of Named Parameters among the ones listed below |
- Named Parameters
-
- Returns
- the computed normal. The return type is a 3D vector 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
.
#include <CGAL/Polygon_mesh_processing/compute_normal.h>
template<typename PolygonMesh , typename VertexNormalMap , typename NamedParameters >
void CGAL::Polygon_mesh_processing::compute_vertex_normals |
( |
const PolygonMesh & |
pmesh, |
|
|
VertexNormalMap |
vnm, |
|
|
const NamedParameters & |
np |
|
) |
| |
computes the outward unit vector normal for all vertices of the polygon mesh.
- Template Parameters
-
- Parameters
-
pmesh | the polygon mesh |
vnm | the property map in which the normals are written |
np | optional sequence of Named Parameters among the ones listed below |
- Named Parameters
-
#include <CGAL/Polygon_mesh_processing/compute_normal.h>