Public Member Functions | List of all members
lvr2::BaseMesh< BaseVecT > Class Template Referenceabstract

Interface for triangle-meshes with adjacency information. More...

#include <BaseMesh.hpp>

Inheritance diagram for lvr2::BaseMesh< BaseVecT >:
Inheritance graph
[legend]

Public Member Functions

virtual FaceHandle addFace (VertexHandle v1, VertexHandle v2, VertexHandle v3)=0
 Creates a face connecting the three given vertices. More...
 
virtual VertexHandle addVertex (BaseVecT pos)=0
 Adds a vertex with the given position to the mesh. More...
 
BaseVecT::CoordType calcFaceArea (FaceHandle handle) const
 Calc and return the area of the requested face. More...
 
BaseVecT calcFaceCentroid (FaceHandle handle) const
 Calc and return the centroid of the requested face. More...
 
virtual EdgeCollapseResult collapseEdge (EdgeHandle edgeH)=0
 Merges the two vertices connected by the given edge. More...
 
virtual bool containsEdge (EdgeHandle vH) const =0
 Checks if the given edge is part of this mesh. More...
 
virtual bool containsFace (FaceHandle vH) const =0
 Checks if the given face is part of this mesh. More...
 
virtual bool containsVertex (VertexHandle vH) const =0
 Checks if the given vertex is part of this mesh. More...
 
virtual EdgeIteratorProxy< BaseVecT > edges () const
 Method for usage in range-based for-loops. More...
 
virtual MeshHandleIteratorPtr< EdgeHandleedgesBegin () const =0
 Returns an iterator to the first edge of this mesh. More...
 
virtual MeshHandleIteratorPtr< EdgeHandleedgesEnd () const =0
 Returns an iterator to the element following the last edge of this mesh. More...
 
virtual FaceIteratorProxy< BaseVecT > faces () const
 Method for usage in range-based for-loops. More...
 
virtual MeshHandleIteratorPtr< FaceHandlefacesBegin () const =0
 Returns an iterator to the first face of this mesh. More...
 
virtual MeshHandleIteratorPtr< FaceHandlefacesEnd () const =0
 Returns an iterator to the element following the last face of this mesh. More...
 
virtual void flipEdge (EdgeHandle edgeH)=0
 Performs the edge flip operation. More...
 
virtual OptionalEdgeHandle getEdgeBetween (VertexHandle aH, VertexHandle bH) const
 If the two given vertices are connected by an edge, it is returned. None otherwise. More...
 
virtual std::array< EdgeHandle, 3 > getEdgesOfFace (FaceHandle handle) const =0
 Get the three edges surrounding the given face. More...
 
virtual void getEdgesOfVertex (VertexHandle handle, std::vector< EdgeHandle > &edgesOut) const =0
 Get a list of edges around the given vertex. More...
 
virtual std::vector< EdgeHandlegetEdgesOfVertex (VertexHandle handle) const
 Get a list of edges around the given vertex. More...
 
virtual OptionalFaceHandle getFaceBetween (VertexHandle aH, VertexHandle bH, VertexHandle cH) const
 If all vertices are part of one face, this face is returned. None otherwise. More...
 
virtual std::array< OptionalFaceHandle, 2 > getFacesOfEdge (EdgeHandle edgeH) const =0
 Get the two faces of an edge. More...
 
virtual void getFacesOfVertex (VertexHandle handle, std::vector< FaceHandle > &facesOut) const =0
 Get a list of faces the given vertex belongs to. More...
 
virtual std::vector< FaceHandlegetFacesOfVertex (VertexHandle handle) const
 Get a list of faces the given vertex belongs to. More...
 
virtual void getNeighboursOfFace (FaceHandle handle, std::vector< FaceHandle > &facesOut) const =0
 Get face handles of the neighbours of the requested face. More...
 
virtual std::vector< FaceHandlegetNeighboursOfFace (FaceHandle handle) const
 Get face handles of the neighbours of the requested face. More...
 
virtual void getNeighboursOfVertex (VertexHandle handle, std::vector< VertexHandle > &verticesOut) const =0
 Get vertex handles of the neighbours of the requested vertex. More...
 
virtual std::vector< VertexHandlegetNeighboursOfVertex (VertexHandle handle) const
 Get a list of vertices around the given vertex. More...
 
virtual OptionalEdgeHandle getOppositeEdge (FaceHandle faceH, VertexHandle vertexH) const =0
 Get the optional edge handle of the edge lying on the vertex's opposite site. More...
 
virtual OptionalFaceHandle getOppositeFace (FaceHandle faceH, VertexHandle vertexH) const =0
 Get the optional face handle of the neighboring face lying on the vertex's opposite site. More...
 
virtual OptionalVertexHandle getOppositeVertex (FaceHandle faceH, EdgeHandle edgeH) const =0
 Get the optional vertex handle of the vertex lying on the edge's opposite site. More...
 
virtual OptionalVertexHandle getVertexBetween (EdgeHandle aH, EdgeHandle bH) const
 If the given edges share a vertex, it is returned. None otherwise. More...
 
virtual BaseVecT getVertexPosition (VertexHandle handle) const =0
 Get the position of the given vertex. More...
 
virtual BaseVecT & getVertexPosition (VertexHandle handle)=0
 Get a ref to the position of the given vertex. More...
 
virtual std::array< BaseVecT, 3 > getVertexPositionsOfFace (FaceHandle handle) const
 Get the points of the requested face. More...
 
virtual std::array< VertexHandle, 2 > getVerticesOfEdge (EdgeHandle edgeH) const =0
 Get the two vertices of an edge. More...
 
virtual std::array< VertexHandle, 3 > getVerticesOfFace (FaceHandle handle) const =0
 Get the three vertices surrounding the given face. More...
 
virtual bool isBorderEdge (EdgeHandle handle) const =0
 Determines wheter the given edge is an border edge, i.e., if it is connected to two faces or not. More...
 
virtual bool isCollapsable (EdgeHandle handle) const
 Determines whether or not an edge collapse of the given edge is possible without creating invalid meshes. More...
 
virtual bool isFaceInsertionValid (VertexHandle v1, VertexHandle v2, VertexHandle v3) const
 Check whether or not inserting a face between the given vertices would be valid. More...
 
virtual bool isFlippable (EdgeHandle handle) const
 Determines whether or not the given edge can be flipped without destroying the mesh. More...
 
virtual Index nextEdgeIndex () const =0
 Returns the handle index which would be assigned to the next edge that is created. This method is mainly useful for manually iterating over all possible handles. As handles are strictly increasing, all edges currently in this mesh have a handle index smaller than what this method returns. More...
 
virtual Index nextFaceIndex () const =0
 Returns the handle index which would be assigned to the next face that is created. This method is mainly useful for manually iterating over all possible handles. As handles are strictly increasing, all faces currently in this mesh have a handle index smaller than what this method returns. More...
 
virtual Index nextVertexIndex () const =0
 Returns the handle index which would be assigned to the next vertex that is created. This method is mainly useful for manually iterating over all possible handles. As handles are strictly increasing, all vertices currently in this mesh have a handle index smaller than what this method returns. More...
 
virtual uint8_t numAdjacentFaces (EdgeHandle handle) const
 Returns the number of adjacent faces to the given edge. More...
 
virtual size_t numEdges () const =0
 Returns the number of edges in the mesh. More...
 
virtual size_t numFaces () const =0
 Returns the number of faces in the mesh. More...
 
virtual size_t numVertices () const =0
 Returns the number of vertices in the mesh. More...
 
virtual void removeFace (FaceHandle handle)=0
 Removes the given face and all (if not connected to any other face/edge/vertex) connected edges and vertices. More...
 
virtual VertexIteratorProxy< BaseVecT > vertices () const
 Method for usage in range-based for-loops. More...
 
virtual MeshHandleIteratorPtr< VertexHandleverticesBegin () const =0
 Returns an iterator to the first vertex of this mesh. More...
 
virtual MeshHandleIteratorPtr< VertexHandleverticesEnd () const =0
 Returns an iterator to the element following the last vertex of this mesh. More...
 
virtual ~BaseMesh ()
 

Detailed Description

template<typename BaseVecT>
class lvr2::BaseMesh< BaseVecT >

Interface for triangle-meshes with adjacency information.

This interface represents meshes that contain information about the conectivity of their faces, edges and vertices. They make it possible to access adjacent faces/edges/vertices in constant time.

Faces, edges and vertices in these meshes are explicitly represented (the phrase "faces, edge or vertex" is often abbreviated "FEV"). To talk about one specific FEV, so called handles are used. A handle is basically an index which is used to identify a FEV. Note that the internal structures used to represent FEVs are not exposed in this interface. This means you'll never write something like vertex.outgoingEdge, but you'll always use methods of this interface to get information about a FEV.

Meshes are mainly used to store connectivity information. They are not used to store arbitrary data for each FEV. To do that, you should use FEV maps which allow you to associate arbitrary data with a FEV (and more). For more information about that, please refer to the documentation in VectorMap. There is one important exception, though: the 3D position of vertices is stored inside the mesh directly. This is actually rather inconsistent with the whole design, but positions are used a lot – so it is convenient to store them in the mesh. But this might change in the future.

This interface cannot be used for arbitrarily connected meshes. Instead, only manifold meshes can be represented. In particular, this means that each connected component of the mesh has to be a planar graph (you could draw it on a piece of paper without edges crossing). As a consequence we can use terms like "clockwise" and "counter-clockwise" (a property that I think is called "orientable"). When doing that, we assume a planar embedding that shows the face's normals sticking "out of the paper". In easier terms: draw the graph (represented by the mesh) on a paper and draw it in the way such that you can see the front of all faces. When we talk about "clockwise" and "counter-clockwise" we are talking about this embedding – when looking at the face.

Definition at line 140 of file BaseMesh.hpp.

Constructor & Destructor Documentation

◆ ~BaseMesh()

template<typename BaseVecT>
virtual lvr2::BaseMesh< BaseVecT >::~BaseMesh ( )
inlinevirtual

Definition at line 144 of file BaseMesh.hpp.

Member Function Documentation

◆ addFace()

template<typename BaseVecT>
virtual FaceHandle lvr2::BaseMesh< BaseVecT >::addFace ( VertexHandle  v1,
VertexHandle  v2,
VertexHandle  v3 
)
pure virtual

Creates a face connecting the three given vertices.

Important: The face's vertices have to be given in front-face counter- clockwise order. This means that, when looking at the face's front, the vertices would appear in counter-clockwise order. Or in more mathy terms: the face's normal is equal to (v1 - v2) x (v1 - v3) in the right-handed coordinate system (where x is cross-product).

This method panics if an insertion is not possible. You can check whether or not an insertion is valid by using isFaceInsertionValid().

Returns
A handle to access the inserted face later.

Implemented in lvr2::HalfEdgeMesh< BaseVecT >.

◆ addVertex()

template<typename BaseVecT>
virtual VertexHandle lvr2::BaseMesh< BaseVecT >::addVertex ( BaseVecT  pos)
pure virtual

Adds a vertex with the given position to the mesh.

The vertex is not connected to anything after calling this method. To add this vertex to a face, use addFace().

Returns
A handle to access the inserted vertex later.

Implemented in lvr2::HalfEdgeMesh< BaseVecT >.

◆ calcFaceArea()

template<typename BaseVecT>
BaseVecT::CoordType lvr2::BaseMesh< BaseVecT >::calcFaceArea ( FaceHandle  handle) const

Calc and return the area of the requested face.

◆ calcFaceCentroid()

template<typename BaseVecT>
BaseVecT lvr2::BaseMesh< BaseVecT >::calcFaceCentroid ( FaceHandle  handle) const

Calc and return the centroid of the requested face.

◆ collapseEdge()

template<typename BaseVecT>
virtual EdgeCollapseResult lvr2::BaseMesh< BaseVecT >::collapseEdge ( EdgeHandle  edgeH)
pure virtual

Merges the two vertices connected by the given edge.

If existing, the two neighboring faces or triangles without faces and their edges are removed and replaced by two new edges The vertices at the start and end of the given edge are removed and replaced by a new vertex at the center of the previous vertex positions

Returns
An EdgeCollapseResult that contains handles of the removed faces and edges and the new vertex and the new edges

Implemented in lvr2::HalfEdgeMesh< BaseVecT >.

◆ containsEdge()

template<typename BaseVecT>
virtual bool lvr2::BaseMesh< BaseVecT >::containsEdge ( EdgeHandle  vH) const
pure virtual

Checks if the given edge is part of this mesh.

Implemented in lvr2::HalfEdgeMesh< BaseVecT >.

◆ containsFace()

template<typename BaseVecT>
virtual bool lvr2::BaseMesh< BaseVecT >::containsFace ( FaceHandle  vH) const
pure virtual

Checks if the given face is part of this mesh.

Implemented in lvr2::HalfEdgeMesh< BaseVecT >.

◆ containsVertex()

template<typename BaseVecT>
virtual bool lvr2::BaseMesh< BaseVecT >::containsVertex ( VertexHandle  vH) const
pure virtual

Checks if the given vertex is part of this mesh.

Implemented in lvr2::HalfEdgeMesh< BaseVecT >.

◆ edges()

template<typename BaseVecT>
virtual EdgeIteratorProxy<BaseVecT> lvr2::BaseMesh< BaseVecT >::edges ( ) const
virtual

Method for usage in range-based for-loops.

Returns a simple proxy object that uses edgesBegin() and edgesEnd().

◆ edgesBegin()

template<typename BaseVecT>
virtual MeshHandleIteratorPtr<EdgeHandle> lvr2::BaseMesh< BaseVecT >::edgesBegin ( ) const
pure virtual

Returns an iterator to the first edge of this mesh.

Returns
When dereferenced, this iterator returns a handle to the current edge.

Implemented in lvr2::HalfEdgeMesh< BaseVecT >.

◆ edgesEnd()

template<typename BaseVecT>
virtual MeshHandleIteratorPtr<EdgeHandle> lvr2::BaseMesh< BaseVecT >::edgesEnd ( ) const
pure virtual

Returns an iterator to the element following the last edge of this mesh.

Implemented in lvr2::HalfEdgeMesh< BaseVecT >.

◆ faces()

template<typename BaseVecT>
virtual FaceIteratorProxy<BaseVecT> lvr2::BaseMesh< BaseVecT >::faces ( ) const
virtual

Method for usage in range-based for-loops.

Returns a simple proxy object that uses facesBegin() and facesEnd().

◆ facesBegin()

template<typename BaseVecT>
virtual MeshHandleIteratorPtr<FaceHandle> lvr2::BaseMesh< BaseVecT >::facesBegin ( ) const
pure virtual

Returns an iterator to the first face of this mesh.

Returns
When dereferenced, this iterator returns a handle to the current face.

Implemented in lvr2::HalfEdgeMesh< BaseVecT >.

◆ facesEnd()

template<typename BaseVecT>
virtual MeshHandleIteratorPtr<FaceHandle> lvr2::BaseMesh< BaseVecT >::facesEnd ( ) const
pure virtual

Returns an iterator to the element following the last face of this mesh.

Implemented in lvr2::HalfEdgeMesh< BaseVecT >.

◆ flipEdge()

template<typename BaseVecT>
virtual void lvr2::BaseMesh< BaseVecT >::flipEdge ( EdgeHandle  edgeH)
pure virtual

Performs the edge flip operation.

This operation turns an edge and the two adjacent faces within a four vertex region by 90°. The edge is now connected to two new vertices; the new edge would cross the old one.

Important: the given edge needs to be flippable. You can check that property with isFlippable(). If that property is not satisfied, this method will panic.

Note that while this method modifies connectivity information, it does not add or remove any elements. This implies that it doesn't invalidate any handles.

The user of this method has to pay attention to what edges to flip. It's easily possible to create unrealistic meshes with this method (things like zero volume and stuff like that). However, it doesn't destroy the mesh in itself or create non-manifold meshes.

Implemented in lvr2::HalfEdgeMesh< BaseVecT >.

◆ getEdgeBetween()

template<typename BaseVecT>
virtual OptionalEdgeHandle lvr2::BaseMesh< BaseVecT >::getEdgeBetween ( VertexHandle  aH,
VertexHandle  bH 
) const
virtual

If the two given vertices are connected by an edge, it is returned. None otherwise.

◆ getEdgesOfFace()

template<typename BaseVecT>
virtual std::array<EdgeHandle, 3> lvr2::BaseMesh< BaseVecT >::getEdgesOfFace ( FaceHandle  handle) const
pure virtual

Get the three edges surrounding the given face.

Returns
The edge-handles in counter-clockwise order.

Implemented in lvr2::HalfEdgeMesh< BaseVecT >.

◆ getEdgesOfVertex() [1/2]

template<typename BaseVecT>
virtual void lvr2::BaseMesh< BaseVecT >::getEdgesOfVertex ( VertexHandle  handle,
std::vector< EdgeHandle > &  edgesOut 
) const
pure virtual

Get a list of edges around the given vertex.

The face handles are written into the edgesOut vector. This is done to reduce the number of heap allocations if this method is called in a loop. If you are not calling it in a loop or can't, for some reason, take advantages of this method's signature, you can call the other overload of this method which just returns the vector. Such convenient.

Note: you probably should remember to clear() the vector before passing it into this method.

Parameters
edgesOutThe handles of the edges around handle will be written into this vector in clockwise order.

◆ getEdgesOfVertex() [2/2]

template<typename BaseVecT>
virtual std::vector<EdgeHandle> lvr2::BaseMesh< BaseVecT >::getEdgesOfVertex ( VertexHandle  handle) const
virtual

Get a list of edges around the given vertex.

This method is implemented using the pure virtual method getEdgesOfVertex(VertexHandle, vector<EdgeHandle>&). If you are calling this method in a loop, you should probably call the more manual method (with the out vector) to avoid useless heap allocations.

Returns
The edge-handles in counter-clockwise order.

◆ getFaceBetween()

template<typename BaseVecT>
virtual OptionalFaceHandle lvr2::BaseMesh< BaseVecT >::getFaceBetween ( VertexHandle  aH,
VertexHandle  bH,
VertexHandle  cH 
) const
virtual

If all vertices are part of one face, this face is returned. None otherwise.

The vertices don't have to be in a specific order. In particular, this method will find a face regardless of whether the vertices are given in clockwise or counter-clockwise order.

◆ getFacesOfEdge()

template<typename BaseVecT>
virtual std::array<OptionalFaceHandle, 2> lvr2::BaseMesh< BaseVecT >::getFacesOfEdge ( EdgeHandle  edgeH) const
pure virtual

Get the two faces of an edge.

The order of the faces is not specified

Implemented in lvr2::HalfEdgeMesh< BaseVecT >.

◆ getFacesOfVertex() [1/2]

template<typename BaseVecT>
virtual void lvr2::BaseMesh< BaseVecT >::getFacesOfVertex ( VertexHandle  handle,
std::vector< FaceHandle > &  facesOut 
) const
pure virtual

Get a list of faces the given vertex belongs to.

The face handles are written into the facesOut vector. This is done to reduce the number of heap allocations if this method is called in a loop. If you are not calling it in a loop or can't, for some reason, take advantages of this method's signature, you can call the other overload of this method which just returns the vector. Such convinient.

Note: you probably should remember to clear() the vector before passing it into this method.

Parameters
facesOutThe handles of the faces around handle will be written into this vector in clockwise order.

◆ getFacesOfVertex() [2/2]

template<typename BaseVecT>
virtual std::vector<FaceHandle> lvr2::BaseMesh< BaseVecT >::getFacesOfVertex ( VertexHandle  handle) const
virtual

Get a list of faces the given vertex belongs to.

This method is implemented using the pure virtual method getFacesOfVertex(VertexHandle, vector<FaceHandle>&). If you are calling this method in a loop, you should probably call the more manual method (with the out vector) to avoid useless heap allocations.

Returns
The face-handles in counter-clockwise order.

◆ getNeighboursOfFace() [1/2]

template<typename BaseVecT>
virtual void lvr2::BaseMesh< BaseVecT >::getNeighboursOfFace ( FaceHandle  handle,
std::vector< FaceHandle > &  facesOut 
) const
pure virtual

Get face handles of the neighbours of the requested face.

The face handles are written into the facesOut vector. This is done to reduce the number of heap allocations if this method is called in a loop. If you are not calling it in a loop or can't, for some reason, take advantages of this method's signature, you can call the other overload of this method which just returns the vector. Such convinient.

Note: you probably should remember to clear() the vector before passing it into this method.

Parameters
facesOutThe face-handles of the neighbours of handle will be written into this vector in counter-clockwise order. There are at most three neighbours of a face, so this method will push 0, 1, 2 or 3 handles to facesOut.

◆ getNeighboursOfFace() [2/2]

template<typename BaseVecT>
virtual std::vector<FaceHandle> lvr2::BaseMesh< BaseVecT >::getNeighboursOfFace ( FaceHandle  handle) const
virtual

Get face handles of the neighbours of the requested face.

This method is implemented using the pure virtual method getNeighboursOfFace(FaceHandle, vector<FaceHandle>&). If you are calling this method in a loop, you should probably call the more manual method (with the out vector) to avoid useless heap allocations.

Returns
The face-handles of the neighbours in counter-clockwise order.

◆ getNeighboursOfVertex() [1/2]

template<typename BaseVecT>
virtual void lvr2::BaseMesh< BaseVecT >::getNeighboursOfVertex ( VertexHandle  handle,
std::vector< VertexHandle > &  verticesOut 
) const
pure virtual

Get vertex handles of the neighbours of the requested vertex.

The vertex handles are written into the verticesOut vector. This is done to reduce the number of heap allocations if this method is called in a loop. If you are not calling it in a loop or can't, for some reason, take advantages of this method's signature, you can call the other overload of this method which just returns the vector. Such convenient.

Note: you probably should remember to clear() the vector before passing it into this method.

Parameters
verticesOutThe vertex-handles of the neighbours of handle will be written into this vector in clockwise order.

◆ getNeighboursOfVertex() [2/2]

template<typename BaseVecT>
virtual std::vector<VertexHandle> lvr2::BaseMesh< BaseVecT >::getNeighboursOfVertex ( VertexHandle  handle) const
virtual

Get a list of vertices around the given vertex.

This method is implemented using the pure virtual method getNeighboursOfVertex(VertexHandle, vector<EdgeHandle>&). If you are calling this method in a loop, you should probably call the more manual method (with the out vector) to avoid useless heap allocations.

Returns
The vertex-handles in clockwise order.

◆ getOppositeEdge()

template<typename BaseVecT>
virtual OptionalEdgeHandle lvr2::BaseMesh< BaseVecT >::getOppositeEdge ( FaceHandle  faceH,
VertexHandle  vertexH 
) const
pure virtual

Get the optional edge handle of the edge lying on the vertex's opposite site.

Parameters
faceHThe corresponding face handle
vertexHThe corresponding vertex handle
Returns
optional edge handle which lies on the faceH face on the opposite side of the vertexH vertex.

Implemented in lvr2::HalfEdgeMesh< BaseVecT >.

◆ getOppositeFace()

template<typename BaseVecT>
virtual OptionalFaceHandle lvr2::BaseMesh< BaseVecT >::getOppositeFace ( FaceHandle  faceH,
VertexHandle  vertexH 
) const
pure virtual

Get the optional face handle of the neighboring face lying on the vertex's opposite site.

Parameters
faceHThe corresponding face handle
vertexHThe corresponding vertex handle
Returns
optional face handle of the faceH neighboring face lying on the opposite side of the vertexH vertex.

Implemented in lvr2::HalfEdgeMesh< BaseVecT >.

◆ getOppositeVertex()

template<typename BaseVecT>
virtual OptionalVertexHandle lvr2::BaseMesh< BaseVecT >::getOppositeVertex ( FaceHandle  faceH,
EdgeHandle  edgeH 
) const
pure virtual

Get the optional vertex handle of the vertex lying on the edge's opposite site.

Parameters
faceHThe corresponding face handle
edgeHThe corresponding edge handle
Returns
optional vertex handle which lies on the faceH face on the opposite side of the edgeH edge.

Implemented in lvr2::HalfEdgeMesh< BaseVecT >.

◆ getVertexBetween()

template<typename BaseVecT>
virtual OptionalVertexHandle lvr2::BaseMesh< BaseVecT >::getVertexBetween ( EdgeHandle  aH,
EdgeHandle  bH 
) const
virtual

If the given edges share a vertex, it is returned. None otherwise.

◆ getVertexPosition() [1/2]

template<typename BaseVecT>
virtual BaseVecT lvr2::BaseMesh< BaseVecT >::getVertexPosition ( VertexHandle  handle) const
pure virtual

Get the position of the given vertex.

Implemented in lvr2::HalfEdgeMesh< BaseVecT >.

◆ getVertexPosition() [2/2]

template<typename BaseVecT>
virtual BaseVecT& lvr2::BaseMesh< BaseVecT >::getVertexPosition ( VertexHandle  handle)
pure virtual

Get a ref to the position of the given vertex.

Implemented in lvr2::HalfEdgeMesh< BaseVecT >.

◆ getVertexPositionsOfFace()

template<typename BaseVecT>
virtual std::array<BaseVecT, 3> lvr2::BaseMesh< BaseVecT >::getVertexPositionsOfFace ( FaceHandle  handle) const
virtual

Get the points of the requested face.

Returns
The points of the vertices in counter-clockwise order.

◆ getVerticesOfEdge()

template<typename BaseVecT>
virtual std::array<VertexHandle, 2> lvr2::BaseMesh< BaseVecT >::getVerticesOfEdge ( EdgeHandle  edgeH) const
pure virtual

Get the two vertices of an edge.

The order of the vertices is not specified

Implemented in lvr2::HalfEdgeMesh< BaseVecT >.

◆ getVerticesOfFace()

template<typename BaseVecT>
virtual std::array<VertexHandle, 3> lvr2::BaseMesh< BaseVecT >::getVerticesOfFace ( FaceHandle  handle) const
pure virtual

Get the three vertices surrounding the given face.

Returns
The vertex-handles in counter-clockwise order.

Implemented in lvr2::HalfEdgeMesh< BaseVecT >.

◆ isBorderEdge()

template<typename BaseVecT>
virtual bool lvr2::BaseMesh< BaseVecT >::isBorderEdge ( EdgeHandle  handle) const
pure virtual

Determines wheter the given edge is an border edge, i.e., if it is connected to two faces or not.

Implemented in lvr2::HalfEdgeMesh< BaseVecT >.

◆ isCollapsable()

template<typename BaseVecT>
virtual bool lvr2::BaseMesh< BaseVecT >::isCollapsable ( EdgeHandle  handle) const
virtual

Determines whether or not an edge collapse of the given edge is possible without creating invalid meshes.

For example, an edge collapse can create non-manifold meshes in some situations. Thus, those collapses are not allowed and collapseEdge() will panic if called with a non-collapsable edge.

◆ isFaceInsertionValid()

template<typename BaseVecT>
virtual bool lvr2::BaseMesh< BaseVecT >::isFaceInsertionValid ( VertexHandle  v1,
VertexHandle  v2,
VertexHandle  v3 
) const
virtual

Check whether or not inserting a face between the given vertices would be valid.

Adding a face is invalid if it destroys the mesh in any kind, like making it non-manifold, non-orientable or something similar. But there are other reasons for invalidity as well, like: there is already a face connecting the given vertices.

Note that the given vertices have to be in front-face counter-clockwise order, just as with addFace(). See addFace() for more information about this.

◆ isFlippable()

template<typename BaseVecT>
virtual bool lvr2::BaseMesh< BaseVecT >::isFlippable ( EdgeHandle  handle) const
virtual

Determines whether or not the given edge can be flipped without destroying the mesh.

The mesh could be destroyed by invalidating mesh connectivity information or by making it non-manifold.

Reimplemented in lvr2::HalfEdgeMesh< BaseVecT >.

◆ nextEdgeIndex()

template<typename BaseVecT>
virtual Index lvr2::BaseMesh< BaseVecT >::nextEdgeIndex ( ) const
pure virtual

Returns the handle index which would be assigned to the next edge that is created. This method is mainly useful for manually iterating over all possible handles. As handles are strictly increasing, all edges currently in this mesh have a handle index smaller than what this method returns.

Implemented in lvr2::HalfEdgeMesh< BaseVecT >.

◆ nextFaceIndex()

template<typename BaseVecT>
virtual Index lvr2::BaseMesh< BaseVecT >::nextFaceIndex ( ) const
pure virtual

Returns the handle index which would be assigned to the next face that is created. This method is mainly useful for manually iterating over all possible handles. As handles are strictly increasing, all faces currently in this mesh have a handle index smaller than what this method returns.

Implemented in lvr2::HalfEdgeMesh< BaseVecT >.

◆ nextVertexIndex()

template<typename BaseVecT>
virtual Index lvr2::BaseMesh< BaseVecT >::nextVertexIndex ( ) const
pure virtual

Returns the handle index which would be assigned to the next vertex that is created. This method is mainly useful for manually iterating over all possible handles. As handles are strictly increasing, all vertices currently in this mesh have a handle index smaller than what this method returns.

Implemented in lvr2::HalfEdgeMesh< BaseVecT >.

◆ numAdjacentFaces()

template<typename BaseVecT>
virtual uint8_t lvr2::BaseMesh< BaseVecT >::numAdjacentFaces ( EdgeHandle  handle) const
virtual

Returns the number of adjacent faces to the given edge.

This functions always returns one of 0, 1 or 2.

◆ numEdges()

template<typename BaseVecT>
virtual size_t lvr2::BaseMesh< BaseVecT >::numEdges ( ) const
pure virtual

Returns the number of edges in the mesh.

Implemented in lvr2::HalfEdgeMesh< BaseVecT >.

◆ numFaces()

template<typename BaseVecT>
virtual size_t lvr2::BaseMesh< BaseVecT >::numFaces ( ) const
pure virtual

Returns the number of faces in the mesh.

Implemented in lvr2::HalfEdgeMesh< BaseVecT >.

◆ numVertices()

template<typename BaseVecT>
virtual size_t lvr2::BaseMesh< BaseVecT >::numVertices ( ) const
pure virtual

Returns the number of vertices in the mesh.

Implemented in lvr2::HalfEdgeMesh< BaseVecT >.

◆ removeFace()

template<typename BaseVecT>
virtual void lvr2::BaseMesh< BaseVecT >::removeFace ( FaceHandle  handle)
pure virtual

Removes the given face and all (if not connected to any other face/edge/vertex) connected edges and vertices.

Implemented in lvr2::HalfEdgeMesh< BaseVecT >.

◆ vertices()

template<typename BaseVecT>
virtual VertexIteratorProxy<BaseVecT> lvr2::BaseMesh< BaseVecT >::vertices ( ) const
virtual

Method for usage in range-based for-loops.

Returns a simple proxy object that uses verticesBegin() and verticesEnd().

◆ verticesBegin()

template<typename BaseVecT>
virtual MeshHandleIteratorPtr<VertexHandle> lvr2::BaseMesh< BaseVecT >::verticesBegin ( ) const
pure virtual

Returns an iterator to the first vertex of this mesh.

Returns
When dereferenced, this iterator returns a handle to the current vertex.

Implemented in lvr2::HalfEdgeMesh< BaseVecT >.

◆ verticesEnd()

template<typename BaseVecT>
virtual MeshHandleIteratorPtr<VertexHandle> lvr2::BaseMesh< BaseVecT >::verticesEnd ( ) const
pure virtual

Returns an iterator to the element following the last vertex of this mesh.

Implemented in lvr2::HalfEdgeMesh< BaseVecT >.


The documentation for this class was generated from the following file:


lvr2
Author(s): Thomas Wiemann , Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Mon Feb 28 2022 22:46:11