TriConnectivity: Added two functions split_edge and split_edge_copy to mask the PolyConnectivity functions of the same name (Prevents creation of valence 2 vertices on trimeshes)

closes #51
This commit is contained in:
Jan Möbius
2018-06-19 09:04:51 +02:00
parent e5e82e5ff2
commit b0ece67d46
2 changed files with 43 additions and 4 deletions

View File

@@ -162,11 +162,28 @@ public:
*
* \note The properties of the new edges, halfedges, and faces will be undefined!
*
* @param _eh Edge handle that should be splitted
* @param _eh Edge handle that should be split
* @param _vh Vertex handle that will be inserted at the edge
*/
void split(EdgeHandle _eh, VertexHandle _vh);
/** \brief Edge split (= 2-to-4 split)
*
*
* The function will introduce two new faces ( non-boundary case) or
* one additional face (if edge is boundary)
*
* \note The properties of the new edges, halfedges, and faces will be undefined!
*
* \note This is an override to prevent a direct call to PolyConnectivity split_edge,
* which would introduce a singular vertex with valence 2 which is not allowed
* on TriMeshes
*
* @param _eh Edge handle that should be split
* @param _vh Vertex handle that will be inserted at the edge
*/
inline void split_edge(EdgeHandle _eh, VertexHandle _vh) { TriConnectivity::split(_eh, _vh); }
/** \brief Edge split (= 2-to-4 split)
*
* The function will introduce two new faces ( non-boundary case) or
@@ -175,14 +192,31 @@ public:
* \note The properties of the new edges will be adjusted to the properties of the original edge
* \note The properties of the new faces and halfedges will be undefined
*
* @param _eh Edge handle that should be splitted
* @param _eh Edge handle that should be split
* @param _vh Vertex handle that will be inserted at the edge
*/
void split_copy(EdgeHandle _eh, VertexHandle _vh);
/** \brief Edge split (= 2-to-4 split)
*
* The function will introduce two new faces ( non-boundary case) or
* one additional face (if edge is boundary)
*
* \note The properties of the new edges will be adjusted to the properties of the original edge
* \note The properties of the new faces and halfedges will be undefined
*
* \note This is an override to prevent a direct call to PolyConnectivity split_edge_copy,
* which would introduce a singular vertex with valence 2 which is not allowed
* on TriMeshes
*
* @param _eh Edge handle that should be split
* @param _vh Vertex handle that will be inserted at the edge
*/
inline void split_edge_copy(EdgeHandle _eh, VertexHandle _vh) { TriConnectivity::split_copy(_eh, _vh); }
/** \brief Face split (= 1-to-3) split, calls corresponding PolyMeshT function).
*
* @param _fh Face handle that should be splitted
* @param _fh Face handle that should be split
* @param _vh Vertex handle that will be inserted at the face
*/
inline void split(FaceHandle _fh, VertexHandle _vh)
@@ -190,7 +224,7 @@ public:
/** \brief Face split (= 1-to-3) split, calls corresponding PolyMeshT function).
*
* @param _fh Face handle that should be splitted
* @param _fh Face handle that should be split
* @param _vh Vertex handle that will be inserted at the face
*/
inline void split_copy(FaceHandle _fh, VertexHandle _vh)