bitrl & cuberl Documentation
Simulation engine for reinforcement learning agents
Loading...
Searching...
No Matches
face_mesh_iterator.h
Go to the documentation of this file.
1#ifndef FACE_MESH_ITERATOR_H
2#define FACE_MESH_ITERATOR_H
3
5
6namespace bitrl
7{
8namespace utils
9{
10namespace geom
11{
12
13template <typename Predicate, typename MeshTp> class FaceMeshIterator;
14
16template <typename Predicate, typename MeshTp> class FaceMeshIterator
17{
18 public:
20 typedef MeshTp mesh_t;
21 typedef typename mesh_t::face_iterator_impl iterator_impl;
24
27
30
32 result_t end();
33
34 protected:
35 // the mesh over which the iterator is working
37};
38
39template <typename Predicate, typename MeshTp>
45
46template <typename Predicate, typename MeshTp>
52
53template <typename Predicate, typename MeshTp>
59
61template <typename Predicate, typename MeshTp> class ConstFaceMeshIterator
62{
63 public:
65 typedef MeshTp mesh_t;
66 typedef typename mesh_t::cface_iterator_impl iterator_impl;
69
72
74 result_t begin() const;
75
77 result_t end() const;
78
79 protected:
80 // the mesh over which the iterator is working
81 const mesh_t &mesh_;
82};
83
84template <typename Predicate, typename MeshTp>
90
91template <typename Predicate, typename MeshTp>
94{
95 Predicate p;
96 return ConstFaceMeshIterator<Predicate, MeshTp>::result_t(p, mesh_.faces_begin(),
97 mesh_.faces_end());
98}
99
100template <typename Predicate, typename MeshTp>
103{
104 Predicate p;
105 return ConstFaceMeshIterator<Predicate, MeshTp>::result_t(p, mesh_.faces_end(),
106 mesh_.faces_end());
107}
108
109} // namespace geom
110} // namespace utils
111} // namespace bitrl
112
113#endif // FACE_MESH_ITERATOR_H
Simple wrapper to boost::filter_iterator.
Definition filtered_iterator.h:13
iterator_t::value_type value_type
Definition filtered_iterator.h:19
The general template.
Definition face_mesh_iterator.h:62
ConstFaceMeshIterator(const mesh_t &mesh)
constructor
Definition face_mesh_iterator.h:85
result_t begin() const
begin the iteration
Definition face_mesh_iterator.h:93
result_t end() const
end the iteration
Definition face_mesh_iterator.h:102
mesh_t::cface_iterator_impl iterator_impl
Definition face_mesh_iterator.h:66
FilteredIterator< Predicate, iterator_impl > result_t
Definition face_mesh_iterator.h:68
MeshTp mesh_t
Definition face_mesh_iterator.h:65
FilteredIterator< Predicate, iterator_impl >::value_type value_type
Definition face_mesh_iterator.h:67
Predicate predicate_t
Definition face_mesh_iterator.h:64
const mesh_t & mesh_
Definition face_mesh_iterator.h:81
The general template.
Definition face_mesh_iterator.h:17
MeshTp mesh_t
Definition face_mesh_iterator.h:20
result_t begin()
begin the iteration
Definition face_mesh_iterator.h:47
FilteredIterator< Predicate, iterator_impl >::value_type value_type
Definition face_mesh_iterator.h:22
FilteredIterator< Predicate, iterator_impl > result_t
Definition face_mesh_iterator.h:23
mesh_t & mesh_
Definition face_mesh_iterator.h:36
mesh_t::face_iterator_impl iterator_impl
Definition face_mesh_iterator.h:21
FaceMeshIterator(mesh_t &mesh)
constructor
Definition face_mesh_iterator.h:40
result_t end()
end the iteration
Definition face_mesh_iterator.h:54
Predicate predicate_t
Definition face_mesh_iterator.h:19
OutT resolve(const std::string &name, const std::map< std::string, std::any > &input)
Definition std_map_utils.h:25
Definition bitrl_consts.h:14