Commit d48f6e00 authored by Dick Hollenbeck's avatar Dick Hollenbeck
Browse files

merge from testing

parents 1f18ff28 e2d4b16b
Loading
Loading
Loading
Loading
+7 −7
Original line number Original line Diff line number Diff line
@@ -29,7 +29,7 @@ private:
public:
public:
  iterator_geometry_to_set() : rectangle_(), vertex_(), corner_(4), orient_(), is_hole_() {}
  iterator_geometry_to_set() : rectangle_(), vertex_(), corner_(4), orient_(), is_hole_() {}
  iterator_geometry_to_set(const rectangle_type& rectangle, direction_1d dir, 
  iterator_geometry_to_set(const rectangle_type& rectangle, direction_1d dir, 
                           orientation_2d orient = HORIZONTAL, bool is_hole = false) : 
                           orientation_2d orient = HORIZONTAL, bool is_hole = false, bool = false, direction_1d = CLOCKWISE) : 
    rectangle_(), vertex_(), corner_(0), orient_(orient), is_hole_(is_hole) {
    rectangle_(), vertex_(), corner_(0), orient_(orient), is_hole_(is_hole) {
    assign(rectangle_, rectangle);
    assign(rectangle_, rectangle);
    if(dir == HIGH) corner_ = 4;
    if(dir == HIGH) corner_ = 4;
@@ -93,7 +93,7 @@ private:
  int polygon_index;
  int polygon_index;
public:
public:
  iterator_geometry_to_set() : vertex_(), itrb(), itre(), last_vertex_(), is_hole_(), multiplier_(), first_pt(), second_pt(), pts(), use_wrap(), orient_(), polygon_index(-1) {}
  iterator_geometry_to_set() : vertex_(), itrb(), itre(), last_vertex_(), is_hole_(), multiplier_(), first_pt(), second_pt(), pts(), use_wrap(), orient_(), polygon_index(-1) {}
  iterator_geometry_to_set(const polygon_type& polygon, direction_1d dir, orientation_2d orient = HORIZONTAL, bool is_hole = false) : 
  iterator_geometry_to_set(const polygon_type& polygon, direction_1d dir, orientation_2d orient = HORIZONTAL, bool is_hole = false, bool winding_override = false, direction_1d w = CLOCKWISE) : 
    vertex_(), itrb(), itre(), last_vertex_(), 
    vertex_(), itrb(), itre(), last_vertex_(), 
    is_hole_(is_hole), multiplier_(), first_pt(), second_pt(), pts(), use_wrap(), 
    is_hole_(is_hole), multiplier_(), first_pt(), second_pt(), pts(), use_wrap(), 
    orient_(orient), polygon_index(0) {
    orient_(orient), polygon_index(0) {
@@ -103,7 +103,9 @@ public:
    if(itrb == itre || dir == HIGH || size(polygon) < 4) {
    if(itrb == itre || dir == HIGH || size(polygon) < 4) {
      polygon_index = -1;
      polygon_index = -1;
    } else {
    } else {
      direction_1d wdir = winding(polygon);
      direction_1d wdir = w;
      if(!winding_override)
        wdir = winding(polygon);
      multiplier_ = wdir == LOW ? -1 : 1;
      multiplier_ = wdir == LOW ? -1 : 1;
      if(is_hole_) multiplier_ *= -1;
      if(is_hole_) multiplier_ *= -1;
      first_pt = pts[0] = *itrb;
      first_pt = pts[0] = *itrb;
@@ -182,9 +184,7 @@ public:
    vertex_.second.first =pts[1].get(orient_);
    vertex_.second.first =pts[1].get(orient_);
    if(pts[1] == pts[2]) {
    if(pts[1] == pts[2]) {
      vertex_.second.second = 0;
      vertex_.second.second = 0;
      return;
    } else if(pts[0].get(HORIZONTAL) != pts[1].get(HORIZONTAL)) {
    }
    if(pts[0].get(HORIZONTAL) != pts[1].get(HORIZONTAL)) {
      vertex_.second.second = -1; 
      vertex_.second.second = -1; 
    } else if(pts[0].get(VERTICAL) != pts[1].get(VERTICAL)) {
    } else if(pts[0].get(VERTICAL) != pts[1].get(VERTICAL)) {
      vertex_.second.second = 1;
      vertex_.second.second = 1;
@@ -214,7 +214,7 @@ private:
public:
public:
  iterator_geometry_to_set() : itrb(), itre(), itrhib(), itrhie(), itrhb(), itrhe(), orient_(), is_hole_(), started_holes() {}
  iterator_geometry_to_set() : itrb(), itre(), itrhib(), itrhie(), itrhb(), itrhe(), orient_(), is_hole_(), started_holes() {}
  iterator_geometry_to_set(const polygon_with_holes_type& polygon, direction_1d dir, 
  iterator_geometry_to_set(const polygon_with_holes_type& polygon, direction_1d dir, 
                           orientation_2d orient = HORIZONTAL, bool is_hole = false) : 
                           orientation_2d orient = HORIZONTAL, bool is_hole = false, bool = false, direction_1d = CLOCKWISE) : 
    itrb(), itre(), itrhib(), itrhie(), itrhb(), itrhe(), orient_(orient), is_hole_(is_hole), started_holes() {
    itrb(), itre(), itrhib(), itrhie(), itrhb(), itrhe(), orient_(orient), is_hole_(is_hole), started_holes() {
    itre = iterator_geometry_to_set<polygon_90_concept, polygon_with_holes_type>(polygon, HIGH, orient, is_hole_);
    itre = iterator_geometry_to_set<polygon_90_concept, polygon_with_holes_type>(polygon, HIGH, orient, is_hole_);
    itrhe = end_holes(polygon);
    itrhe = end_holes(polygon);
+10 −4
Original line number Original line Diff line number Diff line
@@ -251,12 +251,14 @@ namespace boost { namespace polygon{
            return;
            return;
          }
          }
          Unit firstY = (*iter).y();
          Unit firstY = (*iter).y();
          Unit firstX = (*iter).x();
          ++iter;
          ++iter;
          if(iter == tailp_->points.end()) {
          if(iter == tailp_->points.end()) {
            tailp_->points.push_front(point);
            tailp_->points.push_front(point);
            return;
            return;
          }
          }
          if(iter->y() == point.y() && firstY == point.y()) {
          if((iter->y() == point.y() && firstY == point.y()) ||
             (iter->x() == point.x() && firstX == point.x())){
            --iter;
            --iter;
            *iter = point;
            *iter = point;
          } else {
          } else {
@@ -274,12 +276,14 @@ namespace boost { namespace polygon{
          return;
          return;
        }
        }
        Unit firstY = (*iter).y();
        Unit firstY = (*iter).y();
        Unit firstX = (*iter).x();
        ++iter;
        ++iter;
        if(iter == tailp_->points.rend()) {
        if(iter == tailp_->points.rend()) {
          tailp_->points.push_back(point);
          tailp_->points.push_back(point);
          return;
          return;
        }
        }
        if(iter->y() == point.y() && firstY == point.y()) {
        if((iter->y() == point.y() && firstY == point.y()) ||
           (iter->x() == point.x() && firstX == point.x())){
          --iter;
          --iter;
          *iter = point;
          *iter = point;
        } else {
        } else {
@@ -474,7 +478,7 @@ namespace boost { namespace polygon{
      ct counts[4];
      ct counts[4];
    };
    };


    typedef Vertex45CountT<int> Vertex45Count;
    typedef Vertex45CountT<signed char> Vertex45Count;


//     inline std::ostream& operator<< (std::ostream& o, const Vertex45Count& c) {
//     inline std::ostream& operator<< (std::ostream& o, const Vertex45Count& c) {
//       o << c[0] << ", " << c[1] << ", ";
//       o << c[0] << ", " << c[1] << ", ";
@@ -492,7 +496,8 @@ namespace boost { namespace polygon{
      inline Vertex45CompactT(const Point& point, int riseIn, int countIn) : pt(point), count() {
      inline Vertex45CompactT(const Point& point, int riseIn, int countIn) : pt(point), count() {
        count[riseIn+1] = countIn;
        count[riseIn+1] = countIn;
      }
      }
      inline Vertex45CompactT(const Vertex45T& vertex) : pt(vertex.pt), count() {
      template <typename ct2>
      inline Vertex45CompactT(const typename boolean_op_45<Unit>::template Vertex45T<ct2>& vertex) : pt(vertex.pt), count() {
        count[vertex.rise+1] = vertex.count;
        count[vertex.rise+1] = vertex.count;
      }
      }
      inline Vertex45CompactT(const Vertex45CompactT& vertex) : pt(vertex.pt), count(vertex.count) {}
      inline Vertex45CompactT(const Vertex45CompactT& vertex) : pt(vertex.pt), count(vertex.count) {}
@@ -2244,6 +2249,7 @@ namespace boost { namespace polygon{
  struct geometry_concept<PolyLine45PolygonData<T> > { typedef polygon_45_with_holes_concept type; };
  struct geometry_concept<PolyLine45PolygonData<T> > { typedef polygon_45_with_holes_concept type; };
  template <typename T>
  template <typename T>
  struct geometry_concept<PolyLine45HoleData<T> > { typedef polygon_45_concept type; };
  struct geometry_concept<PolyLine45HoleData<T> > { typedef polygon_45_concept type; };

}
}
}
}
#endif
#endif
+2 −2
Original line number Original line Diff line number Diff line
@@ -124,13 +124,13 @@ namespace boost { namespace polygon{
  };
  };


  template <typename ltype, typename rtype, int op_type>
  template <typename ltype, typename rtype, int op_type>
  typename polygon_45_set_view<ltype, rtype, op_type>::iterator_type 
  typename polygon_45_set_traits<polygon_45_set_view<ltype, rtype, op_type> >::iterator_type
  polygon_45_set_traits<polygon_45_set_view<ltype, rtype, op_type> >::
  polygon_45_set_traits<polygon_45_set_view<ltype, rtype, op_type> >::
  begin(const polygon_45_set_view<ltype, rtype, op_type>& polygon_45_set) {
  begin(const polygon_45_set_view<ltype, rtype, op_type>& polygon_45_set) {
    return polygon_45_set.begin();
    return polygon_45_set.begin();
  }
  }
  template <typename ltype, typename rtype, int op_type>
  template <typename ltype, typename rtype, int op_type>
  typename polygon_45_set_view<ltype, rtype, op_type>::iterator_type 
  typename polygon_45_set_traits<polygon_45_set_view<ltype, rtype, op_type> >::iterator_type
  polygon_45_set_traits<polygon_45_set_view<ltype, rtype, op_type> >::
  polygon_45_set_traits<polygon_45_set_view<ltype, rtype, op_type> >::
  end(const polygon_45_set_view<ltype, rtype, op_type>& polygon_45_set) {
  end(const polygon_45_set_view<ltype, rtype, op_type>& polygon_45_set) {
    return polygon_45_set.end();
    return polygon_45_set.end();
+2 −2
Original line number Original line Diff line number Diff line
@@ -140,13 +140,13 @@ namespace boost { namespace polygon{
  };
  };


  template <typename ltype, typename rtype, typename op_type>
  template <typename ltype, typename rtype, typename op_type>
  typename polygon_90_set_view<ltype, rtype, op_type>::iterator_type 
  typename polygon_90_set_traits<polygon_90_set_view<ltype, rtype, op_type> >::iterator_type
  polygon_90_set_traits<polygon_90_set_view<ltype, rtype, op_type> >::
  polygon_90_set_traits<polygon_90_set_view<ltype, rtype, op_type> >::
  begin(const polygon_90_set_view<ltype, rtype, op_type>& polygon_set) {
  begin(const polygon_90_set_view<ltype, rtype, op_type>& polygon_set) {
    return polygon_set.begin();
    return polygon_set.begin();
  }
  }
  template <typename ltype, typename rtype, typename op_type>
  template <typename ltype, typename rtype, typename op_type>
  typename polygon_90_set_view<ltype, rtype, op_type>::iterator_type 
  typename polygon_90_set_traits<polygon_90_set_view<ltype, rtype, op_type> >::iterator_type
  polygon_90_set_traits<polygon_90_set_view<ltype, rtype, op_type> >::
  polygon_90_set_traits<polygon_90_set_view<ltype, rtype, op_type> >::
  end(const polygon_90_set_view<ltype, rtype, op_type>& polygon_set) {
  end(const polygon_90_set_view<ltype, rtype, op_type>& polygon_set) {
    return polygon_set.end();
    return polygon_set.end();
+1 −1
Original line number Original line Diff line number Diff line
@@ -42,7 +42,7 @@ namespace boost { namespace polygon{
          ivlIds_.second = that.ivlIds_.second;
          ivlIds_.second = that.ivlIds_.second;
          incremented_ = that.incremented_;
          incremented_ = that.incremented_;
          return *this;
          return *this;
        };
        }
        inline bool operator==(const iterator& that) { return itr_ == that.itr_; }
        inline bool operator==(const iterator& that) { return itr_ == that.itr_; }
        inline bool operator!=(const iterator& that) { return itr_ != that.itr_; }
        inline bool operator!=(const iterator& that) { return itr_ != that.itr_; }
        inline iterator& operator++() {
        inline iterator& operator++() {
Loading