\( \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.8 - Surface Mesh

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Classes | Functions
Surface Mesh Reference

##

Mario Botsch, Daniel Sieger, Philipp Moeller, and Andreas Fabri
The surface mesh class provided by this package is an implementation of the halfedge data structure allowing to represent polyhedral surfaces. It is an alternative to the packages Halfedge Data Structures and 3D Polyhedral Surface. The main differences are that it is indexed based and not pointer based, and that the mechanism for adding information to vertices, halfedges, edges, and faces is much simpler and can be used at runtime and not at compile time.

Introduced in: CGAL 4.6
BibTeX: cgal:bsmf-sm-16a
License: GPL

## Classified Reference Pages

## Classes

- `CGAL::Surface_mesh<P>`

## Classes
class | CGAL::Surface_mesh< P >
| This class is a data structure that can be used as halfedge data structure or polyhedral surface. It is an alternative to the classes `HalfedgeDS` and `Polyhedron_3` defined in the packages Halfedge Data Structures and 3D Polyhedral Surface. The main difference is that it is indexed based and not pointer based, and that the mechanism for adding information to vertices, halfedges, edges, and faces is much simpler and done at runtime and not at compile time. When elements are removed, they are only marked as removed, and a garbage collection function must be called to really remove them. More...

## Functions
template<typename P >
Surface_mesh< P > & | operator+= (Surface_mesh< P > &sm, const Surface_mesh< P > &other)
template<typename P >
std::ostream & | operator<< (std::ostream &os, const Surface_mesh< P > &sm)
template<typename P >
std::istream & | operator>> (std::istream &is, Surface_mesh< P > &sm)

## Function Documentation

template<typename P >

Surface_mesh< P > & operator+= | ( | Surface_mesh< P > & | sm,
|  | const Surface_mesh< P > & | other
| ) |  |
| related

Inserts `other` into `sm`. Shifts the indices of vertices of `other` by `sm.number_of_vertices() + sm.number_of_removed_vertices()` and analoguously for halfedges, edges, and faces. Copies entries of all property maps which have the same name in `sm` and `other`. that is, property maps which are only in `other` are ignored. Also copies elements which are marked as removed, and concatenates the freelists of `sm` and `other`.

template<typename P >

std::ostream & operator<< | ( | std::ostream & | os,
|  | const Surface_mesh< P > & | sm
| ) |  |
| related

Inserts the surface mesh in an output stream in Ascii OFF format. Only the point property is inserted in the stream.

Precondition
  `operator<<(std::ostream&,const P&)` must be defined.

template<typename P >

std::istream & operator>> | ( | std::istream & | is,
|  | Surface_mesh< P > & | sm
| ) |  |
| related

Extracts the surface mesh from an input stream in Ascii OFF format. The operator only reads the point property and does not read files with vertex normals or textures.

Precondition
  `operator>>(std::istream&,const P&)` must be defined.