Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenVolumeMesh
OpenVolumeMesh
Commits
22cb65e4
Commit
22cb65e4
authored
Feb 15, 2018
by
Janis Born
Browse files
rename swap_*s methods to swap_*_indices and make the public
parent
5a0ceeb4
Pipeline
#6217
passed with stage
in 4 minutes and 7 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/OpenVolumeMesh/Core/GeometryKernel.hh
View file @
22cb65e4
...
...
@@ -124,7 +124,7 @@ public:
}
virtual
void
swap_vertices
(
VertexHandle
_h1
,
VertexHandle
_h2
)
virtual
void
swap_vert
ex_ind
ices
(
VertexHandle
_h1
,
VertexHandle
_h2
)
{
assert
(
_h1
.
idx
()
>=
0
&&
_h1
.
idx
()
<
(
int
)
vertices_
.
size
());
assert
(
_h2
.
idx
()
>=
0
&&
_h2
.
idx
()
<
(
int
)
vertices_
.
size
());
...
...
@@ -134,7 +134,7 @@ public:
std
::
swap
(
vertices_
[
_h1
.
idx
()],
vertices_
[
_h2
.
idx
()]);
TopologyKernelT
::
swap_vertices
(
_h1
,
_h2
);
TopologyKernelT
::
swap_vert
ex_ind
ices
(
_h1
,
_h2
);
}
protected:
...
...
src/OpenVolumeMesh/Core/TopologyKernel.cc
View file @
22cb65e4
...
...
@@ -916,7 +916,7 @@ VertexIter TopologyKernel::delete_vertex_core(const VertexHandle& _h) {
{
VertexHandle
last_undeleted_vertex
=
VertexHandle
((
int
)
n_vertices
()
-
1
);
assert
(
!
vertex_deleted_
[
last_undeleted_vertex
.
idx
()]);
swap_vertices
(
h
,
last_undeleted_vertex
);
swap_vert
ex_ind
ices
(
h
,
last_undeleted_vertex
);
h
=
last_undeleted_vertex
;
}
...
...
@@ -1022,7 +1022,7 @@ EdgeIter TopologyKernel::delete_edge_core(const EdgeHandle& _h) {
{
EdgeHandle
last_edge
=
EdgeHandle
((
int
)
edges_
.
size
()
-
1
);
assert
(
!
edge_deleted_
[
last_edge
.
idx
()]);
swap_edges
(
h
,
last_edge
);
swap_edge
_indice
s
(
h
,
last_edge
);
h
=
last_edge
;
}
...
...
@@ -1207,7 +1207,7 @@ FaceIter TopologyKernel::delete_face_core(const FaceHandle& _h) {
{
FaceHandle
last_face
=
FaceHandle
((
int
)
faces_
.
size
()
-
1
);
assert
(
!
face_deleted_
[
last_face
.
idx
()]);
swap_faces
(
h
,
last_face
);
swap_face
_indice
s
(
h
,
last_face
);
h
=
last_face
;
}
...
...
@@ -1376,7 +1376,7 @@ CellIter TopologyKernel::delete_cell_core(const CellHandle& _h) {
{
CellHandle
last_undeleted_cell
=
CellHandle
((
int
)
cells_
.
size
()
-
1
);
assert
(
!
cell_deleted_
[
last_undeleted_cell
.
idx
()]);
swap_cells
(
h
,
last_undeleted_cell
);
swap_cell
_indice
s
(
h
,
last_undeleted_cell
);
h
=
last_undeleted_cell
;
}
...
...
@@ -1435,7 +1435,7 @@ CellIter TopologyKernel::delete_cell_core(const CellHandle& _h) {
}
}
void
TopologyKernel
::
swap_cells
(
CellHandle
_h1
,
CellHandle
_h2
)
void
TopologyKernel
::
swap_cell
_indice
s
(
CellHandle
_h1
,
CellHandle
_h2
)
{
assert
(
_h1
.
idx
()
>=
0
&&
_h1
.
idx
()
<
(
int
)
cells_
.
size
());
assert
(
_h2
.
idx
()
>=
0
&&
_h2
.
idx
()
<
(
int
)
cells_
.
size
());
...
...
@@ -1474,7 +1474,7 @@ void TopologyKernel::swap_cells(CellHandle _h1, CellHandle _h2)
swap_cell_properties
(
_h1
,
_h2
);
}
void
TopologyKernel
::
swap_faces
(
FaceHandle
_h1
,
FaceHandle
_h2
)
void
TopologyKernel
::
swap_face
_indice
s
(
FaceHandle
_h1
,
FaceHandle
_h2
)
{
assert
(
_h1
.
idx
()
>=
0
&&
_h1
.
idx
()
<
(
int
)
faces_
.
size
());
assert
(
_h2
.
idx
()
>=
0
&&
_h2
.
idx
()
<
(
int
)
faces_
.
size
());
...
...
@@ -1615,7 +1615,7 @@ void TopologyKernel::swap_faces(FaceHandle _h1, FaceHandle _h2)
}
void
TopologyKernel
::
swap_edges
(
EdgeHandle
_h1
,
EdgeHandle
_h2
)
void
TopologyKernel
::
swap_edge
_indice
s
(
EdgeHandle
_h1
,
EdgeHandle
_h2
)
{
assert
(
_h1
.
idx
()
>=
0
&&
_h1
.
idx
()
<
(
int
)
edges_
.
size
());
assert
(
_h2
.
idx
()
>=
0
&&
_h2
.
idx
()
<
(
int
)
edges_
.
size
());
...
...
@@ -1753,7 +1753,7 @@ void TopologyKernel::swap_edges(EdgeHandle _h1, EdgeHandle _h2)
}
void
TopologyKernel
::
swap_vertices
(
VertexHandle
_h1
,
VertexHandle
_h2
)
void
TopologyKernel
::
swap_vert
ex_ind
ices
(
VertexHandle
_h1
,
VertexHandle
_h2
)
{
assert
(
_h1
.
idx
()
>=
0
&&
_h1
.
idx
()
<
(
int
)
n_vertices_
);
assert
(
_h2
.
idx
()
>=
0
&&
_h2
.
idx
()
<
(
int
)
n_vertices_
);
...
...
src/OpenVolumeMesh/Core/TopologyKernel.hh
View file @
22cb65e4
...
...
@@ -522,15 +522,21 @@ private:
CellIter
delete_cell_core
(
const
CellHandle
&
_h
);
p
rotected
:
p
ublic
:
virtual
void
swap_cells
(
CellHandle
_h1
,
CellHandle
_h2
);
/// Exchanges the indices of two cells while keeping the mesh otherwise unaffected.
virtual
void
swap_cell_indices
(
CellHandle
_h1
,
CellHandle
_h2
);
virtual
void
swap_faces
(
FaceHandle
_h1
,
FaceHandle
_h2
);
/// Exchanges the indices of two faces while keeping the mesh otherwise unaffected.
virtual
void
swap_face_indices
(
FaceHandle
_h1
,
FaceHandle
_h2
);
virtual
void
swap_edges
(
EdgeHandle
_h1
,
EdgeHandle
_h2
);
/// Exchanges the indices of two edges while keeping the mesh otherwise unaffected.
virtual
void
swap_edge_indices
(
EdgeHandle
_h1
,
EdgeHandle
_h2
);
virtual
void
swap_vertices
(
VertexHandle
_h1
,
VertexHandle
_h2
);
/// Exchanges the indices of two vertices while keeping the mesh otherwise unaffected.
virtual
void
swap_vertex_indices
(
VertexHandle
_h1
,
VertexHandle
_h2
);
protected:
virtual
void
delete_multiple_vertices
(
const
std
::
vector
<
bool
>&
_tag
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment