Developer Documentation
Loading...
Searching...
No Matches
TetrahedralMeshIterators.hh
1
#pragma once
2
/*===========================================================================*\
3
* *
4
* OpenVolumeMesh *
5
* Copyright (C) 2011 by Computer Graphics Group, RWTH Aachen *
6
* www.openvolumemesh.org *
7
* *
8
*---------------------------------------------------------------------------*
9
* This file is part of OpenVolumeMesh. *
10
* *
11
* OpenVolumeMesh is free software: you can redistribute it and/or modify *
12
* it under the terms of the GNU Lesser General Public License as *
13
* published by the Free Software Foundation, either version 3 of *
14
* the License, or (at your option) any later version with the *
15
* following exceptions: *
16
* *
17
* If other files instantiate templates or use macros *
18
* or inline functions from this file, or you compile this file and *
19
* link it with other files to produce an executable, this file does *
20
* not by itself cause the resulting executable to be covered by the *
21
* GNU Lesser General Public License. This exception does not however *
22
* invalidate any other reasons why the executable file might be *
23
* covered by the GNU Lesser General Public License. *
24
* *
25
* OpenVolumeMesh is distributed in the hope that it will be useful, *
26
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
27
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
28
* GNU Lesser General Public License for more details. *
29
* *
30
* You should have received a copy of the GNU LesserGeneral Public *
31
* License along with OpenVolumeMesh. If not, *
32
* see <http://www.gnu.org/licenses/>. *
33
* *
34
\*===========================================================================*/
35
36
#include <OpenVolumeMesh/Core/Iterators.hh>
37
#include <OpenVolumeMesh/Config/Export.hh>
38
39
#include <array>
40
41
namespace
OpenVolumeMesh {
42
43
class
TetrahedralMeshTopologyKernel;
44
45
52
class
OVM_EXPORT
TetVertexIter
:
public
BaseCirculator
<CellHandle,
53
VertexHandle> {
54
private
:
55
typedef
BaseCirculator
<
CellHandle
,
56
VertexHandle
>
BaseIter
;
57
public
:
58
TetVertexIter
(
CellHandle
_ref_h,
59
const
TetrahedralMeshTopologyKernel
* _mesh,
60
int
_max_laps = 1);
61
62
// Post increment/decrement operator
63
TetVertexIter
operator++(
int
) {
64
TetVertexIter
cpy = *
this
;
65
++(*this);
66
return
cpy;
67
}
68
TetVertexIter
operator--(
int
) {
69
TetVertexIter
cpy = *
this
;
70
--(*this);
71
return
cpy;
72
}
73
TetVertexIter
operator+(
int
_n) {
74
TetVertexIter
cpy = *
this
;
75
for
(
int
i = 0; i < _n; ++i) {
76
++cpy;
77
}
78
return
cpy;
79
}
80
TetVertexIter
operator-(
int
_n) {
81
TetVertexIter
cpy = *
this
;
82
for
(
int
i = 0; i < _n; ++i) {
83
--cpy;
84
}
85
return
cpy;
86
}
87
TetVertexIter
& operator+=(
int
_n) {
88
for
(
int
i = 0; i < _n; ++i) {
89
++(*this);
90
}
91
return
*
this
;
92
}
93
TetVertexIter
& operator-=(
int
_n) {
94
for
(
int
i = 0; i < _n; ++i) {
95
--(*this);
96
}
97
return
*
this
;
98
}
99
100
TetVertexIter
& operator++();
101
TetVertexIter
& operator--();
102
103
private
:
104
std::array<VertexHandle, 4> vertices_;
105
size_t
cur_index_;
106
};
107
108
}
// Namespace OpenVolumeMesh
OpenVolumeMesh::BaseCirculator
Definition
BaseCirculator.hh:10
OpenVolumeMesh::CH
Definition
Handles.hh:202
OpenVolumeMesh::TetVertexIter
Iterate over all vertices of a hexahedron in a specific order.
Definition
TetrahedralMeshIterators.hh:53
OpenVolumeMesh::TetrahedralMeshTopologyKernel
A data structure based on PolyhedralMesh with specializations for tetrahedra.
Definition
TetrahedralMeshTopologyKernel.hh:55
OpenVolumeMesh::VH
Definition
Handles.hh:156
Type-OpenVolumeMesh
libs
OpenVolumeMesh
src
OpenVolumeMesh
Mesh
TetrahedralMeshIterators.hh
Generated on Wed Jul 16 2025 14:44:36 for Developer Documentation by
1.9.8