SLIP  1.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
iterator3d_plane.hpp
Go to the documentation of this file.
1 /*
2  * Copyright(c):
3  * Signal Image and Communications (SIC) Department
4  * http://www.sic.sp2mi.univ-poitiers.fr/
5  * - University of Poitiers, France http://www.univ-poitiers.fr
6  * - XLIM Institute UMR CNRS 7252 http://www.xlim.fr/
7  *
8  * and
9  *
10  * D2 Fluid, Thermic and Combustion
11  * - University of Poitiers, France http://www.univ-poitiers.fr
12  * - PPRIME Institute - UPR CNRS 3346 http://www.pprime.fr
13  * - ISAE-ENSMA http://www.ensma.fr
14  *
15  * Contributor(s):
16  * The SLIP team,
17  * Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>,
18  * Laurent David <laurent.david_AT_lea.univ-poitiers.fr>,
19  * Ludovic Chatellier <ludovic.chatellier_AT_univ-poitiers.fr>,
20  * Lionel Thomas <lionel.thomas_AT_univ-poitiers.fr>,
21  * Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr>,
22  * Julien Dombre <julien.dombre_AT_univ-poitiers.fr>.
23  *
24  * Description:
25  * The Simple Library of Image Processing (SLIP) is a new image processing
26  * library. It is written in the C++ language following as much as possible
27  * the ISO/ANSI C++ standard. It is consequently compatible with any system
28  * satisfying the ANSI C++ complience. It works on different Unix , Linux ,
29  * Mircrosoft Windows and Mac OS X plateforms. SLIP is a research library that
30  * was created by the Signal, Image and Communications (SIC) departement of
31  * the XLIM, UMR 7252 CNRS Institute in collaboration with the Fluids, Thermic
32  * and Combustion departement of the P', UPR 3346 CNRS Institute of the
33  * University of Poitiers.
34  *
35  * The SLIP Library source code has been registered to the APP (French Agency
36  * for the Protection of Programs) by the University of Poitiers and CNRS,
37  * under registration number IDDN.FR.001.300034.000.S.P.2010.000.21000.
38 
39  * http://www.sic.sp2mi.univ-poitiers.fr/slip/
40  *
41  * This software is governed by the CeCILL-C license under French law and
42  * abiding by the rules of distribution of free software. You can use,
43  * modify and/ or redistribute the software under the terms of the CeCILL-C
44  * license as circulated by CEA, CNRS and INRIA at the following URL
45  * http://www.cecill.info.
46  * As a counterpart to the access to the source code and rights to copy,
47  * modify and redistribute granted by the license, users are provided only
48  * with a limited warranty and the software's author, the holder of the
49  * economic rights, and the successive licensors have only limited
50  * liability.
51  *
52  * In this respect, the user's attention is drawn to the risks associated
53  * with loading, using, modifying and/or developing or reproducing the
54  * software by the user in light of its specific status of free software,
55  * that may mean that it is complicated to manipulate, and that also
56  * therefore means that it is reserved for developers and experienced
57  * professionals having in-depth computer knowledge. Users are therefore
58  * encouraged to load and test the software's suitability as regards their
59  * requirements in conditions enabling the security of their systems and/or
60  * data to be ensured and, more generally, to use and operate it in the
61  * same conditions as regards security.
62  *
63  * The fact that you are presently reading this means that you have had
64  * knowledge of the CeCILL-C license and that you accept its terms.
65  */
66 
67 
74 #ifndef SLIP_ITERATOR3D_PLANE_HPP
75 #define SLIP_ITERATOR3D_PLANE_HPP
76 
77 #include <iterator>
78 #include <cassert>
79 #include "DPoint.hpp"
80 #include "Point2d.hpp"
81 #include "DPoint2d.hpp"
82 #include "Box2d.hpp"
83 #include "Box3d.hpp"
84 #include "iterator_types.hpp"
85 
86 namespace slip
87 {
110  {
111  IJ_PLANE = 0,
114  };
115 
136  template <class Container3D>
138  {
139  private:
140 
145  void pos_calc()
146  {
147  if(zerodim_ == 0)
148  {
149  this->pos_ = cont3d_->begin() +
150  (this->xp_ * int(cont3d_->rows() * int(cont3d_->cols()))) +
151  (this->x1_* int(cont3d_->cols())) + this->x2_;
152  }
153  else if(zerodim_ == 1)
154  {
155  this->pos_ = cont3d_->begin() +
156  (this->x1_ * int(cont3d_->rows() * int(cont3d_->cols()))) +
157  (this->xp_* int(cont3d_->cols())) + this->x2_;
158  }
159  else
160  {
161  this->pos_ = cont3d_->begin() +
162  (this->x1_ * int(cont3d_->rows() * int(cont3d_->cols()))) +
163  (this->x2_* int(cont3d_->cols())) + this->xp_;
164  }
165  }
166 
167  public:
168  //typedef std::random_access_iterator_tag iterator_category;
170  typedef typename Container3D::value_type value_type;
172  typedef typename Container3D::pointer pointer;
173  typedef typename Container3D::reference reference;
174 
175  typedef iterator3d_plane self;
176 
177  typedef typename Container3D::size_type size_type;
182 
188  cont3d_(0),pos_(0),zerodim_(0),xp_(0),x1_(0),x2_(0),box_(0,0,0,0)
189  {}
190 
202  iterator3d_plane(Container3D* c, PLANE_ORIENTATION P, const int plane_coordinate, const Box2d<int>& b):
203  cont3d_(c),pos_(0),zerodim_(P),xp_(plane_coordinate),x1_(b.upper_left()[0]),x2_(b.upper_left()[1]),box_(b)
204  {
205  assert((P == IJ_PLANE) || (P == KJ_PLANE) || (P == KI_PLANE));
206  this->pos_calc();
207  }
208 
216  iterator3d_plane(Container3D* c,
217  const Box3d<int>& b):
218  cont3d_(c),pos_(0),zerodim_(0),xp_(0),x1_(0),x2_(0),box_(0,0,0,0)
219  {
221  zerodim_ = ((dim[0] == 0)?0:((dim[1] == 0)?1:((dim[2] == 0)?2:-1)));
222  assert(zerodim_ != -1);
223  xp_ = b.back_bottom_right()[zerodim_];
224  if (zerodim_ == 0)
225  {
226  x1_ = b.front_upper_left()[1];
227  x2_ = b.front_upper_left()[2];
228  box_ = slip::Box2d<int>(x1_,x2_,b.back_bottom_right()[1],b.back_bottom_right()[2]);
229  }
230  else if (zerodim_ == 1)
231  {
232  x1_ = b.front_upper_left()[0];
233  x2_ = b.front_upper_left()[2];
234  box_ = slip::Box2d<int>(x1_,x2_,b.back_bottom_right()[0],b.back_bottom_right()[2]);
235  }
236  else
237  {
238  x1_ = b.front_upper_left()[0];
239  x2_ = b.front_upper_left()[1];
240  box_ = slip::Box2d<int>(x1_,x2_,b.back_bottom_right()[0],b.back_bottom_right()[1]);
241  }
242  this->pos_calc();
243  }
244 
250  iterator3d_plane(const self& o):
251  cont3d_(o.cont3d_),pos_(o.pos_),zerodim_(o.zerodim_),xp_(o.xp_),x1_(o.x1_),x2_(o.x2_),box_(o.box_)
252  {}
253 
268  self& operator=(const self& o)
269  {
270  if(this != &o)
271  {
272  this->cont3d_ = o.cont3d_;
273  this->pos_ = o.pos_;
274  this->zerodim_ = o.zerodim_;
275  this->xp_ = o.xp_;
276  this->x1_ = o.x1_;
277  this->x2_ = o.x2_;
278  this->box_ = o.box_;
279  }
280  return *this;
281  }
290  inline
292  {
293  return *pos_;
294  }
295 
296 
297 
304  inline
305  const reference operator*() const
306  {
307  return *pos_;
308  }
309 
310 
311  inline
313  {
314  return &(operator*());
315  }
316 
317  inline
319  {
320  return &(operator*());
321  }
322 
327 
333  inline
334  self& operator++()
335  {
336  if(x2_ < (box_.bottom_right())[1])
337  {
338  this->x2_++;
339  this->pos_calc();
340  }
341  else if(x1_ < (box_.bottom_right())[0])
342  {
343  this->x1_++;
344  this->x2_ = (box_.upper_left())[1];
345  this->pos_calc();
346  }
347  else
348  {
349  this->x1_ = (box_.bottom_right())[0] + 1;
350  this->x2_ = (box_.bottom_right())[1] + 1;
351  this->pos_calc();
352  }
353  return *this;
354  }
355 
361  inline
362  self operator++(int)
363  {
364  self tmp = *this;
365  ++(*this);
366  return tmp;
367  }
368 
380  inline
381  self& operator--()
382  {
383  if(x2_ > (box_.upper_left())[1])
384  {
385  this->x2_--;
386  this->pos_calc();
387  }
388  else if (x1_ > (box_.upper_left())[0])
389  {
390  this->x1_--;
391  this->x2_ = (box_.bottom_right())[1];
392  this->pos_calc();
393  }
394  else
395  {
396  this->x1_ = (box_.upper_left())[0] - 1;
397  this->x2_ = (box_.upper_left())[1] - 1;
398  this->pos_calc();
399  }
400 
401  return *this;
402  }
403 
409  inline
410  self operator--(int)
411  {
412  self tmp = *this;
413  --(*this);
414  return tmp;
415  }
416 
430  inline
431  friend bool operator==(const self& i1,
432  const self& i2)
433  {
434 
435  return ( (i1.cont3d_ == i2.cont3d_) && (i1.pos_ == i2.pos_)
436  && (i1.zerodim_ == i2.zerodim_) && (i1.xp_ == i2.xp_)
437  && (i1.x1_ == i2.x1_) && (i1.x2_ == i2.x2_) );
438  }
439 
446  inline
447  friend bool operator!=(const self& i1,
448  const self& i2)
449  {
450  return ( (i1.cont3d_ != i2.cont3d_) || (i1.pos_ != i2.pos_)
451  || (i1.zerodim_ != i2.zerodim_) || (i1.xp_ != i2.xp_)
452  || (i1.x1_ != i2.x1_) || (i1.x2_ != i2.x2_));
453  }
466  inline
467  friend bool operator<(const self& i1,
468  const self& i2)
469  {
470 
471  return ( i1.pos_ < i2.pos_);
472  }
473 
480  inline
481  friend bool operator>(const self& i1,
482  const self& i2)
483  {
484 
485  return (i2 < i1);
486  }
487 
494  inline
495  friend bool operator<=(const self& i1,
496  const self& i2)
497  {
498 
499  return !(i2 < i1);
500  }
501 
508  inline
509  friend bool operator>=(const self& i1,
510  const self& i2)
511  {
512 
513  return !(i1 < i2);
514  }
529  inline
530  self& operator+=(const difference_type& d)
531  {
532  this->x1_ += d.dx1();
533  this->x2_ += d.dx2();
534  this->pos_calc();
535  return *this;
536  }
537 
538 
539 
547  inline
548  self& operator-=(const difference_type& d)
549  {
550  this->x1_ -= d.dx1();
551  this->x2_ -= d.dx2();
552  this->pos_calc();
553  return *this;
554  }
555 
556 
557 
565  inline
566  self operator+(const difference_type& d)
567  {
568  self tmp = *this;
569  tmp += d;
570  return tmp;
571  }
572 
580  inline
581  self operator-(const difference_type& d)
582  {
583  self tmp = *this;
584  tmp -= d;
585  return tmp;
586  }
587 
595  inline
596  friend difference_type operator-(const self& i1,
597  const self& i2)
598  {
599  return difference_type(int(i1.x1_ - i2.x1_),int(i1.x2_ - i2.x2_));
600  }
601 
602 
611  inline
613  {
614  if(zerodim_ == 0)
615  return (*cont3d_)[this->xp_][this->x1_+d.dx1()][this->x2_+d.dx2()];
616  if(zerodim_ == 1)
617  return (*cont3d_)[this->x1_+d.dx1()][this->xp_][this->x2_+d.dx2()];
618  return (*cont3d_)[this->x1_+d.dx1()][this->x2_+d.dx2()][this->xp_];
619  }
620 
630  inline
632  {
633  if(zerodim_ == 0)
634  return (*cont3d_)[this->xp_+ n];
635  return (*cont3d_)[this->x1_+ n];
636  }
637 
638 
650  inline
651  int x1() const
652  {
653  return this->x1_;
654  }
655 
660  inline
661  int x2() const
662  {
663  return this->x2_;
664  }
665 
670  inline
671  int xp() const
672  {
673  return this->xp_;
674  }
679  inline
680  int zerodim() const
681  {
682  return this->zerodim_;
683  }
684 
689  private:
690  Container3D* cont3d_; // pointer to the 3d container
691  pointer pos_; // linear position within the container
692  int zerodim_; // index of the plane axe (0->k,1->i,2->j)
693  int xp_; // position of the plane
694  int x1_; // first subscript position (within the plane)
695  int x2_; // second subscript position (within the plane)
696  Box2d<int> box_; // plane to iterate
697 
698  };
699 
700 
721  template <class Container3D>
723  {
724  private:
725 
730  inline
731  void pos_calc()
732  {
733  if(zerodim_ == 0)
734  {
735  this->pos_ = cont3d_->begin() +
736  (this->xp_ * int(cont3d_->rows() * int(cont3d_->cols()))) +
737  (this->x1_* int(cont3d_->cols())) + this->x2_;
738  }
739  else if(zerodim_ == 1)
740  {
741  this->pos_ = cont3d_->begin() +
742  (this->x1_ * int(cont3d_->rows() * int(cont3d_->cols()))) +
743  (this->xp_* int(cont3d_->cols())) + this->x2_;
744  }
745  else
746  {
747  this->pos_ = cont3d_->begin() +
748  (this->x1_ * int(cont3d_->rows() * int(cont3d_->cols()))) +
749  (this->x2_* int(cont3d_->cols())) + this->xp_;
750  }
751  }
752 
753  public:
754  //typedef std::random_access_iterator_tag iterator_category;
756  typedef typename Container3D::value_type value_type;
758  typedef typename Container3D::pointer pointer;
759  typedef typename Container3D::const_pointer const_pointer;
760  typedef typename Container3D::const_reference reference;
761 
763 
764  typedef typename Container3D::size_type size_type;
769 
775  cont3d_(0),pos_(0),zerodim_(0),xp_(0),x1_(0),x2_(0),box_(0,0,0,0)
776  {}
777 
778 
790  const_iterator3d_plane(Container3D* c, PLANE_ORIENTATION P, const int plane_coordinate, const Box2d<int>& b):
791  cont3d_(c),pos_(0),zerodim_(P),xp_(plane_coordinate),x1_(b.upper_left()[0]),x2_(b.upper_left()[1]),box_(b)
792  {
793  assert((P == IJ_PLANE) || (P == KJ_PLANE) || (P == KI_PLANE));
794  this->pos_calc();
795  }
796 
804  const_iterator3d_plane(Container3D* c,
805  const Box3d<int>& b):
806  cont3d_(c),pos_(0),zerodim_(0),xp_(0),x1_(0),x2_(0),box_(0,0,0,0)
807  {
809  zerodim_ = ((dim[0] == 0)?0:((dim[1] == 0)?1:((dim[2] == 0)?2:-1)));
810  assert(zerodim_ != -1);
811  xp_ = b.back_bottom_right()[zerodim_];
812  if (zerodim_ == 0)
813  {
814  x1_ = b.front_upper_left()[1];
815  x2_ = b.front_upper_left()[2];
816  box_ = slip::Box2d<int>(x1_,x2_,b.back_bottom_right()[1],b.back_bottom_right()[2]);
817  }
818  else if (zerodim_ == 1)
819  {
820  x1_ = b.front_upper_left()[0];
821  x2_ = b.front_upper_left()[2];
822  box_ = slip::Box2d<int>(x1_,x2_,b.back_bottom_right()[0],b.back_bottom_right()[2]);
823  }
824  else
825  {
826  x1_ = b.front_upper_left()[0];
827  x2_ = b.front_upper_left()[1];
828  box_ = slip::Box2d<int>(x1_,x2_,b.back_bottom_right()[0],b.back_bottom_right()[1]);
829  }
830  this->pos_calc();
831  }
832 
838  const_iterator3d_plane(const self& o):
839  cont3d_(o.cont3d_),pos_(o.pos_),zerodim_(o.zerodim_),xp_(o.xp_),x1_(o.x1_),x2_(o.x2_),box_(o.box_)
840  {}
841 
857  self& operator=(const self& o)
858  {
859  if(this != &o)
860  {
861  this->cont3d_ = o.cont3d_;
862  this->pos_ = o.pos_;
863  this->zerodim_ = o.zerodim_;
864  this->xp_ = o.xp_;
865  this->x1_ = o.x1_;
866  this->x2_ = o.x2_;
867  this->box_ = o.box_;
868  }
869  return *this;
870  }
882  inline
884  {
885  return *pos_;
886  }
887 
888 
889  inline
891  {
892  return &(operator*());
893  }
894 
899 
905  inline
906  self& operator++()
907  {
908  if(x2_ < (box_.bottom_right())[1])
909  {
910  this->x2_++;
911  this->pos_calc();
912  }
913  else if(x1_ < (box_.bottom_right())[0])
914  {
915  this->x1_++;
916  this->x2_ = (box_.upper_left())[1];
917  this->pos_calc();
918  }
919  else
920  {
921  this->x1_ = (box_.bottom_right())[0] + 1;
922  this->x2_ = (box_.bottom_right())[1] + 1;
923  this->pos_calc();
924  }
925  return *this;
926  }
927 
933  inline
934  self operator++(int)
935  {
936  self tmp = *this;
937  ++(*this);
938  return tmp;
939  }
940 
952  inline
953  self& operator--()
954  {
955  if(x2_ > (box_.upper_left())[1])
956  {
957  this->x2_--;
958  this->pos_calc();
959  }
960  else if (x1_ > (box_.upper_left())[0])
961  {
962  this->x1_--;
963  this->x2_ = (box_.bottom_right())[1];
964  this->pos_calc();
965  }
966  else
967  {
968  this->x1_ = (box_.upper_left())[0] - 1;
969  this->x2_ = (box_.upper_left())[1] - 1;
970  this->pos_calc();
971  }
972 
973  return *this;
974  }
975 
981  inline
982  self operator--(int)
983  {
984  self tmp = *this;
985  --(*this);
986  return tmp;
987  }
988 
1002  inline
1003  friend bool operator==(const self& i1,
1004  const self& i2)
1005  {
1006  return ( (i1.cont3d_ == i2.cont3d_) && (i1.pos_ == i2.pos_)
1007  && (i1.zerodim_ == i2.zerodim_) && (i1.xp_ == i2.xp_)
1008  && (i1.x1_ == i2.x1_) && (i1.x2_ == i2.x2_) );
1009  }
1010 
1017  inline
1018  friend bool operator!=(const self& i1,
1019  const self& i2)
1020  {
1021  return ( (i1.cont3d_ != i2.cont3d_) || (i1.pos_ != i2.pos_)
1022  || (i1.zerodim_ != i2.zerodim_) || (i1.xp_ != i2.xp_)
1023  || (i1.x1_ != i2.x1_) || (i1.x2_ != i2.x2_));
1024  }
1037  inline
1038  friend bool operator<(const self& i1,
1039  const self& i2)
1040  {
1041  return ( i1.pos_ < i2.pos_);
1042  }
1043 
1050  inline
1051  friend bool operator>(const self& i1,
1052  const self& i2)
1053  {
1054  return (i2 < i1);
1055  }
1056 
1063  inline
1064  friend bool operator<=(const self& i1,
1065  const self& i2)
1066  {
1067  return !(i2 < i1);
1068  }
1069 
1076  inline
1077  friend bool operator>=(const self& i1,
1078  const self& i2)
1079  {
1080  return !(i1 < i2);
1081  }
1095  inline
1096  self& operator+=(const difference_type& d)
1097  {
1098  this->x1_ += d.dx1();
1099  this->x2_ += d.dx2();
1100  this->pos_calc();
1101  return *this;
1102  }
1103 
1111  inline
1112  self& operator-=(const difference_type& d)
1113  {
1114  this->x1_ -= d.dx1();
1115  this->x2_ -= d.dx2();
1116  this->pos_calc();
1117  return *this;
1118  }
1119 
1127  inline
1129  {
1130  self tmp = *this;
1131  tmp += d;
1132  return tmp;
1133  }
1134 
1135 
1143  inline
1145  {
1146  self tmp = *this;
1147  tmp -= d;
1148  return tmp;
1149  }
1150 
1151 
1159  inline
1160  friend difference_type operator-(const self& i1,
1161  const self& i2)
1162  {
1163  return difference_type(int(i1.x1_ - i2.x1_),int(i1.x2_ - i2.x2_));
1164  }
1165 
1173  inline
1175  {
1176  if(zerodim_ == 0)
1177  return (*cont3d_)[this->xp_][this->x1_+d.dx1()][this->x2_+d.dx2()];
1178  if(zerodim_ == 1)
1179  return (*cont3d_)[this->x1_+d.dx1()][this->xp_][this->x2_+d.dx2()];
1180  return (*cont3d_)[this->x1_+d.dx1()][this->x2_+d.dx2()][this->xp_];
1181  }
1182 
1191  inline
1193  {
1194  if(zerodim_ == 0)
1195  return (*cont3d_)[this->xp_+ n];
1196  return (*cont3d_)[this->x1_+ n];
1197  }
1198 
1199 
1200 
1208 
1213  inline
1214  int x1() const
1215  {
1216  return this->x1_;
1217  }
1218 
1223  inline
1224  int x2() const
1225  {
1226  return this->x2_;
1227  }
1228 
1233  inline
1234  int xp() const
1235  {
1236  return this->xp_;
1237  }
1242  inline
1243  int zerodim() const
1244  {
1245  return this->zerodim_;
1246  }
1247 
1252  private:
1253  Container3D* cont3d_; // pointer to the 3d container
1254  const_pointer pos_; // linear position within the container
1255  int zerodim_; // index of the plane axe (0->k,1->i,2->j)
1256  int xp_; // position of the plane
1257  int x1_; // first subscript position (within the plane)
1258  int x2_; // second subscript position (within the plane)
1259  Box2d<int> box_; // plane to iterate
1260  };
1261 
1262 
1263 }//slip::
1264 
1265 #endif //SLIP_ITERATOR3D_PLANE_HPP
int xp() const
Access to the plane subscript of the current iterator3d_plane.
const_pointer operator->() const
This is some iterator to iterate a 3d container into a plane area defined by the subscripts of the 3d...
int zerodim() const
Access to the plane axe number of the current iterator3d_plane.
Provides a class to modelize the difference of slip::Point2d.
friend bool operator!=(const self &i1, const self &i2)
Inequality operator.
const_iterator3d_plane()
Constructs a const_iterator3d_plane.
self operator++(int)
Postincrement a iterator3d_plane. Iterate to the next location inside the Box3d.
std::random_access_iterator2d_tag iterator_category
self & operator--()
Predecrement a iterator3d_plane. Iterate to the previous location inside the Box3d.
const_iterator3d_plane(Container3D *c, PLANE_ORIENTATION P, const int plane_coordinate, const Box2d< int > &b)
Constructs a iterator3d_plane.
void dx2(const CoordType &dx)
Accessor of the second coordinate of DPoint2d.
Definition: DPoint2d.hpp:241
int xp() const
Access to the plane subscript of the current const_iterator3d_plane.
self operator+(const difference_type &d)
iterator3d_plane addition.
Container3D::size_type size_type
self & operator+=(const difference_type &d)
iterator3d_plane addition.
Provides a class to manipulate 2d box.
reference operator[](difference_type d) const
const_iterator3d_plane element assignment operator. Equivalent to *(k + d).
self & operator-=(const difference_type &d)
const_iterator3d_plane substraction.
Provides a class to tag SLIP iterators.
iterator3d_plane(const self &o)
Constructs a copy of the iterator3d_plane o.
friend bool operator<(const self &i1, const self &i2)
< operator.
friend bool operator<=(const self &i1, const self &i2)
<= operator.
self operator--(int)
Postdecrement a iterator3d_plane. Iterate to the previous location inside the Box3d.
void bottom_right(Point< CoordType, 2 >)
Accessor/Mutator of the bottom_right point (p2) of Box2d.
Definition: Box2d.hpp:338
self operator++(int)
Postincrement a const_iterator3d_plane. Iterate to the next location inside the Box3d.
self & operator++()
Preincrement a const_iterator3d_plane. Iterate to the next location inside the Box3d.
Container3D::value_type value_type
const reference operator*() const
Dereference operator. Returns the element that the current iterator3d_plane i point to...
Container3D::const_reference reference
pointer operator->() const
self operator+(const difference_type &d)
const_iterator3d_plane addition.
PLANE_ORIENTATION
Choose between different plane orientations.
reference operator*() const
Dereference operator. Returns the element that the current const_iterator3d_plane i point to...
void dx1(const CoordType &dx)
Accessor of the first coordinate of DPoint2d.
Definition: DPoint2d.hpp:229
self & operator--()
Predecrement a const_iterator3d_plane. Iterate to the previous location inside the Box3d...
friend bool operator>=(const self &i1, const self &i2)
>= operator.
self & operator=(const self &o)
Assign a iterator3d_plane.
friend bool operator<(const self &i1, const self &i2)
< operator.
self & operator=(const self &o)
Assign a const_iterator3d_plane.
void front_upper_left(Point< CoordType, 3 >)
Accessor/Mutator of the front_upper_left point (p1) of Box3d.
Definition: Box3d.hpp:355
Provides a class to manipulate 3d box.
iterator3d_plane(Container3D *c, const Box3d< int > &b)
Constructs a iterator3d_plane.
friend bool operator!=(const self &i1, const self &i2)
Inequality operator.
Define an abstract DPoint structure.
Definition: Box.hpp:95
DPoint2d< int > difference_type
const_pointer * operator[](int n) const
const_iterator3d_plane element assignment operator. Equivalent to *(k + n).
Difference of Point2D class, specialization of DPoint<CoordType,DIM> with DIM = 2.
Definition: Array2d.hpp:129
int x2() const
Access to the first subscript of the current const_iterator3d_plane.
self & operator++()
Preincrement a iterator3d_plane. Iterate to the next location inside the Box3d.
self & operator+=(const difference_type &d)
const_iterator3d_plane addition.
Container3D::size_type size_type
Container3D::pointer pointer
iterator3d_plane(Container3D *c, PLANE_ORIENTATION P, const int plane_coordinate, const Box2d< int > &b)
Constructs a iterator3d_plane.
iterator3d_plane()
Constructs a iterator3d_plane.
friend bool operator==(const self &i1, const self &i2)
Equality operator.
friend bool operator<=(const self &i1, const self &i2)
<= operator.
reference operator*()
Dereference assignment operator. Returns the element that the current iterator3d_plane i point to...
self operator-(const difference_type &d)
iterator3d_plane substraction.
const_iterator3d_plane(const self &o)
Constructs a copy of the const_iterator3d_plane o.
std::random_access_iterator2d_tag iterator_category
void upper_left(Point< CoordType, 2 >)
Accessor/Mutator of the upper_left point (p1) of Box2d.
Definition: Box2d.hpp:325
self & operator-=(const difference_type &d)
iterator3d_plane substraction.
void back_bottom_right(Point< CoordType, 3 >)
Accessor/Mutator of the back_bottom_right point (p2) of Box3d.
Definition: Box3d.hpp:368
friend bool operator>=(const self &i1, const self &i2)
>= operator.
self operator--(int)
Postdecrement a const_iterator3d_plane. Iterate to the previous location inside the Box3d...
friend difference_type operator-(const self &i1, const self &i2)
iterator3d_plane difference operator.
friend bool operator>(const self &i1, const self &i2)
operator.
int x1() const
Access to the first subscript of the current const_iterator3d_plane.
This is some iterator to iterate a 3d container into a plane area defined by the subscripts of the 3d...
Provides a class to modelize 2d points.
const_iterator3d_plane(Container3D *c, const Box3d< int > &b)
Constructs a const_iterator3d_plane.
Container3D::reference reference
self operator-(const difference_type &d)
const_iterator3d_plane substraction.
friend bool operator>(const self &i1, const self &i2)
operator.
Container3D::const_pointer const_pointer
int zerodim() const
Access to the plane axe number of the current const_iterator3d_plane.
friend bool operator==(const self &i1, const self &i2)
Equality operator.
int x1() const
Access to the first subscript of the current iterator3d_plane.
friend difference_type operator-(const self &i1, const self &i2)
const_iterator3d_plane difference operator.
int x2() const
Access to the second subscript of the current iterator3d_plane.
pointer * operator[](int n)
iterator3d_plane element assignment operator. Equivalent to *(k + n).
reference operator[](difference_type d)
iterator3d_plane element assignment operator. Equivalent to *(k + d) = t.
Container3D::value_type value_type
Provides an abstract class to modelize the difference of slip::Point.