Class SurfaceMesh

Nested Relationships

Nested Types

Class Documentation

class SurfaceMesh

A halfedge data structure for polygonal meshes.

Iterator Types

using VertexIterator = HandleIterator<Vertex>

this class iterates linearly over all vertices

See also

vertices_begin(), vertices_end()

See also

HalfedgeIterator, EdgeIterator, FaceIterator

using HalfedgeIterator = HandleIterator<Halfedge>

this class iterates linearly over all halfedges

See also

halfedges_begin(), halfedges_end()

See also

VertexIterator, EdgeIterator, FaceIterator

using EdgeIterator = HandleIterator<Edge>

this class iterates linearly over all edges

See also

edges_begin(), edges_end()

See also

VertexIterator, HalfedgeIterator, FaceIterator

using FaceIterator = HandleIterator<Face>

this class iterates linearly over all faces

See also

faces_begin(), faces_end()

See also

VertexIterator, HalfedgeIterator, EdgeIterator

Container Types

using VertexContainer = HandleContainer<Vertex>

helper class for iterating through all vertices using range-based for-loops.

See also

vertices()

using HalfedgeContainer = HandleContainer<Halfedge>

helper class for iterating through all halfedges using range-based for-loops.

See also

halfedges()

using EdgeContainer = HandleContainer<Edge>

helper class for iterating through all edges using range-based for-loops.

See also

edges()

using FaceContainer = HandleContainer<Face>

helper class for iterating through all faces using range-based for-loops.

See also

faces()

Construction, destruction, assignment

SurfaceMesh()

default constructor

virtual ~SurfaceMesh() = default

destructor

inline SurfaceMesh(const SurfaceMesh &rhs)

copy constructor: copies rhs to *this. performs a deep copy of all properties.

SurfaceMesh(SurfaceMesh &&rhs) = default

move constructor: moves rhs to *this.

SurfaceMesh &operator=(const SurfaceMesh &rhs)

assign rhs to *this. performs a deep copy of all properties.

SurfaceMesh &operator=(SurfaceMesh &&rhs) = default

move assign rhs to *this.

SurfaceMesh &assign(const SurfaceMesh &rhs)

assign rhs to *this. does not copy custom properties.

File IO

void read(const std::string &filename, const IOFlags &flags = IOFlags())

Read mesh from file filename controlled by flags.

File extension determines file type. Supported formats and vertex attributes (a=ASCII, b=binary):

Format

ASCII

Binary

Normals

Colors

Texcoords

OFF

yes

yes

a / b

a

a / b

OBJ

yes

no

a

no

no

STL

yes

yes

no

no

no

PLY

yes

yes

no

no

no

PMP

no

yes

no

no

no

XYZ

yes

no

a

no

no

AGI

yes

no

a

a

no

In addition, the OBJ and PMP formats support reading per-halfedge texture coordinates.

inline void write(const std::string &filename, const IOFlags &flags = IOFlags())

Write mesh to file filename controlled by flags.

File extension determines file type. Supported formats and vertex attributes (a=ASCII, b=binary):

Format

ASCII

Binary

Normals

Colors

Texcoords

OFF

yes

yes

a

a

a

OBJ

yes

no

a

no

no

STL

yes

no

no

no

no

PLY

yes

yes

no

no

no

PMP

no

yes

no

no

no

XYZ

yes

no

a

no

no

In addition, the OBJ and PMP formats support writing per-halfedge texture coordinates.

void write_const(const std::string &filename, const IOFlags &flags = IOFlags()) const

const version of write. Requires that the mesh has no garbage.

void read(const HighFive::Group &group)

Read the mesh from a HDF5 Group.

inline void write(HighFive::Group &group)

Write the mesh to a HDF5 Group.

void write_const(HighFive::Group &group) const

const version of write. Requires that the mesh has no garbage.

void unload(HighFive::Group &group)

write content of the mesh into group and shallow_clear() the mesh.

void restore(const HighFive::Group &group)

restore content of the mesh after a call to unload( group ).

Add new elements by hand

Vertex add_vertex(const Point &p)

add a new vertex with position p

Face add_face(const std::vector<Vertex> &vertices)

Add a new face with vertex list vertices.

See also

add_triangle, add_quad

Throws:

TopologyException – in case a topological error occurs.

Face add_triangle(Vertex v0, Vertex v1, Vertex v2)

add a new triangle connecting vertices v0, v1, v2

See also

add_face, add_quad

Face add_quad(Vertex v0, Vertex v1, Vertex v2, Vertex v3)

add a new quad connecting vertices v0, v1, v2, v3

See also

add_triangle, add_face

Memory Management

inline size_t vertices_size() const

returns number of (deleted and valid) vertices in the mesh

inline size_t halfedges_size() const

returns number of (deleted and valid) halfedges in the mesh

inline size_t edges_size() const

returns number of (deleted and valid) edges in the mesh

inline size_t faces_size() const

returns number of (deleted and valid) faces in the mesh

inline size_t n_vertices() const

returns number of vertices in the mesh

inline size_t n_halfedges() const

returns number of halfedge in the mesh

inline size_t n_edges() const

returns number of edges in the mesh

inline size_t n_faces() const

returns number of faces in the mesh

inline bool is_empty() const

returns true if the mesh is empty, i.e., has no vertices

virtual void clear()

clear mesh: remove all vertices, edges, faces

void shallow_clear()

shallow clear mesh: remove the content of all properties (including positions and connectivity), but keep the properties themselves.

This is useful after calling unload() and a subsequent restore(), if you want to save memory. Can be undone by calling restore() again.

Note that the n_faces() etc. methods will still return the correct values.

void free_memory()

remove unused memory from vectors

void reserve(size_t nvertices = 0, size_t nedges = 0, size_t nfaces = 0)

reserve memory (mainly used in file readers)

Passing in zero for any parameter will attempt to calculate that value using Euler’s formula.

void garbage_collection()

remove deleted elements

inline bool is_deleted(Vertex v) const

returns whether vertex v is deleted

See also

garbage_collection()

inline bool is_deleted(Halfedge h) const

returns whether halfedge h is deleted

See also

garbage_collection()

inline bool is_deleted(Edge e) const

returns whether edge e is deleted

See also

garbage_collection()

inline bool is_deleted(Face f) const

returns whether face f is deleted

See also

garbage_collection()

inline bool is_valid(Vertex v) const

return whether vertex v is valid, i.e. the index is stores it within the array bounds.

inline bool is_valid(Halfedge h) const

return whether halfedge h is valid, i.e. the index is stores it within the array bounds.

inline bool is_valid(Edge e) const

return whether edge e is valid, i.e. the index is stores it within the array bounds.

inline bool is_valid(Face f) const

returns whether the face f is valid.

Low-level connectivity

inline Halfedge halfedge(Vertex v) const

returns an outgoing halfedge of vertex v. if v is a boundary vertex this will be a boundary halfedge.

inline void set_halfedge(Vertex v, Halfedge h)

set the outgoing halfedge of vertex v to h

inline bool is_boundary(Vertex v) const

returns whether v is a boundary vertex

inline bool is_isolated(Vertex v) const

returns whether v is isolated, i.e., not incident to any edge

inline bool is_manifold(Vertex v) const

returns whether v is a manifold vertex (not incident to several patches)

inline Vertex to_vertex(Halfedge h) const

returns the vertex the halfedge h points to

inline Vertex from_vertex(Halfedge h) const

returns the vertex the halfedge h emanates from

inline void set_vertex(Halfedge h, Vertex v)

sets the vertex the halfedge h points to to v

inline Face face(Halfedge h) const

returns the face incident to halfedge h

inline void set_face(Halfedge h, Face f)

sets the incident face to halfedge h to f

inline Halfedge next_halfedge(Halfedge h) const

returns the next halfedge within the incident face

inline void set_next_halfedge(Halfedge h, Halfedge nh)

sets the next halfedge of h within the face to nh

inline void set_prev_halfedge(Halfedge h, Halfedge ph)

sets the previous halfedge of h and the next halfedge of ph to nh

inline Halfedge prev_halfedge(Halfedge h) const

returns the previous halfedge within the incident face

inline Halfedge opposite_halfedge(Halfedge h) const

returns the opposite halfedge of h

inline Halfedge ccw_rotated_halfedge(Halfedge h) const

returns the halfedge that is rotated counter-clockwise around the start vertex of h. it is the opposite halfedge of the previous halfedge of h.

inline Halfedge cw_rotated_halfedge(Halfedge h) const

returns the halfedge that is rotated clockwise around the start vertex of h. it is the next halfedge of the opposite halfedge of h.

inline Edge edge(Halfedge h) const

return the edge that contains halfedge h as one of its two halfedges.

inline bool is_boundary(Halfedge h) const

returns whether h is a boundary halfege, i.e., if its face does not exist.

inline Halfedge halfedge(Edge e, unsigned int i = 0) const

returns the i'th halfedge of edge e. i has to be 0 or 1.

inline Vertex vertex(Edge e, unsigned int i) const

returns the i'th vertex of edge e. i has to be 0 or 1.

inline Face face(Edge e, unsigned int i) const

returns the face incident to the i'th halfedge of edge e. i has to be 0 or 1.

inline bool is_boundary(Edge e) const

returns whether e is a boundary edge, i.e., if one of its halfedges is a boundary halfedge.

inline Halfedge halfedge(Face f) const

returns a halfedge of face f

inline void set_halfedge(Face f, Halfedge h)

sets the halfedge of face f to h

inline bool is_boundary(Face f) const

returns whether f is a boundary face, i.e., it one of its edges is a boundary edge.

Property handling

template<class T>
inline T &add_object_property(const std::string &name, const T t = T())

add a object property of type T with name name and default value t. fails if a property named name exists already, since the name has to be unique. in this case it returns an invalid property

template<class T>
inline boost::optional<T&> get_object_property(const std::string &name)

get the object property named name of type T. returns an invalid Property if the property does not exist or if the type does not match.

template<class T>
inline boost::optional<const T&> get_object_property(const std::string &name) const

get the object property named name of type T. returns an invalid Property if the property does not exist or if the type does not match.

template<class T>
inline T &object_property(const std::string &name, const T t = T())

if a object property of type T with name name exists, it is returned. otherwise this property is added (with default value t)

template<class T>
inline void remove_object_property(Property<T> &p)

remove the object property p

template<class T>
inline void remove_object_property(const std::string &name)
inline const std::type_info &get_object_propertyType(const std::string &name)

get the type_info T of face property named name. returns an typeid(void) if the property does not exist or if the type does not match.

inline std::vector<std::string> object_properties() const

returns the names of all face properties

template<class T>
inline VertexProperty<T> add_vertex_property(const std::string &name, const T t = T())

add a vertex property of type T with name name and default value t. fails if a property named name exists already, since the name has to be unique. in this case it returns an invalid property

template<class T>
inline VertexProperty<T> get_vertex_property(const std::string &name)

get the vertex property named name of type T. returns an invalid VertexProperty if the property does not exist or if the type does not match.

template<class T>
inline VertexConstProperty<T> get_vertex_property(const std::string &name) const

get the vertex property named name of type T. returns an invalid VertexProperty if the property does not exist or if the type does not match.

template<class T>
inline VertexProperty<T> vertex_property(const std::string &name, const T t = T())

if a vertex property of type T with name name exists, it is returned. otherwise this property is added (with default value t)

template<class T>
inline void remove_vertex_property(VertexProperty<T> &p)

remove the vertex property p

template<class T>
inline void remove_vertex_property(const std::string &name)
inline bool has_vertex_property(const std::string &name) const

does the mesh have a vertex property with name name?

template<class T>
inline HalfedgeProperty<T> add_halfedge_property(const std::string &name, const T t = T())

add a halfedge property of type T with name name and default value t. fails if a property named name exists already, since the name has to be unique. in this case it returns an invalid property.

template<class T>
inline EdgeProperty<T> add_edge_property(const std::string &name, const T t = T())

add a edge property of type T with name name and default value t. fails if a property named name exists already, since the name has to be unique. in this case it returns an invalid property.

template<class T>
inline HalfedgeProperty<T> get_halfedge_property(const std::string &name)

get the halfedge property named name of type T. returns an invalid VertexProperty if the property does not exist or if the type does not match.

template<class T>
inline HalfedgeConstProperty<T> get_halfedge_property(const std::string &name) const

get the halfedge property named name of type T. returns an invalid VertexProperty if the property does not exist or if the type does not match.

template<class T>
inline EdgeProperty<T> get_edge_property(const std::string &name)

get the edge property named name of type T. returns an invalid VertexProperty if the property does not exist or if the type does not match.

template<class T>
inline EdgeConstProperty<T> get_edge_property(const std::string &name) const

get the edge property named name of type T. returns an invalid VertexProperty if the property does not exist or if the type does not match.

template<class T>
inline HalfedgeProperty<T> halfedge_property(const std::string &name, const T t = T())

if a halfedge property of type T with name name exists, it is returned. otherwise this property is added (with default value t)

template<class T>
inline EdgeProperty<T> edge_property(const std::string &name, const T t = T())

if an edge property of type T with name name exists, it is returned. otherwise this property is added (with default value t)

template<class T>
inline void remove_halfedge_property(HalfedgeProperty<T> &p)

remove the halfedge property p

template<class T>
inline void remove_halfedge_property(const std::string &name)
inline bool has_halfedge_property(const std::string &name) const

does the mesh have a halfedge property with name name?

template<class T>
inline void remove_edge_property(EdgeProperty<T> &p)

remove the edge property p

template<class T>
inline void remove_edge_property(const std::string &name)
inline bool has_edge_property(const std::string &name) const

does the mesh have an edge property with name name?

inline const std::type_info &get_halfedge_property_type(const std::string &name)

get the type_info T of halfedge property named name. returns an typeid(void) if the property does not exist or if the type does not match.

inline const std::type_info &get_vertex_property_type(const std::string &name)

get the type_info T of vertex property named name. returns an typeid(void) if the property does not exist or if the type does not match.

inline const std::type_info &get_edge_property_type(const std::string &name)

get the type_info T of edge property named name. returns an typeid(void) if the property does not exist or if the type does not match.

inline std::vector<std::string> vertex_properties() const

returns the names of all vertex properties

inline std::vector<std::string> halfedge_properties() const

returns the names of all halfedge properties

inline std::vector<std::string> edge_properties() const

returns the names of all edge properties

template<class T>
inline FaceProperty<T> add_face_property(const std::string &name, const T t = T())

add a face property of type T with name name and default value t. fails if a property named name exists already, since the name has to be unique. in this case it returns an invalid property

template<class T>
inline FaceProperty<T> get_face_property(const std::string &name)

get the face property named name of type T. returns an invalid VertexProperty if the property does not exist or if the type does not match.

template<class T>
inline FaceConstProperty<T> get_face_property(const std::string &name) const

get the face property named name of type T. returns an invalid VertexProperty if the property does not exist or if the type does not match.

template<class T>
inline FaceProperty<T> face_property(const std::string &name, const T t = T())

if a face property of type T with name name exists, it is returned. otherwise this property is added (with default value t)

template<class T>
inline void remove_face_property(FaceProperty<T> &p)

remove the face property p

template<class T>
inline void remove_face_property(const std::string &name)
inline bool has_face_property(const std::string &name) const

does the mesh have a face property with name name?

inline const std::type_info &get_face_property_type(const std::string &name)

get the type_info T of face property named name . returns an typeid(void) if the property does not exist or if the type does not match.

inline std::vector<std::string> face_properties() const

returns the names of all face properties

void property_stats() const

prints the names of all properties

inline void copy_properties(const SurfaceMesh &src)
inline PropertyMap<Face> gen_face_copy_map(const SurfaceMesh &src)

Generate a PropertyMap to copy face properties from src to faces in this mesh.

Parameters:

src – The source mesh. May be *this if you want to copy within the same mesh.

inline PropertyMap<Vertex> gen_vertex_copy_map(const SurfaceMesh &src)

See also

gen_face_copy_map()

inline PropertyMap<Edge> gen_edge_copy_map(const SurfaceMesh &src)

See also

gen_face_copy_map()

inline PropertyMap<Halfedge> gen_halfedge_copy_map(const SurfaceMesh &src)

See also

gen_face_copy_map()

Iterators and circulators

inline VertexIterator vertices_begin() const

returns start iterator for vertices

inline VertexIterator vertices_end() const

returns end iterator for vertices

inline VertexContainer vertices() const

returns vertex container for C++11 range-based for-loops

inline HalfedgeIterator halfedges_begin() const

returns start iterator for halfedges

inline HalfedgeIterator halfedges_end() const

returns end iterator for halfedges

inline HalfedgeContainer halfedges() const

returns halfedge container for C++11 range-based for-loops

inline EdgeIterator edges_begin() const

returns start iterator for edges

inline EdgeIterator edges_end() const

returns end iterator for edges

inline EdgeContainer edges() const

returns edge container for C++11 range-based for-loops

inline VertexAroundVertexCirculator vertices(Vertex v) const

returns circulator for vertices around vertex v

inline HalfedgeAroundVertexCirculator halfedges(Vertex v) const

returns circulator for outgoing halfedges around vertex v

inline FaceIterator faces_begin() const

returns start iterator for faces

inline FaceIterator faces_end() const

returns end iterator for faces

inline FaceContainer faces() const

returns face container for C++11 range-based for-loops

inline FaceAroundVertexCirculator faces(Vertex v) const

returns circulator for faces around vertex v

inline VertexAroundFaceCirculator vertices(Face f) const

returns circulator for vertices of face f

inline HalfedgeAroundFaceCirculator halfedges(Face f) const

returns circulator for halfedges of face f

inline HalfedgeAroundFaceCirculator boundary_circulator(Halfedge h) const

returns circulator for halfedges of a boundary “Face”

Higher-level Topological Operations

inline Halfedge insert_vertex(Edge e, const Point &p)

Subdivide the edge e = (v0,v1) by splitting it into the two edge (v0,p) and (p,v1). Note that this function does not introduce any other edge or faces. It simply splits the edge. Returns halfedge that points to p.

See also

insert_vertex(Edge, Vertex)

See also

insert_vertex(Halfedge, Vertex)

inline Halfedge insert_vertex(Edge e, Vertex v)

Subdivide the edge e = (v0,v1) by splitting it into the two edge (v0,v) and (v,v1). Note that this function does not introduce any other edge or faces. It simply splits the edge. Returns halfedge that points to p.

See also

insert_vertex(Edge, Point)

See also

insert_vertex(Halfedge, Vertex)

Halfedge insert_vertex(Halfedge h0, Vertex v)

Subdivide the halfedge h = (v0,v1) by splitting it into the two halfedges (v0,v) and (v,v1). Note that this function does not introduce any other edge or faces. It simply splits the edge. Returns the halfedge that points from v1 to v.

See also

insert_vertex(Edge, Point)

See also

insert_vertex(Edge, Vertex)

Halfedge find_halfedge(Vertex start, Vertex end) const

find the halfedge from start to end

Edge find_edge(Vertex a, Vertex b) const

find the edge (a,b)

bool is_triangle_mesh() const

returns whether the mesh a triangle mesh. this function simply tests each face, and therefore is not very efficient.

See also

trianglate(), triangulate(Face)

bool is_quad_mesh() const

returns whether the mesh a quad mesh. this function simply tests each face, and therefore is not very efficient.

bool is_collapse_ok(Halfedge v0v1)

returns whether collapsing the halfedge v0v1 is topologically legal.

Attention

This function is only valid for triangle meshes.

void collapse(Halfedge h)

Collapse the halfedge h by moving its start vertex into its target vertex. For non-boundary halfedges this function removes one vertex, three edges, and two faces. For boundary halfedges it removes one vertex, two edges and one face.

Attention

This function is only valid for triangle meshes.

Attention

Halfedge collapses might lead to invalid faces. Call is_collapse_ok(Halfedge) to be sure the collapse is legal.

Attention

The removed items are only marked as deleted. You have to call garbage_collection() to finally remove them.

bool is_removal_ok(Edge e)

returns whether removing the edge e is topologically legal.

bool remove_edge(Edge e)

Remove edge and merge its two incident faces into one. This operation requires that the edge has two incident faces and that these two are not equal.

inline Vertex split(Face f, const Point &p)

Split the face f by first adding point p to the mesh and then inserting edges between p and the vertices of f. For a triangle this is a standard one-to-three split.

See also

split(Face, Vertex)

void split(Face f, Vertex v)

Split the face f by inserting edges between v and the vertices of f. For a triangle this is a standard one-to-three split.

See also

split(Face, const Point&)

inline Halfedge split(Edge e, const Point &p)

Split the edge e by first adding point p to the mesh and then connecting it to the two vertices of the adjacent triangles that are opposite to edge e. Returns the halfedge pointing to p that is created by splitting the existing edge e.

See also

split(Edge, Vertex)

Attention

This function is only valid for triangle meshes.

Halfedge split(Edge e, Vertex v)

Split the edge e by connecting vertex v it to the two vertices of the adjacent triangles that are opposite to edge e. Returns the halfedge pointing to v that is created by splitting the existing edge e.

See also

split(Edge, Point)

Attention

This function is only valid for triangle meshes.

Halfedge insert_edge(Halfedge h0, Halfedge h1)

insert edge between the to-vertices v0 of h0 and v1 of h1. returns the new halfedge from v0 to v1.

Attention

h0 and h1 have to belong to the same face

bool is_flip_ok(Edge e) const

Check whether flipping edge e is topologically

See also

flip(Edge)

Attention

This function is only valid for triangle meshes.

void flip(Edge e)

Flip the edge e . Removes the edge e and add an edge between the two vertices opposite to edge e of the two incident triangles.

See also

is_flip_ok()

Attention

This function is only valid for triangle meshes.

Attention

Flipping an edge may result in a non-manifold mesh, hence check for yourself whether this operation is allowed or not!

size_t valence(Vertex v) const

returns the valence (number of incident edges or neighboring vertices) of vertex v.

size_t valence(Face f) const

returns the valence of face f (its number of vertices)

Point center(Face f) const

returns the center of face f (average position of vertices)

inline Point center(Edge e) const

returns the center of edge e.

void duplicate_non_manifold_vertices(bool print = true)

attempts to fix non-manifold vertices by inserting a new vertex per connected patch

void remove_degenerate_faces(bool print = true)

removes any broken faces

void delete_vertex(Vertex v)

deletes the vertex v from the mesh

void delete_edge(Edge e)

deletes the edge e from the mesh

void delete_face(Face f)

deletes the face f from the mesh

void delete_many_faces(const FaceProperty<bool> &faces)

deletes all flagged faces and restores consistency

this is a lot faster for deleting large, preferably connected regions of the mesh than individually calling delete_face for each face. This is because delete_face needs to return a consistent halfedge structure after every single remove, even if the restored parts will be removed during a later call. This method can remove all removable parts first, and only then restore consistency where it is actually necessary. Another advantage is that most parts of this can be parallelized with OpenMP, which would not work for delete_face.

void split_mesh(std::vector<SurfaceMesh> &output, FaceProperty<IndexType> &face_dist, VertexProperty<IndexType> &vertex_dist)

Split the mesh into subset meshes. face_dist and vertex_dist contain the index of the target mesh in output or PMP_MAX_INDEX if the face or vertex should not be copied.

Attention

All neighboring vertices and faces must be in the same subset. If your mesh does not meet this requirement, please duplicate faces/vertices until it does.

void join_mesh(const std::vector<const SurfaceMesh*> &input)

Adds everything in the input meshes to the current mesh.

inline bool has_garbage() const

are there any deleted entities?

Unifies h0 and h1 into a single edge, combining adjacent vertices. Requires both halfedges to be boundary halfedges.

inline const Point &position(Vertex v) const

position of a vertex (read only)

inline Point &position(Vertex v)

position of a vertex

inline std::vector<Point> &positions()
Returns:

vector of point positions

inline const std::vector<Point> &positions() const
Returns:

vector of point positions

BoundingBox bounds() const

compute the bounding box of the object

inline Scalar edge_length(Edge e) const

compute the length of edge e.

Allocate new elements

inline Vertex new_vertex()

Allocate a new vertex, resize vertex properties accordingly.

Throws:

AllocationException – in case of failure to allocate a new vertex.

inline Vertex new_vertices(size_t n)
inline Halfedge new_edge()

Allocate a new edge, resize edge and halfedge properties accordingly.

Throws:

AllocationException – in case of failure to allocate a new edge.

inline Halfedge new_edges(size_t n)
inline Halfedge new_edge(Vertex start, Vertex end)

Allocate a new edge, resize edge and halfedge properties accordingly.

Throws:

AllocationException – in case of failure to allocate a new edge.

Parameters:
  • start – starting Vertex of the new edge

  • end – end Vertex of the new edge

inline Face new_face()

Allocate a new face, resize face properties accordingly.

Throws:

AllocationException – in case of failure to allocate a new face.

inline Face new_faces(size_t n)
class CirculatorLoopDetector

Public Functions

inline CirculatorLoopDetector(Halfedge start)
inline void set_start(Halfedge new_start)
inline void loop_detection(Halfedge current)
inline void cancel()
class FaceAroundVertexCirculator

this class circulates through all incident faces of a vertex. it also acts as a container-concept for C++11 range-based for loops.

Public Functions

inline FaceAroundVertexCirculator(const SurfaceMesh *m, Vertex v)

construct with mesh and vertex (vertex should not be isolated!)

inline bool operator==(const FaceAroundVertexCirculator &rhs) const

are two circulators equal?

inline bool operator!=(const FaceAroundVertexCirculator &rhs) const

are two circulators different?

inline FaceAroundVertexCirculator &operator++()

pre-increment (rotates counter-clockwise)

inline FaceAroundVertexCirculator &operator--()

pre-decrement (rotate clockwise)

inline Face operator*() const

get the face the circulator refers to

inline operator bool() const

cast to bool: true if vertex is not isolated

inline FaceAroundVertexCirculator &begin()
inline FaceAroundVertexCirculator &end()
class HalfedgeAroundFaceCirculator

this class circulates through all halfedges of a face. it also acts as a container-concept for C++11 range-based for loops.

See also

VertexAroundFaceCirculator, halfedges(Face)

Public Functions

inline HalfedgeAroundFaceCirculator(const SurfaceMesh *m, Face f)

default constructur

inline HalfedgeAroundFaceCirculator(const SurfaceMesh *m, Halfedge start)
inline bool operator==(const HalfedgeAroundFaceCirculator &rhs) const

are two circulators equal?

inline bool operator!=(const HalfedgeAroundFaceCirculator &rhs) const

are two circulators different?

inline HalfedgeAroundFaceCirculator &operator++()

pre-increment (rotates counter-clockwise)

inline HalfedgeAroundFaceCirculator &operator--()

pre-decrement (rotates clockwise)

inline Halfedge operator*() const

get the halfedge the circulator refers to

inline HalfedgeAroundFaceCirculator &begin()
inline HalfedgeAroundFaceCirculator &end()
class HalfedgeAroundVertexCirculator

this class circulates through all outgoing halfedges of a vertex. it also acts as a container-concept for C++11 range-based for loops.

See also

VertexAroundVertexCirculator, halfedges(Vertex)

Public Functions

inline HalfedgeAroundVertexCirculator(const SurfaceMesh *mesh, Vertex v)

default constructor

inline bool operator==(const HalfedgeAroundVertexCirculator &rhs) const

are two circulators equal?

inline bool operator!=(const HalfedgeAroundVertexCirculator &rhs) const

are two circulators different?

inline HalfedgeAroundVertexCirculator &operator++()

pre-increment (rotate couter-clockwise)

inline HalfedgeAroundVertexCirculator &operator--()

pre-decrement (rotate clockwise)

inline Halfedge operator*() const

get the halfedge the circulator refers to

inline operator bool() const

cast to bool: true if vertex is not isolated

inline HalfedgeAroundVertexCirculator &begin()
inline HalfedgeAroundVertexCirculator &end()
template<class HandleT>
class HandleContainer

Public Functions

inline HandleContainer(HandleIterator<HandleT> begin, HandleIterator<HandleT> end)
inline HandleIterator<HandleT> begin() const
inline HandleIterator<HandleT> end() const
template<class HandleT>
class HandleIterator : public lvr2::MeshHandleIterator<HandleT>

Public Functions

inline HandleIterator(HandleT handle, const SurfaceMesh *m)

Default constructor.

inline virtual HandleT operator*() const override

get the handle the iterator refers to

inline bool operator==(const HandleIterator<HandleT> &rhs) const

are two iterators equal?

inline virtual bool operator==(const lvr2::MeshHandleIterator<HandleT> &other) const override
inline bool operator!=(const HandleIterator<HandleT> &rhs) const

are two iterators different?

inline virtual bool operator!=(const lvr2::MeshHandleIterator<HandleT> &other) const override
inline virtual HandleIterator &operator++() override

pre-increment iterator

inline HandleIterator operator++(int)

post-increment iterator

inline HandleIterator &operator--()

pre-decrement iterator

Protected Attributes

HandleT handle_
const SurfaceMesh *mesh_
class VertexAroundFaceCirculator

this class circulates through the vertices of a face. it also acts as a container-concept for C++11 range-based for loops.

See also

HalfedgeAroundFaceCirculator, vertices(Face)

Public Functions

inline VertexAroundFaceCirculator(const SurfaceMesh *m, Face f)

default constructor

inline bool operator==(const VertexAroundFaceCirculator &rhs) const

are two circulators equal?

inline bool operator!=(const VertexAroundFaceCirculator &rhs) const

are two circulators different?

inline VertexAroundFaceCirculator &operator++()

pre-increment (rotates counter-clockwise)

inline VertexAroundFaceCirculator &operator--()

pre-decrement (rotates clockwise)

inline Vertex operator*() const

get the vertex the circulator refers to

inline VertexAroundFaceCirculator &begin()
inline VertexAroundFaceCirculator &end()
class VertexAroundVertexCirculator

this class circulates through all one-ring neighbors of a vertex. it also acts as a container-concept for C++11 range-based for loops.

See also

HalfedgeAroundVertexCirculator, vertices(Vertex)

Public Functions

inline VertexAroundVertexCirculator(const SurfaceMesh *mesh, Vertex v)

default constructor

inline bool operator==(const VertexAroundVertexCirculator &rhs) const

are two circulators equal?

inline bool operator!=(const VertexAroundVertexCirculator &rhs) const

are two circulators different?

inline VertexAroundVertexCirculator &operator++()

pre-increment (rotate couter-clockwise)

inline VertexAroundVertexCirculator &operator--()

pre-decrement (rotate clockwise)

inline Vertex operator*() const

get the vertex the circulator refers to

inline operator bool() const

cast to bool: true if vertex is not isolated

inline Halfedge halfedge() const

return current halfedge

inline VertexAroundVertexCirculator &begin()
inline VertexAroundVertexCirculator &end()