\( \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.9 - Polygon Mesh Processing
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages

Functions to compute or change the orientation of faces and surfaces.

Functions

template<typename PolygonMesh , typename NamedParameters >
bool CGAL::Polygon_mesh_processing::is_outward_oriented (const PolygonMesh &pmesh, const NamedParameters &np)
 tests whether a closed polygon mesh has a positive orientation. More...
 
template<typename PolygonMesh >
void CGAL::Polygon_mesh_processing::reverse_face_orientations (PolygonMesh &pmesh)
 reverses for each face the order of the vertices along the face boundary. More...
 
template<typename PolygonMesh , typename FaceRange >
void CGAL::Polygon_mesh_processing::reverse_face_orientations (const FaceRange &face_range, PolygonMesh &pmesh)
 reverses for each face in face_range the order of the vertices along the face boundary. More...
 

Function Documentation

template<typename PolygonMesh , typename NamedParameters >
bool CGAL::Polygon_mesh_processing::is_outward_oriented ( const PolygonMesh &  pmesh,
const NamedParameters &  np 
)

tests whether a closed polygon mesh has a positive orientation.

A closed polygon mesh is considered to have a positive orientation if the normal vectors to all its faces point outside the domain bounded by the polygon mesh. The normal vector to each face is chosen pointing on the side of the face where its sequence of vertices is seen counterclockwise.

Precondition
CGAL::is_closed(pmesh)
If pmesh contains several connected components, they are oriented consistently. In other words, the answer to this predicate would be the same for each isolated connected component.
Template Parameters
PolygonMesha model of FaceListGraph that has an internal property map for boost::vertex_point_t
NamedParametersa sequence of Named Parameters
Parameters
pmeshthe closed polygon mesh to be tested
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
geom_traitsa geometric traits class instance
See Also
CGAL::Polygon_mesh_processing::reverse_face_orientations()

#include <CGAL/Polygon_mesh_processing/orientation.h>

Examples:
Polygon_mesh_processing/polygon_soup_example.cpp.
template<typename PolygonMesh >
void CGAL::Polygon_mesh_processing::reverse_face_orientations ( PolygonMesh &  pmesh)

reverses for each face the order of the vertices along the face boundary.

Template Parameters
PolygonMesha model of FaceListGraph and MutableFaceGraph

#include <CGAL/Polygon_mesh_processing/orientation.h>

Examples:
Polygon_mesh_processing/polygon_soup_example.cpp.
template<typename PolygonMesh , typename FaceRange >
void CGAL::Polygon_mesh_processing::reverse_face_orientations ( const FaceRange &  face_range,
PolygonMesh &  pmesh 
)

reverses for each face in face_range the order of the vertices along the face boundary.

The function does not perform any control and if the orientation change of the faces makes the polygon mesh invalid, the behavior is undefined.

Template Parameters
PolygonMesha model of FaceListGraph and MutableFaceGraph
FaceRangerange of face descriptors, model of Range. Its iterator type is InputIterator.

#include <CGAL/Polygon_mesh_processing/orientation.h>