50 #include "OpenVolumeMeshHandle.hh" 62 typedef std::bidirectional_iterator_tag iterator_category;
63 typedef int difference_type;
64 typedef const OH value_type;
65 typedef const OH* pointer;
66 typedef const OH& reference;
70 valid_(
true), cur_handle_(_ch), mesh_(_mesh) {}
73 valid_(
true), mesh_(_mesh) {}
79 return (this->cur_handle_ == _c.cur_handle() &&
80 this->valid_ == _c.valid() &&
81 this->mesh_ == _c.mesh());
84 return !this->operator==(_c);
87 pointer operator->()
const {
91 reference operator*()
const {
96 return cur_handle_.idx() < _c.cur_handle_.idx();
100 this->valid_ = _c.valid();
101 this->cur_handle_ = _c.cur_handle();
102 this->mesh_ = _c.mesh();
106 operator bool()
const {
110 void valid(
bool _valid) {
116 void cur_handle(
const OH& _h) {
119 reference cur_handle()
const {
134 #if __cplusplus >= 201103L || _MSC_VER >= 1800 // an older MSVC version might be sufficient, didn't test 136 #include <type_traits> 139 using is_ovm_iterator = std::is_base_of<BaseIterator<typename std::remove_const<typename I::value_type>::type>, I>;
144 typename std::enable_if<is_ovm_iterator<I>::value, I>::type
145 begin(
const std::pair<I, I>& iterpair)
147 return iterpair.first;
151 typename std::enable_if<is_ovm_iterator<I>::value, I>::type
152 end(
const std::pair<I, I>& iterpair)
154 return iterpair.second;
168 BaseIter(_mesh, _oh),
170 max_laps_(_max_laps),
175 BaseIter(_mesh, OH()),
177 max_laps_(_max_laps),
191 return (BaseIter::operator==(_c) &&
192 this->lap() == _c.lap() &&
193 this->ref_handle() == _c.ref_handle());
196 return !this->operator==(_c);
201 return BaseIter::operator<(_c);
203 return lap_ < _c.lap_;
207 BaseIter::operator=(_c);
208 this->ref_handle_ = _c.ref_handle();
209 this->lap_ = _c.lap_;
210 this->max_laps_ = _c.max_laps_;
214 const IH& ref_handle()
const {
225 void max_laps(
int _max_laps) {
226 max_laps_ = _max_laps;
228 int max_laps()
const {
267 for(
int i = 0; i < _n; ++i) {
274 for(
int i = 0; i < _n; ++i) {
280 for(
int i = 0; i < _n; ++i) {
286 for(
int i = 0; i < _n; ++i) {
330 for(
int i = 0; i < _n; ++i) {
337 for(
int i = 0; i < _n; ++i) {
343 for(
int i = 0; i < _n; ++i) {
349 for(
int i = 0; i < _n; ++i) {
389 for(
int i = 0; i < _n; ++i) {
396 for(
int i = 0; i < _n; ++i) {
402 for(
int i = 0; i < _n; ++i) {
408 for(
int i = 0; i < _n; ++i) {
446 for(
int i = 0; i < _n; ++i) {
453 for(
int i = 0; i < _n; ++i) {
459 for(
int i = 0; i < _n; ++i) {
465 for(
int i = 0; i < _n; ++i) {
475 std::vector<FaceHandle> faces_;
504 for(
int i = 0; i < _n; ++i) {
511 for(
int i = 0; i < _n; ++i) {
517 for(
int i = 0; i < _n; ++i) {
523 for(
int i = 0; i < _n; ++i) {
533 std::vector<CellHandle> cells_;
561 for(
int i = 0; i < _n; ++i) {
568 for(
int i = 0; i < _n; ++i) {
574 for(
int i = 0; i < _n; ++i) {
580 for(
int i = 0; i < _n; ++i) {
590 CellHandle getCellHandle(
int _cur_index)
const;
593 std::vector<CellHandle> cells_;
622 for(
int i = 0; i < _n; ++i) {
629 for(
int i = 0; i < _n; ++i) {
635 for(
int i = 0; i < _n; ++i) {
641 for(
int i = 0; i < _n; ++i) {
651 std::vector<VertexHandle> incident_vertices_;
680 for(
int i = 0; i < _n; ++i) {
687 for(
int i = 0; i < _n; ++i) {
693 for(
int i = 0; i < _n; ++i) {
699 for(
int i = 0; i < _n; ++i) {
709 std::vector<CellHandle> adjacent_cells_;
738 for(
int i = 0; i < _n; ++i) {
745 for(
int i = 0; i < _n; ++i) {
751 for(
int i = 0; i < _n; ++i) {
757 for(
int i = 0; i < _n; ++i) {
767 std::vector<VertexHandle> vertices_;
795 for(
int i = 0; i < _n; ++i) {
802 for(
int i = 0; i < _n; ++i) {
808 for(
int i = 0; i < _n; ++i) {
814 for(
int i = 0; i < _n; ++i) {
820 const EdgeHandle& common_edge()
const {
return common_edges_[cur_index_]; }
826 std::vector<HalfFaceHandle> neighbor_halffaces_;
827 std::vector<EdgeHandle> common_edges_;
853 for(
int i = 0; i < _n; ++i) {
860 for(
int i = 0; i < _n; ++i) {
866 for(
int i = 0; i < _n; ++i) {
872 for(
int i = 0; i < _n; ++i) {
907 for(
int i = 0; i < _n; ++i) {
914 for(
int i = 0; i < _n; ++i) {
920 for(
int i = 0; i < _n; ++i) {
926 for(
int i = 0; i < _n; ++i) {
961 for(
int i = 0; i < _n; ++i) {
968 for(
int i = 0; i < _n; ++i) {
974 for(
int i = 0; i < _n; ++i) {
980 for(
int i = 0; i < _n; ++i) {
1015 for(
int i = 0; i < _n; ++i) {
1022 for(
int i = 0; i < _n; ++i) {
1028 for(
int i = 0; i < _n; ++i) {
1034 for(
int i = 0; i < _n; ++i) {
1069 for(
int i = 0; i < _n; ++i) {
1076 for(
int i = 0; i < _n; ++i) {
1082 for(
int i = 0; i < _n; ++i) {
1088 for(
int i = 0; i < _n; ++i) {
1123 for(
int i = 0; i < _n; ++i) {
1130 for(
int i = 0; i < _n; ++i) {
1136 for(
int i = 0; i < _n; ++i) {
1142 for(
int i = 0; i < _n; ++i) {
1177 for(
int i = 0; i < _n; ++i) {
1184 for(
int i = 0; i < _n; ++i) {
1190 for(
int i = 0; i < _n; ++i) {
1196 for(
int i = 0; i < _n; ++i) {