|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r78394 - in trunk: boost/polygon boost/polygon/detail libs/polygon/test
From: sydorchuk.andriy_at_[hidden]
Date: 2012-05-09 15:34:04
Author: asydorchuk
Date: 2012-05-09 15:33:59 EDT (Wed, 09 May 2012)
New Revision: 78394
URL: http://svn.boost.org/trac/boost/changeset/78394
Log:
Polygon: fixing failing trunk test targets, removing trailing whitespaces from headers.
Text files modified:
trunk/boost/polygon/detail/boolean_op.hpp | 68 ++++----
trunk/boost/polygon/detail/boolean_op_45.hpp | 130 ++++++++--------
trunk/boost/polygon/detail/iterator_compact_to_points.hpp | 5
trunk/boost/polygon/detail/iterator_geometry_to_set.hpp | 43 ++--
trunk/boost/polygon/detail/max_cover.hpp | 10
trunk/boost/polygon/detail/minkowski.hpp | 8
trunk/boost/polygon/detail/polygon_45_formation.hpp | 210 +++++++++++++-------------
trunk/boost/polygon/detail/polygon_45_set_view.hpp | 83 +++++-----
trunk/boost/polygon/detail/polygon_45_touch.hpp | 28 +-
trunk/boost/polygon/detail/polygon_90_set_view.hpp | 119 +++++++-------
trunk/boost/polygon/detail/polygon_90_touch.hpp | 38 ++--
trunk/boost/polygon/detail/polygon_formation.hpp | 247 +++++++++++++++---------------
trunk/boost/polygon/detail/polygon_set_view.hpp | 17 -
trunk/boost/polygon/detail/polygon_simplify.hpp | 28 +-
trunk/boost/polygon/detail/polygon_sort_adaptor.hpp | 20 +-
trunk/boost/polygon/detail/property_merge.hpp | 20 +-
trunk/boost/polygon/detail/property_merge_45.hpp | 16
trunk/boost/polygon/detail/rectangle_formation.hpp | 59 +++---
trunk/boost/polygon/detail/scan_arbitrary.hpp | 307 ++++++++++++++++++-------------------
trunk/boost/polygon/gmp_override.hpp | 12
trunk/boost/polygon/gtl.hpp | 2
trunk/boost/polygon/interval_concept.hpp | 112 ++++++------
trunk/boost/polygon/interval_data.hpp | 34 ++--
trunk/boost/polygon/interval_traits.hpp | 11
trunk/boost/polygon/isotropy.hpp | 31 +-
trunk/boost/polygon/point_3d_concept.hpp | 66 ++++----
trunk/boost/polygon/point_3d_data.hpp | 10
trunk/boost/polygon/point_3d_traits.hpp | 3
trunk/boost/polygon/point_concept.hpp | 67 ++++----
trunk/boost/polygon/point_data.hpp | 27 +-
trunk/boost/polygon/point_traits.hpp | 11
trunk/boost/polygon/polygon.hpp | 2
trunk/boost/polygon/polygon_45_data.hpp | 7
trunk/boost/polygon/polygon_45_set_concept.hpp | 34 ++--
trunk/boost/polygon/polygon_45_set_traits.hpp | 15
trunk/boost/polygon/polygon_45_with_holes_data.hpp | 13
trunk/boost/polygon/polygon_90_data.hpp | 11
trunk/boost/polygon/polygon_90_set_concept.hpp | 48 ++--
trunk/boost/polygon/polygon_90_set_data.hpp | 96 ++++++-----
trunk/boost/polygon/polygon_90_with_holes_data.hpp | 13
trunk/boost/polygon/polygon_data.hpp | 7
trunk/boost/polygon/polygon_set_concept.hpp | 90 +++++-----
trunk/boost/polygon/polygon_set_data.hpp | 6
trunk/boost/polygon/polygon_set_traits.hpp | 17 -
trunk/boost/polygon/polygon_traits.hpp | 261 ++++++++++++++++----------------
trunk/boost/polygon/polygon_with_holes_data.hpp | 15
trunk/boost/polygon/rectangle_concept.hpp | 236 ++++++++++++++--------------
trunk/boost/polygon/rectangle_data.hpp | 7
trunk/boost/polygon/rectangle_traits.hpp | 3
trunk/boost/polygon/segment_concept.hpp | 4
trunk/boost/polygon/transform.hpp | 323 +++++++++++++++++++--------------------
trunk/boost/polygon/voronoi.hpp | 47 +----
trunk/boost/polygon/voronoi_builder.hpp | 2
trunk/boost/polygon/voronoi_diagram.hpp | 2
trunk/boost/polygon/voronoi_utils.hpp | 4
trunk/libs/polygon/test/voronoi_robust_fpt_test.cpp | 4
56 files changed, 1529 insertions(+), 1580 deletions(-)
Modified: trunk/boost/polygon/detail/boolean_op.hpp
==============================================================================
--- trunk/boost/polygon/detail/boolean_op.hpp (original)
+++ trunk/boost/polygon/detail/boolean_op.hpp 2012-05-09 15:33:59 EDT (Wed, 09 May 2012)
@@ -1,6 +1,6 @@
/*
Copyright 2008 Intel Corporation
-
+
Use, modification and distribution are subject to the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
@@ -30,8 +30,8 @@
inline BooleanOp (T nullT) : scanData_(), nextItr_(), nullT_(nullT) { nextItr_ = scanData_.end(); }
inline BooleanOp (const BooleanOp& that) : scanData_(that.scanData_), nextItr_(),
nullT_(that.nullT_) { nextItr_ = scanData_.begin(); }
- inline BooleanOp& operator=(const BooleanOp& that);
-
+ inline BooleanOp& operator=(const BooleanOp& that);
+
//moves scanline forward
inline void advanceScan() { nextItr_ = scanData_.begin(); }
@@ -39,7 +39,7 @@
//appends output edges to cT
template <class cT>
inline void processInterval(cT& outputContainer, interval_data<Unit> ivl, T deltaCount);
-
+
private:
inline typename ScanData::iterator lookup_(Unit pos){
if(nextItr_ != scanData_.end() && nextItr_->first >= pos) {
@@ -47,9 +47,9 @@
}
return nextItr_ = scanData_.lower_bound(pos);
}
- inline typename ScanData::iterator insert_(Unit pos, T count){
- return nextItr_ = scanData_.insert(nextItr_, ElementType(pos, count));
- }
+ inline typename ScanData::iterator insert_(Unit pos, T count){
+ return nextItr_ = scanData_.insert(nextItr_, ElementType(pos, count));
+ }
template <class cT>
inline void evaluateInterval_(cT& outputContainer, interval_data<Unit> ivl, T beforeCount, T afterCount);
};
@@ -78,29 +78,29 @@
//BinaryCount is an array of two deltaCounts coming from two different layers
//of scan event data. It is the merged count of the two suitable for consumption
//as the template argument of the BooleanOp algorithm because BinaryCount casts to int.
- //T is a binary functor object that evaluates the array of counts and returns a logical
+ //T is a binary functor object that evaluates the array of counts and returns a logical
//result of some operation on those values.
//BinaryCount supports many of the operators that work with int, particularly the
//binary operators, but cannot support less than or increment.
template <class T>
class BinaryCount {
public:
- inline BinaryCount()
-#ifndef BOOST_POLYGON_MSVC
- : counts_()
+ inline BinaryCount()
+#ifndef BOOST_POLYGON_MSVC
+ : counts_()
#endif
{ counts_[0] = counts_[1] = 0; }
// constructs from two integers
- inline BinaryCount(int countL, int countR)
-#ifndef BOOST_POLYGON_MSVC
- : counts_()
+ inline BinaryCount(int countL, int countR)
+#ifndef BOOST_POLYGON_MSVC
+ : counts_()
#endif
{ counts_[0] = countL, counts_[1] = countR; }
inline BinaryCount& operator=(int count) { counts_[0] = count, counts_[1] = count; return *this; }
- inline BinaryCount& operator=(const BinaryCount& that);
+ inline BinaryCount& operator=(const BinaryCount& that);
inline BinaryCount(const BinaryCount& that)
#ifndef BOOST_POLYGON_MSVC
- : counts_()
+ : counts_()
#endif
{ *this = that; }
inline bool operator==(const BinaryCount& that) const;
@@ -141,13 +141,13 @@
};
template <class T, typename Unit>
- inline BooleanOp<T, Unit>& BooleanOp<T, Unit>::operator=(const BooleanOp& that) {
- scanData_ = that.scanData_;
+ inline BooleanOp<T, Unit>& BooleanOp<T, Unit>::operator=(const BooleanOp& that) {
+ scanData_ = that.scanData_;
nextItr_ = scanData_.begin();
nullT_ = that.nullT_;
return *this;
}
-
+
//appends output edges to cT
template <class T, typename Unit>
template <class cT>
@@ -214,7 +214,7 @@
template <class T, typename Unit>
template <class cT>
- inline void BooleanOp<T, Unit>::evaluateInterval_(cT& outputContainer, interval_data<Unit> ivl,
+ inline void BooleanOp<T, Unit>::evaluateInterval_(cT& outputContainer, interval_data<Unit> ivl,
T beforeCount, T afterCount) {
bool before = (int)beforeCount > 0;
bool after = (int)afterCount > 0;
@@ -225,13 +225,13 @@
}
template <class T>
- inline BinaryCount<T>& BinaryCount<T>::operator=(const BinaryCount<T>& that) {
+ inline BinaryCount<T>& BinaryCount<T>::operator=(const BinaryCount<T>& that) {
counts_[0] = that.counts_[0];
counts_[1] = that.counts_[1];
return *this;
}
template <class T>
- inline bool BinaryCount<T>::operator==(const BinaryCount<T>& that) const {
+ inline bool BinaryCount<T>::operator==(const BinaryCount<T>& that) const {
return counts_[0] == that.counts_[0] &&
counts_[1] == that.counts_[1];
}
@@ -290,7 +290,7 @@
count[0] += (*itr1).second.second;
}
if(itr2 != itr2_end) {
- if((*itr2).first < prevCoord ||
+ if((*itr2).first < prevCoord ||
((*itr2).first == prevCoord && (*itr2).second.first < prevPosition)) {
prevCoord = (*itr2).first;
prevPosition = (*itr2).second.first;
@@ -307,7 +307,7 @@
} else {
if(itr1 != itr1_end) ++itr1;
}
-
+
while(itr1 != itr1_end || itr2 != itr2_end) {
Unit curCoord = UnitMax;
Unit curPosition = UnitMax;
@@ -318,7 +318,7 @@
curCount[0] += (*itr1).second.second;
}
if(itr2 != itr2_end) {
- if((*itr2).first < curCoord ||
+ if((*itr2).first < curCoord ||
((*itr2).first == curCoord && (*itr2).second.first < curPosition)) {
curCoord = (*itr2).first;
curPosition = (*itr2).second.first;
@@ -349,15 +349,15 @@
boolean.processInterval(container, ivl, count);
for(std::size_t i = 0; i < container.size(); ++i) {
std::pair<interval_data<Unit>, int>& element = container[i];
- if(!output.empty() && output.back().first == prevCoord &&
+ if(!output.empty() && output.back().first == prevCoord &&
output.back().second.first == element.first.low() &&
output.back().second.second == element.second * -1) {
output.pop_back();
} else {
- output.push_back(std::pair<Unit, std::pair<Unit, int> >(prevCoord, std::pair<Unit, int>(element.first.low(),
+ output.push_back(std::pair<Unit, std::pair<Unit, int> >(prevCoord, std::pair<Unit, int>(element.first.low(),
element.second)));
}
- output.push_back(std::pair<Unit, std::pair<Unit, int> >(prevCoord, std::pair<Unit, int>(element.first.high(),
+ output.push_back(std::pair<Unit, std::pair<Unit, int> >(prevCoord, std::pair<Unit, int>(element.first.high(),
element.second * -1)));
}
}
@@ -379,11 +379,11 @@
}
inputOutput.insert(inputOutput.end(), output.begin(), output.end());
}
-
+
template <typename Unit>
inline void applyUnaryXOr(std::vector<std::pair<Unit, std::pair<Unit, int> > >& input) {
BooleanOp<UnaryCount, Unit> booleanXOr;
-
+
}
template <typename count_type = int>
@@ -416,15 +416,15 @@
booleanOr.processInterval(container, ivl, count_type(count));
for(std::size_t i = 0; i < container.size(); ++i) {
std::pair<interval_data<Unit>, int>& element = container[i];
- if(!output.empty() && output.back().first == prevPos &&
+ if(!output.empty() && output.back().first == prevPos &&
output.back().second.first == element.first.low() &&
output.back().second.second == element.second * -1) {
output.pop_back();
} else {
- output.push_back(std::pair<Unit, std::pair<Unit, int> >(prevPos, std::pair<Unit, int>(element.first.low(),
+ output.push_back(std::pair<Unit, std::pair<Unit, int> >(prevPos, std::pair<Unit, int>(element.first.low(),
element.second)));
}
- output.push_back(std::pair<Unit, std::pair<Unit, int> >(prevPos, std::pair<Unit, int>(element.first.high(),
+ output.push_back(std::pair<Unit, std::pair<Unit, int> >(prevPos, std::pair<Unit, int>(element.first.high(),
element.second * -1)));
}
}
@@ -435,7 +435,7 @@
input = std::vector<std::pair<Unit, std::pair<Unit, int> > >();
} else {
input.clear();
- }
+ }
input.insert(input.end(), output.begin(), output.end());
}
};
Modified: trunk/boost/polygon/detail/boolean_op_45.hpp
==============================================================================
--- trunk/boost/polygon/detail/boolean_op_45.hpp (original)
+++ trunk/boost/polygon/detail/boolean_op_45.hpp 2012-05-09 15:33:59 EDT (Wed, 09 May 2012)
@@ -1,6 +1,6 @@
/*
Copyright 2008 Intel Corporation
-
+
Use, modification and distribution are subject to the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
@@ -16,20 +16,20 @@
class Count2 {
public:
- inline Count2()
-#ifndef BOOST_POLYGON_MSVC
- : counts()
+ inline Count2()
+#ifndef BOOST_POLYGON_MSVC
+ : counts()
#endif
{ counts[0] = counts[1] = 0; }
//inline Count2(int count) { counts[0] = counts[1] = count; }
- inline Count2(int count1, int count2)
-#ifndef BOOST_POLYGON_MSVC
- : counts()
+ inline Count2(int count1, int count2)
+#ifndef BOOST_POLYGON_MSVC
+ : counts()
#endif
{ counts[0] = count1; counts[1] = count2; }
- inline Count2(const Count2& count)
-#ifndef BOOST_POLYGON_MSVC
- : counts()
+ inline Count2(const Count2& count)
+#ifndef BOOST_POLYGON_MSVC
+ : counts()
#endif
{ counts[0] = count.counts[0]; counts[1] = count.counts[1]; }
inline bool operator==(const Count2& count) const { return counts[0] == count.counts[0] && counts[1] == count.counts[1]; }
@@ -108,7 +108,7 @@
inline Scan45ElementT(const Scan45ElementT& that) :
x(that.x), y(that.y), rise(that.rise), count(that.count) {}
inline Scan45ElementT& operator=(const Scan45ElementT& that) {
- x = that.x; y = that.y; rise = that.rise; count = that.count;
+ x = that.x; y = that.y; rise = that.rise; count = that.count;
return *this;
}
inline Unit evalAtX(Unit xIn) const {
@@ -142,7 +142,7 @@
return true;
}
};
-
+
typedef Scan45ElementT<Count2> Scan45Element;
// inline std::ostream& operator<< (std::ostream& o, const Scan45Element& c) {
@@ -168,7 +168,7 @@
inline lessScan45Element(Unit *x, int *justBefore) : x_(x), justBefore_(justBefore) {}
inline lessScan45Element(const lessScan45Element& that) : x_(that.x_), justBefore_(that.justBefore_) {}
inline lessScan45Element& operator=(const lessScan45Element& that) { x_ = that.x_; justBefore_ = that.justBefore_; return *this; }
- inline bool operator () (const Scan45ElementT<CountType>& elm1,
+ inline bool operator () (const Scan45ElementT<CountType>& elm1,
const Scan45ElementT<CountType>& elm2) const {
Unit y1 = elm1.evalAtX(*x_);
Unit y2 = elm2.evalAtX(*x_);
@@ -190,42 +190,42 @@
public:
inline Scan45CountT() : counts() {} //counts[0] = counts[1] = counts[2] = counts[3] = 0; }
inline Scan45CountT(CountType count) : counts() { counts[0] = counts[1] = counts[2] = counts[3] = count; }
- inline Scan45CountT(const CountType& count1, const CountType& count2, const CountType& count3,
- const CountType& count4) : counts() {
- counts[0] = count1;
- counts[1] = count2;
+ inline Scan45CountT(const CountType& count1, const CountType& count2, const CountType& count3,
+ const CountType& count4) : counts() {
+ counts[0] = count1;
+ counts[1] = count2;
counts[2] = count3;
- counts[3] = count4;
+ counts[3] = count4;
}
- inline Scan45CountT(const Scan45CountT& count) : counts() {
+ inline Scan45CountT(const Scan45CountT& count) : counts() {
(*this) = count;
}
- inline bool operator==(const Scan45CountT& count) const {
+ inline bool operator==(const Scan45CountT& count) const {
for(unsigned int i = 0; i < 4; ++i) {
- if(counts[i] != count.counts[i]) return false;
+ if(counts[i] != count.counts[i]) return false;
}
return true;
}
inline bool operator!=(const Scan45CountT& count) const { return !((*this) == count); }
- inline Scan45CountT& operator=(CountType count) {
+ inline Scan45CountT& operator=(CountType count) {
counts[0] = counts[1] = counts[2] = counts[3] = count; return *this; }
inline Scan45CountT& operator=(const Scan45CountT& count) {
for(unsigned int i = 0; i < 4; ++i) {
- counts[i] = count.counts[i];
+ counts[i] = count.counts[i];
}
- return *this;
+ return *this;
}
inline CountType& operator[](int index) { return counts[index]; }
inline CountType operator[](int index) const {return counts[index]; }
inline Scan45CountT& operator+=(const Scan45CountT& count){
for(unsigned int i = 0; i < 4; ++i) {
- counts[i] += count.counts[i];
+ counts[i] += count.counts[i];
}
return *this;
}
inline Scan45CountT& operator-=(const Scan45CountT& count){
for(unsigned int i = 0; i < 4; ++i) {
- counts[i] -= count.counts[i];
+ counts[i] -= count.counts[i];
}
return *this;
}
@@ -270,7 +270,7 @@
inline Vertex45T() : pt(), rise(), count() {}
inline Vertex45T(const Point& point, int riseIn, ct countIn) : pt(point), rise(riseIn), count(countIn) {}
inline Vertex45T(const Vertex45T& vertex) : pt(vertex.pt), rise(vertex.rise), count(vertex.count) {}
- inline Vertex45T& operator=(const Vertex45T& vertex){
+ inline Vertex45T& operator=(const Vertex45T& vertex){
pt = vertex.pt; rise = vertex.rise; count = vertex.count; return *this; }
inline Vertex45T(const std::pair<Point, Point>& vertex) : pt(), rise(), count() {}
inline Vertex45T& operator=(const std::pair<Point, Point>& vertex){ return *this; }
@@ -307,13 +307,13 @@
int *justBefore_;
public:
inline lessVertex45() : x_(0), justBefore_() {}
-
+
inline lessVertex45(Unit *x, int *justBefore) : x_(x), justBefore_(justBefore) {}
-
+
inline lessVertex45(const lessVertex45& that) : x_(that.x_), justBefore_(that.justBefore_) {}
-
+
inline lessVertex45& operator=(const lessVertex45& that) { x_ = that.x_; justBefore_ = that.justBefore_; return *this; }
-
+
template <typename ct>
inline bool operator () (const Vertex45T<ct>& elm1, const Vertex45T<ct>& elm2) const {
Unit y1 = elm1.evalAtX(*x_);
@@ -390,7 +390,7 @@
template <int op>
struct boolean_op_45_output_functor {
template <typename cT>
- void operator()(cT& output, const Count2& count1, const Count2& count2,
+ void operator()(cT& output, const Count2& count1, const Count2& count2,
const Point& pt, int rise, direction_1d end) {
int edgeType = applyLogic<op>(count1, count2);
if(edgeType) {
@@ -423,7 +423,7 @@
template <int op>
struct unary_op_45_output_functor {
template <typename cT>
- void operator()(cT& output, const Count1& count1, const Count1& count2,
+ void operator()(cT& output, const Count1& count1, const Count1& count2,
const Point& pt, int rise, direction_1d end) {
int edgeType = applyLogic<op>(count1, count2);
if(edgeType) {
@@ -453,12 +453,12 @@
public:
typedef Scan45CountT<CountType> Scan45Count;
typedef std::pair<Point, Scan45Count> Scan45Vertex;
-
+
//index is the index into the vertex
static inline Scan45Element getElement(const Scan45Vertex& vertex, int index) {
return Scan45Element(vertex.first.x(), vertex.first.y(), index - 1, vertex.second[index]);
}
-
+
class lessScan45Point : public std::binary_function<Point, Point, bool> {
public:
inline lessScan45Point() {} //default constructor is only constructor
@@ -466,7 +466,7 @@
return (v1.x() < v2.x()) || (v1.x() == v2.x() && v1.y() < v2.y());
}
};
-
+
typedef std::vector<Scan45Vertex> Scan45Vector;
//definitions
@@ -474,7 +474,7 @@
typedef typename Scan45Data::iterator iterator;
typedef typename Scan45Data::const_iterator const_iterator;
typedef std::set<Point, lessScan45Point> CrossQueue;
-
+
//data
Scan45Data scanData_;
CrossQueue crossQueue_;
@@ -482,19 +482,19 @@
Unit x_;
int justBefore_;
public:
- inline Scan45() : scanData_(), crossQueue_(), crossVector_(),
+ inline Scan45() : scanData_(), crossQueue_(), crossVector_(),
x_((std::numeric_limits<Unit>::min)()), justBefore_(false) {
lessScan45Element<CountType> lessElm(&x_, &justBefore_);
scanData_ = std::set<Scan45ElementT<CountType>, lessScan45Element<CountType> >(lessElm);
}
- inline Scan45(const Scan45& that) : scanData_(), crossQueue_(), crossVector_(),
+ inline Scan45(const Scan45& that) : scanData_(), crossQueue_(), crossVector_(),
x_((std::numeric_limits<Unit>::min)()), justBefore_(false) {
(*this) = that; }
inline Scan45& operator=(const Scan45& that) {
x_ = that.x_;
justBefore_ = that.justBefore_;
- crossQueue_ = that.crossQueue_;
- crossVector_ = that.crossVector_;
+ crossQueue_ = that.crossQueue_;
+ crossVector_ = that.crossVector_;
lessScan45Element<CountType> lessElm(&x_, &justBefore_);
scanData_ = std::set<Scan45ElementT<CountType>, lessScan45Element<CountType> >(lessElm);
for(const_iterator itr = that.scanData_.begin(); itr != that.scanData_.end(); ++itr){
@@ -502,7 +502,7 @@
}
return *this;
}
-
+
//cT is an output container of Vertex45
//iT is an iterator over Scan45Vertex elements
template <class cT, class iT>
@@ -623,7 +623,7 @@
for(std::size_t i = 0; i < numEdges; ++i) {
eraseVec.push_back(eraseItrs[i]);
}
-
+
//take the derivative wrt theta of the count at the crossing point
vertex.second[2] = count[2] - countBelow;
vertex.second[1] = count[1] - count[2];
@@ -650,7 +650,7 @@
findCross_(searchVec[i]);
}
}
-
+
template <class iT>
inline iT mergeCross_(iT inputBegin, iT inputEnd) {
Scan45Vector vec;
@@ -677,7 +677,7 @@
}
return inputBegin;
}
-
+
template <class cT, class iT>
inline iT processEvent_(cT& output, iT inputBegin, iT inputEnd) {
//std::cout << "processEvent_\n";
@@ -695,12 +695,12 @@
prevIter->evalAtX(x_) < vertex.first.y())) {
//std::cout << "faking null event\n";
vertex = Scan45Vertex(Point(x_, prevIter->evalAtX(x_)), Scan45Count());
- } else {
- ++inputBegin;
+ } else {
+ ++inputBegin;
//std::cout << "after increment\n";
//accumulate overlapping changes in Scan45Count
while(inputBegin != inputEnd &&
- (*inputBegin).first.x() == x_ &&
+ (*inputBegin).first.x() == x_ &&
(*inputBegin).first.y() == vertex.first.y()) {
//std::cout << "accumulate\n";
vertex.second += (*inputBegin).second;
@@ -715,7 +715,7 @@
}
//std::cout << vertex.second << std::endl;
//vertex represents the change in state at this point
-
+
//get counts at current vertex
CountType countBelow;
iterator lowIter = lookUp_(vertex.first.y());
@@ -764,15 +764,15 @@
//std::cout << "ADD\n";
vertex.second += countAt;
//std::cout << vertex.second << std::endl;
-
+
//add elements to the scanline
for(int i = 0; i < 3; ++i) {
if(vertex.second[i] != countBelow) {
//std::cout << "insert: " << vertex.first.x() << " " << vertex.first.y() << " " << i-1 <<
// " " << vertex.second[i][0] << " " << vertex.second[i][1] << std::endl;
- iterator insertIter = scanData_.insert(scanData_.end(),
- Scan45ElementT<CountType>(vertex.first.x(),
- vertex.first.y(),
+ iterator insertIter = scanData_.insert(scanData_.end(),
+ Scan45ElementT<CountType>(vertex.first.x(),
+ vertex.first.y(),
i - 1, vertex.second[i]));
findCross_(insertIter);
output_functor f;
@@ -784,7 +784,7 @@
//std::cout << "end processEvent\n";
return inputBegin;
}
-
+
//iter1 is horizontal
inline void scheduleCross0_(iterator iter1, iterator iter2) {
//std::cout << "0, ";
@@ -815,7 +815,7 @@
throw(msg);
} else {
//note that result of this subtraction is always positive because itr1 is above itr2 in scanline
- LongUnit halfDelta2 = (LongUnit)((((LongUnit)y1) - y2)/2);
+ LongUnit halfDelta2 = (LongUnit)((((LongUnit)y1) - y2)/2);
//note that halfDelta2 has been truncated
if(halfDelta2 + x_ <= UnitMax && halfDelta2 + y2 <= UnitMax) {
crossQueue_.insert(crossQueue_.end(), Point(x_+static_cast<Unit>(halfDelta2), y2+static_cast<Unit>(halfDelta2)));
@@ -823,13 +823,13 @@
}
}
} else {
- LongUnit halfDelta = (LongUnit)((((LongUnit)y1) - y2)/2);
+ LongUnit halfDelta = (LongUnit)((((LongUnit)y1) - y2)/2);
if(halfDelta + x_ <= UnitMax && halfDelta + y2 <= UnitMax)
crossQueue_.insert(crossQueue_.end(), Point(x_+static_cast<Unit>(halfDelta), y2+static_cast<Unit>(halfDelta)));
//std::cout << Point(x_+halfDelta, y2+halfDelta);
}
}
-
+
inline void findCross_(iterator iter) {
//std::cout << "find cross ";
iterator iteratorBelow = iter;
@@ -839,7 +839,7 @@
if(iter->rise == 0){
if(iteratorBelow->rise == 1) {
scheduleCross0_(iter, iteratorBelow);
- }
+ }
} else {
//iter->rise == -1
if(iteratorBelow->rise == 1) {
@@ -863,10 +863,10 @@
scheduleCross0_(iteratorAbove, iter);
}
}
- }
- //std::cout << std::endl;
- }
-
+ }
+ //std::cout << std::endl;
+ }
+
inline iterator lookUp_(Unit y){
//if just before then we need to look from 1 not -1
return scanData_.lower_bound(Scan45ElementT<CountType>(x_, y, -1+2*justBefore_));
@@ -874,7 +874,7 @@
};
//template <typename CountType>
- //static inline void print45Data(const std::set<Scan45ElementT<CountType>,
+ //static inline void print45Data(const std::set<Scan45ElementT<CountType>,
// lessScan45Element<CountType> >& data) {
// typename std::set<Scan45ElementT<CountType>, lessScan45Element<CountType> >::const_iterator iter;
// for(iter = data.begin(); iter != data.end(); ++iter) {
@@ -920,7 +920,7 @@
stdcout << "done testing Scan45Data\n";
return true;
}
-
+
template <typename stream_type>
static inline bool testScan45Rect(stream_type& stdcout) {
stdcout << "testing Scan45Rect\n";
@@ -1306,7 +1306,7 @@
return true;
}
-
+
template <typename stream_type>
static inline bool testScan45Star4(stream_type& stdcout) {
stdcout << "testing Scan45Star4\n";
Modified: trunk/boost/polygon/detail/iterator_compact_to_points.hpp
==============================================================================
--- trunk/boost/polygon/detail/iterator_compact_to_points.hpp (original)
+++ trunk/boost/polygon/detail/iterator_compact_to_points.hpp 2012-05-09 15:33:59 EDT (Wed, 09 May 2012)
@@ -1,6 +1,6 @@
/*
Copyright 2008 Intel Corporation
-
+
Use, modification and distribution are subject to the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
@@ -24,7 +24,7 @@
typedef const point_type& reference; //immutable
inline iterator_compact_to_points() : iter_(), iter_end_(), pt_(), firstX_(), orient_() {}
- inline iterator_compact_to_points(iterator_type iter, iterator_type iter_end) :
+ inline iterator_compact_to_points(iterator_type iter, iterator_type iter_end) :
iter_(iter), iter_end_(iter_end), pt_(), firstX_(), orient_(HORIZONTAL) {
if(iter_ != iter_end_) {
firstX_ = *iter_;
@@ -66,4 +66,3 @@
}
}
#endif
-
Modified: trunk/boost/polygon/detail/iterator_geometry_to_set.hpp
==============================================================================
--- trunk/boost/polygon/detail/iterator_geometry_to_set.hpp (original)
+++ trunk/boost/polygon/detail/iterator_geometry_to_set.hpp 2012-05-09 15:33:59 EDT (Wed, 09 May 2012)
@@ -1,6 +1,6 @@
/*
Copyright 2008 Intel Corporation
-
+
Use, modification and distribution are subject to the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
@@ -28,8 +28,8 @@
bool is_hole_;
public:
iterator_geometry_to_set() : rectangle_(), vertex_(), corner_(4), orient_(), is_hole_() {}
- iterator_geometry_to_set(const rectangle_type& rectangle, direction_1d dir,
- orientation_2d orient = HORIZONTAL, bool is_hole = false, bool = false, direction_1d = CLOCKWISE) :
+ iterator_geometry_to_set(const rectangle_type& rectangle, direction_1d dir,
+ orientation_2d orient = HORIZONTAL, bool is_hole = false, bool = false, direction_1d = CLOCKWISE) :
rectangle_(), vertex_(), corner_(0), orient_(orient), is_hole_(is_hole) {
assign(rectangle_, rectangle);
if(dir == HIGH) corner_ = 4;
@@ -67,7 +67,7 @@
vertex_.second.second = 1;
if(is_hole_) vertex_.second.second *= -1;
}
- return vertex_;
+ return vertex_;
}
};
@@ -93,9 +93,9 @@
int polygon_index;
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(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_(),
- is_hole_(is_hole), multiplier_(), first_pt(), second_pt(), pts(), use_wrap(),
+ 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_(),
+ is_hole_(is_hole), multiplier_(), first_pt(), second_pt(), pts(), use_wrap(),
orient_(orient), polygon_index(0) {
itrb = begin_points(polygon);
itre = end_points(polygon);
@@ -116,7 +116,7 @@
evaluate_();
}
}
- iterator_geometry_to_set(const iterator_geometry_to_set& that) :
+ iterator_geometry_to_set(const iterator_geometry_to_set& that) :
vertex_(), itrb(), itre(), last_vertex_(), is_hole_(), multiplier_(), first_pt(),
second_pt(), pts(), use_wrap(), orient_(), polygon_index(-1) {
vertex_ = that.vertex_;
@@ -176,7 +176,7 @@
return !(*this == that);
}
inline reference operator*() const {
- return vertex_;
+ return vertex_;
}
inline void evaluate_() {
@@ -185,7 +185,7 @@
if(pts[1] == pts[2]) {
vertex_.second.second = 0;
} else 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)) {
vertex_.second.second = 1;
} else {
@@ -213,8 +213,8 @@
bool started_holes;
public:
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,
- orientation_2d orient = HORIZONTAL, bool is_hole = false, bool = false, direction_1d = CLOCKWISE) :
+ iterator_geometry_to_set(const polygon_with_holes_type& polygon, direction_1d dir,
+ 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() {
itre = iterator_geometry_to_set<polygon_90_concept, polygon_with_holes_type>(polygon, HIGH, orient, is_hole_);
itrhe = end_holes(polygon);
@@ -228,7 +228,7 @@
started_holes = false;
}
}
- iterator_geometry_to_set(const iterator_geometry_to_set& that) :
+ iterator_geometry_to_set(const iterator_geometry_to_set& that) :
itrb(), itre(), itrhib(), itrhie(), itrhb(), itrhe(), orient_(), is_hole_(), started_holes() {
itrb = that.itrb;
itre = that.itre;
@@ -247,9 +247,9 @@
if(itrb == itre) {
if(itrhib == itrhie) {
if(itrhb != itrhe) {
- itrhib = iterator_geometry_to_set<polygon_90_concept,
+ itrhib = iterator_geometry_to_set<polygon_90_concept,
typename polygon_with_holes_traits<polygon_with_holes_type>::hole_type>(*itrhb, LOW, orient_, !is_hole_);
- itrhie = iterator_geometry_to_set<polygon_90_concept,
+ itrhie = iterator_geometry_to_set<polygon_90_concept,
typename polygon_with_holes_traits<polygon_with_holes_type>::hole_type>(*itrhb, HIGH, orient_, !is_hole_);
++itrhb;
} else {
@@ -258,21 +258,21 @@
//both point to end of the previous hole processed
//no need to explicitly reset them, and it causes an stl debug assertion to use
//the default constructed iterator this way
- //itrhib = itrhie = iterator_geometry_to_set<polygon_90_concept,
+ //itrhib = itrhie = iterator_geometry_to_set<polygon_90_concept,
// typename polygon_with_holes_traits<polygon_with_holes_type>::hole_type>();
}
} else {
++itrhib;
if(itrhib == itrhie) {
if(itrhb != itrhe) {
- itrhib = iterator_geometry_to_set<polygon_90_concept,
+ itrhib = iterator_geometry_to_set<polygon_90_concept,
typename polygon_with_holes_traits<polygon_with_holes_type>::hole_type>(*itrhb, LOW, orient_, !is_hole_);
- itrhie = iterator_geometry_to_set<polygon_90_concept,
+ itrhie = iterator_geometry_to_set<polygon_90_concept,
typename polygon_with_holes_traits<polygon_with_holes_type>::hole_type>(*itrhb, HIGH, orient_, !is_hole_);
++itrhb;
} else {
//this is the same case as above
- //itrhib = itrhie = iterator_geometry_to_set<polygon_90_concept,
+ //itrhib = itrhie = iterator_geometry_to_set<polygon_90_concept,
// typename polygon_with_holes_traits<polygon_with_holes_type>::hole_type>();
}
}
@@ -281,9 +281,9 @@
++itrb;
if(itrb == itre) {
if(itrhb != itrhe) {
- itrhib = iterator_geometry_to_set<polygon_90_concept,
+ itrhib = iterator_geometry_to_set<polygon_90_concept,
typename polygon_with_holes_traits<polygon_with_holes_type>::hole_type>(*itrhb, LOW, orient_, !is_hole_);
- itrhie = iterator_geometry_to_set<polygon_90_concept,
+ itrhie = iterator_geometry_to_set<polygon_90_concept,
typename polygon_with_holes_traits<polygon_with_holes_type>::hole_type>(*itrhb, HIGH, orient_, !is_hole_);
++itrhb;
}
@@ -312,4 +312,3 @@
}
}
#endif
-
Modified: trunk/boost/polygon/detail/max_cover.hpp
==============================================================================
--- trunk/boost/polygon/detail/max_cover.hpp (original)
+++ trunk/boost/polygon/detail/max_cover.hpp 2012-05-09 15:33:59 EDT (Wed, 09 May 2012)
@@ -1,6 +1,6 @@
/*
Copyright 2008 Intel Corporation
-
+
Use, modification and distribution are subject to the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
@@ -35,7 +35,7 @@
};
typedef std::pair<std::pair<Unit, Interval>, Node* > EdgeAssociation;
-
+
class lessEdgeAssociation : public std::binary_function<const EdgeAssociation&, const EdgeAssociation&, bool> {
public:
inline lessEdgeAssociation() {}
@@ -83,7 +83,7 @@
};
template <class cT>
- static inline void getMaxCover(cT& outputContainer, Node* node, orientation_2d orient,
+ static inline void getMaxCover(cT& outputContainer, Node* node, orientation_2d orient,
Rectangle rect) {
//std::cout << "New Root\n";
std::vector<stack_element> stack;
@@ -170,7 +170,7 @@
Because the code is so much simpler than the loop algorithm I retain it for clarity
template <class cT>
- static inline void getMaxCover(cT& outputContainer, Node* node, orientation_2d orient,
+ static inline void getMaxCover(cT& outputContainer, Node* node, orientation_2d orient,
const Rectangle& rect) {
Interval rectIvl = rect.get(orient);
Interval nodeIvl = node->rect.get(orient);
@@ -205,7 +205,7 @@
template <class iT>
static inline void computeDag(iT beginNode, iT endNode, orientation_2d orient,
std::size_t size) {
- std::vector<EdgeAssociation> leadingEdges;
+ std::vector<EdgeAssociation> leadingEdges;
leadingEdges.reserve(size);
for(iT iter = beginNode; iter != endNode; ++iter) {
Node* nodep = &(*iter);
Modified: trunk/boost/polygon/detail/minkowski.hpp
==============================================================================
--- trunk/boost/polygon/detail/minkowski.hpp (original)
+++ trunk/boost/polygon/detail/minkowski.hpp 2012-05-09 15:33:59 EDT (Wed, 09 May 2012)
@@ -62,11 +62,11 @@
a.get(a_polygons);
b.get(b_polygons);
for(std::size_t ai = 0; ai < a_polygons.size(); ++ai) {
- convolve_point_sequence_with_polygons(result, begin_points(a_polygons[ai]),
+ convolve_point_sequence_with_polygons(result, begin_points(a_polygons[ai]),
end_points(a_polygons[ai]), b_polygons);
for(typename polygon_with_holes_traits<polygon>::iterator_holes_type itrh = begin_holes(a_polygons[ai]);
itrh != end_holes(a_polygons[ai]); ++itrh) {
- convolve_point_sequence_with_polygons(result, begin_points(*itrh),
+ convolve_point_sequence_with_polygons(result, begin_points(*itrh),
end_points(*itrh), b_polygons);
}
for(std::size_t bi = 0; bi < b_polygons.size(); ++bi) {
@@ -100,9 +100,9 @@
::boost::polygon::bloat(rect, 10);
(*this) = rect - (*this); //invert
}
- //make_arc(std::vector<point_data< T> >& return_points,
+ //make_arc(std::vector<point_data< T> >& return_points,
//point_data< double> start, point_data< double> end,
- //point_data< double> center, double r, unsigned int num_circle_segments)
+ //point_data< double> center, double r, unsigned int num_circle_segments)
std::vector<point_data<coordinate_type> > circle;
point_data<double> center(0.0, 0.0), start(0.0, (double)resizing);
make_arc(circle, start, start, center, std::abs((double)resizing),
Modified: trunk/boost/polygon/detail/polygon_45_formation.hpp
==============================================================================
--- trunk/boost/polygon/detail/polygon_45_formation.hpp (original)
+++ trunk/boost/polygon/detail/polygon_45_formation.hpp 2012-05-09 15:33:59 EDT (Wed, 09 May 2012)
@@ -1,6 +1,6 @@
/*
Copyright 2008 Intel Corporation
-
+
Use, modification and distribution are subject to the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
@@ -30,7 +30,7 @@
typedef std::pair<Point, Scan45Count> Scan45Vertex;
typedef typename boolean_op_45<Unit>::template
Scan45<Count2, typename boolean_op_45<Unit>::template boolean_op_45_output_functor<0> > Scan45;
-
+
class PolyLine45 {
public:
typedef typename std::list<Point>::const_iterator iterator;
@@ -52,7 +52,7 @@
// copy constructor (since we have dynamic memory)
inline PolyLine45(const PolyLine45& that) : points(that.points) {}
-
+
// assignment operator (since we have dynamic memory do a deep copy)
inline PolyLine45& operator=(const PolyLine45& that) {
points = that.points;
@@ -68,31 +68,31 @@
inline std::size_t size() const { return points.size(); }
//public data member
- std::list<Point> points;
+ std::list<Point> points;
};
class ActiveTail45 {
private:
//data
- PolyLine45* tailp_;
+ PolyLine45* tailp_;
ActiveTail45 *otherTailp_;
std::list<ActiveTail45*> holesList_;
bool head_;
public:
-
+
/**
* @brief iterator over coordinates of the figure
*/
typedef typename PolyLine45::iterator iterator;
-
+
/**
* @brief iterator over holes contained within the figure
*/
typedef typename std::list<ActiveTail45*>::const_iterator iteratorHoles;
-
+
//default constructor
inline ActiveTail45() : tailp_(0), otherTailp_(0), holesList_(), head_(0) {}
-
+
//constructor
inline ActiveTail45(const Vertex45& vertex, ActiveTail45* otherTailp = 0) :
tailp_(0), otherTailp_(0), holesList_(), head_(0) {
@@ -110,7 +110,7 @@
tailp_->points.push_back(point);
head_ = head;
otherTailp_ = otherTailp;
-
+
}
inline ActiveTail45(ActiveTail45* otherTailp) :
tailp_(0), otherTailp_(0), holesList_(), head_(0) {
@@ -155,7 +155,7 @@
* @brief get the pointer to the activetail at the other end of the chain
*/
inline ActiveTail45* getOtherActiveTail() const { return otherTailp_; }
-
+
/**
* @brief test if another active tail is the other end of the chain
*/
@@ -298,7 +298,7 @@
*/
template <class cT>
- static inline ActiveTail45* joinChains(Point point, ActiveTail45* at1, ActiveTail45* at2, bool solid,
+ static inline ActiveTail45* joinChains(Point point, ActiveTail45* at1, ActiveTail45* at2, bool solid,
cT& output) {
if(at1->otherTailp_ == at2) {
//if(at2->otherTailp_ != at1) std::cout << "half closed error\n";
@@ -370,7 +370,7 @@
// std::cout << this << " " << tailp_ << " " << otherTailp_ << " " << holesList_.size() << " " << head_ << std::endl;
// }
- static inline std::pair<ActiveTail45*, ActiveTail45*> createActiveTail45sAsPair(Point point, bool solid,
+ static inline std::pair<ActiveTail45*, ActiveTail45*> createActiveTail45sAsPair(Point point, bool solid,
ActiveTail45* phole, bool fractureHoles) {
ActiveTail45* at1 = 0;
ActiveTail45* at2 = 0;
@@ -386,7 +386,7 @@
at2 = new ActiveTail45(at1);
at1->otherTailp_ = at2;
at2->head_ = !solid;
- if(phole)
+ if(phole)
at2->addHole(phole); //assert fractureHoles == false
}
return std::pair<ActiveTail45*, ActiveTail45*>(at1, at2);
@@ -398,64 +398,64 @@
class Vertex45CountT {
public:
typedef ct count_type;
- inline Vertex45CountT()
-#ifndef BOOST_POLYGON_MSVC
- : counts()
+ inline Vertex45CountT()
+#ifndef BOOST_POLYGON_MSVC
+ : counts()
#endif
{ counts[0] = counts[1] = counts[2] = counts[3] = 0; }
//inline Vertex45CountT(ct count) { counts[0] = counts[1] = counts[2] = counts[3] = count; }
- inline Vertex45CountT(const ct& count1, const ct& count2, const ct& count3,
+ inline Vertex45CountT(const ct& count1, const ct& count2, const ct& count3,
const ct& count4)
-#ifndef BOOST_POLYGON_MSVC
- : counts()
-#endif
- {
- counts[0] = count1;
- counts[1] = count2;
+#ifndef BOOST_POLYGON_MSVC
+ : counts()
+#endif
+ {
+ counts[0] = count1;
+ counts[1] = count2;
counts[2] = count3;
- counts[3] = count4;
+ counts[3] = count4;
}
inline Vertex45CountT(const Vertex45& vertex)
-#ifndef BOOST_POLYGON_MSVC
- : counts()
-#endif
- {
+#ifndef BOOST_POLYGON_MSVC
+ : counts()
+#endif
+ {
counts[0] = counts[1] = counts[2] = counts[3] = 0;
(*this) += vertex;
}
inline Vertex45CountT(const Vertex45CountT& count)
-#ifndef BOOST_POLYGON_MSVC
- : counts()
-#endif
- {
+#ifndef BOOST_POLYGON_MSVC
+ : counts()
+#endif
+ {
(*this) = count;
}
- inline bool operator==(const Vertex45CountT& count) const {
+ inline bool operator==(const Vertex45CountT& count) const {
for(unsigned int i = 0; i < 4; ++i) {
- if(counts[i] != count.counts[i]) return false;
+ if(counts[i] != count.counts[i]) return false;
}
return true;
}
inline bool operator!=(const Vertex45CountT& count) const { return !((*this) == count); }
- inline Vertex45CountT& operator=(ct count) {
+ inline Vertex45CountT& operator=(ct count) {
counts[0] = counts[1] = counts[2] = counts[3] = count; return *this; }
inline Vertex45CountT& operator=(const Vertex45CountT& count) {
for(unsigned int i = 0; i < 4; ++i) {
- counts[i] = count.counts[i];
+ counts[i] = count.counts[i];
}
- return *this;
+ return *this;
}
inline ct& operator[](int index) { return counts[index]; }
inline ct operator[](int index) const {return counts[index]; }
inline Vertex45CountT& operator+=(const Vertex45CountT& count){
for(unsigned int i = 0; i < 4; ++i) {
- counts[i] += count.counts[i];
+ counts[i] += count.counts[i];
}
return *this;
}
inline Vertex45CountT& operator-=(const Vertex45CountT& count){
for(unsigned int i = 0; i < 4; ++i) {
- counts[i] -= count.counts[i];
+ counts[i] -= count.counts[i];
}
return *this;
}
@@ -501,7 +501,7 @@
count[vertex.rise+1] = vertex.count;
}
inline Vertex45CompactT(const Vertex45CompactT& vertex) : pt(vertex.pt), count(vertex.count) {}
- inline Vertex45CompactT& operator=(const Vertex45CompactT& vertex){
+ inline Vertex45CompactT& operator=(const Vertex45CompactT& vertex){
pt = vertex.pt; count = vertex.count; return *this; }
inline bool operator==(const Vertex45CompactT& vertex) const {
return pt == vertex.pt && count == vertex.count; }
@@ -536,12 +536,12 @@
typedef std::map<Vertex45, ActiveTail45*, lessVertex45> Polygon45FormationData;
typedef typename Polygon45FormationData::iterator iterator;
typedef typename Polygon45FormationData::const_iterator const_iterator;
-
+
//data
Polygon45FormationData scanData_;
Unit x_;
int justBefore_;
- int fractureHoles_;
+ int fractureHoles_;
public:
inline Polygon45Formation() : scanData_(), x_((std::numeric_limits<Unit>::min)()), justBefore_(false), fractureHoles_(0) {
lessVertex45 lessElm(&x_, &justBefore_);
@@ -564,7 +564,7 @@
}
return *this;
}
-
+
//cT is an output container of Polygon45 or Polygon45WithHoles
//iT is an iterator over Vertex45 elements
//inputBegin - inputEnd is a range of sorted iT that represents
@@ -585,8 +585,8 @@
private:
//functions
template <class cT, class cT2>
- inline std::pair<int, ActiveTail45*> processPoint_(cT& output, cT2& elements, Point point,
- Vertex45Count& counts, ActiveTail45** tails, Vertex45Count& incoming) {
+ inline std::pair<int, ActiveTail45*> processPoint_(cT& output, cT2& elements, Point point,
+ Vertex45Count& counts, ActiveTail45** tails, Vertex45Count& incoming) {
//std::cout << point << std::endl;
//std::cout << counts[0] << " ";
//std::cout << counts[1] << " ";
@@ -609,7 +609,7 @@
if(counts[j] == 1) {
//std::cout << "case1: " << i << " " << j << std::endl;
//if a figure is closed it will be written out by this function to output
- ActiveTail45::joinChains(point, tails[i], tails[j], true, output);
+ ActiveTail45::joinChains(point, tails[i], tails[j], true, output);
counts[i] = 0;
counts[j] = 0;
tails[i] = 0;
@@ -632,7 +632,7 @@
if(incoming[j] == -1) {
//std::cout << "case2: " << i << " " << j << std::endl;
//std::cout << "creating active tail pair\n";
- std::pair<ActiveTail45*, ActiveTail45*> tailPair =
+ std::pair<ActiveTail45*, ActiveTail45*> tailPair =
ActiveTail45::createActiveTail45sAsPair(point, true, 0, fractureHoles_ != 0);
//tailPair.first->print();
//tailPair.second->print();
@@ -740,7 +740,7 @@
}
break;
}
- }
+ }
//find beginning of a hole
for(int i = 0; i < 3; ++i) {
if(incoming[i] != 0) {
@@ -750,7 +750,7 @@
//we are beginning a empty space
ActiveTail45* holep = 0;
if(counts[3] == 0) holep = tails[3];
- std::pair<ActiveTail45*, ActiveTail45*> tailPair =
+ std::pair<ActiveTail45*, ActiveTail45*> tailPair =
ActiveTail45::createActiveTail45sAsPair(point, false, holep, fractureHoles_ != 0);
if(j == 3) {
returnValue = tailPair.first;
@@ -839,7 +839,7 @@
//we got a hole out of the point we just processed
//iter is still at the next y element above the current y value in the tree
//std::cout << "checking whether ot handle hole\n";
- if(currentIter == inputEnd ||
+ if(currentIter == inputEnd ||
currentIter->pt.x() != x_ ||
currentIter->pt.y() >= iter->first.evalAtX(x_)) {
//std::cout << "handle hole here\n";
@@ -882,12 +882,12 @@
//std::cout << "end processEvent\n";
return currentIter;
}
-
+
inline iterator lookUp_(Unit y){
//if just before then we need to look from 1 not -1
return scanData_.lower_bound(Vertex45(Point(x_, y), -1+2*justBefore_, 0));
}
-
+
};
template <typename stream_type>
@@ -935,7 +935,7 @@
stdcout << polys[i] << std::endl;
}
stdcout << "done testing polygon formation\n";
- return true;
+ return true;
}
//polygon45set class
@@ -952,7 +952,7 @@
data.push_back(Vertex45(Point(10, 10), 1, 1));
data.push_back(Vertex45(Point(10, 10), 0, -1));
data.push_back(Vertex45(Point(20, 10), 1, -1));
- data.push_back(Vertex45(Point(20, 10), 0, 1));
+ data.push_back(Vertex45(Point(20, 10), 0, 1));
polygon_sort(data.begin(), data.end());
pf.scan(polys, data.begin(), data.end());
stdcout << "result size: " << polys.size() << std::endl;
@@ -960,7 +960,7 @@
stdcout << polys[i] << std::endl;
}
stdcout << "done testing polygon formation\n";
- return true;
+ return true;
}
//polygon45set class
@@ -1025,7 +1025,7 @@
stdcout << polys[i] << std::endl;
}
stdcout << "done testing polygon formation\n";
- return true;
+ return true;
}
template <typename stream_type>
@@ -1050,7 +1050,7 @@
sortScan45Vector(vertices);
stdcout << "scanning\n";
scan45.scan(result, vertices.begin(), vertices.end());
-
+
polygon_sort(result.begin(), result.end());
pf.scan(polys, result.begin(), result.end());
stdcout << "result size: " << polys.size() << std::endl;
@@ -1058,7 +1058,7 @@
stdcout << polys[i] << std::endl;
}
stdcout << "done testing polygon formation\n";
- return true;
+ return true;
}
template <typename stream_type>
@@ -1130,7 +1130,7 @@
stdcout << polys[i] << std::endl;
}
stdcout << "done testing polygon formation\n";
- return true;
+ return true;
}
template <typename stream_type>
@@ -1202,7 +1202,7 @@
stdcout << polys[i] << std::endl;
}
stdcout << "done testing polygon formation\n";
- return true;
+ return true;
}
template <typename stream_type>
@@ -1211,7 +1211,7 @@
Polygon45Formation pf(false);
std::vector<Polygon45WithHoles> polys;
std::vector<Vertex45> data;
-
+
data.push_back(Vertex45(Point(0, 0), 0, 1));
data.push_back(Vertex45(Point(0, 0), 2, 1));
data.push_back(Vertex45(Point(0, 100), 2, -1));
@@ -1246,7 +1246,7 @@
stdcout << polys[i] << std::endl;
}
stdcout << "done testing polygon formation\n";
- return true;
+ return true;
}
@@ -1256,7 +1256,7 @@
typedef std::map<Vertex45, ActiveTail45*, lessVertex45> Polygon45FormationData;
typedef typename Polygon45FormationData::iterator iterator;
typedef typename Polygon45FormationData::const_iterator const_iterator;
-
+
//data
Polygon45FormationData scanData_;
Unit x_;
@@ -1266,7 +1266,7 @@
lessVertex45 lessElm(&x_, &justBefore_);
scanData_ = Polygon45FormationData(lessElm);
}
- inline Polygon45Tiling(const Polygon45Tiling& that) :
+ inline Polygon45Tiling(const Polygon45Tiling& that) :
scanData_(), x_((std::numeric_limits<Unit>::min)()), justBefore_(false) { (*this) = that; }
inline Polygon45Tiling& operator=(const Polygon45Tiling& that) {
x_ = that.x_;
@@ -1278,7 +1278,7 @@
}
return *this;
}
-
+
//cT is an output container of Polygon45 or Polygon45WithHoles
//iT is an iterator over Vertex45 elements
//inputBegin - inputEnd is a range of sorted iT that represents
@@ -1298,13 +1298,13 @@
private:
//functions
-
- inline void getVerticalPair_(std::pair<ActiveTail45*, ActiveTail45*>& verticalPair,
+
+ inline void getVerticalPair_(std::pair<ActiveTail45*, ActiveTail45*>& verticalPair,
iterator previter) {
ActiveTail45* iterTail = (*previter).second;
Point prevPoint(x_, previter->first.evalAtX(x_));
iterTail->pushPoint(prevPoint);
- std::pair<ActiveTail45*, ActiveTail45*> tailPair =
+ std::pair<ActiveTail45*, ActiveTail45*> tailPair =
ActiveTail45::createActiveTail45sAsPair(prevPoint, true, 0, false);
verticalPair.first = iterTail;
verticalPair.second = tailPair.first;
@@ -1312,10 +1312,10 @@
}
template <class cT, class cT2>
- inline std::pair<int, ActiveTail45*> processPoint_(cT& output, cT2& elements,
- std::pair<ActiveTail45*, ActiveTail45*>& verticalPair,
- iterator previter, Point point,
- Vertex45Count& counts, ActiveTail45** tails, Vertex45Count& incoming) {
+ inline std::pair<int, ActiveTail45*> processPoint_(cT& output, cT2& elements,
+ std::pair<ActiveTail45*, ActiveTail45*>& verticalPair,
+ iterator previter, Point point,
+ Vertex45Count& counts, ActiveTail45** tails, Vertex45Count& incoming) {
//std::cout << point << std::endl;
//std::cout << counts[0] << " ";
//std::cout << counts[1] << " ";
@@ -1341,7 +1341,7 @@
if(counts[j] == 1) {
//std::cout << "case1: " << i << " " << j << std::endl;
//if a figure is closed it will be written out by this function to output
- ActiveTail45::joinChains(point, tails[i], tails[j], true, output);
+ ActiveTail45::joinChains(point, tails[i], tails[j], true, output);
counts[i] = 0;
counts[j] = 0;
tails[i] = 0;
@@ -1364,7 +1364,7 @@
if(incoming[j] == -1) {
//std::cout << "case2: " << i << " " << j << std::endl;
//std::cout << "creating active tail pair\n";
- std::pair<ActiveTail45*, ActiveTail45*> tailPair =
+ std::pair<ActiveTail45*, ActiveTail45*> tailPair =
ActiveTail45::createActiveTail45sAsPair(point, true, 0, false);
//tailPair.first->print();
//tailPair.second->print();
@@ -1412,10 +1412,10 @@
returnCount = -1;
} else {
verticalPairOut.first = tails[i];
- std::pair<ActiveTail45*, ActiveTail45*> tailPair =
+ std::pair<ActiveTail45*, ActiveTail45*> tailPair =
ActiveTail45::createActiveTail45sAsPair(point, true, 0, false);
verticalPairOut.second = tailPair.first;
- elements.push_back(std::pair<Vertex45, ActiveTail45*>(Vertex45(point, j -1, incoming[j]),
+ elements.push_back(std::pair<Vertex45, ActiveTail45*>(Vertex45(point, j -1, incoming[j]),
tailPair.second));
}
tails[i] = 0;
@@ -1452,16 +1452,16 @@
if(verticalPair.first == 0) {
getVerticalPair_(verticalPair, previter);
}
- ActiveTail45::joinChains(point, tails[i], verticalPair.first, true, output);
+ ActiveTail45::joinChains(point, tails[i], verticalPair.first, true, output);
returnValue = verticalPair.second;
returnCount = 1;
} else {
if(verticalPair.first == 0) {
getVerticalPair_(verticalPair, previter);
}
- ActiveTail45::joinChains(point, tails[i], verticalPair.first, true, output);
+ ActiveTail45::joinChains(point, tails[i], verticalPair.first, true, output);
verticalPair.second->pushPoint(point);
- elements.push_back(std::pair<Vertex45, ActiveTail45*>(Vertex45(point, j -1, incoming[j]),
+ elements.push_back(std::pair<Vertex45, ActiveTail45*>(Vertex45(point, j -1, incoming[j]),
verticalPair.second));
}
tails[i] = 0;
@@ -1493,7 +1493,7 @@
if(verticalPair.first == 0) {
getVerticalPair_(verticalPair, previter);
}
- ActiveTail45::joinChains(point, tails[j], verticalPair.first, true, output);
+ ActiveTail45::joinChains(point, tails[j], verticalPair.first, true, output);
verticalPairOut.second = verticalPair.second;
}
tails[i] = 0;
@@ -1505,7 +1505,7 @@
}
break;
}
- }
+ }
//find beginning of a hole
for(int i = 0; i < 3; ++i) {
if(incoming[i] != 0) {
@@ -1521,7 +1521,7 @@
returnValue = verticalPair.first;
returnCount = -1;
} else {
- std::pair<ActiveTail45*, ActiveTail45*> tailPair =
+ std::pair<ActiveTail45*, ActiveTail45*> tailPair =
ActiveTail45::createActiveTail45sAsPair(point, true, 0, false);
//std::cout << "new element " << j-1 << " " << incoming[j] << std::endl;
elements.push_back(std::pair<Vertex45, ActiveTail45*>(Vertex45(point, j -1, incoming[j]), tailPair.second));
@@ -1646,12 +1646,12 @@
//std::cout << "end processEvent\n";
return currentIter;
}
-
+
inline iterator lookUp_(Unit y){
//if just before then we need to look from 1 not -1
return scanData_.lower_bound(Vertex45(Point(x_, y), -1+2*justBefore_, 0));
}
-
+
};
template <typename stream_type>
@@ -1699,7 +1699,7 @@
stdcout << polys[i] << std::endl;
}
stdcout << "done testing polygon tiling\n";
- return true;
+ return true;
}
template <typename stream_type>
@@ -1715,7 +1715,7 @@
data.push_back(Vertex45(Point(10, 10), 1, 1));
data.push_back(Vertex45(Point(10, 10), 0, -1));
data.push_back(Vertex45(Point(20, 10), 1, -1));
- data.push_back(Vertex45(Point(20, 10), 0, 1));
+ data.push_back(Vertex45(Point(20, 10), 0, 1));
polygon_sort(data.begin(), data.end());
pf.scan(polys, data.begin(), data.end());
stdcout << "result size: " << polys.size() << std::endl;
@@ -1723,7 +1723,7 @@
stdcout << polys[i] << std::endl;
}
stdcout << "done testing polygon tiling\n";
- return true;
+ return true;
}
template <typename stream_type>
@@ -1749,7 +1749,7 @@
stdcout << polys[i] << std::endl;
}
stdcout << "done testing polygon tiling\n";
- return true;
+ return true;
}
template <typename stream_type>
@@ -1775,7 +1775,7 @@
stdcout << polys[i] << std::endl;
}
stdcout << "done testing polygon tiling\n";
- return true;
+ return true;
}
template <typename stream_type>
@@ -1800,7 +1800,7 @@
data.push_back(Vertex45(Point(2, 2), 1, -1));
data.push_back(Vertex45(Point(2, 2), 0, 1));
data.push_back(Vertex45(Point(3, 2), 1, 1));
- data.push_back(Vertex45(Point(3, 2), 0, -1));
+ data.push_back(Vertex45(Point(3, 2), 0, -1));
polygon_sort(data.begin(), data.end());
pf.scan(polys, data.begin(), data.end());
stdcout << "result size: " << polys.size() << std::endl;
@@ -1906,7 +1906,7 @@
stdcout << polys[i] << std::endl;
}
stdcout << "done testing polygon tiling\n";
- return true;
+ return true;
}
template <typename stream_type>
@@ -1932,7 +1932,7 @@
sortScan45Vector(vertices);
stdcout << "scanning\n";
scan45.scan(result, vertices.begin(), vertices.end());
-
+
polygon_sort(result.begin(), result.end());
pf.scan(polys, result.begin(), result.end());
stdcout << "result size: " << polys.size() << std::endl;
@@ -1940,7 +1940,7 @@
stdcout << polys[i] << std::endl;
}
stdcout << "done testing polygon tiling\n";
- return true;
+ return true;
}
template <typename stream_type>
@@ -2012,7 +2012,7 @@
stdcout << polys[i] << std::endl;
}
stdcout << "done testing polygon tiling\n";
- return true;
+ return true;
}
template <typename stream_type>
@@ -2084,7 +2084,7 @@
stdcout << polys[i] << std::endl;
}
stdcout << "done testing polygon tiling\n";
- return true;
+ return true;
}
template <typename stream_type>
@@ -2093,7 +2093,7 @@
Polygon45Tiling pf;
std::vector<Polygon45WithHoles> polys;
std::vector<Vertex45> data;
-
+
data.push_back(Vertex45(Point(0, 0), 0, 1));
data.push_back(Vertex45(Point(0, 0), 2, 1));
data.push_back(Vertex45(Point(0, 100), 2, -1));
@@ -2128,7 +2128,7 @@
stdcout << polys[i] << std::endl;
}
stdcout << "done testing polygon tiling\n";
- return true;
+ return true;
}
};
@@ -2137,7 +2137,7 @@
public:
typedef typename polygon_45_formation<Unit>::ActiveTail45 ActiveTail45;
typedef typename ActiveTail45::iterator iterator;
-
+
typedef polygon_45_concept geometry_type;
typedef Unit coordinate_type;
typedef point_data<Unit> Point;
@@ -2145,7 +2145,7 @@
// typedef iterator_points_to_compact<iterator, Point> compact_iterator_type;
typedef iterator iterator_type;
typedef typename coordinate_traits<Unit>::area_type area_type;
-
+
inline PolyLine45HoleData() : p_(0) {}
inline PolyLine45HoleData(ActiveTail45* p) : p_(p) {}
//use default copy and assign
@@ -2166,7 +2166,7 @@
typedef typename polygon_45_formation<Unit>::ActiveTail45 ActiveTail45;
typedef typename ActiveTail45::iterator iterator;
typedef PolyLine45HoleData<Unit> holeType;
-
+
typedef polygon_45_with_holes_concept geometry_type;
typedef Unit coordinate_type;
typedef point_data<Unit> Point;
@@ -2187,7 +2187,7 @@
typedef const value_type& reference; //immutable
inline iteratorHoles() : itr_() {}
inline iteratorHoles(typename ActiveTail45::iteratorHoles itr) : itr_(itr) {}
- inline iteratorHoles(const iteratorHoles& that) : itr_(that.itr_) {}
+ inline iteratorHoles(const iteratorHoles& that) : itr_(that.itr_) {}
inline iteratorHoles& operator=(const iteratorHoles& that) {
itr_ = that.itr_;
return *this;
@@ -2208,8 +2208,8 @@
}
};
typedef iteratorHoles iterator_holes_type;
-
-
+
+
inline PolyLine45PolygonData() : p_(0) {}
inline PolyLine45PolygonData(ActiveTail45* p) : p_(p) {}
//use default copy and assign
@@ -2225,7 +2225,7 @@
inline PolyLine45PolygonData& set(iT inputBegin, iT inputEnd) {
return *this;
}
-
+
// initialize a polygon from x,y values, it is assumed that the first is an x
// and that the input is a well behaved polygon
template<class iT>
Modified: trunk/boost/polygon/detail/polygon_45_set_view.hpp
==============================================================================
--- trunk/boost/polygon/detail/polygon_45_set_view.hpp (original)
+++ trunk/boost/polygon/detail/polygon_45_set_view.hpp 2012-05-09 15:33:59 EDT (Wed, 09 May 2012)
@@ -1,6 +1,6 @@
/*
Copyright 2008 Intel Corporation
-
+
Use, modification and distribution are subject to the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
@@ -18,11 +18,11 @@
typedef typename polygon_45_set_view<ltype, rtype, op_type>::iterator_type iterator_type;
typedef typename polygon_45_set_view<ltype, rtype, op_type>::operator_arg_type operator_arg_type;
- static inline iterator_type begin(const polygon_45_set_view<ltype, rtype, op_type>& polygon_45_set);
+ static inline iterator_type begin(const polygon_45_set_view<ltype, rtype, op_type>& polygon_45_set);
static inline iterator_type end(const polygon_45_set_view<ltype, rtype, op_type>& polygon_45_set);
template <typename input_iterator_type>
- static inline void set(polygon_45_set_view<ltype, rtype, op_type>& polygon_45_set,
+ static inline void set(polygon_45_set_view<ltype, rtype, op_type>& polygon_45_set,
input_iterator_type input_begin, input_iterator_type input_end);
static inline bool clean(const polygon_45_set_view<ltype, rtype, op_type>& polygon_45_set);
@@ -114,7 +114,7 @@
bool sorted() const { return value().sorted(); } //result of a boolean is sorted
// template <typename input_iterator_type>
- // void set(input_iterator_type input_begin, input_iterator_type input_end,
+ // void set(input_iterator_type input_begin, input_iterator_type input_end,
// orientation_2d orient) const {
// orient_ = orient;
// output_.clear();
@@ -137,7 +137,7 @@
}
template <typename ltype, typename rtype, int op_type>
bool polygon_45_set_traits<polygon_45_set_view<ltype, rtype, op_type> >::
- clean(const polygon_45_set_view<ltype, rtype, op_type>& polygon_45_set) {
+ clean(const polygon_45_set_view<ltype, rtype, op_type>& polygon_45_set) {
return polygon_45_set.value().clean(); }
template <typename geometry_type_1, typename geometry_type_2, int op_type>
@@ -194,32 +194,32 @@
typename is_polygon_45_or_90_set_type<geometry_type_1>::type,
typename is_polygon_45_or_90_set_type<geometry_type_2>::type,
typename is_either_polygon_45_set_type<geometry_type_1, geometry_type_2>::type>::type,
- polygon_45_set_view<geometry_type_1, geometry_type_2, 0> >::type
+ polygon_45_set_view<geometry_type_1, geometry_type_2, 0> >::type
operator|(const geometry_type_1& lvalue, const geometry_type_2& rvalue) {
return polygon_45_set_view<geometry_type_1, geometry_type_2, 0>
(lvalue, rvalue);
}
-
+
struct y_ps45_p : gtl_yes {};
template <typename geometry_type_1, typename geometry_type_2>
typename enable_if< typename gtl_and_4< y_ps45_p,
- typename gtl_if<typename is_polygon_45_or_90_set_type<geometry_type_1>::type>::type,
- typename gtl_if<typename is_polygon_45_or_90_set_type<geometry_type_2>::type>::type,
- typename gtl_if<typename is_either_polygon_45_set_type<geometry_type_1, geometry_type_2>::type>::type>::type,
- polygon_45_set_view<geometry_type_1, geometry_type_2, 0> >::type
+ typename gtl_if<typename is_polygon_45_or_90_set_type<geometry_type_1>::type>::type,
+ typename gtl_if<typename is_polygon_45_or_90_set_type<geometry_type_2>::type>::type,
+ typename gtl_if<typename is_either_polygon_45_set_type<geometry_type_1, geometry_type_2>::type>::type>::type,
+ polygon_45_set_view<geometry_type_1, geometry_type_2, 0> >::type
operator+(const geometry_type_1& lvalue, const geometry_type_2& rvalue) {
return polygon_45_set_view<geometry_type_1, geometry_type_2, 0>
(lvalue, rvalue);
}
-
+
struct y_ps45_s : gtl_yes {};
template <typename geometry_type_1, typename geometry_type_2>
typename enable_if< typename gtl_and_4< y_ps45_s, typename is_polygon_45_or_90_set_type<geometry_type_1>::type,
typename is_polygon_45_or_90_set_type<geometry_type_2>::type,
typename is_either_polygon_45_set_type<geometry_type_1, geometry_type_2>::type>::type,
- polygon_45_set_view<geometry_type_1, geometry_type_2, 1> >::type
+ polygon_45_set_view<geometry_type_1, geometry_type_2, 1> >::type
operator*(const geometry_type_1& lvalue, const geometry_type_2& rvalue) {
return polygon_45_set_view<geometry_type_1, geometry_type_2, 1>
(lvalue, rvalue);
@@ -231,7 +231,7 @@
typename enable_if< typename gtl_and_4< y_ps45_a, typename is_polygon_45_or_90_set_type<geometry_type_1>::type,
typename is_polygon_45_or_90_set_type<geometry_type_2>::type,
typename is_either_polygon_45_set_type<geometry_type_1, geometry_type_2>::type>::type,
- polygon_45_set_view<geometry_type_1, geometry_type_2, 1> >::type
+ polygon_45_set_view<geometry_type_1, geometry_type_2, 1> >::type
operator&(const geometry_type_1& lvalue, const geometry_type_2& rvalue) {
return polygon_45_set_view<geometry_type_1, geometry_type_2, 1>
(lvalue, rvalue);
@@ -243,30 +243,30 @@
typename enable_if< typename gtl_and_4< y_ps45_x, typename is_polygon_45_or_90_set_type<geometry_type_1>::type,
typename is_polygon_45_or_90_set_type<geometry_type_2>::type,
typename is_either_polygon_45_set_type<geometry_type_1, geometry_type_2>::type>::type,
- polygon_45_set_view<geometry_type_1, geometry_type_2, 2> >::type
+ polygon_45_set_view<geometry_type_1, geometry_type_2, 2> >::type
operator^(const geometry_type_1& lvalue, const geometry_type_2& rvalue) {
return polygon_45_set_view<geometry_type_1, geometry_type_2, 2>
(lvalue, rvalue);
}
-
+
struct y_ps45_m : gtl_yes {};
template <typename geometry_type_1, typename geometry_type_2>
typename enable_if< typename gtl_and_4< y_ps45_m,
- typename gtl_if<typename is_polygon_45_or_90_set_type<geometry_type_1>::type>::type,
- typename gtl_if<typename is_polygon_45_or_90_set_type<geometry_type_2>::type>::type,
- typename gtl_if<typename is_either_polygon_45_set_type<geometry_type_1, geometry_type_2>::type>::type>::type,
- polygon_45_set_view<geometry_type_1, geometry_type_2, 3> >::type
+ typename gtl_if<typename is_polygon_45_or_90_set_type<geometry_type_1>::type>::type,
+ typename gtl_if<typename is_polygon_45_or_90_set_type<geometry_type_2>::type>::type,
+ typename gtl_if<typename is_either_polygon_45_set_type<geometry_type_1, geometry_type_2>::type>::type>::type,
+ polygon_45_set_view<geometry_type_1, geometry_type_2, 3> >::type
operator-(const geometry_type_1& lvalue, const geometry_type_2& rvalue) {
return polygon_45_set_view<geometry_type_1, geometry_type_2, 3>
(lvalue, rvalue);
}
-
+
struct y_ps45_pe : gtl_yes {};
template <typename geometry_type_1, typename geometry_type_2>
typename enable_if< typename gtl_and_4<y_ps45_pe, typename is_mutable_polygon_45_set_type<geometry_type_1>::type, gtl_yes,
- typename is_polygon_45_or_90_set_type<geometry_type_2>::type>::type,
+ typename is_polygon_45_or_90_set_type<geometry_type_2>::type>::type,
geometry_type_1>::type &
operator+=(geometry_type_1& lvalue, const geometry_type_2& rvalue) {
return self_assignment_boolean_op_45<geometry_type_1, geometry_type_2, 0>(lvalue, rvalue);
@@ -275,8 +275,8 @@
struct y_ps45_be : gtl_yes {};
template <typename geometry_type_1, typename geometry_type_2>
- typename enable_if< typename gtl_and_3<y_ps45_be, typename is_mutable_polygon_45_set_type<geometry_type_1>::type,
- typename is_polygon_45_or_90_set_type<geometry_type_2>::type>::type,
+ typename enable_if< typename gtl_and_3<y_ps45_be, typename is_mutable_polygon_45_set_type<geometry_type_1>::type,
+ typename is_polygon_45_or_90_set_type<geometry_type_2>::type>::type,
geometry_type_1>::type &
operator|=(geometry_type_1& lvalue, const geometry_type_2& rvalue) {
return self_assignment_boolean_op_45<geometry_type_1, geometry_type_2, 0>(lvalue, rvalue);
@@ -286,8 +286,8 @@
template <typename geometry_type_1, typename geometry_type_2>
typename enable_if< typename gtl_and_3< y_ps45_se,
- typename is_mutable_polygon_45_set_type<geometry_type_1>::type,
- typename is_polygon_45_or_90_set_type<geometry_type_2>::type>::type,
+ typename is_mutable_polygon_45_set_type<geometry_type_1>::type,
+ typename is_polygon_45_or_90_set_type<geometry_type_2>::type>::type,
geometry_type_1>::type &
operator*=(geometry_type_1& lvalue, const geometry_type_2& rvalue) {
return self_assignment_boolean_op_45<geometry_type_1, geometry_type_2, 1>(lvalue, rvalue);
@@ -296,8 +296,8 @@
struct y_ps45_ae : gtl_yes {};
template <typename geometry_type_1, typename geometry_type_2>
- typename enable_if< typename gtl_and_3<y_ps45_ae, typename is_mutable_polygon_45_set_type<geometry_type_1>::type,
- typename is_polygon_45_or_90_set_type<geometry_type_2>::type>::type,
+ typename enable_if< typename gtl_and_3<y_ps45_ae, typename is_mutable_polygon_45_set_type<geometry_type_1>::type,
+ typename is_polygon_45_or_90_set_type<geometry_type_2>::type>::type,
geometry_type_1>::type &
operator&=(geometry_type_1& lvalue, const geometry_type_2& rvalue) {
return self_assignment_boolean_op_45<geometry_type_1, geometry_type_2, 1>(lvalue, rvalue);
@@ -306,9 +306,9 @@
struct y_ps45_xe : gtl_yes {};
template <typename geometry_type_1, typename geometry_type_2>
- typename enable_if<
- typename gtl_and_3<y_ps45_xe, typename is_mutable_polygon_45_set_type<geometry_type_1>::type,
- typename is_polygon_45_or_90_set_type<geometry_type_2>::type>::type,
+ typename enable_if<
+ typename gtl_and_3<y_ps45_xe, typename is_mutable_polygon_45_set_type<geometry_type_1>::type,
+ typename is_polygon_45_or_90_set_type<geometry_type_2>::type>::type,
geometry_type_1>::type &
operator^=(geometry_type_1& lvalue, const geometry_type_2& rvalue) {
return self_assignment_boolean_op_45<geometry_type_1, geometry_type_2, 2>(lvalue, rvalue);
@@ -317,8 +317,8 @@
struct y_ps45_me : gtl_yes {};
template <typename geometry_type_1, typename geometry_type_2>
- typename enable_if< typename gtl_and_3<y_ps45_me, typename is_mutable_polygon_45_set_type<geometry_type_1>::type,
- typename is_polygon_45_or_90_set_type<geometry_type_2>::type>::type,
+ typename enable_if< typename gtl_and_3<y_ps45_me, typename is_mutable_polygon_45_set_type<geometry_type_1>::type,
+ typename is_polygon_45_or_90_set_type<geometry_type_2>::type>::type,
geometry_type_1>::type &
operator-=(geometry_type_1& lvalue, const geometry_type_2& rvalue) {
return self_assignment_boolean_op_45<geometry_type_1, geometry_type_2, 3>(lvalue, rvalue);
@@ -327,8 +327,8 @@
struct y_ps45_rpe : gtl_yes {};
template <typename geometry_type_1, typename coordinate_type_1>
- typename enable_if< typename gtl_and_3< y_ps45_rpe, typename is_mutable_polygon_45_set_type<geometry_type_1>::type,
- typename gtl_same_type<typename geometry_concept<coordinate_type_1>::type,
+ typename enable_if< typename gtl_and_3< y_ps45_rpe, typename is_mutable_polygon_45_set_type<geometry_type_1>::type,
+ typename gtl_same_type<typename geometry_concept<coordinate_type_1>::type,
coordinate_concept>::type>::type,
geometry_type_1>::type &
operator+=(geometry_type_1& lvalue, coordinate_type_1 rvalue) {
@@ -338,8 +338,8 @@
struct y_ps45_rme : gtl_yes {};
template <typename geometry_type_1, typename coordinate_type_1>
- typename enable_if< typename gtl_and_3<y_ps45_rme, typename gtl_if<typename is_mutable_polygon_45_set_type<geometry_type_1>::type>::type,
- typename gtl_same_type<typename geometry_concept<coordinate_type_1>::type,
+ typename enable_if< typename gtl_and_3<y_ps45_rme, typename gtl_if<typename is_mutable_polygon_45_set_type<geometry_type_1>::type>::type,
+ typename gtl_same_type<typename geometry_concept<coordinate_type_1>::type,
coordinate_concept>::type>::type,
geometry_type_1>::type &
operator-=(geometry_type_1& lvalue, coordinate_type_1 rvalue) {
@@ -349,8 +349,8 @@
struct y_ps45_rp : gtl_yes {};
template <typename geometry_type_1, typename coordinate_type_1>
- typename enable_if< typename gtl_and_3<y_ps45_rp, typename gtl_if<typename is_mutable_polygon_45_set_type<geometry_type_1>::type>::type,
- typename gtl_same_type<typename geometry_concept<coordinate_type_1>::type,
+ typename enable_if< typename gtl_and_3<y_ps45_rp, typename gtl_if<typename is_mutable_polygon_45_set_type<geometry_type_1>::type>::type,
+ typename gtl_same_type<typename geometry_concept<coordinate_type_1>::type,
coordinate_concept>::type>
::type, geometry_type_1>::type
operator+(const geometry_type_1& lvalue, coordinate_type_1 rvalue) {
@@ -362,8 +362,8 @@
struct y_ps45_rm : gtl_yes {};
template <typename geometry_type_1, typename coordinate_type_1>
- typename enable_if< typename gtl_and_3<y_ps45_rm, typename gtl_if<typename is_mutable_polygon_45_set_type<geometry_type_1>::type>::type,
- typename gtl_same_type<typename geometry_concept<coordinate_type_1>::type,
+ typename enable_if< typename gtl_and_3<y_ps45_rm, typename gtl_if<typename is_mutable_polygon_45_set_type<geometry_type_1>::type>::type,
+ typename gtl_same_type<typename geometry_concept<coordinate_type_1>::type,
coordinate_concept>::type>
::type, geometry_type_1>::type
operator-(const geometry_type_1& lvalue, coordinate_type_1 rvalue) {
@@ -375,4 +375,3 @@
}
}
#endif
-
Modified: trunk/boost/polygon/detail/polygon_45_touch.hpp
==============================================================================
--- trunk/boost/polygon/detail/polygon_45_touch.hpp (original)
+++ trunk/boost/polygon/detail/polygon_45_touch.hpp 2012-05-09 15:33:59 EDT (Wed, 09 May 2012)
@@ -1,6 +1,6 @@
/*
Copyright 2008 Intel Corporation
-
+
Use, modification and distribution are subject to the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
@@ -32,7 +32,7 @@
} else {
int count = mp[i].second;
if(subtract) count -= mp2[j].second;
- else count += mp2[j].second;
+ else count += mp2[j].second;
if(count) {
newmp.push_back(mp[i]);
newmp.back().second = count;
@@ -63,7 +63,7 @@
inline bool operator!=(const CountTouch& count) const { return !((*this) == count); }
//inline CountTouch& operator=(int count) { counts[0] = counts[1] = count; return *this; }
inline CountTouch& operator=(const CountTouch& count) { counts = count.counts; return *this; }
- inline int& operator[](int index) {
+ inline int& operator[](int index) {
std::vector<std::pair<int, int> >::iterator itr = lower_bound(counts.begin(), counts.end(), std::make_pair(index, int(0)));
if(itr != counts.end() && itr->first == index) {
return itr->second;
@@ -102,8 +102,8 @@
std::vector<std::pair<int, int> > counts;
};
- typedef std::pair<std::pair<Unit, std::map<Unit, std::set<int> > >, std::map<int, std::set<int> > > map_graph_o;
- typedef std::pair<std::pair<Unit, std::map<Unit, std::set<int> > >, std::vector<std::set<int> > > vector_graph_o;
+ typedef std::pair<std::pair<Unit, std::map<Unit, std::set<int> > >, std::map<int, std::set<int> > > map_graph_o;
+ typedef std::pair<std::pair<Unit, std::map<Unit, std::set<int> > >, std::vector<std::set<int> > > vector_graph_o;
template <typename cT>
static void process_previous_x(cT& output) {
@@ -124,10 +124,10 @@
}
y_prop_map.clear();
}
-
+
struct touch_45_output_functor {
template <typename cT>
- void operator()(cT& output, const CountTouch& count1, const CountTouch& count2,
+ void operator()(cT& output, const CountTouch& count1, const CountTouch& count2,
const Point& pt, int , direction_1d ) {
Unit& x = output.first.first;
std::map<Unit, std::set<int> >& y_prop_map = output.first.second;
@@ -138,7 +138,7 @@
itr1 != count1.counts.end(); ++itr1) {
if(itr1->second > 0) {
output_set.insert(output_set.end(), itr1->first);
- }
+ }
}
for(std::vector<std::pair<int, int> >::const_iterator itr2 = count2.counts.begin();
itr2 != count2.counts.end(); ++itr2) {
@@ -148,16 +148,16 @@
}
}
};
- typedef typename std::pair<Point,
+ typedef typename std::pair<Point,
typename boolean_op_45<Unit>::template Scan45CountT<CountTouch> > Vertex45Compact;
typedef std::vector<Vertex45Compact> TouchSetData;
-
+
struct lessVertex45Compact {
bool operator()(const Vertex45Compact& l, const Vertex45Compact& r) {
return l.first < r.first;
}
};
-
+
// template <typename TSD>
// static void print_tsd(TSD& tsd) {
// for(std::size_t i = 0; i < tsd.size(); ++i) {
@@ -185,7 +185,7 @@
template <typename graph_type>
static void performTouch(graph_type& graph, TouchSetData& tsd) {
-
+
polygon_sort(tsd.begin(), tsd.end(), lessVertex45Compact());
typedef std::vector<std::pair<Point, typename boolean_op_45<Unit>::template Scan45CountT<CountTouch> > > TSD;
TSD tsd_;
@@ -227,10 +227,10 @@
}
}
}
-
+
};
}
}
-#endif
+#endif
Modified: trunk/boost/polygon/detail/polygon_90_set_view.hpp
==============================================================================
--- trunk/boost/polygon/detail/polygon_90_set_view.hpp (original)
+++ trunk/boost/polygon/detail/polygon_90_set_view.hpp 2012-05-09 15:33:59 EDT (Wed, 09 May 2012)
@@ -1,6 +1,6 @@
/*
Copyright 2008 Intel Corporation
-
+
Use, modification and distribution are subject to the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
@@ -23,7 +23,7 @@
typedef typename polygon_90_set_view<ltype, rtype, op_type>::iterator_type iterator_type;
typedef typename polygon_90_set_view<ltype, rtype, op_type>::operator_arg_type operator_arg_type;
- static inline iterator_type begin(const polygon_90_set_view<ltype, rtype, op_type>& polygon_set);
+ static inline iterator_type begin(const polygon_90_set_view<ltype, rtype, op_type>& polygon_set);
static inline iterator_type end(const polygon_90_set_view<ltype, rtype, op_type>& polygon_set);
static inline orientation_2d orient(const polygon_90_set_view<ltype, rtype, op_type>& polygon_set);
@@ -46,7 +46,7 @@
insert_into_view_arg(linput_, lvalue_, orient_l);
insert_into_view_arg(rinput_, rvalue_, orient_r);
output_.applyBooleanBinaryOp(linput_.begin(), linput_.end(),
- rinput_.begin(), rinput_.end(), boolean_op::BinaryCount<op_type>());
+ rinput_.begin(), rinput_.end(), boolean_op::BinaryCount<op_type>());
}
};
@@ -65,23 +65,23 @@
lvalue_.sort();
rvalue_.sort();
output_.applyBooleanBinaryOp(lvalue_.begin(), lvalue_.end(),
- rvalue_.begin(), rvalue_.end(), boolean_op::BinaryCount<op_type>());
+ rvalue_.begin(), rvalue_.end(), boolean_op::BinaryCount<op_type>());
}else if((orient_ != orient_l) && (orient_!= orient_r)){ // both the orientations are not equal to input
// easier way is to ignore the input orientation and use the input data's orientation, but not done so
insert_into_view_arg(linput_, lvalue_, orient_l);
insert_into_view_arg(rinput_, rvalue_, orient_r);
output_.applyBooleanBinaryOp(linput_.begin(), linput_.end(),
- rinput_.begin(), rinput_.end(), boolean_op::BinaryCount<op_type>());
+ rinput_.begin(), rinput_.end(), boolean_op::BinaryCount<op_type>());
}else if(orient_ != orient_l){ // left hand side orientation is different
insert_into_view_arg(linput_, lvalue_, orient_l);
rvalue_.sort();
output_.applyBooleanBinaryOp(linput_.begin(), linput_.end(),
- rvalue_.begin(), rvalue_.end(), boolean_op::BinaryCount<op_type>());
+ rvalue_.begin(), rvalue_.end(), boolean_op::BinaryCount<op_type>());
} else if(orient_ != orient_r){ // right hand side orientation is different
insert_into_view_arg(rinput_, rvalue_, orient_r);
lvalue_.sort();
output_.applyBooleanBinaryOp(lvalue_.begin(), lvalue_.end(),
- rinput_.begin(), rinput_.end(), boolean_op::BinaryCount<op_type>());
+ rinput_.begin(), rinput_.end(), boolean_op::BinaryCount<op_type>());
}
}
};
@@ -98,7 +98,7 @@
// << "," << orient_.to_int() << std::endl;
insert_into_view_arg(rinput_, rvalue_, orient_r);
output_.applyBooleanBinaryOp(lvalue_.begin(), lvalue_.end(),
- rinput_.begin(), rinput_.end(), boolean_op::BinaryCount<op_type>());
+ rinput_.begin(), rinput_.end(), boolean_op::BinaryCount<op_type>());
}
};
@@ -115,7 +115,7 @@
// << "," << orient_.to_int() << std::endl;
output_.applyBooleanBinaryOp(linput_.begin(), linput_.end(),
- rvalue_.begin(), rvalue_.end(), boolean_op::BinaryCount<op_type>());
+ rvalue_.begin(), rvalue_.end(), boolean_op::BinaryCount<op_type>());
}
};
@@ -159,7 +159,7 @@
bool sorted() const { return true; } //result of a boolean is sorted
// template <typename input_iterator_type>
-// void set(input_iterator_type input_begin, input_iterator_type input_end,
+// void set(input_iterator_type input_begin, input_iterator_type input_end,
// orientation_2d orient) const {
// orient_ = orient;
// output_.clear();
@@ -189,22 +189,22 @@
// template <typename ltype, typename rtype, typename op_type>
// template <typename input_iterator_type>
// void polygon_90_set_traits<polygon_90_set_view<ltype, rtype, op_type> >::
-// set(polygon_90_set_view<ltype, rtype, op_type>& polygon_set,
+// set(polygon_90_set_view<ltype, rtype, op_type>& polygon_set,
// input_iterator_type input_begin, input_iterator_type input_end,
// orientation_2d orient) {
// polygon_set.set(input_begin, input_end, orient);
// }
template <typename ltype, typename rtype, typename op_type>
orientation_2d polygon_90_set_traits<polygon_90_set_view<ltype, rtype, op_type> >::
- orient(const polygon_90_set_view<ltype, rtype, op_type>& polygon_set) {
+ orient(const polygon_90_set_view<ltype, rtype, op_type>& polygon_set) {
return polygon_set.orient(); }
template <typename ltype, typename rtype, typename op_type>
bool polygon_90_set_traits<polygon_90_set_view<ltype, rtype, op_type> >::
- clean(const polygon_90_set_view<ltype, rtype, op_type>& polygon_set) {
+ clean(const polygon_90_set_view<ltype, rtype, op_type>& polygon_set) {
return true; }
template <typename ltype, typename rtype, typename op_type>
bool polygon_90_set_traits<polygon_90_set_view<ltype, rtype, op_type> >::
- sorted(const polygon_90_set_view<ltype, rtype, op_type>& polygon_set) {
+ sorted(const polygon_90_set_view<ltype, rtype, op_type>& polygon_set) {
return true; }
template <typename value_type, typename arg_type>
@@ -216,7 +216,7 @@
dest.insert(itr1, itr2, orient);
dest.sort();
}
-
+
template <typename T>
template <typename ltype, typename rtype, typename op_type>
inline polygon_90_set_data<T>& polygon_90_set_data<T>::operator=(const polygon_90_set_view<ltype, rtype, op_type>& that) {
@@ -225,22 +225,22 @@
unsorted_ = false;
return *this;
}
-
+
template <typename T>
template <typename ltype, typename rtype, typename op_type>
inline polygon_90_set_data<T>::polygon_90_set_data(const polygon_90_set_view<ltype, rtype, op_type>& that) :
orient_(that.orient()), data_(that.begin(), that.end()), dirty_(false), unsorted_(false) {}
-
+
template <typename geometry_type_1, typename geometry_type_2>
struct self_assign_operator_lvalue {
typedef geometry_type_1& type;
};
-
+
template <typename type_1, typename type_2>
struct by_value_binary_operator {
typedef type_1 type;
};
-
+
template <typename geometry_type_1, typename geometry_type_2, typename op_type>
geometry_type_1& self_assignment_boolean_op(geometry_type_1& lvalue_, const geometry_type_2& rvalue_) {
typedef geometry_type_1 ltype;
@@ -257,7 +257,7 @@
// to be same as linput
value_type rinput_(orient_);
//BM: The output dataset's scanline orient is set as equal to first input dataset's (lvalue_) orientation
- value_type output_(orient_);
+ value_type output_(orient_);
insert_into_view_arg(linput_, lvalue_, orient_);
// BM: The last argument orient_r is the user initialized scanline orientation for rvalue_ data set.
// But since rinput (see above) is initialized to scanline orientation consistent with the lvalue_
@@ -265,11 +265,11 @@
insert_into_view_arg(rinput_, rvalue_, orient_r);
// BM: boolean operation and output uses lvalue_ dataset's scanline orientation.
output_.applyBooleanBinaryOp(linput_.begin(), linput_.end(),
- rinput_.begin(), rinput_.end(), boolean_op::BinaryCount<op_type>());
+ rinput_.begin(), rinput_.end(), boolean_op::BinaryCount<op_type>());
polygon_90_set_mutable_traits<geometry_type_1>::set(lvalue_, output_.begin(), output_.end(), orient_);
return lvalue_;
}
-
+
namespace operators {
struct y_ps90_b : gtl_yes {};
@@ -279,27 +279,27 @@
typename is_polygon_90_set_type<geometry_type_2>::type>::type,
polygon_90_set_view<geometry_type_1, geometry_type_2, boolean_op::BinaryOr> >::type
operator|(const geometry_type_1& lvalue, const geometry_type_2& rvalue) {
- return polygon_90_set_view<geometry_type_1, geometry_type_2, boolean_op::BinaryOr>
- (lvalue, rvalue,
+ return polygon_90_set_view<geometry_type_1, geometry_type_2, boolean_op::BinaryOr>
+ (lvalue, rvalue,
polygon_90_set_traits<geometry_type_1>::orient(lvalue),
boolean_op::BinaryOr());
}
-
+
struct y_ps90_p : gtl_yes {};
template <typename geometry_type_1, typename geometry_type_2>
- typename enable_if<
+ typename enable_if<
typename gtl_and_3< y_ps90_p,
typename gtl_if<typename is_polygon_90_set_type<geometry_type_1>::type>::type,
typename gtl_if<typename is_polygon_90_set_type<geometry_type_2>::type>::type>::type,
polygon_90_set_view<geometry_type_1, geometry_type_2, boolean_op::BinaryOr> >::type
operator+(const geometry_type_1& lvalue, const geometry_type_2& rvalue) {
- return polygon_90_set_view<geometry_type_1, geometry_type_2, boolean_op::BinaryOr>
- (lvalue, rvalue,
+ return polygon_90_set_view<geometry_type_1, geometry_type_2, boolean_op::BinaryOr>
+ (lvalue, rvalue,
polygon_90_set_traits<geometry_type_1>::orient(lvalue),
boolean_op::BinaryOr());
}
-
+
struct y_ps90_s : gtl_yes {};
template <typename geometry_type_1, typename geometry_type_2>
@@ -308,12 +308,12 @@
typename is_polygon_90_set_type<geometry_type_2>::type>::type,
polygon_90_set_view<geometry_type_1, geometry_type_2, boolean_op::BinaryAnd> >::type
operator*(const geometry_type_1& lvalue, const geometry_type_2& rvalue) {
- return polygon_90_set_view<geometry_type_1, geometry_type_2, boolean_op::BinaryAnd>
- (lvalue, rvalue,
+ return polygon_90_set_view<geometry_type_1, geometry_type_2, boolean_op::BinaryAnd>
+ (lvalue, rvalue,
polygon_90_set_traits<geometry_type_1>::orient(lvalue),
boolean_op::BinaryAnd());
}
-
+
struct y_ps90_a : gtl_yes {};
template <typename geometry_type_1, typename geometry_type_2>
@@ -322,8 +322,8 @@
typename is_polygon_90_set_type<geometry_type_2>::type>::type,
polygon_90_set_view<geometry_type_1, geometry_type_2, boolean_op::BinaryAnd> >::type
operator&(const geometry_type_1& lvalue, const geometry_type_2& rvalue) {
- return polygon_90_set_view<geometry_type_1, geometry_type_2, boolean_op::BinaryAnd>
- (lvalue, rvalue,
+ return polygon_90_set_view<geometry_type_1, geometry_type_2, boolean_op::BinaryAnd>
+ (lvalue, rvalue,
polygon_90_set_traits<geometry_type_1>::orient(lvalue),
boolean_op::BinaryAnd());
}
@@ -336,12 +336,12 @@
typename is_polygon_90_set_type<geometry_type_2>::type>::type,
polygon_90_set_view<geometry_type_1, geometry_type_2, boolean_op::BinaryXor> >::type
operator^(const geometry_type_1& lvalue, const geometry_type_2& rvalue) {
- return polygon_90_set_view<geometry_type_1, geometry_type_2, boolean_op::BinaryXor>
- (lvalue, rvalue,
+ return polygon_90_set_view<geometry_type_1, geometry_type_2, boolean_op::BinaryXor>
+ (lvalue, rvalue,
polygon_90_set_traits<geometry_type_1>::orient(lvalue),
boolean_op::BinaryXor());
}
-
+
struct y_ps90_m : gtl_yes {};
template <typename geometry_type_1, typename geometry_type_2>
@@ -350,12 +350,12 @@
typename gtl_if<typename is_polygon_90_set_type<geometry_type_2>::type>::type>::type,
polygon_90_set_view<geometry_type_1, geometry_type_2, boolean_op::BinaryNot> >::type
operator-(const geometry_type_1& lvalue, const geometry_type_2& rvalue) {
- return polygon_90_set_view<geometry_type_1, geometry_type_2, boolean_op::BinaryNot>
- (lvalue, rvalue,
+ return polygon_90_set_view<geometry_type_1, geometry_type_2, boolean_op::BinaryNot>
+ (lvalue, rvalue,
polygon_90_set_traits<geometry_type_1>::orient(lvalue),
boolean_op::BinaryNot());
}
-
+
struct y_ps90_pe : gtl_yes {};
template <typename coordinate_type_1, typename geometry_type_2>
@@ -366,11 +366,11 @@
polygon_90_set_traits<geometry_type_2>::orient(rvalue));
return lvalue;
}
-
+
struct y_ps90_be : gtl_yes {};
//
template <typename coordinate_type_1, typename geometry_type_2>
- typename enable_if< typename gtl_and< y_ps90_be, typename is_polygon_90_set_type<geometry_type_2>::type>::type,
+ typename enable_if< typename gtl_and< y_ps90_be, typename is_polygon_90_set_type<geometry_type_2>::type>::type,
polygon_90_set_data<coordinate_type_1> >::type &
operator|=(polygon_90_set_data<coordinate_type_1>& lvalue, const geometry_type_2& rvalue) {
return lvalue += rvalue;
@@ -380,8 +380,8 @@
//normal self assignment boolean operations
template <typename geometry_type_1, typename geometry_type_2>
- typename enable_if< typename gtl_and_3< y_ps90_pe2, typename is_mutable_polygon_90_set_type<geometry_type_1>::type,
- typename is_polygon_90_set_type<geometry_type_2>::type>::type,
+ typename enable_if< typename gtl_and_3< y_ps90_pe2, typename is_mutable_polygon_90_set_type<geometry_type_1>::type,
+ typename is_polygon_90_set_type<geometry_type_2>::type>::type,
geometry_type_1>::type &
operator+=(geometry_type_1& lvalue, const geometry_type_2& rvalue) {
return self_assignment_boolean_op<geometry_type_1, geometry_type_2, boolean_op::BinaryOr>(lvalue, rvalue);
@@ -390,8 +390,8 @@
struct y_ps90_be2 : gtl_yes {};
template <typename geometry_type_1, typename geometry_type_2>
- typename enable_if< typename gtl_and_3<y_ps90_be2, typename is_mutable_polygon_90_set_type<geometry_type_1>::type,
- typename is_polygon_90_set_type<geometry_type_2>::type>::type,
+ typename enable_if< typename gtl_and_3<y_ps90_be2, typename is_mutable_polygon_90_set_type<geometry_type_1>::type,
+ typename is_polygon_90_set_type<geometry_type_2>::type>::type,
geometry_type_1>::type &
operator|=(geometry_type_1& lvalue, const geometry_type_2& rvalue) {
return self_assignment_boolean_op<geometry_type_1, geometry_type_2, boolean_op::BinaryOr>(lvalue, rvalue);
@@ -400,18 +400,18 @@
struct y_ps90_se : gtl_yes {};
template <typename geometry_type_1, typename geometry_type_2>
- typename enable_if< typename gtl_and_3<y_ps90_se, typename is_mutable_polygon_90_set_type<geometry_type_1>::type,
- typename is_polygon_90_set_type<geometry_type_2>::type>::type,
+ typename enable_if< typename gtl_and_3<y_ps90_se, typename is_mutable_polygon_90_set_type<geometry_type_1>::type,
+ typename is_polygon_90_set_type<geometry_type_2>::type>::type,
geometry_type_1>::type &
operator*=(geometry_type_1& lvalue, const geometry_type_2& rvalue) {
return self_assignment_boolean_op<geometry_type_1, geometry_type_2, boolean_op::BinaryAnd>(lvalue, rvalue);
}
-
+
struct y_ps90_ae : gtl_yes {};
template <typename geometry_type_1, typename geometry_type_2>
- typename enable_if< typename gtl_and_3<y_ps90_ae, typename is_mutable_polygon_90_set_type<geometry_type_1>::type,
- typename is_polygon_90_set_type<geometry_type_2>::type>::type,
+ typename enable_if< typename gtl_and_3<y_ps90_ae, typename is_mutable_polygon_90_set_type<geometry_type_1>::type,
+ typename is_polygon_90_set_type<geometry_type_2>::type>::type,
geometry_type_1>::type &
operator&=(geometry_type_1& lvalue, const geometry_type_2& rvalue) {
return self_assignment_boolean_op<geometry_type_1, geometry_type_2, boolean_op::BinaryAnd>(lvalue, rvalue);
@@ -420,8 +420,8 @@
struct y_ps90_xe : gtl_yes {};
template <typename geometry_type_1, typename geometry_type_2>
- typename enable_if< typename gtl_and_3<y_ps90_xe, typename is_mutable_polygon_90_set_type<geometry_type_1>::type,
- typename is_polygon_90_set_type<geometry_type_2>::type>::type,
+ typename enable_if< typename gtl_and_3<y_ps90_xe, typename is_mutable_polygon_90_set_type<geometry_type_1>::type,
+ typename is_polygon_90_set_type<geometry_type_2>::type>::type,
geometry_type_1>::type &
operator^=(geometry_type_1& lvalue, const geometry_type_2& rvalue) {
return self_assignment_boolean_op<geometry_type_1, geometry_type_2, boolean_op::BinaryXor>(lvalue, rvalue);
@@ -430,8 +430,8 @@
struct y_ps90_me : gtl_yes {};
template <typename geometry_type_1, typename geometry_type_2>
- typename enable_if< typename gtl_and_3< y_ps90_me, typename is_mutable_polygon_90_set_type<geometry_type_1>::type,
- typename is_polygon_90_set_type<geometry_type_2>::type>::type,
+ typename enable_if< typename gtl_and_3< y_ps90_me, typename is_mutable_polygon_90_set_type<geometry_type_1>::type,
+ typename is_polygon_90_set_type<geometry_type_2>::type>::type,
geometry_type_1>::type &
operator-=(geometry_type_1& lvalue, const geometry_type_2& rvalue) {
return self_assignment_boolean_op<geometry_type_1, geometry_type_2, boolean_op::BinaryNot>(lvalue, rvalue);
@@ -441,7 +441,7 @@
template <typename geometry_type_1, typename coordinate_type_1>
typename enable_if< typename gtl_and_3<y_ps90_rpe,
- typename is_mutable_polygon_90_set_type<geometry_type_1>::type,
+ typename is_mutable_polygon_90_set_type<geometry_type_1>::type,
typename gtl_same_type<typename geometry_concept<coordinate_type_1>::type, coordinate_concept>::type>::type,
geometry_type_1>::type &
operator+=(geometry_type_1& lvalue, coordinate_type_1 rvalue) {
@@ -452,7 +452,7 @@
template <typename geometry_type_1, typename coordinate_type_1>
typename enable_if< typename gtl_and_3<y_ps90_rme,
- typename is_mutable_polygon_90_set_type<geometry_type_1>::type,
+ typename is_mutable_polygon_90_set_type<geometry_type_1>::type,
typename gtl_same_type<typename geometry_concept<coordinate_type_1>::type, coordinate_concept>::type>::type,
geometry_type_1>::type &
operator-=(geometry_type_1& lvalue, coordinate_type_1 rvalue) {
@@ -463,7 +463,7 @@
template <typename geometry_type_1, typename coordinate_type_1>
typename enable_if< typename gtl_and_3<y_ps90_rp,
- typename gtl_if<typename is_mutable_polygon_90_set_type<geometry_type_1>::type>::type,
+ typename gtl_if<typename is_mutable_polygon_90_set_type<geometry_type_1>::type>::type,
typename gtl_if<typename gtl_same_type<typename geometry_concept<coordinate_type_1>::type, coordinate_concept>::type>::type>::type,
geometry_type_1>::type
operator+(const geometry_type_1& lvalue, coordinate_type_1 rvalue) {
@@ -476,7 +476,7 @@
template <typename geometry_type_1, typename coordinate_type_1>
typename enable_if< typename gtl_and_3<y_ps90_rm,
- typename gtl_if<typename is_mutable_polygon_90_set_type<geometry_type_1>::type>::type,
+ typename gtl_if<typename is_mutable_polygon_90_set_type<geometry_type_1>::type>::type,
typename gtl_if<typename gtl_same_type<typename geometry_concept<coordinate_type_1>::type, coordinate_concept>::type>::type>::type,
geometry_type_1>::type
operator-(const geometry_type_1& lvalue, coordinate_type_1 rvalue) {
@@ -488,4 +488,3 @@
}
}
#endif
-
Modified: trunk/boost/polygon/detail/polygon_90_touch.hpp
==============================================================================
--- trunk/boost/polygon/detail/polygon_90_touch.hpp (original)
+++ trunk/boost/polygon/detail/polygon_90_touch.hpp 2012-05-09 15:33:59 EDT (Wed, 09 May 2012)
@@ -1,6 +1,6 @@
/*
Copyright 2008 Intel Corporation
-
+
Use, modification and distribution are subject to the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
@@ -30,7 +30,7 @@
bool incremented_;
public:
inline iterator() : itr_(), ivlIds_(), incremented_(false) {}
- inline iterator(typename EventData::const_iterator itr,
+ inline iterator(typename EventData::const_iterator itr,
Unit prevPos, Unit curPos, const std::set<int>& ivlIds) : itr_(itr), ivlIds_(), incremented_(false) {
ivlIds_.second = ivlIds;
ivlIds_.first = Interval(prevPos, curPos);
@@ -61,7 +61,7 @@
} else {
ivlIds_.second.insert(*itr);
}
- }
+ }
//std::cout << std::endl;
//std::cout << "new state\n";
//for(std::set<int>::iterator itr = ivlIds_.second.begin(); itr != ivlIds_.second.end(); ++itr) {
@@ -77,7 +77,7 @@
++(*this);
return tmpItr;
}
- inline std::pair<Interval, std::set<int> >& operator*() {
+ inline std::pair<Interval, std::set<int> >& operator*() {
if(incremented_) ivlIds_.first = Interval(ivlIds_.first.get(HIGH), itr_->first);
incremented_ = false;
if(ivlIds_.second.empty())(++(*this));
@@ -98,13 +98,13 @@
eventData_ = that.eventData_;
return *this;
}
-
+
//Insert an interval polygon id into the EventData
inline void insert(const std::pair<Interval, int>& intervalId){
insert(intervalId.first.low(), intervalId.second);
insert(intervalId.first.high(), intervalId.second);
}
-
+
//Insert an position and polygon id into EventData
inline void insert(Unit pos, int id) {
typename EventData::iterator lb = eventData_.lower_bound(pos);
@@ -121,7 +121,7 @@
(*lb).second.insert(id);
}
}
-
+
//merge this scan event with that by inserting its data
inline void insert(const TouchScanEvent& that){
typename EventData::const_iterator itr;
@@ -129,9 +129,9 @@
eventData_[(*itr).first].insert(itr->second.begin(), itr->second.end());
}
}
-
+
//Get the begin iterator over event data
- inline iterator begin() const {
+ inline iterator begin() const {
//std::cout << "begin\n";
if(eventData_.empty()) return end();
typename EventData::const_iterator itr = eventData_.begin();
@@ -140,18 +140,18 @@
++itr;
return iterator(itr, pos, itr->first, idr);
}
-
+
//Get the end iterator over event data
inline iterator end() const { return iterator(eventData_.end(), 0, 0, std::set<int>()); }
-
+
inline void clear() { eventData_.clear(); }
-
- inline Interval extents() const {
+
+ inline Interval extents() const {
if(eventData_.empty()) return Interval();
return Interval((*(eventData_.begin())).first, (*(eventData_.rbegin())).first);
}
};
-
+
//declaration of a map of scan events by coordinate value used to store all the
//polygon data for a single layer input into the scanline algorithm
typedef std::pair<std::map<Unit, TouchScanEvent>, std::map<Unit, TouchScanEvent> > TouchSetData;
@@ -166,8 +166,8 @@
public:
inline TouchOp () : scanData_(), nextItr_() { nextItr_ = scanData_.end(); }
inline TouchOp (const TouchOp& that) : scanData_(that.scanData_), nextItr_() { nextItr_ = scanData_.begin(); }
- inline TouchOp& operator=(const TouchOp& that);
-
+ inline TouchOp& operator=(const TouchOp& that);
+
//moves scanline forward
inline void advanceScan() { nextItr_ = scanData_.begin(); }
@@ -252,7 +252,7 @@
//std::cout << "case7" << std::endl;
scanData_.erase(lowItr);
}
- }
+ }
//merge the top interval with the one above if they have the same count
if(highItr != scanData_.begin()) {
//std::cout << "case8" << std::endl;
@@ -279,7 +279,7 @@
// std::cout << std::endl;
// }
// }
-
+
private:
inline typename ScanData::iterator lookup_(Unit pos){
if(nextItr_ != scanData_.end() && nextItr_->first >= pos) {
@@ -294,7 +294,7 @@
}
template <typename graphT>
- inline void evaluateInterval_(graphT& outputContainer, std::set<int>& ids,
+ inline void evaluateInterval_(graphT& outputContainer, std::set<int>& ids,
const std::set<int>& changingIds, bool leadingEdge) {
for(std::set<int>::const_iterator ciditr = changingIds.begin(); ciditr != changingIds.end(); ++ciditr){
//std::cout << "evaluateInterval " << (*ciditr) << std::endl;
Modified: trunk/boost/polygon/detail/polygon_formation.hpp
==============================================================================
--- trunk/boost/polygon/detail/polygon_formation.hpp (original)
+++ trunk/boost/polygon/detail/polygon_formation.hpp 2012-05-09 15:33:59 EDT (Wed, 09 May 2012)
@@ -1,6 +1,6 @@
/*
Copyright 2008 Intel Corporation
-
+
Use, modification and distribution are subject to the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
@@ -25,24 +25,24 @@
* TAIL End is represented by true because TAIL comes after head and 1 after 0
*/
const End TAIL = true;
-
+
/*
* 2D turning direction, left and right sides (is a boolean value since it has two states.)
*/
typedef bool Side;
-
+
/*
* LEFT Side is 0 because we inuitively think left to right; left < right
*/
const Side LEFT = false;
-
+
/*
* RIGHT Side is 1 so that right > left
*/
const Side RIGHT = true;
/*
- * The PolyLine class is data storage and services for building and representing partial polygons.
+ * The PolyLine class is data storage and services for building and representing partial polygons.
* As the polyline is added to it extends its storage to accomodate the data.
* PolyLines can be joined head-to-head/head-to-tail when it is determined that two polylines are
* part of the same polygon.
@@ -59,20 +59,20 @@
class PolyLine {
private:
//data
-
+
/*
* ptdata_ a vector of coordiantes
* if VERTICAL_HEAD, first coordiante is an X
* else first coordinate is a Y
*/
std::vector<Unit> ptdata_;
-
+
/*
* head and tail points to other polylines before and after this in a chain
*/
PolyLine* headp_;
PolyLine* tailp_;
-
+
/*
* state bitmask
* bit zero is orientation, 0 H, 1 V
@@ -81,24 +81,24 @@
* bit 3 is solid to left of PolyLine when 1, right when 0
*/
int state_;
-
+
public:
/*
* default constructor (for preallocation)
*/
PolyLine();
-
+
/*
* constructor that takes the orientation, coordiante and side to which there is solid
*/
PolyLine(orientation_2d orient, Unit coord, Side side);
-
+
//copy constructor
PolyLine(const PolyLine& pline);
-
+
//destructor
~PolyLine();
-
+
//assignment operator
PolyLine& operator=(const PolyLine& that);
@@ -118,18 +118,18 @@
/*
* returns true if first coordinate is an X value (first segment is vertical)
*/
- bool verticalHead() const;
+ bool verticalHead() const;
/*
* returns the orientation_2d fo the tail
*/
orientation_2d tailOrient() const;
-
+
/*
* returns true if last coordinate is an X value (last segment is vertical)
*/
bool verticalTail() const;
-
+
/*
* retrun true if PolyLine has odd number of coordiantes
*/
@@ -157,7 +157,7 @@
* retrun true if the tail of this polyline is connect to the head of a polyline
*/
bool tailToHead() const;
-
+
/*
* retrun the side on which there is solid for this polyline
*/
@@ -177,12 +177,12 @@
* adds a coordinate value to the end of the polyline changing the tail orientation
*/
PolyLine& pushCoordinate(Unit coord);
-
+
/*
* removes a coordinate value at the end of the polyline changing the tail orientation
*/
PolyLine& popCoordinate();
-
+
/*
* extends the tail of the polyline to include the point, changing orientation if needed
*/
@@ -299,7 +299,7 @@
* that edge is supposed to be solid or space. Any incomplete polygon will have two active tails. Active tails
* may be joined together to merge two incomplete polygons into a larger incomplete polygon. If two active tails
* that are to be merged are the oppositve ends of the same incomplete polygon that indicates that the polygon
- * has been closed and is complete. The active tail keeps a pointer to the other active tail of its incomplete
+ * has been closed and is complete. The active tail keeps a pointer to the other active tail of its incomplete
* polygon so that it is easy to check this condition. These pointers are updated when active tails are joined.
* The active tail also keeps a list of pointers to active tail objects that serve as handles to closed holes. In
* this way a hole can be associated to another incomplete polygon, which will eventually be its enclosing shell,
@@ -314,7 +314,7 @@
class ActiveTail {
private:
//data
- PolyLine<Unit>* tailp_;
+ PolyLine<Unit>* tailp_;
ActiveTail *otherTailp_;
std::list<ActiveTail*> holesList_;
public:
@@ -331,7 +331,7 @@
End startEnd_;
public:
inline iterator() : pLine_(), pLineEnd_(), index_(), indexEnd_(), startEnd_() {}
- inline iterator(const ActiveTail* at, bool isHole, orientation_2d orient) :
+ inline iterator(const ActiveTail* at, bool isHole, orientation_2d orient) :
pLine_(), pLineEnd_(), index_(), indexEnd_(), startEnd_() {
//if it is a hole and orientation is vertical or it is not a hole and orientation is horizontal
//we want to use this active tail, otherwise we want to use the other active tail
@@ -560,7 +560,7 @@
/* deallocate an activetail object */
template <typename Unit>
void destroyActiveTail(ActiveTail<Unit>* aTail);
-
+
template<bool orientT, typename Unit>
class PolyLineHoleData {
private:
@@ -586,7 +586,7 @@
inline PolyLineHoleData& set_compact(iT inputBegin, iT inputEnd) {
return *this;
}
-
+
};
template<bool orientT, typename Unit>
@@ -646,7 +646,7 @@
inline PolyLinePolygonWithHolesData& set_compact(iT inputBegin, iT inputEnd) {
return *this;
}
-
+
// initialize a polygon from x,y values, it is assumed that the first is an x
// and that the input is a well behaved polygon
template<class iT>
@@ -679,18 +679,18 @@
std::vector<PolyLinePolygonData> outputPolygons_;
bool fractureHoles_;
public:
- typedef typename std::vector<PolyLinePolygonData>::iterator iterator;
+ typedef typename std::vector<PolyLinePolygonData>::iterator iterator;
inline ScanLineToPolygonItrs() : tailMap_(), outputPolygons_(), fractureHoles_(false) {}
/* construct a scanline with the proper offsets, protocol and options */
inline ScanLineToPolygonItrs(bool fractureHoles) : tailMap_(), outputPolygons_(), fractureHoles_(fractureHoles) {}
-
+
~ScanLineToPolygonItrs() { clearOutput_(); }
-
+
/* process all vertical edges, left and right, at a unique x coordinate, edges must be sorted low to high */
- void processEdges(iterator& beginOutput, iterator& endOutput,
- Unit currentX, std::vector<interval_data<Unit> >& leftEdges,
+ void processEdges(iterator& beginOutput, iterator& endOutput,
+ Unit currentX, std::vector<interval_data<Unit> >& leftEdges,
std::vector<interval_data<Unit> >& rightEdges);
-
+
private:
void clearOutput_();
};
@@ -706,9 +706,9 @@
// inline ScanLineToPolygons() : scanline_() {}
// /* construct a scanline with the proper offsets, protocol and options */
// inline ScanLineToPolygons(bool fractureHoles) : scanline_(fractureHoles) {}
-
+
// /* process all vertical edges, left and right, at a unique x coordinate, edges must be sorted low to high */
-// inline void processEdges(std::vector<Unit>& outBufferTmp, Unit currentX, std::vector<interval_data<Unit> >& leftEdges,
+// inline void processEdges(std::vector<Unit>& outBufferTmp, Unit currentX, std::vector<interval_data<Unit> >& leftEdges,
// std::vector<interval_data<Unit> >& rightEdges) {
// typename ScanLineToPolygonItrs<true, Unit>::iterator itr, endItr;
// scanline_.processEdges(itr, endItr, currentX, leftEdges, rightEdges);
@@ -754,7 +754,7 @@
//constructor
template <typename Unit>
- inline PolyLine<Unit>::PolyLine(orientation_2d orient, Unit coord, Side side) :
+ inline PolyLine<Unit>::PolyLine(orientation_2d orient, Unit coord, Side side) :
ptdata_(1, coord),
headp_(0),
tailp_(0),
@@ -796,7 +796,7 @@
//valid PolyLine
template <typename Unit>
- inline bool PolyLine<Unit>::isValid() const {
+ inline bool PolyLine<Unit>::isValid() const {
return state_ > -1; }
//first coordinate is an X value
@@ -818,7 +818,7 @@
inline bool PolyLine<Unit>::verticalTail() const {
return to_bool(verticalHead() ^ oddLength());
}
-
+
template <typename Unit>
inline orientation_2d PolyLine<Unit>::tailOrient() const {
return (verticalTail() ? VERTICAL : HORIZONTAL);
@@ -850,16 +850,16 @@
inline bool PolyLine<Unit>::tailToHead() const {
return to_bool(!tailToTail());
}
-
+
template <typename Unit>
inline bool PolyLine<Unit>::tailToTail() const {
return to_bool(state_ & TAIL_TO_TAIL);
}
template <typename Unit>
- inline Side PolyLine<Unit>::solidSide() const {
+ inline Side PolyLine<Unit>::solidSide() const {
return solidToRight(); }
-
+
template <typename Unit>
inline bool PolyLine<Unit>::solidToRight() const {
return to_bool(state_ & SOLID_TO_RIGHT) != 0;
@@ -1010,14 +1010,14 @@
inline ActiveTail<Unit>::ActiveTail() : tailp_(0), otherTailp_(0), holesList_() {}
template <typename Unit>
- inline ActiveTail<Unit>::ActiveTail(orientation_2d orient, Unit coord, Side solidToRight, ActiveTail* otherTailp) :
+ inline ActiveTail<Unit>::ActiveTail(orientation_2d orient, Unit coord, Side solidToRight, ActiveTail* otherTailp) :
tailp_(0), otherTailp_(0), holesList_() {
tailp_ = createPolyLine(orient, coord, solidToRight);
otherTailp_ = otherTailp;
}
template <typename Unit>
- inline ActiveTail<Unit>::ActiveTail(PolyLine<Unit>* active, ActiveTail<Unit>* otherTailp) :
+ inline ActiveTail<Unit>::ActiveTail(PolyLine<Unit>* active, ActiveTail<Unit>* otherTailp) :
tailp_(active), otherTailp_(otherTailp), holesList_() {}
//copy constructor
@@ -1026,9 +1026,9 @@
//destructor
template <typename Unit>
- inline ActiveTail<Unit>::~ActiveTail() {
+ inline ActiveTail<Unit>::~ActiveTail() {
//clear them in case the memory is read later
- tailp_ = 0; otherTailp_ = 0;
+ tailp_ = 0; otherTailp_ = 0;
}
template <typename Unit>
@@ -1050,33 +1050,33 @@
}
template <typename Unit>
- inline bool ActiveTail<Unit>::operator<=(const ActiveTail<Unit>& b) const {
+ inline bool ActiveTail<Unit>::operator<=(const ActiveTail<Unit>& b) const {
return !(*this > b); }
-
+
template <typename Unit>
- inline bool ActiveTail<Unit>::operator>(const ActiveTail<Unit>& b) const {
+ inline bool ActiveTail<Unit>::operator>(const ActiveTail<Unit>& b) const {
return b < (*this); }
-
+
template <typename Unit>
- inline bool ActiveTail<Unit>::operator>=(const ActiveTail<Unit>& b) const {
+ inline bool ActiveTail<Unit>::operator>=(const ActiveTail<Unit>& b) const {
return !(*this < b); }
template <typename Unit>
- inline PolyLine<Unit>* ActiveTail<Unit>::getTail() const {
+ inline PolyLine<Unit>* ActiveTail<Unit>::getTail() const {
return tailp_; }
template <typename Unit>
- inline PolyLine<Unit>* ActiveTail<Unit>::getOtherTail() const {
+ inline PolyLine<Unit>* ActiveTail<Unit>::getOtherTail() const {
return otherTailp_->tailp_; }
template <typename Unit>
- inline ActiveTail<Unit>* ActiveTail<Unit>::getOtherActiveTail() const {
+ inline ActiveTail<Unit>* ActiveTail<Unit>::getOtherActiveTail() const {
return otherTailp_; }
template <typename Unit>
inline bool ActiveTail<Unit>::isOtherTail(const ActiveTail<Unit>& b) {
// assert( (tailp_ == b.getOtherTail() && getOtherTail() == b.tailp_) ||
- // (tailp_ != b.getOtherTail() && getOtherTail() != b.tailp_))
+ // (tailp_ != b.getOtherTail() && getOtherTail() != b.tailp_))
// ("ActiveTail: Active tails out of sync");
return otherTailp_ == &b;
}
@@ -1100,7 +1100,7 @@
if(other->getOrient() == VERTICAL) {
//assert that hole.getOrient() == HORIZONTAL
//this case should never happen
- h = hole;
+ h = hole;
v = other;
} else {
//assert that hole.getOrient() == VERTICAL
@@ -1128,23 +1128,23 @@
}
template <typename Unit>
- inline bool ActiveTail<Unit>::solidToRight() const {
+ inline bool ActiveTail<Unit>::solidToRight() const {
return getTail()->solidToRight(); }
template <typename Unit>
- inline Unit ActiveTail<Unit>::getCoord() const {
+ inline Unit ActiveTail<Unit>::getCoord() const {
return getTail()->getEndCoord(); }
-
+
template <typename Unit>
- inline Unit ActiveTail<Unit>::getCoordinate() const {
- return getCoord(); }
+ inline Unit ActiveTail<Unit>::getCoordinate() const {
+ return getCoord(); }
template <typename Unit>
- inline orientation_2d ActiveTail<Unit>::getOrient() const {
+ inline orientation_2d ActiveTail<Unit>::getOrient() const {
return getTail()->tailOrient(); }
template <typename Unit>
- inline void ActiveTail<Unit>::pushCoordinate(Unit coord) {
+ inline void ActiveTail<Unit>::pushCoordinate(Unit coord) {
//appropriately handle any co-linear polyline segments by calling push point internally
point_data<Unit> p;
p.set(HORIZONTAL, coord);
@@ -1241,16 +1241,16 @@
if((getOrient() == HORIZONTAL) ^ !isHole) {
//our first coordinate is a y value, so we need to rotate it to the end
typename std::vector<Unit>::iterator tmpItr = outVec.begin();
- tmpItr += size;
+ tmpItr += size;
outVec.erase(++tmpItr); //erase the 2nd element
}
End startEnd = tailp_->endConnectivity(HEAD);
if(isHole) startEnd = otherTailp_->tailp_->endConnectivity(HEAD);
while(nextPolyLinep) {
bool nextStartEnd = nextPolyLinep->endConnectivity(!startEnd);
- nextPolyLinep = nextPolyLinep->writeOut(outVec, startEnd);
+ nextPolyLinep = nextPolyLinep->writeOut(outVec, startEnd);
startEnd = nextStartEnd;
- }
+ }
if((getOrient() == HORIZONTAL) ^ !isHole) {
//we want to push the y value onto the end since we ought to have ended with an x
outVec.push_back(firsty); //should never be executed because we want first value to be an x
@@ -1284,7 +1284,7 @@
//solid indicates if it was joined by a solit or a space
template <typename Unit>
- inline ActiveTail<Unit>* ActiveTail<Unit>::joinChains(ActiveTail<Unit>* at1, ActiveTail<Unit>* at2, bool solid, std::vector<Unit>& outBufferTmp)
+ inline ActiveTail<Unit>* ActiveTail<Unit>::joinChains(ActiveTail<Unit>* at1, ActiveTail<Unit>* at2, bool solid, std::vector<Unit>& outBufferTmp)
{
//checks to see if we closed a figure
if(at1->isOtherTail(*at2)){
@@ -1298,7 +1298,7 @@
//because otherwise it would have to have another vertex to the right of this one
//and would not be closed at this point
return at1;
- } else {
+ } else {
//assert pG != 0
//the figure that was closed is a shell
at1->writeOutFigure(outBufferTmp);
@@ -1334,7 +1334,7 @@
//solid indicates if it was joined by a solit or a space
template <typename Unit>
template <typename PolygonT>
- inline ActiveTail<Unit>* ActiveTail<Unit>::joinChains(ActiveTail<Unit>* at1, ActiveTail<Unit>* at2, bool solid,
+ inline ActiveTail<Unit>* ActiveTail<Unit>::joinChains(ActiveTail<Unit>* at1, ActiveTail<Unit>* at2, bool solid,
std::vector<PolygonT>& outBufferTmp) {
//checks to see if we closed a figure
if(at1->isOtherTail(*at2)){
@@ -1348,7 +1348,7 @@
//because otherwise it would have to have another vertex to the right of this one
//and would not be closed at this point
return at1;
- } else {
+ } else {
//assert pG != 0
//the figure that was closed is a shell
outBufferTmp.push_back(at1);
@@ -1367,8 +1367,8 @@
return 0;
}
- template <class TKey, class T> inline typename std::map<TKey, T>::iterator findAtNext(std::map<TKey, T>& theMap,
- typename std::map<TKey, T>::iterator pos, const TKey& key)
+ template <class TKey, class T> inline typename std::map<TKey, T>::iterator findAtNext(std::map<TKey, T>& theMap,
+ typename std::map<TKey, T>::iterator pos, const TKey& key)
{
if(pos == theMap.end()) return theMap.find(key);
//if they match the mapItr is pointing to the correct position
@@ -1377,22 +1377,22 @@
}
if(pos->first > key) {
return theMap.end();
- }
+ }
//else they are equal and no need to do anything to the iterator
return pos;
}
// createActiveTailsAsPair is called in these two end cases of geometry
// 1. lower left concave corner
- // ###|
// ###|
- // ###|###
+ // ###|
+ // ###|###
// ###|###
// 2. lower left convex corner
- // |###
- // |###
- // |
- // |
+ // |###
+ // |###
+ // |
+ // |
// In case 1 there may be a hole propigated up from the bottom. If the fracture option is enabled
// the two active tails that form the filament fracture line edges can become the new active tail pair
// by pushing x and y onto them. Otherwise the hole simply needs to be associated to one of the new active tails
@@ -1408,7 +1408,7 @@
(*at2) = ActiveTail<Unit>(HORIZONTAL, y, !solid, at1);
//provide a function through activeTail class to provide this
at1->getTail()->joinHeadToHead(*(at2->getTail()));
- if(phole)
+ if(phole)
at1->addHole(phole, fractureHoles); //assert fractureHoles == false
return std::pair<ActiveTail<Unit>*, ActiveTail<Unit>*>(at1, at2);
}
@@ -1427,105 +1427,105 @@
at2->pushCoordinate(y);
return std::pair<ActiveTail<Unit>*, ActiveTail<Unit>*>(at1, at2);
}
-
+
//Process edges connects vertical input edges (right or left edges of figures) to horizontal edges stored as member
//data of the scanline object. It also creates now horizontal edges as needed to construct figures from edge data.
//
- //There are only 12 geometric end cases where the scanline intersects a horizontal edge and even fewer unique
+ //There are only 12 geometric end cases where the scanline intersects a horizontal edge and even fewer unique
//actions to take:
// 1. Solid on both sides of the vertical partition after the current position and space on both sides before
- // ###|###
- // ###|###
- // |
- // |
+ // ###|###
+ // ###|###
+ // |
+ // |
// This case does not need to be handled because there is no vertical edge at the current x coordinate.
//
// 2. Solid on both sides of the vertical partition before the current position and space on both sides after
- // |
- // |
- // ###|###
- // ###|###
+ // |
+ // |
+ // ###|###
+ // ###|###
// This case does not need to be handled because there is no vertical edge at the current x coordinate.
//
// 3. Solid on the left of the vertical partition after the current position and space elsewhere
- // ###|
- // ###|
- // |
- // |
+ // ###|
+ // ###|
+ // |
+ // |
// The horizontal edge from the left is found and turns upward because of the vertical right edge to become
// the currently active vertical edge.
//
// 4. Solid on the left of the vertical partion before the current position and space elsewhere
- // |
- // |
- // ###|
+ // |
+ // |
+ // ###|
// ###|
// The horizontal edge from the left is found and joined to the currently active vertical edge.
//
// 5. Solid to the right above and below and solid to the left above current position.
- // ###|###
- // ###|###
- // |###
- // |###
+ // ###|###
+ // ###|###
+ // |###
+ // |###
// The horizontal edge from the left is found and joined to the currently active vertical edge,
// potentially closing a hole.
//
// 6. Solid on the left of the vertical partion before the current position and solid to the right above and below
// |###
- // |###
- // ###|###
+ // |###
+ // ###|###
// ###|###
// The horizontal edge from the left is found and turns upward because of the vertical right edge to become
// the currently active vertical edge.
//
// 7. Solid on the right of the vertical partition after the current position and space elsewhere
- // |###
- // |###
- // |
- // |
+ // |###
+ // |###
+ // |
+ // |
// Create two new ActiveTails, one is added to the horizontal edges and the other becomes the vertical currentTail
//
// 8. Solid on the right of the vertical partion before the current position and space elsewhere
- // |
- // |
- // |###
+ // |
+ // |
+ // |###
// |###
// The currentTail vertical edge turns right and is added to the horizontal edges data
//
// 9. Solid to the right above and solid to the left above and below current position.
- // ###|###
- // ###|###
- // ###|
+ // ###|###
+ // ###|###
+ // ###|
// ###|
// The currentTail vertical edge turns right and is added to the horizontal edges data
//
// 10. Solid on the left of the vertical partion above and below the current position and solid to the right below
- // ###|
// ###|
- // ###|###
+ // ###|
+ // ###|###
// ###|###
// Create two new ActiveTails, one is added to the horizontal edges data and the other becomes the vertical currentTail
//
// 11. Solid to the right above and solid to the left below current position.
- // |###
// |###
- // ###|
+ // |###
+ // ###|
// ###|
// The currentTail vertical edge joins the horizontal edge from the left (may close a polygon)
// Create two new ActiveTails, one is added to the horizontal edges data and the other becomes the vertical currentTail
//
// 12. Solid on the left of the vertical partion above the current position and solid to the right below
- // ###|
// ###|
- // |###
+ // ###|
+ // |###
// |###
// The currentTail vertical edge turns right and is added to the horizontal edges data.
// The horizontal edge from the left turns upward and becomes the currentTail vertical edge
//
template <bool orientT, typename Unit, typename polygon_concept_type>
inline void ScanLineToPolygonItrs<orientT, Unit, polygon_concept_type>::
- processEdges(iterator& beginOutput, iterator& endOutput,
- Unit currentX, std::vector<interval_data<Unit> >& leftEdges,
+ processEdges(iterator& beginOutput, iterator& endOutput,
+ Unit currentX, std::vector<interval_data<Unit> >& leftEdges,
std::vector<interval_data<Unit> >& rightEdges) {
clearOutput_();
typename std::map<Unit, ActiveTail<Unit>*>::iterator nextMapItr = tailMap_.begin();
@@ -1551,7 +1551,7 @@
interval_data<Unit> & nextEdge = edges[!trailingEdge];
//process this edge
if(!bottomAlreadyProcessed) {
- //assert currentTail = 0
+ //assert currentTail = 0
//process the bottom end of this edge
typename std::map<Unit, ActiveTail<Unit>*>::iterator thisMapItr = findAtNext(tailMap_, nextMapItr, edge.get(LOW));
@@ -1578,7 +1578,7 @@
//we need to create one and another one to be the current vertical tail
//if this is a trailing edge then there is space to the right of the vertical edge
//so pass the inverse of trailingEdge to indicate solid to the right
- std::pair<ActiveTail<Unit>*, ActiveTail<Unit>*> tailPair =
+ std::pair<ActiveTail<Unit>*, ActiveTail<Unit>*> tailPair =
createActiveTailsAsPair(currentX, edge.get(LOW), !trailingEdge, currentTail, fractureHoles_);
currentTail = tailPair.first;
tailMap_.insert(nextMapItr, std::pair<Unit, ActiveTail<Unit>*>(edge.get(LOW), tailPair.second));
@@ -1606,7 +1606,7 @@
//two new tails are created, the vertical becomes current tail, the horizontal becomes thisMapItr tail
//pass true becuase they are created at the lower left corner of some solid
//pass null because there is no hole pointer possible
- std::pair<ActiveTail<Unit>*, ActiveTail<Unit>*> tailPair =
+ std::pair<ActiveTail<Unit>*, ActiveTail<Unit>*> tailPair =
createActiveTailsAsPair<Unit>(currentX, edge.get(HIGH), true, 0, fractureHoles_);
currentTail = tailPair.first;
thisMapItr->second = tailPair.second;
@@ -1662,7 +1662,7 @@
//set current tail to null
currentTail = 0;
}
- }
+ }
//delete thisMapItr from the map
tailMap_.erase(thisMapItr);
} else {
@@ -1675,7 +1675,7 @@
//leave nextMapItr unchanged, it is still next
}
}
-
+
//increment index
leftIndex += !trailingEdge;
rightIndex += trailingEdge;
@@ -1804,4 +1804,3 @@
}
}
#endif
-
Modified: trunk/boost/polygon/detail/polygon_set_view.hpp
==============================================================================
--- trunk/boost/polygon/detail/polygon_set_view.hpp (original)
+++ trunk/boost/polygon/detail/polygon_set_view.hpp 2012-05-09 15:33:59 EDT (Wed, 09 May 2012)
@@ -1,6 +1,6 @@
/*
Copyright 2008 Intel Corporation
-
+
Use, modification and distribution are subject to the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
@@ -8,8 +8,8 @@
#ifndef BOOST_POLYGON_POLYGON_SET_VIEW_HPP
#define BOOST_POLYGON_POLYGON_SET_VIEW_HPP
namespace boost { namespace polygon{
-
-
+
+
template <typename coordinate_type>
inline void polygon_set_data<coordinate_type>::clean() const {
if(dirty_) {
@@ -66,7 +66,7 @@
typedef typename polygon_set_view<ltype, rtype, op_type>::iterator_type iterator_type;
typedef typename polygon_set_view<ltype, rtype, op_type>::operator_arg_type operator_arg_type;
- static inline iterator_type begin(const polygon_set_view<ltype, rtype, op_type>& polygon_set);
+ static inline iterator_type begin(const polygon_set_view<ltype, rtype, op_type>& polygon_set);
static inline iterator_type end(const polygon_set_view<ltype, rtype, op_type>& polygon_set);
static inline bool clean(const polygon_set_view<ltype, rtype, op_type>& polygon_set);
@@ -172,11 +172,11 @@
}
template <typename ltype, typename rtype, int op_type>
bool polygon_set_traits<polygon_set_view<ltype, rtype, op_type> >::
- clean(const polygon_set_view<ltype, rtype, op_type>& ) {
+ clean(const polygon_set_view<ltype, rtype, op_type>& ) {
return true; }
template <typename ltype, typename rtype, int op_type>
bool polygon_set_traits<polygon_set_view<ltype, rtype, op_type> >::
- sort(const polygon_set_view<ltype, rtype, op_type>& ) {
+ sort(const polygon_set_view<ltype, rtype, op_type>& ) {
return true; }
template <typename value_type, typename arg_type>
@@ -187,7 +187,7 @@
itr2 = polygon_set_traits<arg_type>::end(arg);
dest.insert(itr1, itr2);
}
-
+
template <typename geometry_type_1, typename geometry_type_2, int op_type>
geometry_type_1& self_assignment_boolean_op(geometry_type_1& lvalue_, const geometry_type_2& rvalue_) {
typedef geometry_type_1 ltype;
@@ -201,7 +201,7 @@
// copy constructor
template <typename coordinate_type>
- template <typename ltype, typename rtype, int op_type>
+ template <typename ltype, typename rtype, int op_type>
polygon_set_data<coordinate_type>::polygon_set_data(const polygon_set_view<ltype, rtype, op_type>& that) :
data_(that.value().data_), dirty_(that.value().dirty_), unsorted_(that.value().unsorted_), is_45_(that.value().is_45_) {}
@@ -210,4 +210,3 @@
}
}
#endif
-
Modified: trunk/boost/polygon/detail/polygon_simplify.hpp
==============================================================================
--- trunk/boost/polygon/detail/polygon_simplify.hpp (original)
+++ trunk/boost/polygon/detail/polygon_simplify.hpp 2012-05-09 15:33:59 EDT (Wed, 09 May 2012)
@@ -8,19 +8,19 @@
#include <vector>
namespace boost { namespace polygon { namespace detail { namespace simplify_detail {
-
+
// Does a simplification/optimization pass on the polygon. If a given
// vertex lies within "len" of the line segment joining its neighbor
// vertices, it is removed.
template <typename T> //T is a model of point concept
- std::size_t simplify(std::vector<T>& dst, const std::vector<T>& src,
+ std::size_t simplify(std::vector<T>& dst, const std::vector<T>& src,
typename coordinate_traits<
typename point_traits<T>::coordinate_type
>::coordinate_distance len)
{
using namespace boost::polygon;
typedef typename point_traits<T>::coordinate_type coordinate_type;
- typedef typename coordinate_traits<coordinate_type>::area_type ftype;
+ typedef typename coordinate_traits<coordinate_type>::area_type ftype;
typedef typename std::vector<T>::const_iterator iter;
std::vector<T> out;
@@ -33,7 +33,7 @@
bool closed = equivalence(src.front(), src.back());
//we need to keep smoothing until we don't find points to remove
- //because removing points in the first iteration through the
+ //because removing points in the first iteration through the
//polygon may leave it in a state where more removal is possible
bool not_done = true;
while(not_done) {
@@ -41,7 +41,7 @@
dst.clear();
return orig_size;
}
-
+
// Start with the second, test for the last point
// explicitly, and exit after looping back around to the first.
ftype len2 = ftype(len) * ftype(len);
@@ -49,47 +49,47 @@
next = i+1;
if(next == dst.end())
next = dst.begin();
-
+
// points A, B, C
ftype ax = x(*prev), ay = y(*prev);
ftype bx = x(*i), by = y(*i);
ftype cx = x(*next), cy = y(*next);
-
+
// vectors AB, BC and AC:
ftype abx = bx-ax, aby = by-ay;
ftype bcx = cx-bx, bcy = cy-by;
ftype acx = cx-ax, acy = cy-ay;
-
+
// dot products
ftype ab_ab = abx*abx + aby*aby;
ftype bc_bc = bcx*bcx + bcy*bcy;
ftype ac_ac = acx*acx + acy*acy;
ftype ab_ac = abx*acx + aby*acy;
-
+
// projection of AB along AC
ftype projf = ab_ac / ac_ac;
ftype projx = acx * projf, projy = acy * projf;
-
+
// perpendicular vector from the line AC to point B (i.e. AB - proj)
ftype perpx = abx - projx, perpy = aby - projy;
-
+
// Squared fractional distance of projection. FIXME: can
// remove this division, the decisions below can be made with
// just the sign of the quotient and a check to see if
// abs(numerator) is greater than abs(divisor).
ftype f2 = (projx*acx + projy*acx) / ac_ac;
-
+
// Square of the relevant distance from point B:
ftype dist2;
if (f2 < 0) dist2 = ab_ab;
else if(f2 > 1) dist2 = bc_bc;
else dist2 = perpx*perpx + perpy*perpy;
-
+
if(dist2 > len2) {
prev = i; // bump prev, we didn't remove the segment
out.push_back(*i);
}
-
+
if(i == dst.begin())
break;
}
Modified: trunk/boost/polygon/detail/polygon_sort_adaptor.hpp
==============================================================================
--- trunk/boost/polygon/detail/polygon_sort_adaptor.hpp (original)
+++ trunk/boost/polygon/detail/polygon_sort_adaptor.hpp 2012-05-09 15:33:59 EDT (Wed, 09 May 2012)
@@ -1,6 +1,6 @@
/*
Copyright 2008 Intel Corporation
-
+
Use, modification and distribution are subject to the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
@@ -20,7 +20,7 @@
template<typename iterator_type>
struct dummy_to_delay_instantiation{
- typedef int unit_type; // default GTL unit
+ typedef int unit_type; // default GTL unit
};
//! @brief polygon_sort_adaptor default implementation that calls std::sort
@@ -29,7 +29,7 @@
//! @brief wrapper that mimics std::sort() function and takes
// the same arguments
template<typename RandomAccessIterator_Type>
- static void sort(RandomAccessIterator_Type _First,
+ static void sort(RandomAccessIterator_Type _First,
RandomAccessIterator_Type _Last)
{
std::sort(_First, _Last);
@@ -37,17 +37,17 @@
//! @brief wrapper that mimics std::sort() function overload and takes
// the same arguments
template<typename RandomAccessIterator_Type, typename Pred_Type>
- static void sort(RandomAccessIterator_Type _First,
- RandomAccessIterator_Type _Last,
+ static void sort(RandomAccessIterator_Type _First,
+ RandomAccessIterator_Type _Last,
const Pred_Type& _Comp)
{
std::sort(_First, _Last, _Comp);
}
};
- //! @brief user level wrapper for sorting quantities
+ //! @brief user level wrapper for sorting quantities
template <typename iter_type>
- void polygon_sort(iter_type _b_, iter_type _e_)
+ void polygon_sort(iter_type _b_, iter_type _e_)
{
polygon_sort_adaptor<typename dummy_to_delay_instantiation<iter_type>::unit_type>::sort(_b_, _e_);
}
@@ -55,13 +55,13 @@
//! @brief user level wrapper for sorting quantities that takes predicate
// as additional argument
template <typename iter_type, typename pred_type>
- void polygon_sort(iter_type _b_, iter_type _e_, const pred_type& _pred_)
+ void polygon_sort(iter_type _b_, iter_type _e_, const pred_type& _pred_)
{
polygon_sort_adaptor<typename dummy_to_delay_instantiation<iter_type>::unit_type>::sort(_b_, _e_, _pred_);
}
-
+
} // namespace polygon
-} // namespace boost
+} // namespace boost
#endif
Modified: trunk/boost/polygon/detail/property_merge.hpp
==============================================================================
--- trunk/boost/polygon/detail/property_merge.hpp (original)
+++ trunk/boost/polygon/detail/property_merge.hpp 2012-05-09 15:33:59 EDT (Wed, 09 May 2012)
@@ -1,6 +1,6 @@
/*
Copyright 2008 Intel Corporation
-
+
Use, modification and distribution are subject to the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
@@ -70,8 +70,8 @@
//static public member functions
template <typename iT, typename orientation_2d_type>
- static inline void
- populate_property_merge_data(property_merge_data& pmd, iT input_begin, iT input_end,
+ static inline void
+ populate_property_merge_data(property_merge_data& pmd, iT input_begin, iT input_end,
const property_type& property, orientation_2d_type orient) {
for( ; input_begin != input_end; ++input_begin) {
std::pair<property_merge_point<coordinate_type>, std::pair<property_type, int> > element;
@@ -175,7 +175,7 @@
//private static member functions
static inline void mergeProperty(property_map& lvalue, std::pair<property_type, int>& rvalue) {
- typename property_map::iterator itr = std::lower_bound(lvalue.begin(), lvalue.end(), rvalue,
+ typename property_map::iterator itr = std::lower_bound(lvalue.begin(), lvalue.end(), rvalue,
lessPropertyCount<std::pair<property_type, int> >());
if(itr == lvalue.end() ||
(*itr).first != rvalue.first) {
@@ -286,7 +286,7 @@
inline void processVertex(edge_property_vector& output) {
if(!countFromBelow.empty()) {
//we are processing an interval of change in scanline state between
- //previous vertex position and current vertex position where
+ //previous vertex position and current vertex position where
//count from below represents the change on the interval
//foreach scanline element from previous to current we
//write the interval on the scanline that is changing
@@ -333,7 +333,7 @@
if((*tmpitr).second == (*previousScanlinePosition).second)
scanline.erase(previousScanlinePosition);
}
-
+
} else if(currentY < currentInterval.high()){
//elementY > currentInterval.high()
//split the interval between previous and current scanline elements
@@ -354,7 +354,7 @@
std::pair<coordinate_type, property_map> elementScan;
elementScan.first = currentInterval.high();
scanlinePosition = scanline.insert(scanline.end(), elementScan);
- }
+ }
}
if(scanlinePosition == scanline.end() &&
currentY < currentInterval.high()) {
@@ -423,7 +423,7 @@
template <typename T>
inline int assertRedundant(T& t) {
if(t.empty()) return 0;
- int count = 0;
+ int count = 0;
typename T::iterator itr = t.begin();
if((*itr).second.empty())
++count;
@@ -443,7 +443,7 @@
if(data.empty()) return;
//sort
polygon_sort(data.begin(), data.end(), less_vertex_data<vertex_property>());
-
+
//scanline
bool firstIteration = true;
scanlinePosition = scanline.end();
@@ -528,7 +528,7 @@
insertEdges(graph, edge.second.second, previousEdge.second.first);
} else {
if(!firstIteration){
- //look up regions above previous edge
+ //look up regions above previous edge
propertySetAbove(previousEdge.first.high(), ps, scanline);
insertEdges(graph, ps, previousEdge.second.first);
insertEdges(graph, ps, previousEdge.second.second);
Modified: trunk/boost/polygon/detail/property_merge_45.hpp
==============================================================================
--- trunk/boost/polygon/detail/property_merge_45.hpp (original)
+++ trunk/boost/polygon/detail/property_merge_45.hpp 2012-05-09 15:33:59 EDT (Wed, 09 May 2012)
@@ -1,6 +1,6 @@
/*
Copyright 2008 Intel Corporation
-
+
Use, modification and distribution are subject to the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
@@ -30,7 +30,7 @@
inline bool operator!=(const CountMerge& count) const { return !((*this) == count); }
//inline CountMerge& operator=(int count) { counts[0] = counts[1] = count; return *this; }
inline CountMerge& operator=(const CountMerge& count) { counts = count.counts; return *this; }
- inline int& operator[](property_type index) {
+ inline int& operator[](property_type index) {
std::vector<std::pair<int, int> >::iterator itr = lower_bound(counts.begin(), counts.end(), std::make_pair(index, int(0)));
if(itr != counts.end() && itr->first == index) {
return itr->second;
@@ -72,7 +72,7 @@
//output is a std::map<std::set<property_type>, polygon_45_set_data<Unit> >
struct merge_45_output_functor {
template <typename cT>
- void operator()(cT& output, const CountMerge& count1, const CountMerge& count2,
+ void operator()(cT& output, const CountMerge& count1, const CountMerge& count2,
const Point& pt, int rise, direction_1d end) {
typedef typename cT::key_type keytype;
keytype left;
@@ -98,19 +98,19 @@
}
};
- typedef typename std::pair<Point,
+ typedef typename std::pair<Point,
typename boolean_op_45<Unit>::template Scan45CountT<CountMerge> > Vertex45Compact;
typedef std::vector<Vertex45Compact> MergeSetData;
-
+
struct lessVertex45Compact {
bool operator()(const Vertex45Compact& l, const Vertex45Compact& r) {
return l.first < r.first;
}
};
-
+
template <typename output_type>
static void performMerge(output_type& result, MergeSetData& tsd) {
-
+
polygon_sort(tsd.begin(), tsd.end(), lessVertex45Compact());
typedef std::vector<std::pair<Point, typename boolean_op_45<Unit>::template Scan45CountT<CountMerge> > > TSD;
TSD tsd_;
@@ -149,7 +149,7 @@
}
}
}
-
+
};
Modified: trunk/boost/polygon/detail/rectangle_formation.hpp
==============================================================================
--- trunk/boost/polygon/detail/rectangle_formation.hpp (original)
+++ trunk/boost/polygon/detail/rectangle_formation.hpp 2012-05-09 15:33:59 EDT (Wed, 09 May 2012)
@@ -1,6 +1,6 @@
/*
Copyright 2008 Intel Corporation
-
+
Use, modification and distribution are subject to the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
@@ -10,14 +10,14 @@
namespace boost { namespace polygon{
namespace rectangle_formation {
- template <class T>
+ template <class T>
class ScanLineToRects {
public:
typedef T rectangle_type;
typedef typename rectangle_traits<T>::coordinate_type coordinate_type;
typedef rectangle_data<coordinate_type> scan_rect_type;
private:
-
+
typedef std::set<scan_rect_type, less_rectangle_concept<scan_rect_type, scan_rect_type> > ScanData;
ScanData scanData_;
bool haveCurrentRect_;
@@ -26,17 +26,17 @@
typename rectangle_traits<T>::coordinate_type currentCoordinate_;
public:
inline ScanLineToRects() : scanData_(), haveCurrentRect_(), currentRect_(), orient_(), currentCoordinate_() {}
-
+
inline ScanLineToRects(orientation_2d orient, rectangle_type model) :
scanData_(orientation_2d(orient.to_int() ? VERTICAL : HORIZONTAL)),
haveCurrentRect_(false), currentRect_(), orient_(orient), currentCoordinate_() {
assign(currentRect_, model);
currentCoordinate_ = (std::numeric_limits<coordinate_type>::max)();
}
-
+
template <typename CT>
inline ScanLineToRects& processEdge(CT& rectangles, const interval_data<coordinate_type>& edge);
-
+
inline ScanLineToRects& nextMajorCoordinate(coordinate_type currentCoordinate) {
if(haveCurrentRect_) {
scanData_.insert(scanData_.end(), currentRect_);
@@ -45,12 +45,12 @@
currentCoordinate_ = currentCoordinate;
return *this;
}
-
+
};
- template <class CT, class ST, class rectangle_type, typename interval_type, typename coordinate_type> inline CT&
- processEdge_(CT& rectangles, ST& scanData, const interval_type& edge,
- bool& haveCurrentRect, rectangle_type& currentRect, coordinate_type currentCoordinate, orientation_2d orient)
+ template <class CT, class ST, class rectangle_type, typename interval_type, typename coordinate_type> inline CT&
+ processEdge_(CT& rectangles, ST& scanData, const interval_type& edge,
+ bool& haveCurrentRect, rectangle_type& currentRect, coordinate_type currentCoordinate, orientation_2d orient)
{
typedef typename CT::value_type result_type;
bool edgeProcessed = false;
@@ -59,15 +59,15 @@
//process all rectangles in the scanData that touch the edge
typename ST::iterator dataIter = scanData.lower_bound(rectangle_type(edge, edge));
//decrement beginIter until its low is less than edge's low
- while((dataIter == scanData.end() || (*dataIter).get(orient).get(LOW) > edge.get(LOW)) &&
+ while((dataIter == scanData.end() || (*dataIter).get(orient).get(LOW) > edge.get(LOW)) &&
dataIter != scanData.begin())
{
--dataIter;
}
- //process each rectangle until the low end of the rectangle
+ //process each rectangle until the low end of the rectangle
//is greater than the high end of the edge
while(dataIter != scanData.end() &&
- (*dataIter).get(orient).get(LOW) <= edge.get(HIGH))
+ (*dataIter).get(orient).get(LOW) <= edge.get(HIGH))
{
const rectangle_type& rect = *dataIter;
//if the rectangle data intersects the edge at all
@@ -111,7 +111,7 @@
scanData.insert(nextIter, highRect);
}
//we are done with this edge
- edgeProcessed = true;
+ edgeProcessed = true;
break;
} else {
//it must be an opening edge
@@ -145,8 +145,8 @@
}
} else {
//extend the top of current rect
- currentRect.set(orient.get_direction(HIGH),
- (std::max)(edge.get(HIGH),
+ currentRect.set(orient.get_direction(HIGH),
+ (std::max)(edge.get(HIGH),
tmpRect.get(orient.get_direction(HIGH))));
}
} else {
@@ -155,7 +155,7 @@
//create a new current rect
currentRect.set(orient.get_perpendicular(), interval_data<coordinate_type>(currentCoordinate,
currentCoordinate));
- currentRect.set(orient, interval_data<coordinate_type>((std::min)(tmpRect.get(orient).get(LOW),
+ currentRect.set(orient, interval_data<coordinate_type>((std::min)(tmpRect.get(orient).get(LOW),
edge.get(LOW)),
(std::max)(tmpRect.get(orient).get(HIGH),
edge.get(HIGH))));
@@ -164,7 +164,7 @@
haveCurrentRect = true;
currentRect.set(orient.get_perpendicular(), interval_data<coordinate_type>(currentCoordinate,
currentCoordinate));
- currentRect.set(orient, interval_data<coordinate_type>((std::min)(tmpRect.get(orient).get(LOW),
+ currentRect.set(orient, interval_data<coordinate_type>((std::min)(tmpRect.get(orient).get(LOW),
edge.get(LOW)),
(std::max)(tmpRect.get(orient).get(HIGH),
edge.get(HIGH))));
@@ -176,22 +176,22 @@
//edgeProcessed = true;
}
++dataIter;
- } //end while edge intersects rectangle data
+ } //end while edge intersects rectangle data
}
if(!edgeProcessed) {
if(haveCurrentRect) {
- if(currentRect.get(orient.get_perpendicular().get_direction(HIGH))
+ if(currentRect.get(orient.get_perpendicular().get_direction(HIGH))
== currentCoordinate &&
- currentRect.get(orient.get_direction(HIGH)) >= edge.get(LOW))
+ currentRect.get(orient.get_direction(HIGH)) >= edge.get(LOW))
{
if(currentRect.get(orient.get_direction(HIGH)) > edge.get(LOW)){
rectangle_type tmpRect(currentRect);
tmpRect.set(orient.get_direction(HIGH), edge.get(LOW));
scanData.insert(scanData.end(), tmpRect);
if(currentRect.get(orient.get_direction(HIGH)) > edge.get(HIGH)) {
- currentRect.set(orient,
- interval_data<coordinate_type>(edge.get(HIGH),
+ currentRect.set(orient,
+ interval_data<coordinate_type>(edge.get(HIGH),
currentRect.get(orient.get_direction(HIGH))));
return rectangles;
} else {
@@ -205,7 +205,7 @@
}
scanData.insert(scanData.end(), currentRect);
haveCurrentRect = false;
- }
+ }
rectangle_type tmpRect(currentRect);
tmpRect.set(orient.get_perpendicular(), interval_data<coordinate_type>(currentCoordinate,
currentCoordinate));
@@ -214,13 +214,13 @@
return rectangles;
}
return rectangles;
-
+
}
- template <class T>
- template <class CT>
- inline
- ScanLineToRects<T>& ScanLineToRects<T>::processEdge(CT& rectangles, const interval_data<coordinate_type>& edge)
+ template <class T>
+ template <class CT>
+ inline
+ ScanLineToRects<T>& ScanLineToRects<T>::processEdge(CT& rectangles, const interval_data<coordinate_type>& edge)
{
processEdge_(rectangles, scanData_, edge, haveCurrentRect_, currentRect_, currentCoordinate_, orient_);
return *this;
@@ -264,4 +264,3 @@
}
}
#endif
-
Modified: trunk/boost/polygon/detail/scan_arbitrary.hpp
==============================================================================
--- trunk/boost/polygon/detail/scan_arbitrary.hpp (original)
+++ trunk/boost/polygon/detail/scan_arbitrary.hpp 2012-05-09 15:33:59 EDT (Wed, 09 May 2012)
@@ -1,6 +1,6 @@
/*
Copyright 2008 Intel Corporation
-
+
Use, modification and distribution are subject to the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
@@ -17,11 +17,11 @@
class line_intersection : public scanline_base<Unit> {
private:
typedef typename scanline_base<Unit>::Point Point;
-
+
//the first point is the vertex and and second point establishes the slope of an edge eminating from the vertex
//typedef std::pair<Point, Point> half_edge;
typedef typename scanline_base<Unit>::half_edge half_edge;
-
+
//scanline comparator functor
typedef typename scanline_base<Unit>::less_half_edge less_half_edge;
typedef typename scanline_base<Unit>::less_point less_point;
@@ -51,7 +51,7 @@
// x_ = that.x_;
// just_before_ = that.just_before_;
// segment_id_ = that.segment_id_;
-
+
// //I cannot simply copy that.edge_scanline_ to this edge_scanline_ becuase the functor store pointers to other members!
// less_half_edge lessElm(&x_, &just_before_);
// edge_scanline_ = edge_scanline(lessElm);
@@ -128,11 +128,11 @@
bins[*itr] = std::vector<std::pair<half_edge, segment_id> >();
}
for(iT itr = begin; itr != end; ++itr) {
- typename std::map<Unit, std::vector<std::pair<half_edge, segment_id> > >::iterator lb =
+ typename std::map<Unit, std::vector<std::pair<half_edge, segment_id> > >::iterator lb =
bins.lower_bound((std::min)((*itr).first.first.y(), (*itr).first.second.y()));
if(lb != bins.begin())
--lb;
- typename std::map<Unit, std::vector<std::pair<half_edge, segment_id> > >::iterator ub =
+ typename std::map<Unit, std::vector<std::pair<half_edge, segment_id> > >::iterator ub =
bins.upper_bound((std::max)((*itr).first.first.y(), (*itr).first.second.y()));
for( ; lb != ub; ++lb) {
(*lb).second.push_back(*itr);
@@ -182,7 +182,7 @@
//at least one segment has a low y value within the range
if(he1 == he2) continue;
if((std::min)(he2. first.get(HORIZONTAL),
- he2.second.get(HORIZONTAL)) >=
+ he2.second.get(HORIZONTAL)) >=
(std::max)(he1.second.get(HORIZONTAL),
he1.first.get(HORIZONTAL)))
break;
@@ -194,7 +194,7 @@
pts.push_back(intersection);
intersection_points[(*inner).second].insert(intersection);
intersection_points[(*outer).second].insert(intersection);
- }
+ }
}
}
}
@@ -217,7 +217,7 @@
//while(itr2 != newend && (*itr2).get(HORIZONTAL) <= (std::max)(he1.first.get(HORIZONTAL), he1.second.get(HORIZONTAL))) ++itr2;
//itr = pts.begin();
//itr2 = pts.end();
- while(lfinger != newend && (*lfinger).x() < startpt.x()) ++lfinger;
+ while(lfinger != newend && (*lfinger).x() < startpt.x()) ++lfinger;
for(typename std::vector<Point>::iterator itr = lfinger ; itr != newend && (*itr).x() <= stoppt.x(); ++itr) {
if(scanline_base<Unit>::intersects_grid(*itr, he1))
intersection_points[id1].insert(*itr);
@@ -299,7 +299,7 @@
const half_edge& he2 = (*inner).first;
if(he1 == he2) continue;
if((std::min)(he2. first.get(HORIZONTAL),
- he2.second.get(HORIZONTAL)) >
+ he2.second.get(HORIZONTAL)) >
(std::max)(he1.second.get(HORIZONTAL),
he1.first.get(HORIZONTAL)))
break;
@@ -432,7 +432,7 @@
// edge_scanline_.erase(remove_iter);
// }
-// static inline void update_segments(std::map<segment_id, std::set<Point> >& intersection_points,
+// static inline void update_segments(std::map<segment_id, std::set<Point> >& intersection_points,
// const std::set<segment_id>& segments, Point pt) {
// for(std::set<segment_id>::const_iterator itr = segments.begin(); itr != segments.end(); ++itr) {
// intersection_points[*itr].insert(pt);
@@ -479,7 +479,7 @@
// std::vector<scanline_element> insertion_edges;
// insertion_edges.reserve(intersecting_elements.size());
// std::vector<std::pair<Unit, iterator> > sloping_ends;
-// //do all the work of updating the output of all intersecting
+// //do all the work of updating the output of all intersecting
// for(typename std::set<iterator>::iterator inter_iter = intersecting_elements.begin();
// inter_iter != intersecting_elements.end(); ++inter_iter) {
// //if it is horizontal update it now and continue
@@ -491,7 +491,7 @@
// //insert its end points into the vector of sloping ends
// const half_edge& he = (*inter_iter).first;
// Unit y = evalAtXforY(x_, he.first, he.second);
-// Unit y2 = evalAtXforY(x_+1, he.first, he.second);
+// Unit y2 = evalAtXforY(x_+1, he.first, he.second);
// if(y2 >= y) y2 +=1; //we round up, in exact case we don't worry about overbite of one
// else y += 1; //downward sloping round up
// sloping_ends.push_back(std::make_pair(y, inter_iter));
@@ -499,7 +499,7 @@
// }
// }
// }
-
+
// //merge sloping element data
// polygon_sort(sloping_ends.begin(), sloping_ends.end());
// std::map<Unit, std::set<iterator> > sloping_elements;
@@ -574,7 +574,7 @@
// inline void process_scan_event(std::map<segment_id, std::set<Point> >& intersection_points) {
// just_before_ = true;
-// //process end events by removing those segments from the scanline
+// //process end events by removing those segments from the scanline
// //and insert vertices of all events into intersection queue
// Point prev_point((std::numeric_limits<Unit>::min)(), (std::numeric_limits<Unit>::min)());
// less_point lp;
@@ -591,7 +591,7 @@
// lookup_and_remove(he, id);
// } else {
// //half edge is begin event
-// insert_into_scanline(he, id);
+// insert_into_scanline(he, id);
// //note that they will be immediately removed and reinserted after
// //handling their intersection (vertex)
// //an optimization would allow them to be processed specially to avoid the redundant
@@ -787,7 +787,7 @@
print(edges);
return false;
}
- //3 3 2 2: 0; 4 2 0 6: 1; 0 3 6 3: 2; 4 1 5 5: 3;
+ //3 3 2 2: 0; 4 2 0 6: 1; 0 3 6 3: 2; 4 1 5 5: 3;
input.clear();
edges.clear();
input.push_back(std::make_pair(half_edge(Point(3, 3), Point(2, 2)), 0));
@@ -801,7 +801,7 @@
print(edges);
return false;
}
- //5 7 1 3: 0; 4 5 2 1: 1; 2 5 2 1: 2; 4 1 5 3: 3;
+ //5 7 1 3: 0; 4 5 2 1: 1; 2 5 2 1: 2; 4 1 5 3: 3;
input.clear();
edges.clear();
input.push_back(std::make_pair(half_edge(Point(5, 7), Point(1, 3)), 0));
@@ -815,7 +815,7 @@
print(edges);
return false;
}
- //1 0 -4 -1: 0; 0 0 2 -1: 1;
+ //1 0 -4 -1: 0; 0 0 2 -1: 1;
input.clear();
edges.clear();
input.push_back(std::make_pair(half_edge(Point(1, 0), Point(-4, -1)), 0));
@@ -875,7 +875,7 @@
static void print(const std::vector<std::pair<half_edge, segment_id> >& vec) {
for(std::size_t i = 0; i < vec.size(); ++ i) {
// print(vec[i]);
- }
+ }
//std::cout << std::endl;
}
@@ -940,14 +940,14 @@
};
//scanline consumes the "flattened" fully intersected line segments produced by
- //a pass of line_intersection along with property and count information and performs a
+ //a pass of line_intersection along with property and count information and performs a
//useful operation like booleans or property merge or connectivity extraction
template <typename Unit, typename property_type, typename keytype = std::set<property_type> >
class scanline : public scanline_base<Unit> {
public:
//definitions
typedef typename scanline_base<Unit>::Point Point;
-
+
//the first point is the vertex and and second point establishes the slope of an edge eminating from the vertex
//typedef std::pair<Point, Point> half_edge;
typedef typename scanline_base<Unit>::half_edge half_edge;
@@ -970,7 +970,7 @@
//this is the output data type that is created by the scanline before it is post processed based on content of property sets
typedef std::pair<half_edge, std::pair<property_set, property_set> > half_edge_property;
-
+
//this is the scanline data structure
typedef std::map<half_edge, property_map, less_half_edge> scanline_type;
typedef std::pair<half_edge, property_map> scanline_element;
@@ -987,12 +987,12 @@
int just_before_;
typename scanline_base<Unit>::evalAtXforYPack evalAtXforYPack_;
public:
- inline scanline() : scan_data_(), removal_set_(), insertion_set_(), end_point_queue_(),
+ inline scanline() : scan_data_(), removal_set_(), insertion_set_(), end_point_queue_(),
x_((std::numeric_limits<Unit>::max)()), y_((std::numeric_limits<Unit>::max)()), just_before_(false), evalAtXforYPack_() {
less_half_edge lessElm(&x_, &just_before_, &evalAtXforYPack_);
scan_data_ = scanline_type(lessElm);
}
- inline scanline(const scanline& that) : scan_data_(), removal_set_(), insertion_set_(), end_point_queue_(),
+ inline scanline(const scanline& that) : scan_data_(), removal_set_(), insertion_set_(), end_point_queue_(),
x_((std::numeric_limits<Unit>::max)()), y_((std::numeric_limits<Unit>::max)()), just_before_(false), evalAtXforYPack_() {
(*this) = that; }
inline scanline& operator=(const scanline& that) {
@@ -1037,11 +1037,11 @@
Unit y = (std::numeric_limits<Unit>::min)();
bool first_iteration = true;
//we want to return from inside the loop when we hit end or new x
-#ifdef BOOST_POLYGON_MSVC
+#ifdef BOOST_POLYGON_MSVC
#pragma warning( disable: 4127 )
#endif
while(true) {
- if(begin == end || (!first_iteration && ((*begin).first.first.get(VERTICAL) != y ||
+ if(begin == end || (!first_iteration && ((*begin).first.first.get(VERTICAL) != y ||
(*begin).first.first.get(HORIZONTAL) != x_))) {
//lookup iterator range in scanline for elements coming in from the left
//that end at this y
@@ -1062,7 +1062,7 @@
}
if(current_iter != scan_data_.end()) {
//get the bottom iterator for elements at this point
- //while(evalAtXforY(x_, (*current_iter).first.first, (*current_iter).first.second) >= (high_precision)y &&
+ //while(evalAtXforY(x_, (*current_iter).first.first, (*current_iter).first.second) >= (high_precision)y &&
while(scanline_base<Unit>::on_above_or_below(Point(x_, y), (*current_iter).first) != 1 &&
current_iter != scan_data_.begin()) {
--current_iter;
@@ -1145,7 +1145,7 @@
++begin;
}
}
-#ifdef BOOST_POLYGON_MSVC
+#ifdef BOOST_POLYGON_MSVC
#pragma warning( default: 4127 )
#endif
@@ -1247,7 +1247,7 @@
++j;
} else {
int count = mp[i].second;
- count += mp2[j].second;
+ count += mp2[j].second;
if(count) {
newmp.push_back(mp[i]);
newmp.back().second = count;
@@ -1484,12 +1484,12 @@
}
};
- template <typename Unit, typename property_type, typename key_type = std::set<property_type>,
+ template <typename Unit, typename property_type, typename key_type = std::set<property_type>,
typename output_functor_type = merge_output_functor<Unit> >
class property_merge : public scanline_base<Unit> {
protected:
typedef typename scanline_base<Unit>::Point Point;
-
+
//the first point is the vertex and and second point establishes the slope of an edge eminating from the vertex
//typedef std::pair<Point, Point> half_edge;
typedef typename scanline_base<Unit>::half_edge half_edge;
@@ -1590,7 +1590,7 @@
protected:
template <typename polygon_type>
- void insert(const polygon_type& polygon_object, const property_type& property_value, bool is_hole,
+ void insert(const polygon_type& polygon_object, const property_type& property_value, bool is_hole,
polygon_concept ) {
bool first_iteration = true;
bool second_iteration = true;
@@ -1638,10 +1638,10 @@
}
template <typename polygon_with_holes_type>
- void insert(const polygon_with_holes_type& polygon_with_holes_object, const property_type& property_value, bool is_hole,
+ void insert(const polygon_with_holes_type& polygon_with_holes_object, const property_type& property_value, bool is_hole,
polygon_with_holes_concept tag) {
insert(polygon_with_holes_object, property_value, is_hole, polygon_concept());
- for(typename polygon_with_holes_traits<polygon_with_holes_type>::iterator_holes_type itr =
+ for(typename polygon_with_holes_traits<polygon_with_holes_type>::iterator_holes_type itr =
begin_holes(polygon_with_holes_object);
itr != end_holes(polygon_with_holes_object); ++itr) {
insert(*itr, property_value, !is_hole, polygon_concept());
@@ -1649,7 +1649,7 @@
}
template <typename rectangle_type>
- void insert(const rectangle_type& rectangle_object, const property_type& property_value, bool is_hole,
+ void insert(const rectangle_type& rectangle_object, const property_type& property_value, bool is_hole,
rectangle_concept ) {
polygon_90_data<Unit> poly;
assign(poly, rectangle_object);
@@ -1658,9 +1658,9 @@
public: //change to private when done testing
- static inline void create_vertex(property_merge_data& pmd,
- const Point& current_point,
- const Point& next_point,
+ static inline void create_vertex(property_merge_data& pmd,
+ const Point& current_point,
+ const Point& next_point,
direction_1d winding,
bool is_hole, const property_type& property) {
if(current_point == next_point) return;
@@ -1669,7 +1669,7 @@
current_vertex.first.second = next_point;
current_vertex.second.first = property;
int multiplier = 1;
- if(winding == CLOCKWISE)
+ if(winding == CLOCKWISE)
multiplier = -1;
if(is_hole)
multiplier *= -1;
@@ -1697,12 +1697,12 @@
bool operator()(const half_edge& e1, const half_edge& e2) {
const Point& pt1 = e1.first;
const Point& pt2 = e2.first;
- if(get(pt1, HORIZONTAL) ==
+ if(get(pt1, HORIZONTAL) ==
get(pt_, HORIZONTAL)) {
//vertical edge is always largest
return false;
}
- if(get(pt2, HORIZONTAL) ==
+ if(get(pt2, HORIZONTAL) ==
get(pt_, HORIZONTAL)) {
//if half edge 1 is not vertical its slope is less than that of half edge 2
return get(pt1, HORIZONTAL) != get(pt2, HORIZONTAL);
@@ -1791,7 +1791,7 @@
si.insert(rect, 333);
print(stdcout, si.pmd) << std::endl;
-
+
Point pts[4] = {Point(0, 0), Point(10,-3), Point(13, 8), Point(0, 0) };
polygon_data<Unit> poly;
property_merge si2;
@@ -1817,7 +1817,7 @@
si5.insert(poly, 444);
si5.sort_property_merge_data();
stdcout << (si2.pmd == si5.pmd) << std::endl;
-
+
return true;
}
@@ -1867,8 +1867,8 @@
stdcout << "fail merge 2\n";
return false;
}
- //Polygon { -4 -1, 3 3, -2 3 }
- //Polygon { 0 -4, -4 -2, -2 1 }
+ //Polygon { -4 -1, 3 3, -2 3 }
+ //Polygon { 0 -4, -4 -2, -2 1 }
si.clear();
pts.clear();
pts.push_back(Point(-4, -1));
@@ -2069,89 +2069,89 @@
//pts.push_back(Point(5624841,9125000));
//pts.push_back(Point(17616200,9125000));
//pts.push_back(Point(17616200,75000));
-pts.push_back(Point(12262940, 6652520 )); pts.push_back(Point(12125750, 6652520 )); pts.push_back(Point(12121272, 6652961 )); pts.push_back(Point(12112981, 6656396 )); pts.push_back(Point(12106636, 6662741 )); pts.push_back(Point(12103201, 6671032 )); pts.push_back(Point(12103201, 6680007 )); pts.push_back(Point(12106636, 6688298 ));
-pts.push_back(Point(12109500, 6691780 )); pts.push_back(Point(12748600, 7330890 )); pts.push_back(Point(15762600, 7330890 )); pts.push_back(Point(15904620, 7472900 )); pts.push_back(Point(15909200, 7473030 )); pts.push_back(Point(15935830, 7476006 )); pts.push_back(Point(15992796, 7499602 )); pts.push_back(Point(16036397, 7543203 ));
-pts.push_back(Point(16059993, 7600169 )); pts.push_back(Point(16059993, 7661830 )); pts.push_back(Point(16036397, 7718796 )); pts.push_back(Point(15992796, 7762397 )); pts.push_back(Point(15935830, 7785993 )); pts.push_back(Point(15874169, 7785993 )); pts.push_back(Point(15817203, 7762397 )); pts.push_back(Point(15773602, 7718796 ));
-pts.push_back(Point(15750006, 7661830 )); pts.push_back(Point(15747030, 7635200 )); pts.push_back(Point(15746900, 7630620 )); pts.push_back(Point(15670220, 7553930 )); pts.push_back(Point(14872950, 7553930 )); pts.push_back(Point(14872950, 7626170 ));
-pts.push_back(Point(14869973, 7661280 )); pts.push_back(Point(14846377, 7718246 )); pts.push_back(Point(14802776, 7761847 )); pts.push_back(Point(14745810, 7785443 )); pts.push_back(Point(14684149, 7785443 )); pts.push_back(Point(14627183, 7761847 )); pts.push_back(Point(14583582, 7718246 ));
-pts.push_back(Point(14559986, 7661280 )); pts.push_back(Point(14557070, 7636660 )); pts.push_back(Point(14556670, 7625570 )); pts.push_back(Point(13703330, 7625570 )); pts.push_back(Point(13702930, 7636660 )); pts.push_back(Point(13699993, 7661830 )); pts.push_back(Point(13676397, 7718796 ));
-pts.push_back(Point(13632796, 7762397 )); pts.push_back(Point(13575830, 7785993 )); pts.push_back(Point(13514169, 7785993 )); pts.push_back(Point(13457203, 7762397 )); pts.push_back(Point(13436270, 7745670 )); pts.push_back(Point(13432940, 7742520 )); pts.push_back(Point(12963760, 7742520 ));
-pts.push_back(Point(12959272, 7742961 )); pts.push_back(Point(12950981, 7746396 )); pts.push_back(Point(12944636, 7752741 )); pts.push_back(Point(12941201, 7761032 )); pts.push_back(Point(12941201, 7770007 )); pts.push_back(Point(12944636, 7778298 )); pts.push_back(Point(12947490, 7781780 ));
-pts.push_back(Point(13425330, 8259620 )); pts.push_back(Point(15601330, 8259620 )); pts.push_back(Point(15904620, 8562900 )); pts.push_back(Point(15909200, 8563030 )); pts.push_back(Point(15935830, 8566006 )); pts.push_back(Point(15992796, 8589602 )); pts.push_back(Point(16036397, 8633203 ));
-pts.push_back(Point(16059993, 8690169 )); pts.push_back(Point(16059993, 8751830 )); pts.push_back(Point(16036397, 8808796 )); pts.push_back(Point(15992796, 8852397 )); pts.push_back(Point(15935830, 8875993 )); pts.push_back(Point(15874169, 8875993 )); pts.push_back(Point(15817203, 8852397 )); pts.push_back(Point(15773602, 8808796 ));
-pts.push_back(Point(15750006, 8751830 )); pts.push_back(Point(15747030, 8725200 )); pts.push_back(Point(15746900, 8720620 )); pts.push_back(Point(15508950, 8482660 )); pts.push_back(Point(14689890, 8482660 )); pts.push_back(Point(14685412, 8483101 )); pts.push_back(Point(14677121, 8486536 ));
-pts.push_back(Point(14670776, 8492881 )); pts.push_back(Point(14667341, 8501172 )); pts.push_back(Point(14667341, 8510147 )); pts.push_back(Point(14670776, 8518438 )); pts.push_back(Point(14673630, 8521920 )); pts.push_back(Point(14714620, 8562900 )); pts.push_back(Point(14719200, 8563030 )); pts.push_back(Point(14745830, 8566006 ));
-pts.push_back(Point(14802796, 8589602 )); pts.push_back(Point(14846397, 8633203 )); pts.push_back(Point(14869993, 8690169 )); pts.push_back(Point(14869993, 8751830 )); pts.push_back(Point(14846397, 8808796 )); pts.push_back(Point(14802796, 8852397 )); pts.push_back(Point(14745830, 8875993 )); pts.push_back(Point(14684169, 8875993 ));
-pts.push_back(Point(14627203, 8852397 )); pts.push_back(Point(14583602, 8808796 )); pts.push_back(Point(14560006, 8751830 )); pts.push_back(Point(14557030, 8725200 )); pts.push_back(Point(14556900, 8720620 )); pts.push_back(Point(14408270, 8571980 )); pts.push_back(Point(13696320, 8571980 )); pts.push_back(Point(13696320, 8675520 ));
-pts.push_back(Point(13699963, 8690161 )); pts.push_back(Point(13699963, 8751818 )); pts.push_back(Point(13676368, 8808781 )); pts.push_back(Point(13632771, 8852378 )); pts.push_back(Point(13575808, 8875973 )); pts.push_back(Point(13514151, 8875973 )); pts.push_back(Point(13457188, 8852378 )); pts.push_back(Point(13436270, 8835670 )); pts.push_back(Point(13432940, 8832520 ));
-pts.push_back(Point(13281760, 8832520 )); pts.push_back(Point(13277272, 8832961 )); pts.push_back(Point(13268981, 8836396 )); pts.push_back(Point(13262636, 8842741 )); pts.push_back(Point(13259201, 8851032 )); pts.push_back(Point(13259201, 8860007 )); pts.push_back(Point(13262636, 8868298 )); pts.push_back(Point(13265500, 8871780 ));
-pts.push_back(Point(13518710, 9125000 )); pts.push_back(Point(16270720, 9125000 )); pts.push_back(Point(16270720, 8939590 )); pts.push_back(Point(17120780, 8939590 )); pts.push_back(Point(17120780, 9125000 )); pts.push_back(Point(17616200, 9125000 )); pts.push_back(Point(17616200, 75000 )); pts.push_back(Point(16024790, 75000 ));
-pts.push_back(Point(16021460, 80700 )); pts.push_back(Point(16016397, 88796 )); pts.push_back(Point(15972796, 132397 )); pts.push_back(Point(15915830, 155993 )); pts.push_back(Point(15908730, 157240 )); pts.push_back(Point(15905000, 157800 )); pts.push_back(Point(15516800, 546000 )); pts.push_back(Point(15905000, 934200 ));
-pts.push_back(Point(15908730, 934760 )); pts.push_back(Point(15915830, 936006 )); pts.push_back(Point(15972796, 959602 )); pts.push_back(Point(16016397, 1003203 )); pts.push_back(Point(16039993, 1060169 )); pts.push_back(Point(16039993, 1121830 )); pts.push_back(Point(16016397, 1178796 )); pts.push_back(Point(15972796, 1222397 ));
-pts.push_back(Point(15915830, 1245993 )); pts.push_back(Point(15854169, 1245993 )); pts.push_back(Point(15797203, 1222397 )); pts.push_back(Point(15753602, 1178796 )); pts.push_back(Point(15730006, 1121830 )); pts.push_back(Point(15728760, 1114730 )); pts.push_back(Point(15728200, 1111000 )); pts.push_back(Point(15363500, 746300 ));
-pts.push_back(Point(14602620, 746300 )); pts.push_back(Point(14598142, 746741 )); pts.push_back(Point(14589851, 750176 )); pts.push_back(Point(14583506, 756521 )); pts.push_back(Point(14580071, 764812 )); pts.push_back(Point(14580071, 773787 )); pts.push_back(Point(14583506, 782078 )); pts.push_back(Point(14586360, 785560 ));
-pts.push_back(Point(14586370, 785560 )); pts.push_back(Point(14735000, 934200 )); pts.push_back(Point(14738730, 934760 )); pts.push_back(Point(14745830, 936006 )); pts.push_back(Point(14802796, 959602 )); pts.push_back(Point(14846397, 1003203 )); pts.push_back(Point(14869993, 1060169 ));
-pts.push_back(Point(14870450, 1062550 )); pts.push_back(Point(14872170, 1071980 )); pts.push_back(Point(14972780, 1071980 )); pts.push_back(Point(15925000, 2024200 )); pts.push_back(Point(15928730, 2024760 )); pts.push_back(Point(15935830, 2026006 )); pts.push_back(Point(15992796, 2049602 ));
-pts.push_back(Point(16036397, 2093203 )); pts.push_back(Point(16059993, 2150169 )); pts.push_back(Point(16059993, 2211830 )); pts.push_back(Point(16036397, 2268796 )); pts.push_back(Point(15992796, 2312397 )); pts.push_back(Point(15935830, 2335993 )); pts.push_back(Point(15874169, 2335993 ));
-pts.push_back(Point(15817203, 2312397 )); pts.push_back(Point(15773602, 2268796 )); pts.push_back(Point(15750006, 2211830 )); pts.push_back(Point(15748760, 2204730 )); pts.push_back(Point(15748200, 2201000 )); pts.push_back(Point(14869220, 1322020 )); pts.push_back(Point(14088350, 1322020 ));
-pts.push_back(Point(14083862, 1322461 )); pts.push_back(Point(14075571, 1325896 )); pts.push_back(Point(14069226, 1332241 )); pts.push_back(Point(14065791, 1340532 )); pts.push_back(Point(14065791, 1349507 )); pts.push_back(Point(14069226, 1357798 )); pts.push_back(Point(14072080, 1361280 ));
-pts.push_back(Point(14072090, 1361280 )); pts.push_back(Point(14735000, 2024200 )); pts.push_back(Point(14738730, 2024760 )); pts.push_back(Point(14745830, 2026006 )); pts.push_back(Point(14802796, 2049602 )); pts.push_back(Point(14846397, 2093203 )); pts.push_back(Point(14869993, 2150169 ));
-pts.push_back(Point(14869993, 2211830 )); pts.push_back(Point(14846397, 2268796 )); pts.push_back(Point(14802796, 2312397 )); pts.push_back(Point(14745830, 2335993 )); pts.push_back(Point(14684169, 2335993 )); pts.push_back(Point(14627203, 2312397 )); pts.push_back(Point(14583602, 2268796 )); pts.push_back(Point(14560006, 2211830 ));
-pts.push_back(Point(14558760, 2204730 )); pts.push_back(Point(14558200, 2201000 )); pts.push_back(Point(13752220, 1395020 )); pts.push_back(Point(12991340, 1395020 )); pts.push_back(Point(12986862, 1395461 )); pts.push_back(Point(12978571, 1398896 )); pts.push_back(Point(12972226, 1405241 ));
-pts.push_back(Point(12968791, 1413532 )); pts.push_back(Point(12968791, 1422507 )); pts.push_back(Point(12972226, 1430798 )); pts.push_back(Point(12975080, 1434280 )); pts.push_back(Point(12975090, 1434280 )); pts.push_back(Point(13565000, 2024200 )); pts.push_back(Point(13568730, 2024760 )); pts.push_back(Point(13575830, 2026006 ));
-pts.push_back(Point(13632796, 2049602 )); pts.push_back(Point(13676397, 2093203 )); pts.push_back(Point(13699993, 2150169 )); pts.push_back(Point(13699993, 2211830 )); pts.push_back(Point(13676397, 2268796 )); pts.push_back(Point(13632796, 2312397 )); pts.push_back(Point(13575830, 2335993 ));
-pts.push_back(Point(13514169, 2335993 )); pts.push_back(Point(13457203, 2312397 )); pts.push_back(Point(13413602, 2268796 )); pts.push_back(Point(13390006, 2211830 )); pts.push_back(Point(13388760, 2204730 )); pts.push_back(Point(13388200, 2201000 )); pts.push_back(Point(12655220, 1468020 ));
-pts.push_back(Point(11894340, 1468020 )); pts.push_back(Point(11889862, 1468461 )); pts.push_back(Point(11881571, 1471896 )); pts.push_back(Point(11875226, 1478241 )); pts.push_back(Point(11871791, 1486532 )); pts.push_back(Point(11871791, 1495507 ));
-pts.push_back(Point(11875226, 1503798 )); pts.push_back(Point(11878090, 1507280 )); pts.push_back(Point(12395000, 2024200 )); pts.push_back(Point(12398730, 2024760 )); pts.push_back(Point(12405830, 2026006 )); pts.push_back(Point(12462796, 2049602 )); pts.push_back(Point(12506397, 2093203 ));
-pts.push_back(Point(12529993, 2150169 )); pts.push_back(Point(12529993, 2211830 )); pts.push_back(Point(12506397, 2268796 )); pts.push_back(Point(12462796, 2312397 )); pts.push_back(Point(12405830, 2335993 )); pts.push_back(Point(12344169, 2335993 ));
-pts.push_back(Point(12287203, 2312397 )); pts.push_back(Point(12243602, 2268796 )); pts.push_back(Point(12220006, 2211830 )); pts.push_back(Point(12218760, 2204730 )); pts.push_back(Point(12218200, 2201000 )); pts.push_back(Point(11558220, 1541020 ));
-pts.push_back(Point(10797340, 1541020 )); pts.push_back(Point(10792862, 1541461 )); pts.push_back(Point(10784571, 1544896 )); pts.push_back(Point(10778226, 1551241 )); pts.push_back(Point(10774791, 1559532 )); pts.push_back(Point(10774791, 1568507 )); pts.push_back(Point(10778226, 1576798 )); pts.push_back(Point(10781080, 1580280 ));
-pts.push_back(Point(10781090, 1580280 )); pts.push_back(Point(11225000, 2024200 )); pts.push_back(Point(11228730, 2024760 )); pts.push_back(Point(11235830, 2026006 )); pts.push_back(Point(11292796, 2049602 )); pts.push_back(Point(11336397, 2093203 )); pts.push_back(Point(11359993, 2150169 ));
-pts.push_back(Point(11359993, 2211830 )); pts.push_back(Point(11336397, 2268796 )); pts.push_back(Point(11292796, 2312397 )); pts.push_back(Point(11235830, 2335993 )); pts.push_back(Point(11174169, 2335993 )); pts.push_back(Point(11117203, 2312397 )); pts.push_back(Point(11073602, 2268796 )); pts.push_back(Point(11050006, 2211830 ));
-pts.push_back(Point(11048760, 2204730 )); pts.push_back(Point(11048200, 2201000 )); pts.push_back(Point(10461220, 1614020 )); pts.push_back(Point( 5647400, 1614020 )); pts.push_back(Point( 5642912, 1614461 ));
-pts.push_back(Point( 5634621, 1617896 )); pts.push_back(Point( 5628276, 1624241 )); pts.push_back(Point( 5624841, 1632532 )); pts.push_back(Point( 5624841, 1641507 )); pts.push_back(Point( 5628276, 1649798 )); pts.push_back(Point( 5631130, 1653280 ));
-pts.push_back(Point( 5688490, 1710640 )); pts.push_back(Point( 9722350, 1710640 )); pts.push_back(Point(10034620, 2022900 )); pts.push_back(Point(10039200, 2023030 )); pts.push_back(Point(10065830, 2026006 )); pts.push_back(Point(10122796, 2049602 ));
-pts.push_back(Point(10166397, 2093203 )); pts.push_back(Point(10189993, 2150169 )); pts.push_back(Point(10189993, 2211830 )); pts.push_back(Point(10166397, 2268796 )); pts.push_back(Point(10158620, 2279450 )); pts.push_back(Point(10158620, 2404900 )); pts.push_back(Point(10548950, 2795240 ));
-pts.push_back(Point(15586950, 2795240 )); pts.push_back(Point(15904620, 3112900 )); pts.push_back(Point(15909200, 3113030 )); pts.push_back(Point(15935830, 3116006 )); pts.push_back(Point(15992796, 3139602 )); pts.push_back(Point(16036397, 3183203 )); pts.push_back(Point(16059993, 3240169 )); pts.push_back(Point(16059993, 3301830 ));
-pts.push_back(Point(16036397, 3358796 )); pts.push_back(Point(15992796, 3402397 )); pts.push_back(Point(15935830, 3425993 )); pts.push_back(Point(15874169, 3425993 )); pts.push_back(Point(15817203, 3402397 )); pts.push_back(Point(15773602, 3358796 )); pts.push_back(Point(15750006, 3301830 )); pts.push_back(Point(15747030, 3275200 ));
-pts.push_back(Point(15746900, 3270620 )); pts.push_back(Point(15494570, 3018280 )); pts.push_back(Point(14675510, 3018280 )); pts.push_back(Point(14671032, 3018721 )); pts.push_back(Point(14662741, 3022156 )); pts.push_back(Point(14656396, 3028501 )); pts.push_back(Point(14652961, 3036792 ));
-pts.push_back(Point(14652961, 3045767 )); pts.push_back(Point(14656396, 3054058 )); pts.push_back(Point(14659260, 3057540 )); pts.push_back(Point(14714620, 3112900 )); pts.push_back(Point(14719200, 3113030 )); pts.push_back(Point(14745830, 3116006 )); pts.push_back(Point(14802796, 3139602 ));
-pts.push_back(Point(14846397, 3183203 )); pts.push_back(Point(14869993, 3240169 )); pts.push_back(Point(14869993, 3301830 )); pts.push_back(Point(14846397, 3358796 )); pts.push_back(Point(14802796, 3402397 )); pts.push_back(Point(14745830, 3425993 )); pts.push_back(Point(14684169, 3425993 )); pts.push_back(Point(14627203, 3402397 ));
-pts.push_back(Point(14583602, 3358796 )); pts.push_back(Point(14560006, 3301830 )); pts.push_back(Point(14557030, 3275200 )); pts.push_back(Point(14556900, 3270620 )); pts.push_back(Point(14370700, 3084410 )); pts.push_back(Point(13702830, 3084410 )); pts.push_back(Point(13702830, 3263160 ));
-pts.push_back(Point(13700003, 3302210 )); pts.push_back(Point(13676407, 3359176 )); pts.push_back(Point(13632806, 3402777 )); pts.push_back(Point(13575840, 3426373 )); pts.push_back(Point(13514179, 3426373 )); pts.push_back(Point(13457213, 3402777 )); pts.push_back(Point(13413612, 3359176 ));
-pts.push_back(Point(13390016, 3302210 )); pts.push_back(Point(13387030, 3275200 )); pts.push_back(Point(13386900, 3270620 )); pts.push_back(Point(13266840, 3150550 )); pts.push_back(Point(12532920, 3150550 )); pts.push_back(Point(12532920, 3264990 )); pts.push_back(Point(12529993, 3301820 ));
-pts.push_back(Point(12506397, 3358786 )); pts.push_back(Point(12462796, 3402387 )); pts.push_back(Point(12405830, 3425983 )); pts.push_back(Point(12344169, 3425983 )); pts.push_back(Point(12287203, 3402387 )); pts.push_back(Point(12243602, 3358786 )); pts.push_back(Point(12220006, 3301820 )); pts.push_back(Point(12217030, 3275200 ));
-pts.push_back(Point(12216900, 3270620 )); pts.push_back(Point(12157460, 3211170 )); pts.push_back(Point(11362030, 3211170 )); pts.push_back(Point(11360250, 3220520 )); pts.push_back(Point(11359993, 3221830 )); pts.push_back(Point(11336397, 3278796 ));
-pts.push_back(Point(11292796, 3322397 )); pts.push_back(Point(11235830, 3345993 )); pts.push_back(Point(11174169, 3345993 )); pts.push_back(Point(11117203, 3322397 )); pts.push_back(Point(11096270, 3305670 )); pts.push_back(Point(11092940, 3302520 )); pts.push_back(Point(10680760, 3302520 ));
-pts.push_back(Point(10676272, 3302961 )); pts.push_back(Point(10667981, 3306396 )); pts.push_back(Point(10661636, 3312741 )); pts.push_back(Point(10658201, 3321032 )); pts.push_back(Point(10658201, 3330007 )); pts.push_back(Point(10661636, 3338298 )); pts.push_back(Point(10664500, 3341780 ));
-pts.push_back(Point(11264260, 3941550 )); pts.push_back(Point(15643260, 3941550 )); pts.push_back(Point(15904620, 4202900 )); pts.push_back(Point(15909200, 4203030 )); pts.push_back(Point(15935830, 4206006 )); pts.push_back(Point(15992796, 4229602 ));
-pts.push_back(Point(16036397, 4273203 )); pts.push_back(Point(16059993, 4330169 )); pts.push_back(Point(16059993, 4391830 )); pts.push_back(Point(16036397, 4448796 )); pts.push_back(Point(15992796, 4492397 ));
-pts.push_back(Point(15935830, 4515993 )); pts.push_back(Point(15874169, 4515993 )); pts.push_back(Point(15817203, 4492397 )); pts.push_back(Point(15773602, 4448796 )); pts.push_back(Point(15750006, 4391830 )); pts.push_back(Point(15747030, 4365200 )); pts.push_back(Point(15746900, 4360620 ));
-pts.push_back(Point(15550880, 4164590 )); pts.push_back(Point(14825070, 4164590 )); pts.push_back(Point(14825070, 4247610 )); pts.push_back(Point(14846397, 4273213 )); pts.push_back(Point(14869993, 4330179 )); pts.push_back(Point(14869993, 4391840 )); pts.push_back(Point(14846397, 4448806 ));
-pts.push_back(Point(14802796, 4492407 )); pts.push_back(Point(14745830, 4516003 )); pts.push_back(Point(14684169, 4516003 )); pts.push_back(Point(14627203, 4492407 )); pts.push_back(Point(14583602, 4448806 )); pts.push_back(Point(14560006, 4391840 )); pts.push_back(Point(14557030, 4365200 ));
-pts.push_back(Point(14556900, 4360620 )); pts.push_back(Point(14432520, 4236230 )); pts.push_back(Point(13702830, 4236230 )); pts.push_back(Point(13702830, 4352930 )); pts.push_back(Point(13699993, 4391750 )); pts.push_back(Point(13676397, 4448716 ));
-pts.push_back(Point(13632796, 4492317 )); pts.push_back(Point(13575830, 4515913 )); pts.push_back(Point(13514169, 4515913 )); pts.push_back(Point(13457203, 4492317 )); pts.push_back(Point(13413602, 4448716 )); pts.push_back(Point(13390006, 4391750 )); pts.push_back(Point(13387030, 4365200 ));
-pts.push_back(Point(13386900, 4360620 )); pts.push_back(Point(13334170, 4307880 )); pts.push_back(Point(12532990, 4307880 )); pts.push_back(Point(12532990, 4357550 )); pts.push_back(Point(12529993, 4391760 )); pts.push_back(Point(12506397, 4448726 )); pts.push_back(Point(12462796, 4492327 ));
-pts.push_back(Point(12405830, 4515923 )); pts.push_back(Point(12344169, 4515923 )); pts.push_back(Point(12287203, 4492327 )); pts.push_back(Point(12243602, 4448726 )); pts.push_back(Point(12220006, 4391760 )); pts.push_back(Point(12217970, 4378710 )); pts.push_back(Point(12216810, 4368500 ));
-pts.push_back(Point(11363190, 4368500 )); pts.push_back(Point(11362030, 4378710 )); pts.push_back(Point(11359983, 4391828 )); pts.push_back(Point(11336388, 4448791 )); pts.push_back(Point(11292791, 4492388 )); pts.push_back(Point(11235828, 4515983 )); pts.push_back(Point(11174171, 4515983 )); pts.push_back(Point(11117208, 4492388 ));
-pts.push_back(Point(11096270, 4475670 )); pts.push_back(Point(11092940, 4472520 )); pts.push_back(Point(11057750, 4472520 )); pts.push_back(Point(11053272, 4472961 )); pts.push_back(Point(11044981, 4476396 )); pts.push_back(Point(11038636, 4482741 )); pts.push_back(Point(11035201, 4491032 ));
-pts.push_back(Point(11035201, 4500007 )); pts.push_back(Point(11038636, 4508298 )); pts.push_back(Point(11041490, 4511780 )); pts.push_back(Point(11573490, 5043780 )); pts.push_back(Point(15655490, 5043780 )); pts.push_back(Point(15904620, 5292900 ));
-pts.push_back(Point(15909200, 5293030 )); pts.push_back(Point(15935830, 5296006 )); pts.push_back(Point(15992796, 5319602 )); pts.push_back(Point(16036397, 5363203 )); pts.push_back(Point(16059993, 5420169 )); pts.push_back(Point(16059993, 5481830 )); pts.push_back(Point(16036397, 5538796 ));
-pts.push_back(Point(15992796, 5582397 )); pts.push_back(Point(15935830, 5605993 )); pts.push_back(Point(15874169, 5605993 )); pts.push_back(Point(15817203, 5582397 )); pts.push_back(Point(15773602, 5538796 )); pts.push_back(Point(15750006, 5481830 )); pts.push_back(Point(15747030, 5455200 ));
-pts.push_back(Point(15746900, 5450620 )); pts.push_back(Point(15563110, 5266820 )); pts.push_back(Point(14857380, 5266820 )); pts.push_back(Point(14857380, 5382430 )); pts.push_back(Point(14869993, 5420179 )); pts.push_back(Point(14869993, 5481840 )); pts.push_back(Point(14846397, 5538806 )); pts.push_back(Point(14802796, 5582407 ));
-pts.push_back(Point(14745830, 5606003 )); pts.push_back(Point(14684169, 5606003 )); pts.push_back(Point(14627203, 5582407 )); pts.push_back(Point(14583602, 5538806 )); pts.push_back(Point(14560006, 5481840 )); pts.push_back(Point(14557030, 5455200 )); pts.push_back(Point(14556900, 5450620 )); pts.push_back(Point(14444750, 5338460 ));
-pts.push_back(Point(13702890, 5338460 )); pts.push_back(Point(13702890, 5364400 )); pts.push_back(Point(13699993, 5401800 )); pts.push_back(Point(13676397, 5458766 )); pts.push_back(Point(13632796, 5502367 )); pts.push_back(Point(13575830, 5525963 )); pts.push_back(Point(13514169, 5525963 )); pts.push_back(Point(13457203, 5502367 ));
-pts.push_back(Point(13413602, 5458766 )); pts.push_back(Point(13390006, 5401800 )); pts.push_back(Point(13389230, 5397620 )); pts.push_back(Point(13387590, 5388060 )); pts.push_back(Point(12532960, 5388060 )); pts.push_back(Point(12532960, 5446220 )); pts.push_back(Point(12529993, 5481820 ));
-pts.push_back(Point(12506397, 5538786 )); pts.push_back(Point(12462796, 5582387 )); pts.push_back(Point(12405830, 5605983 )); pts.push_back(Point(12344169, 5605983 )); pts.push_back(Point(12287203, 5582387 )); pts.push_back(Point(12266270, 5565670 )); pts.push_back(Point(12262940, 5562520 )); pts.push_back(Point(11737750, 5562520 ));
-pts.push_back(Point(11733272, 5562961 )); pts.push_back(Point(11724981, 5566396 )); pts.push_back(Point(11718636, 5572741 )); pts.push_back(Point(11715201, 5581032 )); pts.push_back(Point(11715201, 5590007 )); pts.push_back(Point(11718636, 5598298 )); pts.push_back(Point(11721500, 5601780 ));
-pts.push_back(Point(12287760, 6168050 )); pts.push_back(Point(15689760, 6168050 )); pts.push_back(Point(15904620, 6382900 )); pts.push_back(Point(15909200, 6383030 )); pts.push_back(Point(15935830, 6386006 )); pts.push_back(Point(15992796, 6409602 ));
-pts.push_back(Point(16036397, 6453203 )); pts.push_back(Point(16059993, 6510169 )); pts.push_back(Point(16059993, 6571830 )); pts.push_back(Point(16036397, 6628796 )); pts.push_back(Point(15992796, 6672397 )); pts.push_back(Point(15935830, 6695993 )); pts.push_back(Point(15874169, 6695993 ));
-pts.push_back(Point(15817203, 6672397 )); pts.push_back(Point(15773602, 6628796 )); pts.push_back(Point(15750006, 6571830 )); pts.push_back(Point(15747030, 6545200 )); pts.push_back(Point(15746900, 6540620 )); pts.push_back(Point(15597380, 6391090 )); pts.push_back(Point(14858060, 6391090 ));
-pts.push_back(Point(14858060, 6473860 )); pts.push_back(Point(14869993, 6510179 )); pts.push_back(Point(14869993, 6571840 )); pts.push_back(Point(14846397, 6628806 )); pts.push_back(Point(14802796, 6672407 )); pts.push_back(Point(14745830, 6696003 )); pts.push_back(Point(14684169, 6696003 ));
-pts.push_back(Point(14627203, 6672407 )); pts.push_back(Point(14583602, 6628806 )); pts.push_back(Point(14560006, 6571840 )); pts.push_back(Point(14557030, 6545200 )); pts.push_back(Point(14556900, 6540620 )); pts.push_back(Point(14479020, 6462730 ));
-pts.push_back(Point(13702990, 6462730 )); pts.push_back(Point(13702990, 6537170 )); pts.push_back(Point(13700003, 6571840 )); pts.push_back(Point(13676407, 6628806 )); pts.push_back(Point(13632806, 6672407 )); pts.push_back(Point(13575840, 6696003 ));
-pts.push_back(Point(13514179, 6696003 )); pts.push_back(Point(13457213, 6672407 )); pts.push_back(Point(13413612, 6628806 )); pts.push_back(Point(13390016, 6571840 )); pts.push_back(Point(13387040, 6545550 )); pts.push_back(Point(13386710, 6534380 ));
-pts.push_back(Point(12533290, 6534380 )); pts.push_back(Point(12532960, 6545550 )); pts.push_back(Point(12529983, 6571828 )); pts.push_back(Point(12506388, 6628791 )); pts.push_back(Point(12462791, 6672388 )); pts.push_back(Point(12405828, 6695983 ));
+pts.push_back(Point(12262940, 6652520 )); pts.push_back(Point(12125750, 6652520 )); pts.push_back(Point(12121272, 6652961 )); pts.push_back(Point(12112981, 6656396 )); pts.push_back(Point(12106636, 6662741 )); pts.push_back(Point(12103201, 6671032 )); pts.push_back(Point(12103201, 6680007 )); pts.push_back(Point(12106636, 6688298 ));
+pts.push_back(Point(12109500, 6691780 )); pts.push_back(Point(12748600, 7330890 )); pts.push_back(Point(15762600, 7330890 )); pts.push_back(Point(15904620, 7472900 )); pts.push_back(Point(15909200, 7473030 )); pts.push_back(Point(15935830, 7476006 )); pts.push_back(Point(15992796, 7499602 )); pts.push_back(Point(16036397, 7543203 ));
+pts.push_back(Point(16059993, 7600169 )); pts.push_back(Point(16059993, 7661830 )); pts.push_back(Point(16036397, 7718796 )); pts.push_back(Point(15992796, 7762397 )); pts.push_back(Point(15935830, 7785993 )); pts.push_back(Point(15874169, 7785993 )); pts.push_back(Point(15817203, 7762397 )); pts.push_back(Point(15773602, 7718796 ));
+pts.push_back(Point(15750006, 7661830 )); pts.push_back(Point(15747030, 7635200 )); pts.push_back(Point(15746900, 7630620 )); pts.push_back(Point(15670220, 7553930 )); pts.push_back(Point(14872950, 7553930 )); pts.push_back(Point(14872950, 7626170 ));
+pts.push_back(Point(14869973, 7661280 )); pts.push_back(Point(14846377, 7718246 )); pts.push_back(Point(14802776, 7761847 )); pts.push_back(Point(14745810, 7785443 )); pts.push_back(Point(14684149, 7785443 )); pts.push_back(Point(14627183, 7761847 )); pts.push_back(Point(14583582, 7718246 ));
+pts.push_back(Point(14559986, 7661280 )); pts.push_back(Point(14557070, 7636660 )); pts.push_back(Point(14556670, 7625570 )); pts.push_back(Point(13703330, 7625570 )); pts.push_back(Point(13702930, 7636660 )); pts.push_back(Point(13699993, 7661830 )); pts.push_back(Point(13676397, 7718796 ));
+pts.push_back(Point(13632796, 7762397 )); pts.push_back(Point(13575830, 7785993 )); pts.push_back(Point(13514169, 7785993 )); pts.push_back(Point(13457203, 7762397 )); pts.push_back(Point(13436270, 7745670 )); pts.push_back(Point(13432940, 7742520 )); pts.push_back(Point(12963760, 7742520 ));
+pts.push_back(Point(12959272, 7742961 )); pts.push_back(Point(12950981, 7746396 )); pts.push_back(Point(12944636, 7752741 )); pts.push_back(Point(12941201, 7761032 )); pts.push_back(Point(12941201, 7770007 )); pts.push_back(Point(12944636, 7778298 )); pts.push_back(Point(12947490, 7781780 ));
+pts.push_back(Point(13425330, 8259620 )); pts.push_back(Point(15601330, 8259620 )); pts.push_back(Point(15904620, 8562900 )); pts.push_back(Point(15909200, 8563030 )); pts.push_back(Point(15935830, 8566006 )); pts.push_back(Point(15992796, 8589602 )); pts.push_back(Point(16036397, 8633203 ));
+pts.push_back(Point(16059993, 8690169 )); pts.push_back(Point(16059993, 8751830 )); pts.push_back(Point(16036397, 8808796 )); pts.push_back(Point(15992796, 8852397 )); pts.push_back(Point(15935830, 8875993 )); pts.push_back(Point(15874169, 8875993 )); pts.push_back(Point(15817203, 8852397 )); pts.push_back(Point(15773602, 8808796 ));
+pts.push_back(Point(15750006, 8751830 )); pts.push_back(Point(15747030, 8725200 )); pts.push_back(Point(15746900, 8720620 )); pts.push_back(Point(15508950, 8482660 )); pts.push_back(Point(14689890, 8482660 )); pts.push_back(Point(14685412, 8483101 )); pts.push_back(Point(14677121, 8486536 ));
+pts.push_back(Point(14670776, 8492881 )); pts.push_back(Point(14667341, 8501172 )); pts.push_back(Point(14667341, 8510147 )); pts.push_back(Point(14670776, 8518438 )); pts.push_back(Point(14673630, 8521920 )); pts.push_back(Point(14714620, 8562900 )); pts.push_back(Point(14719200, 8563030 )); pts.push_back(Point(14745830, 8566006 ));
+pts.push_back(Point(14802796, 8589602 )); pts.push_back(Point(14846397, 8633203 )); pts.push_back(Point(14869993, 8690169 )); pts.push_back(Point(14869993, 8751830 )); pts.push_back(Point(14846397, 8808796 )); pts.push_back(Point(14802796, 8852397 )); pts.push_back(Point(14745830, 8875993 )); pts.push_back(Point(14684169, 8875993 ));
+pts.push_back(Point(14627203, 8852397 )); pts.push_back(Point(14583602, 8808796 )); pts.push_back(Point(14560006, 8751830 )); pts.push_back(Point(14557030, 8725200 )); pts.push_back(Point(14556900, 8720620 )); pts.push_back(Point(14408270, 8571980 )); pts.push_back(Point(13696320, 8571980 )); pts.push_back(Point(13696320, 8675520 ));
+pts.push_back(Point(13699963, 8690161 )); pts.push_back(Point(13699963, 8751818 )); pts.push_back(Point(13676368, 8808781 )); pts.push_back(Point(13632771, 8852378 )); pts.push_back(Point(13575808, 8875973 )); pts.push_back(Point(13514151, 8875973 )); pts.push_back(Point(13457188, 8852378 )); pts.push_back(Point(13436270, 8835670 )); pts.push_back(Point(13432940, 8832520 ));
+pts.push_back(Point(13281760, 8832520 )); pts.push_back(Point(13277272, 8832961 )); pts.push_back(Point(13268981, 8836396 )); pts.push_back(Point(13262636, 8842741 )); pts.push_back(Point(13259201, 8851032 )); pts.push_back(Point(13259201, 8860007 )); pts.push_back(Point(13262636, 8868298 )); pts.push_back(Point(13265500, 8871780 ));
+pts.push_back(Point(13518710, 9125000 )); pts.push_back(Point(16270720, 9125000 )); pts.push_back(Point(16270720, 8939590 )); pts.push_back(Point(17120780, 8939590 )); pts.push_back(Point(17120780, 9125000 )); pts.push_back(Point(17616200, 9125000 )); pts.push_back(Point(17616200, 75000 )); pts.push_back(Point(16024790, 75000 ));
+pts.push_back(Point(16021460, 80700 )); pts.push_back(Point(16016397, 88796 )); pts.push_back(Point(15972796, 132397 )); pts.push_back(Point(15915830, 155993 )); pts.push_back(Point(15908730, 157240 )); pts.push_back(Point(15905000, 157800 )); pts.push_back(Point(15516800, 546000 )); pts.push_back(Point(15905000, 934200 ));
+pts.push_back(Point(15908730, 934760 )); pts.push_back(Point(15915830, 936006 )); pts.push_back(Point(15972796, 959602 )); pts.push_back(Point(16016397, 1003203 )); pts.push_back(Point(16039993, 1060169 )); pts.push_back(Point(16039993, 1121830 )); pts.push_back(Point(16016397, 1178796 )); pts.push_back(Point(15972796, 1222397 ));
+pts.push_back(Point(15915830, 1245993 )); pts.push_back(Point(15854169, 1245993 )); pts.push_back(Point(15797203, 1222397 )); pts.push_back(Point(15753602, 1178796 )); pts.push_back(Point(15730006, 1121830 )); pts.push_back(Point(15728760, 1114730 )); pts.push_back(Point(15728200, 1111000 )); pts.push_back(Point(15363500, 746300 ));
+pts.push_back(Point(14602620, 746300 )); pts.push_back(Point(14598142, 746741 )); pts.push_back(Point(14589851, 750176 )); pts.push_back(Point(14583506, 756521 )); pts.push_back(Point(14580071, 764812 )); pts.push_back(Point(14580071, 773787 )); pts.push_back(Point(14583506, 782078 )); pts.push_back(Point(14586360, 785560 ));
+pts.push_back(Point(14586370, 785560 )); pts.push_back(Point(14735000, 934200 )); pts.push_back(Point(14738730, 934760 )); pts.push_back(Point(14745830, 936006 )); pts.push_back(Point(14802796, 959602 )); pts.push_back(Point(14846397, 1003203 )); pts.push_back(Point(14869993, 1060169 ));
+pts.push_back(Point(14870450, 1062550 )); pts.push_back(Point(14872170, 1071980 )); pts.push_back(Point(14972780, 1071980 )); pts.push_back(Point(15925000, 2024200 )); pts.push_back(Point(15928730, 2024760 )); pts.push_back(Point(15935830, 2026006 )); pts.push_back(Point(15992796, 2049602 ));
+pts.push_back(Point(16036397, 2093203 )); pts.push_back(Point(16059993, 2150169 )); pts.push_back(Point(16059993, 2211830 )); pts.push_back(Point(16036397, 2268796 )); pts.push_back(Point(15992796, 2312397 )); pts.push_back(Point(15935830, 2335993 )); pts.push_back(Point(15874169, 2335993 ));
+pts.push_back(Point(15817203, 2312397 )); pts.push_back(Point(15773602, 2268796 )); pts.push_back(Point(15750006, 2211830 )); pts.push_back(Point(15748760, 2204730 )); pts.push_back(Point(15748200, 2201000 )); pts.push_back(Point(14869220, 1322020 )); pts.push_back(Point(14088350, 1322020 ));
+pts.push_back(Point(14083862, 1322461 )); pts.push_back(Point(14075571, 1325896 )); pts.push_back(Point(14069226, 1332241 )); pts.push_back(Point(14065791, 1340532 )); pts.push_back(Point(14065791, 1349507 )); pts.push_back(Point(14069226, 1357798 )); pts.push_back(Point(14072080, 1361280 ));
+pts.push_back(Point(14072090, 1361280 )); pts.push_back(Point(14735000, 2024200 )); pts.push_back(Point(14738730, 2024760 )); pts.push_back(Point(14745830, 2026006 )); pts.push_back(Point(14802796, 2049602 )); pts.push_back(Point(14846397, 2093203 )); pts.push_back(Point(14869993, 2150169 ));
+pts.push_back(Point(14869993, 2211830 )); pts.push_back(Point(14846397, 2268796 )); pts.push_back(Point(14802796, 2312397 )); pts.push_back(Point(14745830, 2335993 )); pts.push_back(Point(14684169, 2335993 )); pts.push_back(Point(14627203, 2312397 )); pts.push_back(Point(14583602, 2268796 )); pts.push_back(Point(14560006, 2211830 ));
+pts.push_back(Point(14558760, 2204730 )); pts.push_back(Point(14558200, 2201000 )); pts.push_back(Point(13752220, 1395020 )); pts.push_back(Point(12991340, 1395020 )); pts.push_back(Point(12986862, 1395461 )); pts.push_back(Point(12978571, 1398896 )); pts.push_back(Point(12972226, 1405241 ));
+pts.push_back(Point(12968791, 1413532 )); pts.push_back(Point(12968791, 1422507 )); pts.push_back(Point(12972226, 1430798 )); pts.push_back(Point(12975080, 1434280 )); pts.push_back(Point(12975090, 1434280 )); pts.push_back(Point(13565000, 2024200 )); pts.push_back(Point(13568730, 2024760 )); pts.push_back(Point(13575830, 2026006 ));
+pts.push_back(Point(13632796, 2049602 )); pts.push_back(Point(13676397, 2093203 )); pts.push_back(Point(13699993, 2150169 )); pts.push_back(Point(13699993, 2211830 )); pts.push_back(Point(13676397, 2268796 )); pts.push_back(Point(13632796, 2312397 )); pts.push_back(Point(13575830, 2335993 ));
+pts.push_back(Point(13514169, 2335993 )); pts.push_back(Point(13457203, 2312397 )); pts.push_back(Point(13413602, 2268796 )); pts.push_back(Point(13390006, 2211830 )); pts.push_back(Point(13388760, 2204730 )); pts.push_back(Point(13388200, 2201000 )); pts.push_back(Point(12655220, 1468020 ));
+pts.push_back(Point(11894340, 1468020 )); pts.push_back(Point(11889862, 1468461 )); pts.push_back(Point(11881571, 1471896 )); pts.push_back(Point(11875226, 1478241 )); pts.push_back(Point(11871791, 1486532 )); pts.push_back(Point(11871791, 1495507 ));
+pts.push_back(Point(11875226, 1503798 )); pts.push_back(Point(11878090, 1507280 )); pts.push_back(Point(12395000, 2024200 )); pts.push_back(Point(12398730, 2024760 )); pts.push_back(Point(12405830, 2026006 )); pts.push_back(Point(12462796, 2049602 )); pts.push_back(Point(12506397, 2093203 ));
+pts.push_back(Point(12529993, 2150169 )); pts.push_back(Point(12529993, 2211830 )); pts.push_back(Point(12506397, 2268796 )); pts.push_back(Point(12462796, 2312397 )); pts.push_back(Point(12405830, 2335993 )); pts.push_back(Point(12344169, 2335993 ));
+pts.push_back(Point(12287203, 2312397 )); pts.push_back(Point(12243602, 2268796 )); pts.push_back(Point(12220006, 2211830 )); pts.push_back(Point(12218760, 2204730 )); pts.push_back(Point(12218200, 2201000 )); pts.push_back(Point(11558220, 1541020 ));
+pts.push_back(Point(10797340, 1541020 )); pts.push_back(Point(10792862, 1541461 )); pts.push_back(Point(10784571, 1544896 )); pts.push_back(Point(10778226, 1551241 )); pts.push_back(Point(10774791, 1559532 )); pts.push_back(Point(10774791, 1568507 )); pts.push_back(Point(10778226, 1576798 )); pts.push_back(Point(10781080, 1580280 ));
+pts.push_back(Point(10781090, 1580280 )); pts.push_back(Point(11225000, 2024200 )); pts.push_back(Point(11228730, 2024760 )); pts.push_back(Point(11235830, 2026006 )); pts.push_back(Point(11292796, 2049602 )); pts.push_back(Point(11336397, 2093203 )); pts.push_back(Point(11359993, 2150169 ));
+pts.push_back(Point(11359993, 2211830 )); pts.push_back(Point(11336397, 2268796 )); pts.push_back(Point(11292796, 2312397 )); pts.push_back(Point(11235830, 2335993 )); pts.push_back(Point(11174169, 2335993 )); pts.push_back(Point(11117203, 2312397 )); pts.push_back(Point(11073602, 2268796 )); pts.push_back(Point(11050006, 2211830 ));
+pts.push_back(Point(11048760, 2204730 )); pts.push_back(Point(11048200, 2201000 )); pts.push_back(Point(10461220, 1614020 )); pts.push_back(Point( 5647400, 1614020 )); pts.push_back(Point( 5642912, 1614461 ));
+pts.push_back(Point( 5634621, 1617896 )); pts.push_back(Point( 5628276, 1624241 )); pts.push_back(Point( 5624841, 1632532 )); pts.push_back(Point( 5624841, 1641507 )); pts.push_back(Point( 5628276, 1649798 )); pts.push_back(Point( 5631130, 1653280 ));
+pts.push_back(Point( 5688490, 1710640 )); pts.push_back(Point( 9722350, 1710640 )); pts.push_back(Point(10034620, 2022900 )); pts.push_back(Point(10039200, 2023030 )); pts.push_back(Point(10065830, 2026006 )); pts.push_back(Point(10122796, 2049602 ));
+pts.push_back(Point(10166397, 2093203 )); pts.push_back(Point(10189993, 2150169 )); pts.push_back(Point(10189993, 2211830 )); pts.push_back(Point(10166397, 2268796 )); pts.push_back(Point(10158620, 2279450 )); pts.push_back(Point(10158620, 2404900 )); pts.push_back(Point(10548950, 2795240 ));
+pts.push_back(Point(15586950, 2795240 )); pts.push_back(Point(15904620, 3112900 )); pts.push_back(Point(15909200, 3113030 )); pts.push_back(Point(15935830, 3116006 )); pts.push_back(Point(15992796, 3139602 )); pts.push_back(Point(16036397, 3183203 )); pts.push_back(Point(16059993, 3240169 )); pts.push_back(Point(16059993, 3301830 ));
+pts.push_back(Point(16036397, 3358796 )); pts.push_back(Point(15992796, 3402397 )); pts.push_back(Point(15935830, 3425993 )); pts.push_back(Point(15874169, 3425993 )); pts.push_back(Point(15817203, 3402397 )); pts.push_back(Point(15773602, 3358796 )); pts.push_back(Point(15750006, 3301830 )); pts.push_back(Point(15747030, 3275200 ));
+pts.push_back(Point(15746900, 3270620 )); pts.push_back(Point(15494570, 3018280 )); pts.push_back(Point(14675510, 3018280 )); pts.push_back(Point(14671032, 3018721 )); pts.push_back(Point(14662741, 3022156 )); pts.push_back(Point(14656396, 3028501 )); pts.push_back(Point(14652961, 3036792 ));
+pts.push_back(Point(14652961, 3045767 )); pts.push_back(Point(14656396, 3054058 )); pts.push_back(Point(14659260, 3057540 )); pts.push_back(Point(14714620, 3112900 )); pts.push_back(Point(14719200, 3113030 )); pts.push_back(Point(14745830, 3116006 )); pts.push_back(Point(14802796, 3139602 ));
+pts.push_back(Point(14846397, 3183203 )); pts.push_back(Point(14869993, 3240169 )); pts.push_back(Point(14869993, 3301830 )); pts.push_back(Point(14846397, 3358796 )); pts.push_back(Point(14802796, 3402397 )); pts.push_back(Point(14745830, 3425993 )); pts.push_back(Point(14684169, 3425993 )); pts.push_back(Point(14627203, 3402397 ));
+pts.push_back(Point(14583602, 3358796 )); pts.push_back(Point(14560006, 3301830 )); pts.push_back(Point(14557030, 3275200 )); pts.push_back(Point(14556900, 3270620 )); pts.push_back(Point(14370700, 3084410 )); pts.push_back(Point(13702830, 3084410 )); pts.push_back(Point(13702830, 3263160 ));
+pts.push_back(Point(13700003, 3302210 )); pts.push_back(Point(13676407, 3359176 )); pts.push_back(Point(13632806, 3402777 )); pts.push_back(Point(13575840, 3426373 )); pts.push_back(Point(13514179, 3426373 )); pts.push_back(Point(13457213, 3402777 )); pts.push_back(Point(13413612, 3359176 ));
+pts.push_back(Point(13390016, 3302210 )); pts.push_back(Point(13387030, 3275200 )); pts.push_back(Point(13386900, 3270620 )); pts.push_back(Point(13266840, 3150550 )); pts.push_back(Point(12532920, 3150550 )); pts.push_back(Point(12532920, 3264990 )); pts.push_back(Point(12529993, 3301820 ));
+pts.push_back(Point(12506397, 3358786 )); pts.push_back(Point(12462796, 3402387 )); pts.push_back(Point(12405830, 3425983 )); pts.push_back(Point(12344169, 3425983 )); pts.push_back(Point(12287203, 3402387 )); pts.push_back(Point(12243602, 3358786 )); pts.push_back(Point(12220006, 3301820 )); pts.push_back(Point(12217030, 3275200 ));
+pts.push_back(Point(12216900, 3270620 )); pts.push_back(Point(12157460, 3211170 )); pts.push_back(Point(11362030, 3211170 )); pts.push_back(Point(11360250, 3220520 )); pts.push_back(Point(11359993, 3221830 )); pts.push_back(Point(11336397, 3278796 ));
+pts.push_back(Point(11292796, 3322397 )); pts.push_back(Point(11235830, 3345993 )); pts.push_back(Point(11174169, 3345993 )); pts.push_back(Point(11117203, 3322397 )); pts.push_back(Point(11096270, 3305670 )); pts.push_back(Point(11092940, 3302520 )); pts.push_back(Point(10680760, 3302520 ));
+pts.push_back(Point(10676272, 3302961 )); pts.push_back(Point(10667981, 3306396 )); pts.push_back(Point(10661636, 3312741 )); pts.push_back(Point(10658201, 3321032 )); pts.push_back(Point(10658201, 3330007 )); pts.push_back(Point(10661636, 3338298 )); pts.push_back(Point(10664500, 3341780 ));
+pts.push_back(Point(11264260, 3941550 )); pts.push_back(Point(15643260, 3941550 )); pts.push_back(Point(15904620, 4202900 )); pts.push_back(Point(15909200, 4203030 )); pts.push_back(Point(15935830, 4206006 )); pts.push_back(Point(15992796, 4229602 ));
+pts.push_back(Point(16036397, 4273203 )); pts.push_back(Point(16059993, 4330169 )); pts.push_back(Point(16059993, 4391830 )); pts.push_back(Point(16036397, 4448796 )); pts.push_back(Point(15992796, 4492397 ));
+pts.push_back(Point(15935830, 4515993 )); pts.push_back(Point(15874169, 4515993 )); pts.push_back(Point(15817203, 4492397 )); pts.push_back(Point(15773602, 4448796 )); pts.push_back(Point(15750006, 4391830 )); pts.push_back(Point(15747030, 4365200 )); pts.push_back(Point(15746900, 4360620 ));
+pts.push_back(Point(15550880, 4164590 )); pts.push_back(Point(14825070, 4164590 )); pts.push_back(Point(14825070, 4247610 )); pts.push_back(Point(14846397, 4273213 )); pts.push_back(Point(14869993, 4330179 )); pts.push_back(Point(14869993, 4391840 )); pts.push_back(Point(14846397, 4448806 ));
+pts.push_back(Point(14802796, 4492407 )); pts.push_back(Point(14745830, 4516003 )); pts.push_back(Point(14684169, 4516003 )); pts.push_back(Point(14627203, 4492407 )); pts.push_back(Point(14583602, 4448806 )); pts.push_back(Point(14560006, 4391840 )); pts.push_back(Point(14557030, 4365200 ));
+pts.push_back(Point(14556900, 4360620 )); pts.push_back(Point(14432520, 4236230 )); pts.push_back(Point(13702830, 4236230 )); pts.push_back(Point(13702830, 4352930 )); pts.push_back(Point(13699993, 4391750 )); pts.push_back(Point(13676397, 4448716 ));
+pts.push_back(Point(13632796, 4492317 )); pts.push_back(Point(13575830, 4515913 )); pts.push_back(Point(13514169, 4515913 )); pts.push_back(Point(13457203, 4492317 )); pts.push_back(Point(13413602, 4448716 )); pts.push_back(Point(13390006, 4391750 )); pts.push_back(Point(13387030, 4365200 ));
+pts.push_back(Point(13386900, 4360620 )); pts.push_back(Point(13334170, 4307880 )); pts.push_back(Point(12532990, 4307880 )); pts.push_back(Point(12532990, 4357550 )); pts.push_back(Point(12529993, 4391760 )); pts.push_back(Point(12506397, 4448726 )); pts.push_back(Point(12462796, 4492327 ));
+pts.push_back(Point(12405830, 4515923 )); pts.push_back(Point(12344169, 4515923 )); pts.push_back(Point(12287203, 4492327 )); pts.push_back(Point(12243602, 4448726 )); pts.push_back(Point(12220006, 4391760 )); pts.push_back(Point(12217970, 4378710 )); pts.push_back(Point(12216810, 4368500 ));
+pts.push_back(Point(11363190, 4368500 )); pts.push_back(Point(11362030, 4378710 )); pts.push_back(Point(11359983, 4391828 )); pts.push_back(Point(11336388, 4448791 )); pts.push_back(Point(11292791, 4492388 )); pts.push_back(Point(11235828, 4515983 )); pts.push_back(Point(11174171, 4515983 )); pts.push_back(Point(11117208, 4492388 ));
+pts.push_back(Point(11096270, 4475670 )); pts.push_back(Point(11092940, 4472520 )); pts.push_back(Point(11057750, 4472520 )); pts.push_back(Point(11053272, 4472961 )); pts.push_back(Point(11044981, 4476396 )); pts.push_back(Point(11038636, 4482741 )); pts.push_back(Point(11035201, 4491032 ));
+pts.push_back(Point(11035201, 4500007 )); pts.push_back(Point(11038636, 4508298 )); pts.push_back(Point(11041490, 4511780 )); pts.push_back(Point(11573490, 5043780 )); pts.push_back(Point(15655490, 5043780 )); pts.push_back(Point(15904620, 5292900 ));
+pts.push_back(Point(15909200, 5293030 )); pts.push_back(Point(15935830, 5296006 )); pts.push_back(Point(15992796, 5319602 )); pts.push_back(Point(16036397, 5363203 )); pts.push_back(Point(16059993, 5420169 )); pts.push_back(Point(16059993, 5481830 )); pts.push_back(Point(16036397, 5538796 ));
+pts.push_back(Point(15992796, 5582397 )); pts.push_back(Point(15935830, 5605993 )); pts.push_back(Point(15874169, 5605993 )); pts.push_back(Point(15817203, 5582397 )); pts.push_back(Point(15773602, 5538796 )); pts.push_back(Point(15750006, 5481830 )); pts.push_back(Point(15747030, 5455200 ));
+pts.push_back(Point(15746900, 5450620 )); pts.push_back(Point(15563110, 5266820 )); pts.push_back(Point(14857380, 5266820 )); pts.push_back(Point(14857380, 5382430 )); pts.push_back(Point(14869993, 5420179 )); pts.push_back(Point(14869993, 5481840 )); pts.push_back(Point(14846397, 5538806 )); pts.push_back(Point(14802796, 5582407 ));
+pts.push_back(Point(14745830, 5606003 )); pts.push_back(Point(14684169, 5606003 )); pts.push_back(Point(14627203, 5582407 )); pts.push_back(Point(14583602, 5538806 )); pts.push_back(Point(14560006, 5481840 )); pts.push_back(Point(14557030, 5455200 )); pts.push_back(Point(14556900, 5450620 )); pts.push_back(Point(14444750, 5338460 ));
+pts.push_back(Point(13702890, 5338460 )); pts.push_back(Point(13702890, 5364400 )); pts.push_back(Point(13699993, 5401800 )); pts.push_back(Point(13676397, 5458766 )); pts.push_back(Point(13632796, 5502367 )); pts.push_back(Point(13575830, 5525963 )); pts.push_back(Point(13514169, 5525963 )); pts.push_back(Point(13457203, 5502367 ));
+pts.push_back(Point(13413602, 5458766 )); pts.push_back(Point(13390006, 5401800 )); pts.push_back(Point(13389230, 5397620 )); pts.push_back(Point(13387590, 5388060 )); pts.push_back(Point(12532960, 5388060 )); pts.push_back(Point(12532960, 5446220 )); pts.push_back(Point(12529993, 5481820 ));
+pts.push_back(Point(12506397, 5538786 )); pts.push_back(Point(12462796, 5582387 )); pts.push_back(Point(12405830, 5605983 )); pts.push_back(Point(12344169, 5605983 )); pts.push_back(Point(12287203, 5582387 )); pts.push_back(Point(12266270, 5565670 )); pts.push_back(Point(12262940, 5562520 )); pts.push_back(Point(11737750, 5562520 ));
+pts.push_back(Point(11733272, 5562961 )); pts.push_back(Point(11724981, 5566396 )); pts.push_back(Point(11718636, 5572741 )); pts.push_back(Point(11715201, 5581032 )); pts.push_back(Point(11715201, 5590007 )); pts.push_back(Point(11718636, 5598298 )); pts.push_back(Point(11721500, 5601780 ));
+pts.push_back(Point(12287760, 6168050 )); pts.push_back(Point(15689760, 6168050 )); pts.push_back(Point(15904620, 6382900 )); pts.push_back(Point(15909200, 6383030 )); pts.push_back(Point(15935830, 6386006 )); pts.push_back(Point(15992796, 6409602 ));
+pts.push_back(Point(16036397, 6453203 )); pts.push_back(Point(16059993, 6510169 )); pts.push_back(Point(16059993, 6571830 )); pts.push_back(Point(16036397, 6628796 )); pts.push_back(Point(15992796, 6672397 )); pts.push_back(Point(15935830, 6695993 )); pts.push_back(Point(15874169, 6695993 ));
+pts.push_back(Point(15817203, 6672397 )); pts.push_back(Point(15773602, 6628796 )); pts.push_back(Point(15750006, 6571830 )); pts.push_back(Point(15747030, 6545200 )); pts.push_back(Point(15746900, 6540620 )); pts.push_back(Point(15597380, 6391090 )); pts.push_back(Point(14858060, 6391090 ));
+pts.push_back(Point(14858060, 6473860 )); pts.push_back(Point(14869993, 6510179 )); pts.push_back(Point(14869993, 6571840 )); pts.push_back(Point(14846397, 6628806 )); pts.push_back(Point(14802796, 6672407 )); pts.push_back(Point(14745830, 6696003 )); pts.push_back(Point(14684169, 6696003 ));
+pts.push_back(Point(14627203, 6672407 )); pts.push_back(Point(14583602, 6628806 )); pts.push_back(Point(14560006, 6571840 )); pts.push_back(Point(14557030, 6545200 )); pts.push_back(Point(14556900, 6540620 )); pts.push_back(Point(14479020, 6462730 ));
+pts.push_back(Point(13702990, 6462730 )); pts.push_back(Point(13702990, 6537170 )); pts.push_back(Point(13700003, 6571840 )); pts.push_back(Point(13676407, 6628806 )); pts.push_back(Point(13632806, 6672407 )); pts.push_back(Point(13575840, 6696003 ));
+pts.push_back(Point(13514179, 6696003 )); pts.push_back(Point(13457213, 6672407 )); pts.push_back(Point(13413612, 6628806 )); pts.push_back(Point(13390016, 6571840 )); pts.push_back(Point(13387040, 6545550 )); pts.push_back(Point(13386710, 6534380 ));
+pts.push_back(Point(12533290, 6534380 )); pts.push_back(Point(12532960, 6545550 )); pts.push_back(Point(12529983, 6571828 )); pts.push_back(Point(12506388, 6628791 )); pts.push_back(Point(12462791, 6672388 )); pts.push_back(Point(12405828, 6695983 ));
pts.push_back(Point(12344171, 6695983 )); pts.push_back(Point(12287208, 6672388 )); pts.push_back(Point(12266270, 6655670 ));
poly.set(pts.begin(), pts.end());
si.insert(poly, 444);
@@ -2486,10 +2486,10 @@
template <typename Unit>
class arbitrary_boolean_op : public scanline_base<Unit> {
private:
-
+
typedef int property_type;
typedef typename scanline_base<Unit>::Point Point;
-
+
//the first point is the vertex and and second point establishes the slope of an edge eminating from the vertex
//typedef std::pair<Point, Point> half_edge;
typedef typename scanline_base<Unit>::half_edge half_edge;
@@ -2567,7 +2567,7 @@
if((*(left.begin())) == 0) {
result.insert_clean(elem);
}
- }
+ }
#ifdef BOOST_POLYGON_MSVC
#pragma warning (default: 4127)
#endif
@@ -2593,7 +2593,7 @@
enum BOOLEAN_OP_TYPE {
BOOLEAN_OR = 0,
BOOLEAN_AND = 1,
- BOOLEAN_XOR = 2,
+ BOOLEAN_XOR = 2,
BOOLEAN_NOT = 3
};
template <typename result_type, typename iT1, typename iT2>
@@ -2627,17 +2627,17 @@
} else if(op == BOOLEAN_NOT) {
boolean_output_functor<result_type, std::vector<property_type>, 3> bof;
sl.scan(result, bof, pmd.begin(), pmd.end());
- }
+ }
}
-
+
inline void clear() {*this = arbitrary_boolean_op();}
private:
template <typename iT>
void insert(iT b, iT e, int id) {
- for(;
+ for(;
b != e; ++b) {
- pmd.push_back(vertex_property(half_edge((*b).first.first, (*b).first.second),
+ pmd.push_back(vertex_property(half_edge((*b).first.first, (*b).first.second),
std::pair<property_type, int>(id, (*b).second)));
}
}
@@ -2705,9 +2705,9 @@
template <typename Unit, typename property_type>
class arbitrary_connectivity_extraction : public scanline_base<Unit> {
private:
-
+
typedef typename scanline_base<Unit>::Point Point;
-
+
//the first point is the vertex and and second point establishes the slope of an edge eminating from the vertex
//typedef std::pair<Point, Point> half_edge;
typedef typename scanline_base<Unit>::half_edge half_edge;
@@ -2752,7 +2752,7 @@
std::map<point_data<Unit>, std::set<property_type> >& y_prop_map = output.first.second;
if(y_prop_map.empty()) return;
Unit x = output.first.first;
- for(typename std::map<point_data<Unit>, std::set<property_type> >::iterator itr =
+ for(typename std::map<point_data<Unit>, std::set<property_type> >::iterator itr =
y_prop_map.begin(); itr != y_prop_map.end(); ++itr) {
if((*itr).first.x() < x) {
y_prop_map.erase(y_prop_map.begin(), itr);
@@ -2771,7 +2771,7 @@
}
}
}
-
+
template <typename result_type, typename key_type>
class connectivity_extraction_output_functor {
public:
@@ -2784,21 +2784,21 @@
x = pt.x();
std::set<property_type>& output_set = y_prop_map[pt];
{
- for(typename key_type::const_iterator itr1 =
+ for(typename key_type::const_iterator itr1 =
left.begin(); itr1 != left.end(); ++itr1) {
output_set.insert(output_set.end(), *itr1);
}
- for(typename key_type::const_iterator itr2 =
+ for(typename key_type::const_iterator itr2 =
right.begin(); itr2 != right.end(); ++itr2) {
output_set.insert(output_set.end(), *itr2);
}
}
std::set<property_type>& output_set2 = y_prop_map[edge.second];
- for(typename key_type::const_iterator itr1 =
+ for(typename key_type::const_iterator itr1 =
left.begin(); itr1 != left.end(); ++itr1) {
output_set2.insert(output_set2.end(), *itr1);
}
- for(typename key_type::const_iterator itr2 =
+ for(typename key_type::const_iterator itr2 =
right.begin(); itr2 != right.end(); ++itr2) {
output_set2.insert(output_set2.end(), *itr2);
}
@@ -2824,13 +2824,13 @@
pmd.swap(tmp_pmd);
sort_property_merge_data();
scanline<Unit, property_type, std::vector<property_type> > sl;
- std::pair<std::pair<Unit, std::map<point_data<Unit>, std::set<property_type> > >,
+ std::pair<std::pair<Unit, std::map<point_data<Unit>, std::set<property_type> > >,
result_type*> output
- (std::make_pair(std::make_pair((std::numeric_limits<Unit>::max)(),
- std::map<point_data<Unit>,
+ (std::make_pair(std::make_pair((std::numeric_limits<Unit>::max)(),
+ std::map<point_data<Unit>,
std::set<property_type> >()), &result));
- connectivity_extraction_output_functor<std::pair<std::pair<Unit,
- std::map<point_data<Unit>, std::set<property_type> > >, result_type*>,
+ connectivity_extraction_output_functor<std::pair<std::pair<Unit,
+ std::map<point_data<Unit>, std::set<property_type> > >, result_type*>,
std::vector<property_type> > ceof;
sl.scan(output, ceof, pmd.begin(), pmd.end());
process_previous_x(output);
@@ -2839,17 +2839,16 @@
inline void clear() {*this = arbitrary_connectivity_extraction();}
template <typename iT>
- void populateTouchSetData(iT begin, iT end,
+ void populateTouchSetData(iT begin, iT end,
property_type property) {
for( ; begin != end; ++begin) {
- pmd.push_back(vertex_property(half_edge((*begin).first.first, (*begin).first.second),
+ pmd.push_back(vertex_property(half_edge((*begin).first.first, (*begin).first.second),
std::pair<property_type, int>(property, (*begin).second)));
}
}
};
-}
+}
}
#endif
-
Modified: trunk/boost/polygon/gmp_override.hpp
==============================================================================
--- trunk/boost/polygon/gmp_override.hpp (original)
+++ trunk/boost/polygon/gmp_override.hpp 2012-05-09 15:33:59 EDT (Wed, 09 May 2012)
@@ -1,6 +1,6 @@
/*
Copyright 2008 Intel Corporation
-
+
Use, modification and distribution are subject to the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
@@ -25,14 +25,14 @@
v_ = that;
return (*this);
}
- inline operator int() const {
+ inline operator int() const {
std::cout << "cast\n";
mpz_class num = v_.get_num();
mpz_class den = v_.get_den();
num /= den;
- return num.get_si();
+ return num.get_si();
}
- inline double get_d() const {
+ inline double get_d() const {
return v_.get_d();
}
inline int get_num() const {
@@ -109,7 +109,7 @@
private:
mpq_class v_;
};
-
+
template <>
struct high_precision_type<int> {
typedef mpq_class type;
@@ -120,7 +120,7 @@
mpz_class num = v.get_num();
mpz_class den = v.get_den();
num /= den;
- return num.get_si();
+ return num.get_si();
};
}
Modified: trunk/boost/polygon/gtl.hpp
==============================================================================
--- trunk/boost/polygon/gtl.hpp (original)
+++ trunk/boost/polygon/gtl.hpp 2012-05-09 15:33:59 EDT (Wed, 09 May 2012)
@@ -1,6 +1,6 @@
/*
Copyright 2008 Intel Corporation
-
+
Use, modification and distribution are subject to the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
Modified: trunk/boost/polygon/interval_concept.hpp
==============================================================================
--- trunk/boost/polygon/interval_concept.hpp (original)
+++ trunk/boost/polygon/interval_concept.hpp 2012-05-09 15:33:59 EDT (Wed, 09 May 2012)
@@ -1,6 +1,6 @@
/*
Copyright 2008 Intel Corporation
-
+
Use, modification and distribution are subject to the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
@@ -13,7 +13,7 @@
namespace boost { namespace polygon{
struct interval_concept {};
-
+
template <typename T>
struct is_interval_concept { typedef gtl_no type; };
template <>
@@ -38,7 +38,7 @@
template <typename T, typename CT>
struct interval_difference_type_by_concept { typedef void type; };
template <typename T>
- struct interval_difference_type_by_concept<T, gtl_yes> {
+ struct interval_difference_type_by_concept<T, gtl_yes> {
typedef typename coordinate_traits<typename interval_traits<T>::coordinate_type>::coordinate_difference type; };
template <typename T>
@@ -55,7 +55,7 @@
typename is_interval_concept<typename geometry_concept<T>::type>::type>::type,
typename interval_coordinate_type<T>::type>::type
get(const T& interval, direction_1d dir) {
- return interval_traits<T>::get(interval, dir);
+ return interval_traits<T>::get(interval, dir);
}
struct y_i_set : gtl_yes {};
@@ -67,13 +67,13 @@
void>::type
set(T& interval, direction_1d dir, coordinate_type value) {
//this may need to be refined
- interval_mutable_traits<T>::set(interval, dir, value);
+ interval_mutable_traits<T>::set(interval, dir, value);
if(high(interval) < low(interval))
interval_mutable_traits<T>::set(interval, dir.backward(), value);
}
struct y_i_construct : gtl_yes {};
-
+
template <typename T, typename T2, typename T3>
typename enable_if< typename gtl_and<
y_i_construct,
@@ -81,11 +81,11 @@
T>::type
construct(T2 low_value, T3 high_value) {
if(low_value > high_value) std::swap(low_value, high_value);
- return interval_mutable_traits<T>::construct(low_value, high_value);
+ return interval_mutable_traits<T>::construct(low_value, high_value);
}
struct y_i_copy_construct : gtl_yes {};
-
+
template <typename T, typename T2>
typename enable_if< typename gtl_and_3<
y_i_copy_construct,
@@ -119,15 +119,15 @@
bool>::type
equivalence(const T& interval1, const T2& interval2) {
return get(interval1, LOW) == get(interval2, LOW) &&
- get(interval1, HIGH) == get(interval2, HIGH);
+ get(interval1, HIGH) == get(interval2, HIGH);
}
-
+
struct y_i_contains : gtl_yes {};
template <typename interval_type>
- typename enable_if< typename gtl_and< y_i_contains, typename is_interval_concept<typename geometry_concept<interval_type>::type>::type >::type, bool>::type
+ typename enable_if< typename gtl_and< y_i_contains, typename is_interval_concept<typename geometry_concept<interval_type>::type>::type >::type, bool>::type
contains(const interval_type& interval,
- typename interval_coordinate_type<interval_type>::type value,
+ typename interval_coordinate_type<interval_type>::type value,
bool consider_touch = true ) {
if(consider_touch) {
return value <= high(interval) && value >= low(interval);
@@ -189,10 +189,10 @@
typename enable_if<typename gtl_and<
y_i_low2,
typename is_mutable_interval_concept<typename geometry_concept<interval_type>::type>::type>::type,
- void>::type
+ void>::type
low(interval_type& interval,
typename interval_coordinate_type<interval_type>::type v) { set(interval, LOW, v); }
-
+
struct y_i_high2 : gtl_yes {};
// set the high coordinate to v
@@ -200,7 +200,7 @@
typename enable_if<typename gtl_and<
y_i_high2,
typename is_mutable_interval_concept<typename geometry_concept<interval_type>::type>::type>::type,
- void>::type
+ void>::type
high(interval_type& interval,
typename interval_coordinate_type<interval_type>::type v) { set(interval, HIGH, v); }
@@ -212,7 +212,7 @@
y_i_delta,
typename is_interval_concept<typename geometry_concept<interval_type>::type>::type>::type,
typename interval_difference_type<interval_type>::type >::type
- delta(const interval_type& interval) {
+ delta(const interval_type& interval) {
typedef typename coordinate_traits<typename interval_coordinate_type<interval_type>::type>::coordinate_difference diffT;
return (diffT)high(interval) - (diffT)low(interval); }
@@ -236,7 +236,7 @@
// scale interval by factor
template <typename interval_type>
typename enable_if<typename gtl_and<y_i_scale_up, typename is_mutable_interval_concept<typename geometry_concept<interval_type>::type>::type>::type, interval_type>::type &
- scale_up(interval_type& interval,
+ scale_up(interval_type& interval,
typename coordinate_traits<typename interval_coordinate_type<interval_type>::type>::unsigned_area_type factor) {
typedef typename interval_coordinate_type<interval_type>::type Unit;
Unit newHigh = high(interval) * (Unit)factor;
@@ -249,12 +249,12 @@
template <typename interval_type>
typename enable_if<typename gtl_and<y_i_scale_down, typename is_mutable_interval_concept<typename geometry_concept<interval_type>::type>::type>::type, interval_type>::type &
- scale_down(interval_type& interval,
+ scale_down(interval_type& interval,
typename coordinate_traits<typename interval_coordinate_type<interval_type>::type>::unsigned_area_type factor) {
typedef typename interval_coordinate_type<interval_type>::type Unit;
typedef typename coordinate_traits<Unit>::coordinate_distance dt;
- Unit newHigh = scaling_policy<Unit>::round((dt)(high(interval)) / (dt)factor);
- low(interval, scaling_policy<Unit>::round((dt)(low(interval)) / (dt)factor));
+ Unit newHigh = scaling_policy<Unit>::round((dt)(high(interval)) / (dt)factor);
+ low(interval, scaling_policy<Unit>::round((dt)(low(interval)) / (dt)factor));
high(interval, (newHigh));
return interval;
}
@@ -287,7 +287,7 @@
high(interval, static_cast<ctype>(static_cast<Unit>(low(interval)) + len));
return interval;
}
-
+
struct y_i_convolve : gtl_yes {};
// convolve this with b
@@ -322,9 +322,9 @@
// convolve this with b
template <typename interval_type, typename interval_type_2>
- typename enable_if<
+ typename enable_if<
typename gtl_and_3<y_i_convolve2,
- typename is_mutable_interval_concept<typename geometry_concept<interval_type>::type>::type,
+ typename is_mutable_interval_concept<typename geometry_concept<interval_type>::type>::type,
typename is_interval_concept<typename geometry_concept<interval_type_2>::type>::type>::type,
interval_type>::type &
convolve(interval_type& interval,
@@ -336,12 +336,12 @@
high(interval, newHigh);
return interval;
}
-
+
struct y_i_deconvolve2 : gtl_yes {};
// deconvolve this with b
template <typename interval_type, typename interval_type_2>
- typename enable_if<
+ typename enable_if<
typename gtl_and_3< y_i_deconvolve2,
typename is_mutable_interval_concept<typename geometry_concept<interval_type>::type>::type,
typename is_interval_concept<typename geometry_concept<interval_type_2>::type>::type>::type,
@@ -355,12 +355,12 @@
high(interval, newHigh);
return interval;
}
-
+
struct y_i_reconvolve : gtl_yes {};
// reflected convolve this with b
template <typename interval_type, typename interval_type_2>
- typename enable_if<
+ typename enable_if<
typename gtl_and_3<y_i_reconvolve,
typename is_mutable_interval_concept<typename geometry_concept<interval_type>::type>::type,
typename is_interval_concept<typename geometry_concept<interval_type_2>::type>::type>::type,
@@ -374,15 +374,15 @@
high(interval, newHigh);
return interval;
}
-
+
struct y_i_redeconvolve : gtl_yes {};
// reflected deconvolve this with b
template <typename interval_type, typename interval_type_2>
- typename enable_if<
+ typename enable_if<
typename gtl_and_3< y_i_redeconvolve,
- typename is_mutable_interval_concept<typename geometry_concept<interval_type>::type>::type,
- typename is_interval_concept<typename geometry_concept<interval_type_2>::type>::type>::type,
+ typename is_mutable_interval_concept<typename geometry_concept<interval_type>::type>::type,
+ typename is_interval_concept<typename geometry_concept<interval_type_2>::type>::type>::type,
interval_type>::type &
reflected_deconvolve(interval_type& interval,
const interval_type_2& b) {
@@ -393,7 +393,7 @@
high(interval, newHigh);
return interval;
}
-
+
struct y_i_e_dist1 : gtl_yes {};
// distance from a coordinate to an interval
@@ -408,10 +408,10 @@
}
struct y_i_e_dist2 : gtl_yes {};
-
+
// distance between two intervals
template <typename interval_type, typename interval_type_2>
- typename enable_if<
+ typename enable_if<
typename gtl_and_3<y_i_e_dist2, typename is_interval_concept<typename geometry_concept<interval_type>::type>::type,
typename is_interval_concept<typename geometry_concept<interval_type_2>::type>::type>::type,
typename interval_difference_type<interval_type>::type>::type
@@ -421,18 +421,18 @@
Unit dist[3] = {0, (Unit)low(interval) - (Unit)high(b), (Unit)low(b) - (Unit)high(interval)};
return dist[ (dist[1] > 0) + ((dist[2] > 0) << 1) ];
}
-
+
struct y_i_e_intersects : gtl_yes {};
// check if Interval b intersects `this` Interval
template <typename interval_type, typename interval_type_2>
- typename enable_if<
+ typename enable_if<
typename gtl_and_3<y_i_e_intersects, typename is_interval_concept<typename geometry_concept<interval_type>::type>::type,
typename is_interval_concept<typename geometry_concept<interval_type_2>::type>::type>::type,
- bool>::type
- intersects(const interval_type& interval, const interval_type_2& b,
+ bool>::type
+ intersects(const interval_type& interval, const interval_type_2& b,
bool consider_touch = true) {
- return consider_touch ?
+ return consider_touch ?
(low(interval) <= high(b)) & (high(interval) >= low(b)) :
(low(interval) < high(b)) & (high(interval) > low(b));
}
@@ -441,15 +441,15 @@
// check if Interval b partially overlaps `this` Interval
template <typename interval_type, typename interval_type_2>
- typename enable_if<
+ typename enable_if<
typename gtl_and_3<y_i_e_bintersect, typename is_interval_concept<typename geometry_concept<interval_type>::type>::type,
typename is_interval_concept<typename geometry_concept<interval_type_2>::type>::type>::type,
- bool>::type
- boundaries_intersect(const interval_type& interval, const interval_type_2& b,
+ bool>::type
+ boundaries_intersect(const interval_type& interval, const interval_type_2& b,
bool consider_touch = true) {
- return (contains(interval, low(b), consider_touch) ||
+ return (contains(interval, low(b), consider_touch) ||
contains(interval, high(b), consider_touch)) &&
- (contains(b, low(interval), consider_touch) ||
+ (contains(b, low(interval), consider_touch) ||
contains(b, high(interval), consider_touch));
}
@@ -459,7 +459,7 @@
template <typename interval_type, typename interval_type_2>
typename enable_if< typename gtl_and_3<y_i_abuts1, typename is_interval_concept<typename geometry_concept<interval_type>::type>::type,
typename is_interval_concept<typename geometry_concept<interval_type_2>::type>::type>::type,
- bool>::type
+ bool>::type
abuts(const interval_type& interval, const interval_type_2& b, direction_1d dir) {
return dir.to_int() ? low(b) == high(interval) : low(interval) == high(b);
}
@@ -468,13 +468,13 @@
// check if they are end to end
template <typename interval_type, typename interval_type_2>
- typename enable_if<
+ typename enable_if<
typename gtl_and_3<y_i_abuts2, typename is_interval_concept<typename geometry_concept<interval_type>::type>::type,
typename is_interval_concept<typename geometry_concept<interval_type_2>::type>::type>::type,
- bool>::type
+ bool>::type
abuts(const interval_type& interval, const interval_type_2& b) {
return abuts(interval, b, HIGH) || abuts(interval, b, LOW);
- }
+ }
struct y_i_intersect : gtl_yes {};
@@ -482,7 +482,7 @@
template <typename interval_type, typename interval_type_2>
typename enable_if< typename gtl_and_3<y_i_intersect, typename is_mutable_interval_concept<typename geometry_concept<interval_type>::type>::type,
typename is_interval_concept<typename geometry_concept<interval_type_2>::type>::type>::type,
- bool>::type
+ bool>::type
intersect(interval_type& interval, const interval_type_2& b, bool consider_touch = true) {
typedef typename interval_coordinate_type<interval_type>::type Unit;
Unit lowVal = (std::max)(low(interval), low(b));
@@ -501,7 +501,7 @@
// set 'this' interval to the generalized intersection of 'this' and b
template <typename interval_type, typename interval_type_2>
- typename enable_if<
+ typename enable_if<
typename gtl_and_3<y_i_g_intersect, typename is_mutable_interval_concept<typename geometry_concept<interval_type>::type>::type,
typename is_interval_concept<typename geometry_concept<interval_type_2>::type>::type>::type,
interval_type>::type &
@@ -526,7 +526,7 @@
high(interval, high(interval)+bloating);
return interval;
}
-
+
struct y_i_bloat2 : gtl_yes {};
// bloat the specified side of `this` Interval
@@ -572,7 +572,7 @@
low(interval, (std::min)(low(interval), low(b)));
high(interval, (std::max)(high(interval), high(b)));
return retval;
- }
+ }
struct y_i_encompass2 : gtl_yes {};
@@ -585,13 +585,13 @@
low(interval, (std::min)(low(interval), b));
high(interval, (std::max)(high(interval), b));
return retval;
- }
+ }
struct y_i_get_half : gtl_yes {};
// gets the half of the interval as an interval
template <typename interval_type>
- typename enable_if<typename gtl_and<y_i_get_half, typename is_mutable_interval_concept<typename geometry_concept<interval_type>::type>::type>::type, interval_type>::type
+ typename enable_if<typename gtl_and<y_i_get_half, typename is_mutable_interval_concept<typename geometry_concept<interval_type>::type>::type>::type, interval_type>::type
get_half(const interval_type& interval, direction_1d d1d) {
typedef typename interval_coordinate_type<interval_type>::type Unit;
Unit c = (get(interval, LOW) + get(interval, HIGH)) / 2;
@@ -604,10 +604,10 @@
// returns true if the 2 intervals exactly touch at one value, like in l1 <= h1 == l2 <= h2
// sets the argument to the joined interval
template <typename interval_type, typename interval_type_2>
- typename enable_if<
+ typename enable_if<
typename gtl_and_3<y_i_join_with, typename is_mutable_interval_concept<typename geometry_concept<interval_type>::type>::type,
typename is_interval_concept<typename geometry_concept<interval_type_2>::type>::type>::type,
- bool>::type
+ bool>::type
join_with(interval_type& interval, const interval_type_2& b) {
if(abuts(interval, b)) {
encompass(interval, b);
Modified: trunk/boost/polygon/interval_data.hpp
==============================================================================
--- trunk/boost/polygon/interval_data.hpp (original)
+++ trunk/boost/polygon/interval_data.hpp 2012-05-09 15:33:59 EDT (Wed, 09 May 2012)
@@ -1,6 +1,6 @@
/*
Copyright 2008 Intel Corporation
-
+
Use, modification and distribution are subject to the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
@@ -14,31 +14,31 @@
public:
typedef T coordinate_type;
inline interval_data()
-#ifndef BOOST_POLYGON_MSVC
- :coords_()
-#endif
- {}
+#ifndef BOOST_POLYGON_MSVC
+ :coords_()
+#endif
+ {}
inline interval_data(coordinate_type low, coordinate_type high)
-#ifndef BOOST_POLYGON_MSVC
- :coords_()
-#endif
+#ifndef BOOST_POLYGON_MSVC
+ :coords_()
+#endif
{
- coords_[LOW] = low; coords_[HIGH] = high;
+ coords_[LOW] = low; coords_[HIGH] = high;
}
inline interval_data(const interval_data& that)
-#ifndef BOOST_POLYGON_MSVC
- :coords_()
-#endif
+#ifndef BOOST_POLYGON_MSVC
+ :coords_()
+#endif
{
- (*this) = that;
+ (*this) = that;
}
inline interval_data& operator=(const interval_data& that) {
- coords_[0] = that.coords_[0]; coords_[1] = that.coords_[1]; return *this;
+ coords_[0] = that.coords_[0]; coords_[1] = that.coords_[1]; return *this;
}
template <typename T2>
inline interval_data& operator=(const T2& rvalue);
inline coordinate_type get(direction_1d dir) const {
- return coords_[dir.to_int()];
+ return coords_[dir.to_int()];
}
inline coordinate_type low() const { return coords_[0]; }
inline coordinate_type high() const { return coords_[1]; }
@@ -56,10 +56,10 @@
inline bool operator>(const interval_data& that) const { return that < *this; }
inline bool operator>=(const interval_data& that) const { return !((*this) < that); }
inline void set(direction_1d dir, coordinate_type value) {
- coords_[dir.to_int()] = value;
+ coords_[dir.to_int()] = value;
}
private:
- coordinate_type coords_[2];
+ coordinate_type coords_[2];
};
}
Modified: trunk/boost/polygon/interval_traits.hpp
==============================================================================
--- trunk/boost/polygon/interval_traits.hpp (original)
+++ trunk/boost/polygon/interval_traits.hpp 2012-05-09 15:33:59 EDT (Wed, 09 May 2012)
@@ -1,6 +1,6 @@
/*
Copyright 2008 Intel Corporation
-
+
Use, modification and distribution are subject to the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
@@ -13,21 +13,20 @@
typedef typename T::coordinate_type coordinate_type;
static inline coordinate_type get(const T& interval, direction_1d dir) {
- return interval.get(dir);
+ return interval.get(dir);
}
};
template <typename T>
struct interval_mutable_traits {
static inline void set(T& interval, direction_1d dir, typename interval_traits<T>::coordinate_type value) {
- interval.set(dir, value);
+ interval.set(dir, value);
}
- static inline T construct(typename interval_traits<T>::coordinate_type low_value,
+ static inline T construct(typename interval_traits<T>::coordinate_type low_value,
typename interval_traits<T>::coordinate_type high_value) {
- return T(low_value, high_value);
+ return T(low_value, high_value);
}
};
}
}
#endif
-
Modified: trunk/boost/polygon/isotropy.hpp
==============================================================================
--- trunk/boost/polygon/isotropy.hpp (original)
+++ trunk/boost/polygon/isotropy.hpp 2012-05-09 15:33:59 EDT (Wed, 09 May 2012)
@@ -1,6 +1,6 @@
/*
Copyright 2008 Intel Corporation
-
+
Use, modification and distribution are subject to the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
@@ -26,7 +26,7 @@
#ifndef BOOST_POLYGON_NO_DEPS
-#include <boost/config.hpp>
+#include <boost/config.hpp>
#ifdef BOOST_MSVC
#define BOOST_POLYGON_MSVC
#endif
@@ -58,7 +58,7 @@
typedef long long polygon_long_long_type;
typedef unsigned long long polygon_ulong_long_type;
- namespace boost {
+ namespace boost {
template <bool B, class T = void>
struct enable_if_c {
typedef T type;
@@ -67,7 +67,7 @@
template <class T>
struct enable_if_c<false, T> {};
- template <class Cond, class T = void>
+ template <class Cond, class T = void>
struct enable_if : public enable_if_c<Cond::value, T> {};
template <bool B, class T>
@@ -78,7 +78,7 @@
template <class T>
struct lazy_enable_if_c<false, T> {};
- template <class Cond, class T>
+ template <class Cond, class T>
struct lazy_enable_if : public lazy_enable_if_c<Cond::value, T> {};
@@ -90,7 +90,7 @@
template <class T>
struct disable_if_c<true, T> {};
- template <class Cond, class T = void>
+ template <class Cond, class T = void>
struct disable_if : public disable_if_c<Cond::value, T> {};
template <bool B, class T>
@@ -101,7 +101,7 @@
template <class T>
struct lazy_disable_if_c<true, T> {};
- template <class Cond, class T>
+ template <class Cond, class T>
struct lazy_disable_if : public lazy_disable_if_c<Cond::value, T> {};
}
@@ -129,13 +129,13 @@
struct undefined_concept {};
template <typename T>
- struct geometry_concept { typedef undefined_concept type; };
+ struct geometry_concept { typedef undefined_concept type; };
template <typename GCT, typename T>
struct view_of {};
template <typename T1, typename T2>
- view_of<T1, T2> view_as(const T2& obj) { return view_of<T1, T2>(obj); }
+ view_of<T1, T2> view_as(const T2& obj) { return view_of<T1, T2>(obj); }
template <typename T>
struct coordinate_traits {};
@@ -323,13 +323,13 @@
template <typename domain_type, typename coordinate_type>
struct area_type_by_domain { typedef typename coordinate_traits<coordinate_type>::area_type type; };
template <typename coordinate_type>
- struct area_type_by_domain<manhattan_domain, coordinate_type> {
+ struct area_type_by_domain<manhattan_domain, coordinate_type> {
typedef typename coordinate_traits<coordinate_type>::manhattan_area_type type; };
struct y_c_edist : gtl_yes {};
template <typename coordinate_type_1, typename coordinate_type_2>
- typename enable_if<
+ typename enable_if<
typename gtl_and_3<y_c_edist, typename gtl_same_type<typename geometry_concept<coordinate_type_1>::type, coordinate_concept>::type,
typename gtl_same_type<typename geometry_concept<coordinate_type_1>::type, coordinate_concept>::type>::type,
typename coordinate_traits<coordinate_type_1>::coordinate_difference>::type
@@ -392,7 +392,7 @@
inline direction_1d(const direction_1d_enum val) : val_(val) {}
explicit inline direction_1d(const direction_2d& that);
explicit inline direction_1d(const direction_3d& that);
- inline direction_1d& operator = (const direction_1d& d) {
+ inline direction_1d& operator = (const direction_1d& d) {
val_ = d.val_; return * this; }
inline bool operator==(direction_1d d) const { return (val_ == d.val_); }
inline bool operator!=(direction_1d d) const { return !((*this) == d); }
@@ -435,7 +435,7 @@
inline direction_2d() : val_(WEST) {}
inline direction_2d(const direction_2d& that) : val_(that.val_) {}
-
+
inline direction_2d(const direction_2d_enum val) : val_(val) {}
inline direction_2d& operator=(const direction_2d& d) {
@@ -498,7 +498,7 @@
explicit inline orientation_3d(const direction_2d& that);
explicit inline orientation_3d(const direction_3d& that);
inline ~orientation_3d() { }
- inline orientation_3d& operator=(const orientation_3d& ori) {
+ inline orientation_3d& operator=(const orientation_3d& ori) {
val_ = ori.val_; return * this; }
inline bool operator==(orientation_3d that) const { return (val_ == that.val_); }
inline bool operator!=(orientation_3d that) const { return (val_ != that.val_); }
@@ -516,7 +516,7 @@
inline direction_3d(direction_2d that) : val_(that.to_int()) {}
inline direction_3d(const direction_3d& that) : val_(that.val_) {}
-
+
inline direction_3d(const direction_2d_enum val) : val_(val) {}
inline direction_3d(const direction_3d_enum val) : val_(val) {}
@@ -560,4 +560,3 @@
}
}
#endif
-
Modified: trunk/boost/polygon/point_3d_concept.hpp
==============================================================================
--- trunk/boost/polygon/point_3d_concept.hpp (original)
+++ trunk/boost/polygon/point_3d_concept.hpp 2012-05-09 15:33:59 EDT (Wed, 09 May 2012)
@@ -1,6 +1,6 @@
/*
Copyright 2008 Intel Corporation
-
+
Use, modification and distribution are subject to the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
@@ -12,7 +12,7 @@
#include "point_3d_traits.hpp"
namespace boost { namespace polygon{
struct point_3d_concept {};
-
+
template <typename T>
struct is_point_3d_concept { typedef gtl_no type; };
template <>
@@ -38,7 +38,7 @@
template <typename T, typename CT>
struct point_3d_difference_type_by_concept { typedef void type; };
template <typename T>
- struct point_3d_difference_type_by_concept<T, gtl_yes> {
+ struct point_3d_difference_type_by_concept<T, gtl_yes> {
typedef typename coordinate_traits<typename point_3d_coordinate_type<T>::type>::coordinate_difference type; };
template <typename T>
@@ -50,7 +50,7 @@
template <typename T, typename CT>
struct point_3d_distance_type_by_concept { typedef void type; };
template <typename T>
- struct point_3d_distance_type_by_concept<T, gtl_yes> {
+ struct point_3d_distance_type_by_concept<T, gtl_yes> {
typedef typename coordinate_traits<typename point_3d_coordinate_type<T>::type>::coordinate_distance type; };
template <typename T>
@@ -63,9 +63,9 @@
template <typename T>
typename enable_if< typename gtl_and<y_p3d_get, typename is_point_3d_concept<typename geometry_concept<T>::type>::type>::type,
- typename point_3d_coordinate_type<T>::type >::type
+ typename point_3d_coordinate_type<T>::type >::type
get(const T& point, orientation_3d orient) { return point_3d_traits<T>::get(point, orient); }
-
+
struct y_p3d_set : gtl_yes {};
template <typename T, typename coordinate_type>
@@ -86,11 +86,11 @@
return point_3d_mutable_traits<T>::construct(x_value, y_value, z_value); }
struct y_p3d_assign : gtl_yes {};
-
+
template <typename point_3d_type_1, typename point_3d_type_2>
typename enable_if<
- typename gtl_and_3<y_p3d_assign, typename is_mutable_point_3d_concept<typename geometry_concept<point_3d_type_1>::type>::type,
- typename is_point_3d_concept<typename geometry_concept<point_3d_type_2>::type>::type>::type,
+ typename gtl_and_3<y_p3d_assign, typename is_mutable_point_3d_concept<typename geometry_concept<point_3d_type_1>::type>::type,
+ typename is_point_3d_concept<typename geometry_concept<point_3d_type_2>::type>::type>::type,
point_3d_type_1>::type &
assign(point_3d_type_1& lvalue, const point_3d_type_2& rvalue) {
set(lvalue, HORIZONTAL, get(rvalue, HORIZONTAL));
@@ -102,8 +102,8 @@
struct y_p3d_z : gtl_yes {};
template <typename point_type>
- typename enable_if< typename gtl_and<y_p3d_z, typename is_point_3d_concept<typename geometry_concept<point_type>::type>::type>::type,
- typename point_3d_coordinate_type<point_type>::type >::type
+ typename enable_if< typename gtl_and<y_p3d_z, typename is_point_3d_concept<typename geometry_concept<point_type>::type>::type>::type,
+ typename point_3d_coordinate_type<point_type>::type >::type
z(const point_type& point) { return get(point, PROXIMAL); }
struct y_p3d_x : gtl_yes {};
@@ -128,7 +128,7 @@
template <typename T, typename T2>
typename enable_if<
- typename gtl_and_3<y_p3d_equiv, typename gtl_same_type<point_3d_concept, typename geometry_concept<T>::type>::type,
+ typename gtl_and_3<y_p3d_equiv, typename gtl_same_type<point_3d_concept, typename geometry_concept<T>::type>::type,
typename gtl_same_type<point_3d_concept, typename geometry_concept<T2>::type>::type>::type,
bool>::type
equivalence(const T& point1, const T2& point2) {
@@ -138,8 +138,8 @@
struct y_p3d_dist : gtl_yes {};
template <typename point_type_1, typename point_type_2>
- typename enable_if< typename gtl_and_3<y_p3d_dist, typename is_point_3d_concept<typename geometry_concept<point_type_1>::type>::type,
- typename is_point_3d_concept<typename geometry_concept<point_type_2>::type>::type>::type,
+ typename enable_if< typename gtl_and_3<y_p3d_dist, typename is_point_3d_concept<typename geometry_concept<point_type_1>::type>::type,
+ typename is_point_3d_concept<typename geometry_concept<point_type_2>::type>::type>::type,
typename point_3d_difference_type<point_type_1>::type>::type
euclidean_distance(const point_type_1& point1, const point_type_2& point2, orientation_3d orient) {
typedef typename coordinate_traits<typename point_3d_coordinate_type<point_type_1>::type>::coordinate_difference return_type;
@@ -151,33 +151,33 @@
struct y_p3d_man_dist : gtl_yes {};
template <typename point_type_1, typename point_type_2>
- typename enable_if< typename gtl_and_3<y_p3d_man_dist, typename gtl_same_type<point_3d_concept, typename geometry_concept<point_type_1>::type>::type,
+ typename enable_if< typename gtl_and_3<y_p3d_man_dist, typename gtl_same_type<point_3d_concept, typename geometry_concept<point_type_1>::type>::type,
typename gtl_same_type<point_3d_concept, typename geometry_concept<point_type_2>::type>::type>::type,
typename point_3d_difference_type<point_type_1>::type>::type
manhattan_distance(const point_type_1& point1, const point_type_2& point2) {
- return euclidean_distance(point1, point2, HORIZONTAL) + euclidean_distance(point1, point2, VERTICAL)
+ return euclidean_distance(point1, point2, HORIZONTAL) + euclidean_distance(point1, point2, VERTICAL)
+ euclidean_distance(point1, point2, PROXIMAL);
}
struct y_p3d_dist2 : gtl_yes {};
template <typename point_type_1, typename point_type_2>
- typename enable_if< typename gtl_and_3< y_p3d_dist2,
- typename gtl_same_type<point_3d_concept, typename geometry_concept<point_type_1>::type>::type,
+ typename enable_if< typename gtl_and_3< y_p3d_dist2,
+ typename gtl_same_type<point_3d_concept, typename geometry_concept<point_type_1>::type>::type,
typename gtl_same_type<point_3d_concept, typename geometry_concept<point_type_2>::type>::type>::type,
typename point_3d_distance_type<point_type_1>::type>::type
euclidean_distance(const point_type_1& point1, const point_type_2& point2) {
typedef typename coordinate_traits<typename point_3d_coordinate_type<point_type_1>::type>::coordinate_distance return_value;
return_value pdist = (return_value)euclidean_distance(point1, point2, PROXIMAL);
pdist *= pdist;
- return sqrt((double)(distance_squared(point1, point2) + pdist));
+ return std::sqrt((double)(distance_squared(point1, point2) + pdist));
}
-
+
struct y_p3d_convolve : gtl_yes {};
template <typename point_type_1, typename point_type_2>
typename enable_if< typename gtl_and_3< y_p3d_convolve,
- typename is_mutable_point_3d_concept<typename geometry_concept<point_type_1>::type>::type,
+ typename is_mutable_point_3d_concept<typename geometry_concept<point_type_1>::type>::type,
typename gtl_same_type<point_3d_concept, typename geometry_concept<point_type_2>::type>::type>::type,
point_type_1>::type &
convolve(point_type_1& lvalue, const point_type_2& rvalue) {
@@ -186,12 +186,12 @@
z(lvalue, z(lvalue) + z(rvalue));
return lvalue;
}
-
+
struct y_p3d_deconvolve : gtl_yes {};
template <typename point_type_1, typename point_type_2>
typename enable_if<
- typename gtl_and_3<y_p3d_deconvolve, typename is_mutable_point_3d_concept<typename geometry_concept<point_type_1>::type>::type,
+ typename gtl_and_3<y_p3d_deconvolve, typename is_mutable_point_3d_concept<typename geometry_concept<point_type_1>::type>::type,
typename gtl_same_type<point_3d_concept, typename geometry_concept<point_type_2>::type>::type>::type,
point_type_1>::type &
deconvolve(point_type_1& lvalue, const point_type_2& rvalue) {
@@ -204,9 +204,9 @@
struct y_p3d_scale_up : gtl_yes {};
template <typename point_type>
- typename enable_if< typename gtl_and<y_p3d_scale_up, typename is_mutable_point_3d_concept<typename geometry_concept<point_type>::type>::type>::type,
+ typename enable_if< typename gtl_and<y_p3d_scale_up, typename is_mutable_point_3d_concept<typename geometry_concept<point_type>::type>::type>::type,
point_type>::type &
- scale_up(point_type& point,
+ scale_up(point_type& point,
typename coordinate_traits<typename point_3d_coordinate_type<point_type>::type>::unsigned_area_type factor) {
x(point, x(point) * (typename point_3d_coordinate_type<point_type>::type)factor);
y(point, y(point) * (typename point_3d_coordinate_type<point_type>::type)factor);
@@ -217,24 +217,24 @@
struct y_p3d_scale_down : gtl_yes {};
template <typename point_type>
- typename enable_if< typename gtl_and<y_p3d_scale_down, typename is_mutable_point_3d_concept<typename geometry_concept<point_type>::type>::type>::type,
+ typename enable_if< typename gtl_and<y_p3d_scale_down, typename is_mutable_point_3d_concept<typename geometry_concept<point_type>::type>::type>::type,
point_type>::type &
- scale_down(point_type& point,
+ scale_down(point_type& point,
typename coordinate_traits<typename point_3d_coordinate_type<point_type>::type>::unsigned_area_type factor) {
typedef typename point_3d_coordinate_type<point_type>::type Unit;
typedef typename coordinate_traits<Unit>::coordinate_distance dt;
- x(point, scaling_policy<Unit>::round((dt)(x(point)) / (dt)factor));
- y(point, scaling_policy<Unit>::round((dt)(y(point)) / (dt)factor));
- z(point, scaling_policy<Unit>::round((dt)(z(point)) / (dt)factor));
+ x(point, scaling_policy<Unit>::round((dt)(x(point)) / (dt)factor));
+ y(point, scaling_policy<Unit>::round((dt)(y(point)) / (dt)factor));
+ z(point, scaling_policy<Unit>::round((dt)(z(point)) / (dt)factor));
return point;
}
struct y_p3d_scale : gtl_yes {};
template <typename point_type, typename scaling_type>
- typename enable_if< typename gtl_and<y_p3d_scale, typename is_mutable_point_3d_concept<typename geometry_concept<point_type>::type>::type>::type,
+ typename enable_if< typename gtl_and<y_p3d_scale, typename is_mutable_point_3d_concept<typename geometry_concept<point_type>::type>::type>::type,
point_type>::type &
- scale(point_type& point,
+ scale(point_type& point,
const scaling_type& scaling) {
typedef typename point_3d_coordinate_type<point_type>::type Unit;
Unit x_(x(point)), y_(y(point)), z_(z(point));
@@ -248,7 +248,7 @@
struct y_p3d_transform : gtl_yes {};
template <typename point_type, typename transformation_type>
- typename enable_if< typename gtl_and<y_p3d_transform, typename is_mutable_point_3d_concept<typename geometry_concept<point_type>::type>::type>::type,
+ typename enable_if< typename gtl_and<y_p3d_transform, typename is_mutable_point_3d_concept<typename geometry_concept<point_type>::type>::type>::type,
point_type>::type &
transform(point_type& point, const transformation_type& transformation) {
typedef typename point_3d_coordinate_type<point_type>::type Unit;
Modified: trunk/boost/polygon/point_3d_data.hpp
==============================================================================
--- trunk/boost/polygon/point_3d_data.hpp (original)
+++ trunk/boost/polygon/point_3d_data.hpp 2012-05-09 15:33:59 EDT (Wed, 09 May 2012)
@@ -1,6 +1,6 @@
/*
Copyright 2008 Intel Corporation
-
+
Use, modification and distribution are subject to the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
@@ -12,7 +12,7 @@
class point_3d_data {
public:
typedef T coordinate_type;
- inline point_3d_data():coords_(){}
+ inline point_3d_data():coords_(){}
inline point_3d_data(coordinate_type x, coordinate_type y):coords_() {
coords_[HORIZONTAL] = x; coords_[VERTICAL] = y; coords_[PROXIMAL] = 0; }
inline point_3d_data(coordinate_type x, coordinate_type y, coordinate_type z)
@@ -23,7 +23,7 @@
coords_[HORIZONTAL] = x; coords_[VERTICAL] = y; coords_[PROXIMAL] = z; }
inline point_3d_data(const point_3d_data& that):coords_() { (*this) = that; }
inline point_3d_data& operator=(const point_3d_data& that) {
- coords_[0] = that.coords_[0]; coords_[1] = that.coords_[1];
+ coords_[0] = that.coords_[0]; coords_[1] = that.coords_[1];
coords_[2] = that.coords_[2]; return *this; }
template <typename T2>
inline point_3d_data& operator=(const T2& rvalue);
@@ -42,10 +42,8 @@
inline void set(orientation_3d orient, coordinate_type value) {
coords_[orient.to_int()] = value; }
private:
- coordinate_type coords_[3];
+ coordinate_type coords_[3];
};
}
}
#endif
-
-
Modified: trunk/boost/polygon/point_3d_traits.hpp
==============================================================================
--- trunk/boost/polygon/point_3d_traits.hpp (original)
+++ trunk/boost/polygon/point_3d_traits.hpp 2012-05-09 15:33:59 EDT (Wed, 09 May 2012)
@@ -23,7 +23,7 @@
struct point_3d_mutable_traits {
static inline void set(T& point, orientation_3d orient, typename point_3d_traits<T>::coordinate_type value) {
point.set(orient, value); }
-
+
static inline T construct(typename point_3d_traits<T>::coordinate_type x_value,
typename point_3d_traits<T>::coordinate_type y_value,
typename point_3d_traits<T>::coordinate_type z_value) {
@@ -32,4 +32,3 @@
}
}
#endif
-
Modified: trunk/boost/polygon/point_concept.hpp
==============================================================================
--- trunk/boost/polygon/point_concept.hpp (original)
+++ trunk/boost/polygon/point_concept.hpp 2012-05-09 15:33:59 EDT (Wed, 09 May 2012)
@@ -1,6 +1,6 @@
/*
Copyright 2008 Intel Corporation
-
+
Use, modification and distribution are subject to the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
@@ -13,7 +13,7 @@
namespace boost { namespace polygon{
struct point_concept {};
-
+
template <typename T>
struct is_point_concept { typedef gtl_no type; };
template <>
@@ -41,7 +41,7 @@
template <typename T, typename CT>
struct point_difference_type_by_concept { typedef void type; };
template <typename T>
- struct point_difference_type_by_concept<T, gtl_yes> {
+ struct point_difference_type_by_concept<T, gtl_yes> {
typedef typename coordinate_traits<typename point_coordinate_type<T>::type>::coordinate_difference type; };
template <typename T>
@@ -53,7 +53,7 @@
template <typename T, typename CT>
struct point_distance_type_by_concept { typedef void type; };
template <typename T>
- struct point_distance_type_by_concept<T, gtl_yes> {
+ struct point_distance_type_by_concept<T, gtl_yes> {
typedef typename coordinate_traits<typename point_coordinate_type<T>::type>::coordinate_distance type; };
template <typename T>
@@ -65,7 +65,7 @@
struct y_pt_get : gtl_yes {};
template <typename T>
- typename enable_if< typename gtl_and<y_pt_get, typename is_point_concept<typename geometry_concept<T>::type>::type>::type,
+ typename enable_if< typename gtl_and<y_pt_get, typename is_point_concept<typename geometry_concept<T>::type>::type>::type,
typename point_coordinate_type<T>::type >::type
get(const T& point, orientation_2d orient) {
return point_traits<T>::get(point, orient);
@@ -74,7 +74,7 @@
struct y_pt_set : gtl_yes {};
template <typename T, typename coordinate_type>
- typename enable_if< typename gtl_and<y_pt_set, typename is_mutable_point_concept<typename geometry_concept<T>::type>::type>::type,
+ typename enable_if< typename gtl_and<y_pt_set, typename is_mutable_point_concept<typename geometry_concept<T>::type>::type>::type,
void>::type
set(T& point, orientation_2d orient, coordinate_type value) {
point_mutable_traits<T>::set(point, orient, value);
@@ -83,10 +83,10 @@
struct y_pt_construct : gtl_yes {};
template <typename T, typename coordinate_type1, typename coordinate_type2>
- typename enable_if< typename gtl_and<y_pt_construct, typename is_mutable_point_concept<typename geometry_concept<T>::type>::type>::type,
+ typename enable_if< typename gtl_and<y_pt_construct, typename is_mutable_point_concept<typename geometry_concept<T>::type>::type>::type,
T>::type
construct(coordinate_type1 x_value, coordinate_type2 y_value) {
- return point_mutable_traits<T>::construct(x_value, y_value);
+ return point_mutable_traits<T>::construct(x_value, y_value);
}
struct y_pt_assign : gtl_yes {};
@@ -94,8 +94,8 @@
template <typename T1, typename T2>
typename enable_if<typename gtl_and_3<
y_pt_assign,
- typename is_mutable_point_concept<typename geometry_concept<T1>::type>::type,
- typename is_point_concept<typename geometry_concept<T2>::type>::type>::type,
+ typename is_mutable_point_concept<typename geometry_concept<T1>::type>::type,
+ typename is_point_concept<typename geometry_concept<T2>::type>::type>::type,
T1>::type &
assign(T1& lvalue, const T2& rvalue) {
set(lvalue, HORIZONTAL, get(rvalue, HORIZONTAL));
@@ -106,8 +106,8 @@
struct y_p_x : gtl_yes {};
template <typename point_type>
- typename enable_if< typename gtl_and<y_p_x, typename is_point_concept<typename geometry_concept<point_type>::type>::type>::type,
- typename point_coordinate_type<point_type>::type >::type
+ typename enable_if< typename gtl_and<y_p_x, typename is_point_concept<typename geometry_concept<point_type>::type>::type>::type,
+ typename point_coordinate_type<point_type>::type >::type
x(const point_type& point) {
return get(point, HORIZONTAL);
}
@@ -115,8 +115,8 @@
struct y_p_y : gtl_yes {};
template <typename point_type>
- typename enable_if< typename gtl_and<y_p_y, typename is_point_concept<typename geometry_concept<point_type>::type>::type>::type,
- typename point_coordinate_type<point_type>::type >::type
+ typename enable_if< typename gtl_and<y_p_y, typename is_point_concept<typename geometry_concept<point_type>::type>::type>::type,
+ typename point_coordinate_type<point_type>::type >::type
y(const point_type& point) {
return get(point, VERTICAL);
}
@@ -125,7 +125,7 @@
template <typename point_type, typename coordinate_type>
typename enable_if<typename gtl_and<y_p_sx, typename is_mutable_point_concept<typename geometry_concept<point_type>::type>::type>::type,
- void>::type
+ void>::type
x(point_type& point, coordinate_type value) {
set(point, HORIZONTAL, value);
}
@@ -134,7 +134,7 @@
template <typename point_type, typename coordinate_type>
typename enable_if<typename gtl_and<y_p_sy, typename is_mutable_point_concept<typename geometry_concept<point_type>::type>::type>::type,
- void>::type
+ void>::type
y(point_type& point, coordinate_type value) {
set(point, VERTICAL, value);
}
@@ -143,7 +143,7 @@
template <typename T, typename T2>
typename enable_if<typename gtl_and_3<y_pt_equiv,
- typename gtl_same_type<point_concept, typename geometry_concept<T>::type>::type,
+ typename gtl_same_type<point_concept, typename geometry_concept<T>::type>::type,
typename is_point_concept<typename geometry_concept<T2>::type>::type>::type,
bool>::type
equivalence(const T& point1, const T2& point2) {
@@ -159,17 +159,17 @@
template <typename point_type_1, typename point_type_2>
typename enable_if< typename gtl_and_3<
y_pt_man_dist,
- typename gtl_same_type<point_concept, typename geometry_concept<point_type_1>::type>::type,
+ typename gtl_same_type<point_concept, typename geometry_concept<point_type_1>::type>::type,
typename is_point_concept<typename geometry_concept<point_type_2>::type>::type>::type,
typename point_difference_type<point_type_1>::type>::type
manhattan_distance(const point_type_1& point1, const point_type_2& point2) {
return euclidean_distance(point1, point2, HORIZONTAL) + euclidean_distance(point1, point2, VERTICAL);
}
-
+
struct y_pt_ed1 : gtl_yes {};
template <typename point_type_1, typename point_type_2>
- typename enable_if< typename gtl_and_3<y_pt_ed1, typename is_point_concept<typename geometry_concept<point_type_1>::type>::type,
+ typename enable_if< typename gtl_and_3<y_pt_ed1, typename is_point_concept<typename geometry_concept<point_type_1>::type>::type,
typename is_point_concept<typename geometry_concept<point_type_2>::type>::type>::type,
typename point_difference_type<point_type_1>::type>::type
euclidean_distance(const point_type_1& point1, const point_type_2& point2, orientation_2d orient) {
@@ -177,7 +177,7 @@
get(point1, orient) - get(point2, orient);
return return_value < 0 ? (typename coordinate_traits<typename point_coordinate_type<point_type_1>::type>::coordinate_difference)-return_value : return_value;
}
-
+
struct y_pt_ed2 : gtl_yes {};
template <typename point_type_1, typename point_type_2>
@@ -186,11 +186,11 @@
typename point_distance_type<point_type_1>::type>::type
euclidean_distance(const point_type_1& point1, const point_type_2& point2) {
typedef typename point_coordinate_type<point_type_1>::type Unit;
- return sqrt((double)(distance_squared(point1, point2)));
+ return std::sqrt((double)(distance_squared(point1, point2)));
}
struct y_pt_eds : gtl_yes {};
-
+
template <typename point_type_1, typename point_type_2>
typename enable_if< typename gtl_and_3<
y_pt_eds,
@@ -211,7 +211,7 @@
template <typename point_type_1, typename point_type_2>
typename enable_if< typename gtl_and_3<
y_pt_convolve,
- typename is_mutable_point_concept<typename geometry_concept<point_type_1>::type>::type,
+ typename is_mutable_point_concept<typename geometry_concept<point_type_1>::type>::type,
typename is_point_concept<typename geometry_concept<point_type_2>::type>::type>::type,
point_type_1>::type &
convolve(point_type_1& lvalue, const point_type_2& rvalue) {
@@ -225,7 +225,7 @@
template <typename point_type_1, typename point_type_2>
typename enable_if< typename gtl_and_3<
y_pt_deconvolve,
- typename is_mutable_point_concept<typename geometry_concept<point_type_1>::type>::type,
+ typename is_mutable_point_concept<typename geometry_concept<point_type_1>::type>::type,
typename is_point_concept<typename geometry_concept<point_type_2>::type>::type>::type,
point_type_1>::type &
deconvolve(point_type_1& lvalue, const point_type_2& rvalue) {
@@ -235,9 +235,9 @@
}
struct y_pt_scale_up : gtl_yes {};
-
+
template <typename point_type, typename coord_type>
- typename enable_if< typename gtl_and<y_pt_scale_up, typename is_mutable_point_concept<typename geometry_concept<point_type>::type>::type>::type,
+ typename enable_if< typename gtl_and<y_pt_scale_up, typename is_mutable_point_concept<typename geometry_concept<point_type>::type>::type>::type,
point_type>::type &
scale_up(point_type& point, coord_type factor) {
typedef typename point_coordinate_type<point_type>::type Unit;
@@ -249,20 +249,20 @@
struct y_pt_scale_down : gtl_yes {};
template <typename point_type, typename coord_type>
- typename enable_if< typename gtl_and<y_pt_scale_down, typename is_mutable_point_concept<typename geometry_concept<point_type>::type>::type>::type,
+ typename enable_if< typename gtl_and<y_pt_scale_down, typename is_mutable_point_concept<typename geometry_concept<point_type>::type>::type>::type,
point_type>::type &
scale_down(point_type& point, coord_type factor) {
typedef typename point_coordinate_type<point_type>::type Unit;
typedef typename coordinate_traits<Unit>::coordinate_distance dt;
- x(point, scaling_policy<Unit>::round((dt)((dt)(x(point)) / (dt)factor)));
- y(point, scaling_policy<Unit>::round((dt)((dt)(y(point)) / (dt)factor)));
+ x(point, scaling_policy<Unit>::round((dt)((dt)(x(point)) / (dt)factor)));
+ y(point, scaling_policy<Unit>::round((dt)((dt)(y(point)) / (dt)factor)));
return point;
}
struct y_pt_scale : gtl_yes {};
template <typename point_type, typename scaling_type>
- typename enable_if< typename gtl_and<y_pt_scale, typename is_mutable_point_concept<typename geometry_concept<point_type>::type>::type>::type,
+ typename enable_if< typename gtl_and<y_pt_scale, typename is_mutable_point_concept<typename geometry_concept<point_type>::type>::type>::type,
point_type>::type &
scale(point_type& point, const scaling_type& scaling) {
typedef typename point_coordinate_type<point_type>::type Unit;
@@ -276,7 +276,7 @@
struct y_pt_transform : gtl_yes {};
template <typename point_type, typename transformation_type>
- typename enable_if< typename gtl_and<y_pt_transform, typename is_mutable_point_concept<typename geometry_concept<point_type>::type>::type>::type,
+ typename enable_if< typename gtl_and<y_pt_transform, typename is_mutable_point_concept<typename geometry_concept<point_type>::type>::type>::type,
point_type>::type &
transform(point_type& point, const transformation_type& transformation) {
typedef typename point_coordinate_type<point_type>::type Unit;
@@ -290,7 +290,7 @@
struct y_pt_move : gtl_yes {};
template <typename point_type>
- typename enable_if< typename gtl_and<y_pt_move, typename is_mutable_point_concept<typename geometry_concept<point_type>::type>::type>::type,
+ typename enable_if< typename gtl_and<y_pt_move, typename is_mutable_point_concept<typename geometry_concept<point_type>::type>::type>::type,
point_type>::type &
move(point_type& point, orientation_2d orient,
typename point_coordinate_type<point_type>::type displacement) {
@@ -314,4 +314,3 @@
}
}
#endif
-
Modified: trunk/boost/polygon/point_data.hpp
==============================================================================
--- trunk/boost/polygon/point_data.hpp (original)
+++ trunk/boost/polygon/point_data.hpp 2012-05-09 15:33:59 EDT (Wed, 09 May 2012)
@@ -1,6 +1,6 @@
/*
Copyright 2008 Intel Corporation
-
+
Use, modification and distribution are subject to the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
@@ -18,34 +18,34 @@
typedef T coordinate_type;
inline point_data()
#ifndef BOOST_POLYGON_MSVC
- :coords_()
+ :coords_()
#endif
- {}
+ {}
inline point_data(coordinate_type x, coordinate_type y)
#ifndef BOOST_POLYGON_MSVC
- :coords_()
+ :coords_()
#endif
{
- coords_[HORIZONTAL] = x; coords_[VERTICAL] = y;
+ coords_[HORIZONTAL] = x; coords_[VERTICAL] = y;
}
inline point_data(const point_data& that)
#ifndef BOOST_POLYGON_MSVC
- :coords_()
+ :coords_()
#endif
{ (*this) = that; }
template <typename other>
point_data(const other& that)
#ifndef BOOST_POLYGON_MSVC
- :coords_()
+ :coords_()
#endif
{ (*this) = that; }
inline point_data& operator=(const point_data& that) {
- coords_[0] = that.coords_[0]; coords_[1] = that.coords_[1]; return *this;
+ coords_[0] = that.coords_[0]; coords_[1] = that.coords_[1]; return *this;
}
template<typename T1, typename T2>
inline point_data(const T1& x, const T2& y)
#ifndef BOOST_POLYGON_MSVC
- :coords_()
+ :coords_()
#endif
{
coords_[HORIZONTAL] = (coordinate_type)x;
@@ -54,7 +54,7 @@
template <typename T2>
inline point_data(const point_data<T2>& rvalue)
#ifndef BOOST_POLYGON_MSVC
- :coords_()
+ :coords_()
#endif
{
coords_[HORIZONTAL] = (coordinate_type)(rvalue.x());
@@ -76,10 +76,10 @@
inline bool operator>(const point_data& that) const { return that < *this; }
inline bool operator>=(const point_data& that) const { return !((*this) < that); }
inline coordinate_type get(orientation_2d orient) const {
- return coords_[orient.to_int()];
+ return coords_[orient.to_int()];
}
inline void set(orientation_2d orient, coordinate_type value) {
- coords_[orient.to_int()] = value;
+ coords_[orient.to_int()] = value;
}
inline coordinate_type x() const {
return coords_[HORIZONTAL];
@@ -96,10 +96,9 @@
return *this;
}
private:
- coordinate_type coords_[2];
+ coordinate_type coords_[2];
};
}
}
#endif
-
Modified: trunk/boost/polygon/point_traits.hpp
==============================================================================
--- trunk/boost/polygon/point_traits.hpp (original)
+++ trunk/boost/polygon/point_traits.hpp 2012-05-09 15:33:59 EDT (Wed, 09 May 2012)
@@ -1,6 +1,6 @@
/*
Copyright 2008 Intel Corporation
-
+
Use, modification and distribution are subject to the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
@@ -14,22 +14,21 @@
template <typename T>
struct point_traits {
typedef typename T::coordinate_type coordinate_type;
-
+
static inline coordinate_type get(const T& point, orientation_2d orient) {
- return point.get(orient);
+ return point.get(orient);
}
};
template <typename T>
struct point_mutable_traits {
static inline void set(T& point, orientation_2d orient, typename point_traits<T>::coordinate_type value) {
- point.set(orient, value);
+ point.set(orient, value);
}
static inline T construct(typename point_traits<T>::coordinate_type x_value, typename point_traits<T>::coordinate_type y_value) {
- return T(x_value, y_value);
+ return T(x_value, y_value);
}
};
}
}
#endif
-
Modified: trunk/boost/polygon/polygon.hpp
==============================================================================
--- trunk/boost/polygon/polygon.hpp (original)
+++ trunk/boost/polygon/polygon.hpp 2012-05-09 15:33:59 EDT (Wed, 09 May 2012)
@@ -1,6 +1,6 @@
/*
Copyright 2008 Intel Corporation
-
+
Use, modification and distribution are subject to the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
Modified: trunk/boost/polygon/polygon_45_data.hpp
==============================================================================
--- trunk/boost/polygon/polygon_45_data.hpp (original)
+++ trunk/boost/polygon/polygon_45_data.hpp 2012-05-09 15:33:59 EDT (Wed, 09 May 2012)
@@ -1,6 +1,6 @@
/*
Copyright 2008 Intel Corporation
-
+
Use, modification and distribution are subject to the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
@@ -34,7 +34,7 @@
// copy constructor (since we have dynamic memory)
inline polygon_45_data(const polygon_45_data& that) : coords_(that.coords_) {}
-
+
// assignment operator (since we have dynamic memory do a deep copy)
inline polygon_45_data& operator=(const polygon_45_data& that) {
coords_ = that.coords_;
@@ -63,11 +63,10 @@
inline std::size_t size() const { return coords_.size(); }
public:
- std::vector<point_data<coordinate_type> > coords_;
+ std::vector<point_data<coordinate_type> > coords_;
};
}
}
#endif
-
Modified: trunk/boost/polygon/polygon_45_set_concept.hpp
==============================================================================
--- trunk/boost/polygon/polygon_45_set_concept.hpp (original)
+++ trunk/boost/polygon/polygon_45_set_concept.hpp 2012-05-09 15:33:59 EDT (Wed, 09 May 2012)
@@ -1,6 +1,6 @@
/*
Copyright 2008 Intel Corporation
-
+
Use, modification and distribution are subject to the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
@@ -28,14 +28,14 @@
begin_45_set_data(const polygon_set_type& polygon_set) {
return polygon_45_set_traits<polygon_set_type>::begin(polygon_set);
}
-
+
template <typename polygon_set_type>
typename enable_if< typename gtl_if<typename is_polygon_45_or_90_set_type<polygon_set_type>::type>::type,
typename polygon_45_set_traits<polygon_set_type>::iterator_type>::type
end_45_set_data(const polygon_set_type& polygon_set) {
return polygon_45_set_traits<polygon_set_type>::end(polygon_set);
}
-
+
template <typename polygon_set_type>
typename enable_if< typename gtl_if<typename is_polygon_45_set_type<polygon_set_type>::type>::type,
bool>::type
@@ -79,9 +79,9 @@
template <typename polygon_set_type_1, typename polygon_set_type_2>
typename enable_if< typename gtl_and_3<typename gtl_if<typename is_polygon_45_or_90_set_type<polygon_set_type_1>::type>::type,
typename gtl_if<typename is_polygon_45_or_90_set_type<polygon_set_type_2>::type>::type,
- typename gtl_if<typename is_either_polygon_45_set_type<polygon_set_type_1,
+ typename gtl_if<typename is_either_polygon_45_set_type<polygon_set_type_1,
polygon_set_type_2>::type>::type>::type,
- bool>::type
+ bool>::type
equivalence(const polygon_set_type_1& lvalue,
const polygon_set_type_2& rvalue) {
polygon_45_set_data<typename polygon_45_set_traits<polygon_set_type_1>::coordinate_type> ps1;
@@ -111,14 +111,14 @@
ps.clean();
return ps.empty();
}
-
+
//extents
template <typename polygon_set_type, typename rectangle_type>
typename enable_if<
typename gtl_and< typename gtl_if<typename is_mutable_polygon_45_set_type<polygon_set_type>::type>::type,
typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
bool>::type
- extents(rectangle_type& extents_rectangle,
+ extents(rectangle_type& extents_rectangle,
const polygon_set_type& polygon_set) {
clean(polygon_set);
polygon_45_set_data<typename polygon_45_set_traits<polygon_set_type>::coordinate_type> ps;
@@ -181,7 +181,7 @@
template <typename polygon_set_type, typename coord_type>
typename enable_if< typename is_mutable_polygon_45_set_type<polygon_set_type>::type,
polygon_set_type>::type &
- resize(polygon_set_type& polygon_set, coord_type resizing,
+ resize(polygon_set_type& polygon_set, coord_type resizing,
RoundingOption rounding = CLOSEST, CornerOption corner = INTERSECTION) {
typedef typename polygon_45_set_traits<polygon_set_type>::coordinate_type Unit;
clean(polygon_set);
@@ -195,7 +195,7 @@
template <typename polygon_set_type>
typename enable_if< typename is_mutable_polygon_45_set_type<polygon_set_type>::type,
polygon_set_type>::type &
- bloat(polygon_set_type& polygon_set,
+ bloat(polygon_set_type& polygon_set,
typename coordinate_traits<typename polygon_45_set_traits<polygon_set_type>::coordinate_type>::unsigned_area_type bloating) {
return resize(polygon_set, static_cast<typename polygon_45_set_traits<polygon_set_type>::coordinate_type>(bloating));
}
@@ -203,7 +203,7 @@
template <typename polygon_set_type>
typename enable_if< typename is_mutable_polygon_45_set_type<polygon_set_type>::type,
polygon_set_type>::type &
- shrink(polygon_set_type& polygon_set,
+ shrink(polygon_set_type& polygon_set,
typename coordinate_traits<typename polygon_45_set_traits<polygon_set_type>::coordinate_type>::unsigned_area_type shrinking) {
return resize(polygon_set, -(typename polygon_45_set_traits<polygon_set_type>::coordinate_type)shrinking);
}
@@ -211,7 +211,7 @@
template <typename polygon_set_type>
typename enable_if< typename is_mutable_polygon_45_set_type<polygon_set_type>::type,
polygon_set_type>::type &
- grow_and(polygon_set_type& polygon_set,
+ grow_and(polygon_set_type& polygon_set,
typename coordinate_traits<typename polygon_45_set_traits<polygon_set_type>::coordinate_type>::unsigned_area_type bloating) {
typedef typename polygon_45_set_traits<polygon_set_type>::coordinate_type Unit;
std::vector<polygon_45_data<Unit> > polys;
@@ -233,7 +233,7 @@
template <typename polygon_set_type>
typename enable_if< typename is_mutable_polygon_45_set_type<polygon_set_type>::type,
polygon_set_type>::type &
- scale_up(polygon_set_type& polygon_set,
+ scale_up(polygon_set_type& polygon_set,
typename coordinate_traits<typename polygon_45_set_traits<polygon_set_type>::coordinate_type>::unsigned_area_type factor) {
typedef typename polygon_45_set_traits<polygon_set_type>::coordinate_type Unit;
clean(polygon_set);
@@ -247,7 +247,7 @@
template <typename polygon_set_type>
typename enable_if< typename is_mutable_polygon_45_set_type<polygon_set_type>::type,
polygon_set_type>::type &
- scale_down(polygon_set_type& polygon_set,
+ scale_down(polygon_set_type& polygon_set,
typename coordinate_traits<typename polygon_45_set_traits<polygon_set_type>::coordinate_type>::unsigned_area_type factor) {
typedef typename polygon_45_set_traits<polygon_set_type>::coordinate_type Unit;
clean(polygon_set);
@@ -316,7 +316,7 @@
template <typename polygon_set_type>
typename enable_if< typename is_mutable_polygon_45_set_type<polygon_set_type>::type,
polygon_set_type>::type &
- keep(polygon_set_type& polygon_set,
+ keep(polygon_set_type& polygon_set,
typename coordinate_traits<typename polygon_45_set_traits<polygon_set_type>::coordinate_type>::area_type min_area,
typename coordinate_traits<typename polygon_45_set_traits<polygon_set_type>::coordinate_type>::area_type max_area,
typename coordinate_traits<typename polygon_45_set_traits<polygon_set_type>::coordinate_type>::unsigned_area_type min_width,
@@ -408,13 +408,13 @@
return polygon_set.end();
}
- static inline orientation_2d orient(const view_of<polygon_90_set_concept, T>& polygon_set) {
+ static inline orientation_2d orient(const view_of<polygon_90_set_concept, T>& polygon_set) {
return polygon_set.orient(); }
- static inline bool clean(const view_of<polygon_90_set_concept, T>& polygon_set) {
+ static inline bool clean(const view_of<polygon_90_set_concept, T>& polygon_set) {
return polygon_set.clean(); }
- static inline bool sorted(const view_of<polygon_90_set_concept, T>& polygon_set) {
+ static inline bool sorted(const view_of<polygon_90_set_concept, T>& polygon_set) {
return polygon_set.sorted(); }
};
Modified: trunk/boost/polygon/polygon_45_set_traits.hpp
==============================================================================
--- trunk/boost/polygon/polygon_45_set_traits.hpp (original)
+++ trunk/boost/polygon/polygon_45_set_traits.hpp 2012-05-09 15:33:59 EDT (Wed, 09 May 2012)
@@ -1,6 +1,6 @@
/*
Copyright 2008 Intel Corporation
-
+
Use, modification and distribution are subject to the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
@@ -43,13 +43,13 @@
typedef typename is_45_polygonal_concept<typename geometry_concept<T>::type>::type type;
};
template <typename T>
- struct is_polygon_45_set_type<std::list<T> > {
+ struct is_polygon_45_set_type<std::list<T> > {
typedef typename gtl_or<
typename is_45_polygonal_concept<typename geometry_concept<std::list<T> >::type>::type,
typename is_45_polygonal_concept<typename geometry_concept<typename std::list<T>::value_type>::type>::type>::type type;
};
template <typename T>
- struct is_polygon_45_set_type<std::vector<T> > {
+ struct is_polygon_45_set_type<std::vector<T> > {
typedef typename gtl_or<
typename is_45_polygonal_concept<typename geometry_concept<std::vector<T> >::type>::type,
typename is_45_polygonal_concept<typename geometry_concept<typename std::vector<T>::value_type>::type>::type>::type type;
@@ -60,13 +60,13 @@
typedef typename gtl_same_type<polygon_45_set_concept, typename geometry_concept<T>::type>::type type;
};
template <typename T>
- struct is_mutable_polygon_45_set_type<std::list<T> > {
+ struct is_mutable_polygon_45_set_type<std::list<T> > {
typedef typename gtl_or<
typename gtl_same_type<polygon_45_set_concept, typename geometry_concept<std::list<T> >::type>::type,
typename is_45_polygonal_concept<typename geometry_concept<typename std::list<T>::value_type>::type>::type>::type type;
};
template <typename T>
- struct is_mutable_polygon_45_set_type<std::vector<T> > {
+ struct is_mutable_polygon_45_set_type<std::vector<T> > {
typedef typename gtl_or<
typename gtl_same_type<polygon_45_set_concept, typename geometry_concept<std::vector<T> >::type>::type,
typename is_45_polygonal_concept<typename geometry_concept<typename std::vector<T>::value_type>::type>::type>::type type;
@@ -120,7 +120,7 @@
template <typename T>
struct polygon_45_set_mutable_traits<polygon_45_set_data<T> > {
template <typename input_iterator_type>
- static inline void set(polygon_45_set_data<T>& polygon_set,
+ static inline void set(polygon_45_set_data<T>& polygon_set,
input_iterator_type input_begin, input_iterator_type input_end) {
polygon_set.set(input_begin, input_end);
}
@@ -144,7 +144,6 @@
static inline bool sorted(const polygon_45_set_data<T>& polygon_set) { polygon_set.sort(); return true; }
};
-}
+}
}
#endif
-
Modified: trunk/boost/polygon/polygon_45_with_holes_data.hpp
==============================================================================
--- trunk/boost/polygon/polygon_45_with_holes_data.hpp (original)
+++ trunk/boost/polygon/polygon_45_with_holes_data.hpp 2012-05-09 15:33:59 EDT (Wed, 09 May 2012)
@@ -1,6 +1,6 @@
/*
Copyright 2008 Intel Corporation
-
+
Use, modification and distribution are subject to the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
@@ -18,7 +18,7 @@
typedef T coordinate_type;
typedef typename polygon_45_data<T>::iterator_type iterator_type;
typedef typename std::list<polygon_45_data<coordinate_type> >::const_iterator iterator_holes_type;
- typedef polygon_45_data<coordinate_type> hole_type;
+ typedef polygon_45_data<coordinate_type> hole_type;
typedef typename coordinate_traits<T>::coordinate_distance area_type;
typedef point_data<T> point_type;
@@ -55,9 +55,9 @@
}
// copy constructor (since we have dynamic memory)
- inline polygon_45_with_holes_data(const polygon_45_with_holes_data& that) : self_(that.self_),
+ inline polygon_45_with_holes_data(const polygon_45_with_holes_data& that) : self_(that.self_),
holes_(that.holes_) {}
-
+
// assignment operator (since we have dynamic memory do a deep copy)
inline polygon_45_with_holes_data& operator=(const polygon_45_with_holes_data& that) {
self_ = that.self_;
@@ -80,7 +80,7 @@
inline std::size_t size() const {
return self_.size();
- }
+ }
// get begin iterator, returns a pointer to a const polygon
inline const iterator_holes_type begin_holes() const {
@@ -98,11 +98,10 @@
public:
polygon_45_data<coordinate_type> self_;
- std::list<hole_type> holes_;
+ std::list<hole_type> holes_;
};
}
}
#endif
-
Modified: trunk/boost/polygon/polygon_90_data.hpp
==============================================================================
--- trunk/boost/polygon/polygon_90_data.hpp (original)
+++ trunk/boost/polygon/polygon_90_data.hpp 2012-05-09 15:33:59 EDT (Wed, 09 May 2012)
@@ -1,6 +1,6 @@
/*
Copyright 2008 Intel Corporation
-
+
Use, modification and distribution are subject to the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
@@ -40,7 +40,7 @@
// copy constructor (since we have dynamic memory)
inline polygon_90_data(const polygon_90_data& that) : coords_(that.coords_) {}
-
+
// assignment operator (since we have dynamic memory do a deep copy)
inline polygon_90_data& operator=(const polygon_90_data& that) {
coords_ = that.coords_;
@@ -63,18 +63,17 @@
// get begin iterator, returns a pointer to a const Unit
inline compact_iterator_type begin_compact() const { return coords_.begin(); }
-
+
// get end iterator, returns a pointer to a const Unit
inline compact_iterator_type end_compact() const { return coords_.end(); }
inline std::size_t size() const { return coords_.size(); }
-
+
private:
- std::vector<coordinate_type> coords_;
+ std::vector<coordinate_type> coords_;
};
}
}
#endif
-
Modified: trunk/boost/polygon/polygon_90_set_concept.hpp
==============================================================================
--- trunk/boost/polygon/polygon_90_set_concept.hpp (original)
+++ trunk/boost/polygon/polygon_90_set_concept.hpp 2012-05-09 15:33:59 EDT (Wed, 09 May 2012)
@@ -1,6 +1,6 @@
/*
Copyright 2008 Intel Corporation
-
+
Use, modification and distribution are subject to the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
@@ -17,14 +17,14 @@
begin_90_set_data(const polygon_set_type& polygon_set) {
return polygon_90_set_traits<polygon_set_type>::begin(polygon_set);
}
-
+
template <typename polygon_set_type>
typename enable_if< typename is_polygon_90_set_type<polygon_set_type>::type,
typename polygon_90_set_traits<polygon_set_type>::iterator_type>::type
end_90_set_data(const polygon_set_type& polygon_set) {
return polygon_90_set_traits<polygon_set_type>::end(polygon_set);
}
-
+
template <typename polygon_set_type>
typename enable_if< typename is_polygon_90_set_type<polygon_set_type>::type,
orientation_2d>::type
@@ -47,7 +47,7 @@
typename is_polygon_90_set_type<polygon_set_type_2>::type>::type,
polygon_set_type_1>::type &
assign(polygon_set_type_1& lvalue, const polygon_set_type_2& rvalue) {
- polygon_90_set_mutable_traits<polygon_set_type_1>::set(lvalue, begin_90_set_data(rvalue), end_90_set_data(rvalue),
+ polygon_90_set_mutable_traits<polygon_set_type_1>::set(lvalue, begin_90_set_data(rvalue), end_90_set_data(rvalue),
scanline_orientation(rvalue));
return lvalue;
}
@@ -59,12 +59,12 @@
//equivalence
template <typename polygon_set_type_1, typename polygon_set_type_2>
- typename enable_if< typename gtl_and_3<
+ typename enable_if< typename gtl_and_3<
typename is_polygon_90_set_type<polygon_set_type_1>::type,
typename is_polygon_90_set_type<polygon_set_type_2>::type,
typename are_not_both_rectangle_concept<typename geometry_concept<polygon_set_type_1>::type,
typename geometry_concept<polygon_set_type_2>::type>::type>::type,
- bool>::type
+ bool>::type
equivalence(const polygon_set_type_1& lvalue,
const polygon_set_type_2& rvalue) {
polygon_90_set_data<typename polygon_90_set_traits<polygon_set_type_1>::coordinate_type> ps1;
@@ -99,7 +99,7 @@
//get: min_rectangles max_rectangles
template <typename output_container_type, typename polygon_set_type>
- typename enable_if <typename gtl_and<
+ typename enable_if <typename gtl_and<
typename is_polygon_90_set_type<polygon_set_type>::type,
typename gtl_same_type<rectangle_concept,
typename geometry_concept
@@ -111,7 +111,7 @@
assign(rects, polygon_set);
MaxCover<typename polygon_90_set_traits<polygon_set_type>::coordinate_type>::getMaxCover(output, rects, scanline_orientation(polygon_set));
}
-
+
//clear
template <typename polygon_set_type>
typename enable_if< typename is_mutable_polygon_90_set_type<polygon_set_type>::type,
@@ -120,7 +120,7 @@
polygon_90_set_data<typename polygon_90_set_traits<polygon_set_type>::coordinate_type> ps(scanline_orientation(polygon_set));
assign(polygon_set, ps);
}
-
+
//empty
template <typename polygon_set_type>
typename enable_if< typename is_mutable_polygon_90_set_type<polygon_set_type>::type,
@@ -132,13 +132,13 @@
ps.clean();
return ps.empty();
}
-
+
//extents
template <typename polygon_set_type, typename rectangle_type>
typename enable_if <typename gtl_and< typename is_mutable_polygon_90_set_type<polygon_set_type>::type,
typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
bool>::type
- extents(rectangle_type& extents_rectangle,
+ extents(rectangle_type& extents_rectangle,
const polygon_set_type& polygon_set) {
typedef typename polygon_90_set_traits<polygon_set_type>::coordinate_type Unit;
polygon_90_set_data<Unit> ps;
@@ -177,7 +177,7 @@
assign(polygon_set_1, ps);
return polygon_set_1;
}
-
+
//self_intersect
template <typename polygon_set_type>
typename enable_if< typename is_mutable_polygon_90_set_type<polygon_set_type>::type,
@@ -207,7 +207,7 @@
template <typename polygon_set_type>
typename enable_if< typename is_mutable_polygon_90_set_type<polygon_set_type>::type,
polygon_set_type>::type &
- bloat(polygon_set_type& polygon_set,
+ bloat(polygon_set_type& polygon_set,
typename coordinate_traits<typename polygon_90_set_traits<polygon_set_type>::coordinate_type>::unsigned_area_type bloating) {
return bloat(polygon_set, bloating, bloating, bloating, bloating);
}
@@ -250,7 +250,7 @@
template <typename polygon_set_type>
typename enable_if< typename is_mutable_polygon_90_set_type<polygon_set_type>::type,
polygon_set_type>::type &
- bloat(polygon_set_type& polygon_set,
+ bloat(polygon_set_type& polygon_set,
typename coordinate_traits<typename polygon_90_set_traits<polygon_set_type>::coordinate_type>::unsigned_area_type west_bloating,
typename coordinate_traits<typename polygon_90_set_traits<polygon_set_type>::coordinate_type>::unsigned_area_type east_bloating,
typename coordinate_traits<typename polygon_90_set_traits<polygon_set_type>::coordinate_type>::unsigned_area_type south_bloating,
@@ -267,7 +267,7 @@
template <typename polygon_set_type>
typename enable_if< typename is_mutable_polygon_90_set_type<polygon_set_type>::type,
polygon_set_type>::type &
- shrink(polygon_set_type& polygon_set,
+ shrink(polygon_set_type& polygon_set,
typename coordinate_traits<typename polygon_90_set_traits<polygon_set_type>::coordinate_type>::unsigned_area_type shrinking) {
return shrink(polygon_set, shrinking, shrinking, shrinking, shrinking);
}
@@ -310,7 +310,7 @@
template <typename polygon_set_type>
typename enable_if< typename is_mutable_polygon_90_set_type<polygon_set_type>::type,
polygon_set_type>::type &
- shrink(polygon_set_type& polygon_set,
+ shrink(polygon_set_type& polygon_set,
typename coordinate_traits<typename polygon_90_set_traits<polygon_set_type>::coordinate_type>::unsigned_area_type west_shrinking,
typename coordinate_traits<typename polygon_90_set_traits<polygon_set_type>::coordinate_type>::unsigned_area_type east_shrinking,
typename coordinate_traits<typename polygon_90_set_traits<polygon_set_type>::coordinate_type>::unsigned_area_type south_shrinking,
@@ -354,7 +354,7 @@
template <typename polygon_set_type>
typename enable_if< typename is_mutable_polygon_90_set_type<polygon_set_type>::type,
polygon_set_type>::type &
- grow_and(polygon_set_type& polygon_set,
+ grow_and(polygon_set_type& polygon_set,
typename coordinate_traits<typename polygon_90_set_traits<polygon_set_type>::coordinate_type>::unsigned_area_type bloating) {
return grow_and(polygon_set, bloating, bloating, bloating, bloating);
}
@@ -397,7 +397,7 @@
template <typename polygon_set_type>
typename enable_if< typename gtl_if<typename is_mutable_polygon_90_set_type<polygon_set_type>::type>::type,
polygon_set_type>::type &
- grow_and(polygon_set_type& polygon_set,
+ grow_and(polygon_set_type& polygon_set,
typename coordinate_traits<typename polygon_90_set_traits<polygon_set_type>::coordinate_type>::unsigned_area_type west_bloating,
typename coordinate_traits<typename polygon_90_set_traits<polygon_set_type>::coordinate_type>::unsigned_area_type east_bloating,
typename coordinate_traits<typename polygon_90_set_traits<polygon_set_type>::coordinate_type>::unsigned_area_type south_bloating,
@@ -422,7 +422,7 @@
template <typename polygon_set_type>
typename enable_if< typename is_mutable_polygon_90_set_type<polygon_set_type>::type,
polygon_set_type>::type &
- scale_up(polygon_set_type& polygon_set,
+ scale_up(polygon_set_type& polygon_set,
typename coordinate_traits<typename polygon_90_set_traits<polygon_set_type>::coordinate_type>
::unsigned_area_type factor) {
typedef typename polygon_90_set_traits<polygon_set_type>::coordinate_type Unit;
@@ -436,7 +436,7 @@
template <typename polygon_set_type>
typename enable_if< typename is_mutable_polygon_90_set_type<polygon_set_type>::type,
polygon_set_type>::type &
- scale_down(polygon_set_type& polygon_set,
+ scale_down(polygon_set_type& polygon_set,
typename coordinate_traits<typename polygon_90_set_traits<polygon_set_type>::coordinate_type>
::unsigned_area_type factor) {
typedef typename polygon_90_set_traits<polygon_set_type>::coordinate_type Unit;
@@ -450,7 +450,7 @@
template <typename polygon_set_type, typename scaling_type>
typename enable_if< typename is_mutable_polygon_90_set_type<polygon_set_type>::type,
polygon_set_type>::type &
- scale(polygon_set_type& polygon_set,
+ scale(polygon_set_type& polygon_set,
const scaling_type& scaling) {
typedef typename polygon_90_set_traits<polygon_set_type>::coordinate_type Unit;
polygon_90_set_data<Unit> ps;
@@ -470,7 +470,7 @@
orientation_2d orient, typename polygon_90_set_traits<polygon_set_type>::coordinate_type displacement) {
if(orient == HORIZONTAL)
return move(polygon_set, displacement, 0);
- else
+ else
return move(polygon_set, 0, displacement);
}
@@ -479,7 +479,7 @@
template <typename polygon_set_type>
typename enable_if< typename gtl_and<y_p_s_move2, typename gtl_if<typename is_mutable_polygon_90_set_type<polygon_set_type>::type>::type>::type,
polygon_set_type>::type &
- move(polygon_set_type& polygon_set, typename polygon_90_set_traits<polygon_set_type>::coordinate_type x_displacement,
+ move(polygon_set_type& polygon_set, typename polygon_90_set_traits<polygon_set_type>::coordinate_type x_displacement,
typename polygon_90_set_traits<polygon_set_type>::coordinate_type y_displacement) {
typedef typename polygon_90_set_traits<polygon_set_type>::coordinate_type Unit;
polygon_90_set_data<Unit> ps;
@@ -510,7 +510,7 @@
template <typename polygon_set_type>
typename enable_if< typename is_mutable_polygon_90_set_type<polygon_set_type>::type,
polygon_set_type>::type &
- keep(polygon_set_type& polygon_set,
+ keep(polygon_set_type& polygon_set,
typename coordinate_traits<typename polygon_90_set_traits<polygon_set_type>::coordinate_type>::unsigned_area_type min_area,
typename coordinate_traits<typename polygon_90_set_traits<polygon_set_type>::coordinate_type>::unsigned_area_type max_area,
typename coordinate_traits<typename polygon_90_set_traits<polygon_set_type>::coordinate_type>::unsigned_area_type min_width,
Modified: trunk/boost/polygon/polygon_90_set_data.hpp
==============================================================================
--- trunk/boost/polygon/polygon_90_set_data.hpp (original)
+++ trunk/boost/polygon/polygon_90_set_data.hpp 2012-05-09 15:33:59 EDT (Wed, 09 May 2012)
@@ -1,6 +1,6 @@
/*
Copyright 2008 Intel Corporation
-
+
Use, modification and distribution are subject to the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
@@ -47,7 +47,7 @@
// constructor from an iterator pair over vertex data
template <typename iT>
- inline polygon_90_set_data(orientation_2d orient, iT input_begin, iT input_end) :
+ inline polygon_90_set_data(orientation_2d orient, iT input_begin, iT input_end) :
orient_(HORIZONTAL), data_(), dirty_(false), unsorted_(false) {
dirty_ = true;
unsorted_ = true;
@@ -55,14 +55,14 @@
}
// copy constructor
- inline polygon_90_set_data(const polygon_90_set_data& that) :
+ inline polygon_90_set_data(const polygon_90_set_data& that) :
orient_(that.orient_), data_(that.data_), dirty_(that.dirty_), unsorted_(that.unsorted_) {}
template <typename ltype, typename rtype, typename op_type>
inline polygon_90_set_data(const polygon_90_set_view<ltype, rtype, op_type>& that);
// copy with orientation change constructor
- inline polygon_90_set_data(orientation_2d orient, const polygon_90_set_data& that) :
+ inline polygon_90_set_data(orientation_2d orient, const polygon_90_set_data& that) :
orient_(orient), data_(), dirty_(false), unsorted_(false) {
insert(that, false, that.orient_);
}
@@ -139,7 +139,7 @@
insert(begin_input, end_input, orient_);
}
- inline void insert(const std::pair<coordinate_type, std::pair<coordinate_type, int> >& vertex, bool is_hole = false,
+ inline void insert(const std::pair<coordinate_type, std::pair<coordinate_type, int> >& vertex, bool is_hole = false,
orientation_2d orient = HORIZONTAL) {
data_.push_back(vertex);
if(orient != orient_) std::swap(data_.back().first, data_.back().second.first);
@@ -191,7 +191,7 @@
}
}
- // equivalence operator
+ // equivalence operator
inline bool operator==(const polygon_90_set_data& p) const {
if(orient_ == p.orient()) {
clean();
@@ -202,7 +202,7 @@
}
}
- // inequivalence operator
+ // inequivalence operator
inline bool operator!=(const polygon_90_set_data& p) const {
return !((*this) == p);
}
@@ -261,7 +261,7 @@
// value_type data;
// std::swap(data, data_);
// applyBooleanBinaryOp(data.begin(), data.end(),
- // that.begin(), that.end(), boolean_op::BinaryCount<boolean_op::BinaryNot>());
+ // that.begin(), that.end(), boolean_op::BinaryCount<boolean_op::BinaryNot>());
// return *this;
// }
// polygon_90_set_data<coordinate_type>& operator^=(const polygon_90_set_data& that) {
@@ -270,7 +270,7 @@
// value_type data;
// std::swap(data, data_);
// applyBooleanBinaryOp(data.begin(), data.end(),
- // that.begin(), that.end(), boolean_op::BinaryCount<boolean_op::BinaryXor>());
+ // that.begin(), that.end(), boolean_op::BinaryCount<boolean_op::BinaryXor>());
// return *this;
// }
// polygon_90_set_data<coordinate_type>& operator&=(const polygon_90_set_data& that) {
@@ -279,7 +279,7 @@
// value_type data;
// std::swap(data, data_);
// applyBooleanBinaryOp(data.begin(), data.end(),
- // that.begin(), that.end(), boolean_op::BinaryCount<boolean_op::BinaryAnd>());
+ // that.begin(), that.end(), boolean_op::BinaryCount<boolean_op::BinaryAnd>());
// return *this;
// }
// polygon_90_set_data<coordinate_type>& operator|=(const polygon_90_set_data& that) {
@@ -313,7 +313,7 @@
}
void set(const value_type& value, orientation_2d orient) {
- data_ = value;
+ data_ = value;
orient_ = orient;
dirty_ = true;
unsorted_ = true;
@@ -347,11 +347,11 @@
typename coordinate_traits<coordinate_type>::unsigned_area_type north_bloating) {
std::vector<rectangle_data<coordinate_type> > rects;
clean();
- rects.reserve(data_.size() / 2);
+ rects.reserve(data_.size() / 2);
get(rects);
- rectangle_data<coordinate_type> convolutionRectangle(interval_data<coordinate_type>(-((coordinate_type)west_bloating),
+ rectangle_data<coordinate_type> convolutionRectangle(interval_data<coordinate_type>(-((coordinate_type)west_bloating),
(coordinate_type)east_bloating),
- interval_data<coordinate_type>(-((coordinate_type)south_bloating),
+ interval_data<coordinate_type>(-((coordinate_type)south_bloating),
(coordinate_type)north_bloating));
for(typename std::vector<rectangle_data<coordinate_type> >::iterator itr = rects.begin();
itr != rects.end(); ++itr) {
@@ -394,7 +394,7 @@
if(nyg)
pt.x(current_pt.x() + east_bloating);
}
- static void resize_poly_up(std::vector<point_data<coordinate_type> >& poly,
+ static void resize_poly_up(std::vector<point_data<coordinate_type> >& poly,
coordinate_type west_bloating,
coordinate_type east_bloating,
coordinate_type south_bloating,
@@ -417,7 +417,7 @@
modify_pt(poly[0], prev_pt, current_pt, next_pt, west_bloating, east_bloating, south_bloating, north_bloating);
remove_colinear_pts(poly);
}
- static bool resize_poly_down(std::vector<point_data<coordinate_type> >& poly,
+ static bool resize_poly_down(std::vector<point_data<coordinate_type> >& poly,
coordinate_type west_shrinking,
coordinate_type east_shrinking,
coordinate_type south_shrinking,
@@ -453,7 +453,7 @@
bool found_colinear = true;
while(found_colinear && poly.size() >= 4) {
found_colinear = false;
- typename std::vector<point_data<coordinate_type> >::iterator itr = poly.begin();
+ typename std::vector<point_data<coordinate_type> >::iterator itr = poly.begin();
itr += poly.size() - 1; //get last element position
typename std::vector<point_data<coordinate_type> >::iterator itr2 = poly.begin();
typename std::vector<point_data<coordinate_type> >::iterator itr3 = itr2;
@@ -479,7 +479,7 @@
poly.erase(poly.end() - count, poly.end());
}
return poly.size() >= 4;
- }
+ }
polygon_90_set_data&
bloat(typename coordinate_traits<coordinate_type>::unsigned_area_type west_bloating,
@@ -495,9 +495,10 @@
//psref.insert(view_as<polygon_90_concept>((*itr).self_));
//rectangle_data<coordinate_type> prerect;
//psref.extents(prerect);
- resize_poly_up((*itr).self_.coords_, west_bloating, east_bloating, south_bloating, north_bloating);
+ resize_poly_up((*itr).self_.coords_, (coordinate_type)west_bloating, (coordinate_type)east_bloating,
+ (coordinate_type)south_bloating, (coordinate_type)north_bloating);
iterator_geometry_to_set<polygon_90_concept, view_of<polygon_90_concept, polygon_45_data<coordinate_type> > >
- begin_input(view_as<polygon_90_concept>((*itr).self_), LOW, orient_, false, true, COUNTERCLOCKWISE),
+ begin_input(view_as<polygon_90_concept>((*itr).self_), LOW, orient_, false, true, COUNTERCLOCKWISE),
end_input(view_as<polygon_90_concept>((*itr).self_), HIGH, orient_, false, true, COUNTERCLOCKWISE);
insert(begin_input, end_input, orient_);
//polygon_90_set_data<coordinate_type> pstest;
@@ -514,15 +515,16 @@
//psrefhole.insert(prerect);
//psrefhole.insert(view_as<polygon_90_concept>(*itrh), true);
//polygon_45_data<coordinate_type> testpoly(*itrh);
- if(resize_poly_down((*itrh).coords_, west_bloating, east_bloating, south_bloating, north_bloating)) {
+ if(resize_poly_down((*itrh).coords_,(coordinate_type)west_bloating, (coordinate_type)east_bloating,
+ (coordinate_type)south_bloating, (coordinate_type)north_bloating)) {
iterator_geometry_to_set<polygon_90_concept, view_of<polygon_90_concept, polygon_45_data<coordinate_type> > >
- begin_input2(view_as<polygon_90_concept>(*itrh), LOW, orient_, true, true),
+ begin_input2(view_as<polygon_90_concept>(*itrh), LOW, orient_, true, true),
end_input2(view_as<polygon_90_concept>(*itrh), HIGH, orient_, true, true);
insert(begin_input2, end_input2, orient_);
//polygon_90_set_data<coordinate_type> pstesthole;
//pstesthole.insert(rect);
//iterator_geometry_to_set<polygon_90_concept, view_of<polygon_90_concept, polygon_45_data<coordinate_type> > >
- // begin_input2(view_as<polygon_90_concept>(*itrh), LOW, orient_, true, true);
+ // begin_input2(view_as<polygon_90_concept>(*itrh), LOW, orient_, true, true);
//pstesthole.insert(begin_input2, end_input, orient_);
//psrefhole.bloat2(west_bloating, east_bloating, south_bloating, north_bloating);
//if(!equivalence(psrefhole, pstesthole)) {
@@ -558,13 +560,14 @@
//rectangle_data<coordinate_type> prerect;
//psref.extents(prerect);
//polygon_45_data<coordinate_type> testpoly((*itr).self_);
- if(resize_poly_down((*itr).self_.coords_, -west_shrinking, -east_shrinking, -south_shrinking, -north_shrinking)) {
+ if(resize_poly_down((*itr).self_.coords_, -(coordinate_type)west_shrinking, -(coordinate_type)east_shrinking,
+ -(coordinate_type)south_shrinking, -(coordinate_type)north_shrinking)) {
iterator_geometry_to_set<polygon_90_concept, view_of<polygon_90_concept, polygon_45_data<coordinate_type> > >
- begin_input(view_as<polygon_90_concept>((*itr).self_), LOW, orient_, false, true, COUNTERCLOCKWISE),
+ begin_input(view_as<polygon_90_concept>((*itr).self_), LOW, orient_, false, true, COUNTERCLOCKWISE),
end_input(view_as<polygon_90_concept>((*itr).self_), HIGH, orient_, false, true, COUNTERCLOCKWISE);
insert(begin_input, end_input, orient_);
//iterator_geometry_to_set<polygon_90_concept, view_of<polygon_90_concept, polygon_45_data<coordinate_type> > >
- // begin_input2(view_as<polygon_90_concept>((*itr).self_), LOW, orient_, false, true, COUNTERCLOCKWISE);
+ // begin_input2(view_as<polygon_90_concept>((*itr).self_), LOW, orient_, false, true, COUNTERCLOCKWISE);
//polygon_90_set_data<coordinate_type> pstest;
//pstest.insert(begin_input2, end_input, orient_);
//psref.shrink2(west_shrinking, east_shrinking, south_shrinking, north_shrinking);
@@ -579,15 +582,16 @@
//psrefhole.insert(prerect);
//psrefhole.insert(view_as<polygon_90_concept>(*itrh), true);
//polygon_45_data<coordinate_type> testpoly(*itrh);
- resize_poly_up((*itrh).coords_, -west_shrinking, -east_shrinking, -south_shrinking, -north_shrinking);
+ resize_poly_up((*itrh).coords_, -(coordinate_type)west_shrinking, -(coordinate_type)east_shrinking,
+ -(coordinate_type)south_shrinking, -(coordinate_type)north_shrinking);
iterator_geometry_to_set<polygon_90_concept, view_of<polygon_90_concept, polygon_45_data<coordinate_type> > >
- begin_input2(view_as<polygon_90_concept>(*itrh), LOW, orient_, true, true),
+ begin_input2(view_as<polygon_90_concept>(*itrh), LOW, orient_, true, true),
end_input2(view_as<polygon_90_concept>(*itrh), HIGH, orient_, true, true);
insert(begin_input2, end_input2, orient_);
//polygon_90_set_data<coordinate_type> pstesthole;
//pstesthole.insert(rect);
//iterator_geometry_to_set<polygon_90_concept, view_of<polygon_90_concept, polygon_45_data<coordinate_type> > >
- // begin_input2(view_as<polygon_90_concept>(*itrh), LOW, orient_, true, true);
+ // begin_input2(view_as<polygon_90_concept>(*itrh), LOW, orient_, true, true);
//pstesthole.insert(begin_input2, end_input, orient_);
//psrefhole.shrink2(west_shrinking, east_shrinking, south_shrinking, north_shrinking);
//if(!equivalence(psrefhole, pstesthole)) {
@@ -620,13 +624,13 @@
insert(externalBoundary, true); //note that the set is in a dirty state now
sort(); //does not apply implicit OR operation
std::vector<rectangle_data<coordinate_type> > rects;
- rects.reserve(data_.size() / 2);
+ rects.reserve(data_.size() / 2);
//begin does not apply implicit or operation, this is a dirty range
form_rectangles(rects, data_.begin(), data_.end(), orient_, rectangle_concept());
clear();
- rectangle_data<coordinate_type> convolutionRectangle(interval_data<coordinate_type>(-((coordinate_type)east_shrinking),
+ rectangle_data<coordinate_type> convolutionRectangle(interval_data<coordinate_type>(-((coordinate_type)east_shrinking),
(coordinate_type)west_shrinking),
- interval_data<coordinate_type>(-((coordinate_type)north_shrinking),
+ interval_data<coordinate_type>(-((coordinate_type)north_shrinking),
(coordinate_type)south_shrinking));
for(typename std::vector<rectangle_data<coordinate_type> >::iterator itr = rects.begin();
itr != rects.end(); ++itr) {
@@ -665,10 +669,10 @@
}
polygon_90_set_data&
- resize(coordinate_type west, coordinate_type east, coordinate_type south, coordinate_type north);
+ resize(coordinate_type west, coordinate_type east, coordinate_type south, coordinate_type north);
polygon_90_set_data& move(coordinate_type x_delta, coordinate_type y_delta) {
- for(typename std::vector<std::pair<coordinate_type, std::pair<coordinate_type, int> > >::iterator
+ for(typename std::vector<std::pair<coordinate_type, std::pair<coordinate_type, int> > >::iterator
itr = data_.begin(); itr != data_.end(); ++itr) {
if(orient_ == orientation_2d(VERTICAL)) {
(*itr).first += x_delta;
@@ -703,7 +707,7 @@
// scale set
polygon_90_set_data& scale_up(typename coordinate_traits<coordinate_type>::unsigned_area_type factor) {
- for(typename std::vector<std::pair<coordinate_type, std::pair<coordinate_type, int> > >::iterator
+ for(typename std::vector<std::pair<coordinate_type, std::pair<coordinate_type, int> > >::iterator
itr = data_.begin(); itr != data_.end(); ++itr) {
(*itr).first *= (coordinate_type)factor;
(*itr).second.first *= (coordinate_type)factor;
@@ -712,7 +716,7 @@
}
polygon_90_set_data& scale_down(typename coordinate_traits<coordinate_type>::unsigned_area_type factor) {
typedef typename coordinate_traits<coordinate_type>::coordinate_distance dt;
- for(typename std::vector<std::pair<coordinate_type, std::pair<coordinate_type, int> > >::iterator
+ for(typename std::vector<std::pair<coordinate_type, std::pair<coordinate_type, int> > >::iterator
itr = data_.begin(); itr != data_.end(); ++itr) {
(*itr).first = scaling_policy<coordinate_type>::round((dt)((*itr).first) / (dt)factor);
(*itr).second.first = scaling_policy<coordinate_type>::round((dt)((*itr).second.first) / (dt)factor);
@@ -722,7 +726,7 @@
}
template <typename scaling_type>
polygon_90_set_data& scale(const anisotropic_scale_factor<scaling_type>& scaling) {
- for(typename std::vector<std::pair<coordinate_type, std::pair<coordinate_type, int> > >::iterator
+ for(typename std::vector<std::pair<coordinate_type, std::pair<coordinate_type, int> > >::iterator
itr = data_.begin(); itr != data_.end(); ++itr) {
if(orient_ == orientation_2d(VERTICAL)) {
scaling.scale((*itr).first, (*itr).second.first);
@@ -735,7 +739,7 @@
}
template <typename scaling_type>
polygon_90_set_data& scale_with(const scaling_type& scaling) {
- for(typename std::vector<std::pair<coordinate_type, std::pair<coordinate_type, int> > >::iterator
+ for(typename std::vector<std::pair<coordinate_type, std::pair<coordinate_type, int> > >::iterator
itr = data_.begin(); itr != data_.end(); ++itr) {
if(orient_ == orientation_2d(VERTICAL)) {
scaling.scale((*itr).first, (*itr).second.first);
@@ -748,7 +752,7 @@
}
polygon_90_set_data& scale(double factor) {
typedef typename coordinate_traits<coordinate_type>::coordinate_distance dt;
- for(typename std::vector<std::pair<coordinate_type, std::pair<coordinate_type, int> > >::iterator
+ for(typename std::vector<std::pair<coordinate_type, std::pair<coordinate_type, int> > >::iterator
itr = data_.begin(); itr != data_.end(); ++itr) {
(*itr).first = scaling_policy<coordinate_type>::round((dt)((*itr).first) * (dt)factor);
(*itr).second.first = scaling_policy<coordinate_type>::round((dt)((*itr).second.first) * (dt)factor);
@@ -814,7 +818,7 @@
mutable value_type data_;
mutable bool dirty_;
mutable bool unsorted_;
-
+
private:
//functions
template <typename output_container>
@@ -884,7 +888,7 @@
return bloat(0, e_total, 0, n_total);
}
}
-
+
template <typename coordinate_type, typename property_type>
class property_merge_90 {
private:
@@ -907,7 +911,7 @@
//with unique sets of merged properties to polygons sets in a map keyed by sets of properties
// T = std::map<std::set<property_type>, polygon_90_set_data<coordiante_type> > or
// T = std::map<std::vector<property_type>, polygon_90_set_data<coordiante_type> >
- template <typename ResultType>
+ template <typename ResultType>
inline void merge(ResultType& result) {
merge_scanline<coordinate_type, property_type, polygon_90_set_data<coordinate_type>, typename ResultType::key_type> ms;
ms.perform_merge(result, pmd_);
@@ -926,12 +930,12 @@
inline connectivity_extraction_90() : tsd_(), nodeCount_(0) {}
inline connectivity_extraction_90(const connectivity_extraction_90& that) : tsd_(that.tsd_),
nodeCount_(that.nodeCount_) {}
- inline connectivity_extraction_90& operator=(const connectivity_extraction_90& that) {
- tsd_ = that.tsd_;
+ inline connectivity_extraction_90& operator=(const connectivity_extraction_90& that) {
+ tsd_ = that.tsd_;
nodeCount_ = that.nodeCount_; {}
return *this;
}
-
+
//insert a polygon set graph node, the value returned is the id of the graph node
inline unsigned int insert(const polygon_90_set_data<coordinate_type>& ps) {
ps.clean();
@@ -944,7 +948,7 @@
ps.insert(geoObj);
return insert(ps);
}
-
+
//extract connectivity and store the edges in the graph
//graph must be indexable by graph node id and the indexed value must be a std::set of
//graph node id
Modified: trunk/boost/polygon/polygon_90_with_holes_data.hpp
==============================================================================
--- trunk/boost/polygon/polygon_90_with_holes_data.hpp (original)
+++ trunk/boost/polygon/polygon_90_with_holes_data.hpp 2012-05-09 15:33:59 EDT (Wed, 09 May 2012)
@@ -1,6 +1,6 @@
/*
Copyright 2008 Intel Corporation
-
+
Use, modification and distribution are subject to the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
@@ -19,7 +19,7 @@
typedef typename polygon_90_data<T>::iterator_type iterator_type;
typedef typename polygon_90_data<T>::compact_iterator_type compact_iterator_type;
typedef typename std::list<polygon_90_data<coordinate_type> >::const_iterator iterator_holes_type;
- typedef polygon_90_data<coordinate_type> hole_type;
+ typedef polygon_90_data<coordinate_type> hole_type;
typedef typename coordinate_traits<T>::area_type area_type;
typedef point_data<T> point_type;
@@ -55,9 +55,9 @@
}
// copy constructor (since we have dynamic memory)
- inline polygon_90_with_holes_data(const polygon_90_with_holes_data& that) : self_(that.self_),
+ inline polygon_90_with_holes_data(const polygon_90_with_holes_data& that) : self_(that.self_),
holes_(that.holes_) {}
-
+
// assignment operator (since we have dynamic memory do a deep copy)
inline polygon_90_with_holes_data& operator=(const polygon_90_with_holes_data& that) {
self_ = that.self_;
@@ -90,7 +90,7 @@
inline std::size_t size() const {
return self_.size();
- }
+ }
// get begin iterator, returns a pointer to a const polygon
inline const iterator_holes_type begin_holes() const {
@@ -108,9 +108,8 @@
private:
polygon_90_data<coordinate_type> self_;
- std::list<hole_type> holes_;
+ std::list<hole_type> holes_;
};
}
}
#endif
-
Modified: trunk/boost/polygon/polygon_data.hpp
==============================================================================
--- trunk/boost/polygon/polygon_data.hpp (original)
+++ trunk/boost/polygon/polygon_data.hpp 2012-05-09 15:33:59 EDT (Wed, 09 May 2012)
@@ -1,6 +1,6 @@
/*
Copyright 2008 Intel Corporation
-
+
Use, modification and distribution are subject to the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
@@ -32,7 +32,7 @@
// copy constructor (since we have dynamic memory)
inline polygon_data(const polygon_data& that) : coords_(that.coords_) {}
-
+
// assignment operator (since we have dynamic memory do a deep copy)
inline polygon_data& operator=(const polygon_data& that) {
coords_ = that.coords_;
@@ -61,10 +61,9 @@
inline std::size_t size() const { return coords_.size(); }
public:
- std::vector<point_data<coordinate_type> > coords_;
+ std::vector<point_data<coordinate_type> > coords_;
};
}
}
#endif
-
Modified: trunk/boost/polygon/polygon_set_concept.hpp
==============================================================================
--- trunk/boost/polygon/polygon_set_concept.hpp (original)
+++ trunk/boost/polygon/polygon_set_concept.hpp 2012-05-09 15:33:59 EDT (Wed, 09 May 2012)
@@ -1,6 +1,6 @@
/*
Copyright 2008 Intel Corporation
-
+
Use, modification and distribution are subject to the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
@@ -27,14 +27,14 @@
begin_polygon_set_data(const polygon_set_type& polygon_set) {
return polygon_set_traits<polygon_set_type>::begin(polygon_set);
}
-
+
template <typename polygon_set_type>
typename enable_if< typename is_any_polygon_set_type<polygon_set_type>::type,
typename polygon_set_traits<polygon_set_type>::iterator_type>::type
end_polygon_set_data(const polygon_set_type& polygon_set) {
return polygon_set_traits<polygon_set_type>::end(polygon_set);
}
-
+
template <typename polygon_set_type>
typename enable_if< typename is_polygon_set_type<polygon_set_type>::type,
bool>::type
@@ -83,11 +83,11 @@
//equivalence
template <typename polygon_set_type_1, typename polygon_set_type_2>
- typename enable_if< typename gtl_and_3 <
+ typename enable_if< typename gtl_and_3 <
typename is_any_polygon_set_type<polygon_set_type_1>::type,
typename is_any_polygon_set_type<polygon_set_type_2>::type,
typename is_either_polygon_set_type<polygon_set_type_1, polygon_set_type_2>::type>::type,
- bool>::type
+ bool>::type
equivalence(const polygon_set_type_1& lvalue,
const polygon_set_type_2& rvalue) {
polygon_set_data<typename polygon_set_traits<polygon_set_type_1>::coordinate_type> ps1;
@@ -117,14 +117,14 @@
ps.clean();
return ps.empty();
}
-
+
//extents
template <typename polygon_set_type, typename rectangle_type>
- typename enable_if< typename gtl_and<
+ typename enable_if< typename gtl_and<
typename is_mutable_polygon_set_type<polygon_set_type>::type,
typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
bool>::type
- extents(rectangle_type& extents_rectangle,
+ extents(rectangle_type& extents_rectangle,
const polygon_set_type& polygon_set) {
clean(polygon_set);
polygon_set_data<typename polygon_set_traits<polygon_set_type>::coordinate_type> ps;
@@ -161,11 +161,11 @@
assign(polys, polygon_set);
std::size_t retval = 0;
for(std::size_t i = 0; i < polys.size(); ++i) {
- retval += detail::simplify_detail::simplify(polys[i].self_.coords_,
+ retval += detail::simplify_detail::simplify(polys[i].self_.coords_,
polys[i].self_.coords_, threshold);
- for(typename std::list<polygon_data<Unit> >::iterator itrh =
+ for(typename std::list<polygon_data<Unit> >::iterator itrh =
polys[i].holes_.begin(); itrh != (polys[i].holes_.end()); ++itrh) {
- retval += detail::simplify_detail::simplify((*itrh).coords_,
+ retval += detail::simplify_detail::simplify((*itrh).coords_,
(*itrh).coords_, threshold);
}
}
@@ -204,7 +204,7 @@
//interact
template <typename polygon_set_type_1, typename polygon_set_type_2>
- typename enable_if< typename gtl_and_3 <
+ typename enable_if< typename gtl_and_3 <
typename is_any_polygon_set_type<polygon_set_type_1>::type,
typename is_any_polygon_set_type<polygon_set_type_2>::type,
typename is_either_polygon_set_type<polygon_set_type_1, polygon_set_type_2>::type>::type,
@@ -222,7 +222,7 @@
template <typename polygon_set_type>
typename enable_if< typename is_mutable_polygon_set_type<polygon_set_type>::type,
polygon_set_type>::type &
- scale_up(polygon_set_type& polygon_set,
+ scale_up(polygon_set_type& polygon_set,
typename coordinate_traits<typename polygon_set_traits<polygon_set_type>::coordinate_type>::unsigned_area_type factor) {
typedef typename polygon_set_traits<polygon_set_type>::coordinate_type Unit;
clean(polygon_set);
@@ -236,7 +236,7 @@
template <typename polygon_set_type>
typename enable_if< typename is_mutable_polygon_set_type<polygon_set_type>::type,
polygon_set_type>::type &
- scale_down(polygon_set_type& polygon_set,
+ scale_down(polygon_set_type& polygon_set,
typename coordinate_traits<typename polygon_set_traits<polygon_set_type>::coordinate_type>::unsigned_area_type factor) {
typedef typename polygon_set_traits<polygon_set_type>::coordinate_type Unit;
clean(polygon_set);
@@ -266,7 +266,7 @@
template <typename polygon_set_type>
typename enable_if< typename is_mutable_polygon_set_type<polygon_set_type>::type,
polygon_set_type>::type &
- keep(polygon_set_type& polygon_set,
+ keep(polygon_set_type& polygon_set,
typename coordinate_traits<typename polygon_set_traits<polygon_set_type>::coordinate_type>::area_type min_area,
typename coordinate_traits<typename polygon_set_traits<polygon_set_type>::coordinate_type>::area_type max_area,
typename coordinate_traits<typename polygon_set_traits<polygon_set_type>::coordinate_type>::unsigned_area_type min_width,
@@ -307,7 +307,7 @@
typename enable_if< typename gtl_and_4 < yes_ps_ob, typename is_any_polygon_set_type<geometry_type_1>::type,
typename is_any_polygon_set_type<geometry_type_2>::type,
typename is_either_polygon_set_type<geometry_type_1, geometry_type_2>::type>::type,
- polygon_set_view<geometry_type_1, geometry_type_2, 0> >::type
+ polygon_set_view<geometry_type_1, geometry_type_2, 0> >::type
operator|(const geometry_type_1& lvalue, const geometry_type_2& rvalue) {
return polygon_set_view<geometry_type_1, geometry_type_2, 0>
(lvalue, rvalue);
@@ -317,23 +317,23 @@
template <typename geometry_type_1, typename geometry_type_2>
typename enable_if< typename gtl_and_4 < yes_ps_op,
- typename gtl_if<typename is_any_polygon_set_type<geometry_type_1>::type>::type,
- typename gtl_if<typename is_any_polygon_set_type<geometry_type_2>::type>::type,
+ typename gtl_if<typename is_any_polygon_set_type<geometry_type_1>::type>::type,
+ typename gtl_if<typename is_any_polygon_set_type<geometry_type_2>::type>::type,
typename gtl_if<typename is_either_polygon_set_type<geometry_type_1, geometry_type_2>::type>::type>
- ::type, polygon_set_view<geometry_type_1, geometry_type_2, 0> >::type
+ ::type, polygon_set_view<geometry_type_1, geometry_type_2, 0> >::type
operator+(const geometry_type_1& lvalue, const geometry_type_2& rvalue) {
return polygon_set_view<geometry_type_1, geometry_type_2, 0>
(lvalue, rvalue);
}
-
+
struct yes_ps_os : gtl_yes {};
template <typename geometry_type_1, typename geometry_type_2>
- typename enable_if< typename gtl_and_4 < yes_ps_os,
+ typename enable_if< typename gtl_and_4 < yes_ps_os,
typename is_any_polygon_set_type<geometry_type_1>::type,
typename is_any_polygon_set_type<geometry_type_2>::type,
typename is_either_polygon_set_type<geometry_type_1, geometry_type_2>::type>::type,
- polygon_set_view<geometry_type_1, geometry_type_2, 1> >::type
+ polygon_set_view<geometry_type_1, geometry_type_2, 1> >::type
operator*(const geometry_type_1& lvalue, const geometry_type_2& rvalue) {
return polygon_set_view<geometry_type_1, geometry_type_2, 1>
(lvalue, rvalue);
@@ -346,7 +346,7 @@
typename is_any_polygon_set_type<geometry_type_1>::type,
typename is_any_polygon_set_type<geometry_type_2>::type,
typename is_either_polygon_set_type<geometry_type_1, geometry_type_2>::type>::type,
- polygon_set_view<geometry_type_1, geometry_type_2, 1> >::type
+ polygon_set_view<geometry_type_1, geometry_type_2, 1> >::type
operator&(const geometry_type_1& lvalue, const geometry_type_2& rvalue) {
return polygon_set_view<geometry_type_1, geometry_type_2, 1>
(lvalue, rvalue);
@@ -359,30 +359,30 @@
typename is_any_polygon_set_type<geometry_type_1>::type,
typename is_any_polygon_set_type<geometry_type_2>::type,
typename is_either_polygon_set_type<geometry_type_1, geometry_type_2>::type>::type,
- polygon_set_view<geometry_type_1, geometry_type_2, 2> >::type
+ polygon_set_view<geometry_type_1, geometry_type_2, 2> >::type
operator^(const geometry_type_1& lvalue, const geometry_type_2& rvalue) {
return polygon_set_view<geometry_type_1, geometry_type_2, 2>
(lvalue, rvalue);
}
-
+
struct yes_ps_om : gtl_yes {};
template <typename geometry_type_1, typename geometry_type_2>
typename enable_if< typename gtl_and_4 < yes_ps_om,
- typename gtl_if<typename is_any_polygon_set_type<geometry_type_1>::type>::type,
- typename gtl_if<typename is_any_polygon_set_type<geometry_type_2>::type>::type,
+ typename gtl_if<typename is_any_polygon_set_type<geometry_type_1>::type>::type,
+ typename gtl_if<typename is_any_polygon_set_type<geometry_type_2>::type>::type,
typename gtl_if<typename is_either_polygon_set_type<geometry_type_1, geometry_type_2>::type>::type>
- ::type, polygon_set_view<geometry_type_1, geometry_type_2, 3> >::type
+ ::type, polygon_set_view<geometry_type_1, geometry_type_2, 3> >::type
operator-(const geometry_type_1& lvalue, const geometry_type_2& rvalue) {
return polygon_set_view<geometry_type_1, geometry_type_2, 3>
(lvalue, rvalue);
}
-
+
struct yes_ps_ope : gtl_yes {};
template <typename geometry_type_1, typename geometry_type_2>
- typename enable_if< typename gtl_and_4< yes_ps_ope, gtl_yes, typename is_mutable_polygon_set_type<geometry_type_1>::type,
- typename is_any_polygon_set_type<geometry_type_2>::type>::type,
+ typename enable_if< typename gtl_and_4< yes_ps_ope, gtl_yes, typename is_mutable_polygon_set_type<geometry_type_1>::type,
+ typename is_any_polygon_set_type<geometry_type_2>::type>::type,
geometry_type_1>::type &
operator+=(geometry_type_1& lvalue, const geometry_type_2& rvalue) {
return self_assignment_boolean_op<geometry_type_1, geometry_type_2, 0>(lvalue, rvalue);
@@ -391,8 +391,8 @@
struct yes_ps_obe : gtl_yes {};
template <typename geometry_type_1, typename geometry_type_2>
- typename enable_if< typename gtl_and_3< yes_ps_obe, typename is_mutable_polygon_set_type<geometry_type_1>::type,
- typename is_any_polygon_set_type<geometry_type_2>::type>::type,
+ typename enable_if< typename gtl_and_3< yes_ps_obe, typename is_mutable_polygon_set_type<geometry_type_1>::type,
+ typename is_any_polygon_set_type<geometry_type_2>::type>::type,
geometry_type_1>::type &
operator|=(geometry_type_1& lvalue, const geometry_type_2& rvalue) {
return self_assignment_boolean_op<geometry_type_1, geometry_type_2, 0>(lvalue, rvalue);
@@ -401,8 +401,8 @@
struct yes_ps_ose : gtl_yes {};
template <typename geometry_type_1, typename geometry_type_2>
- typename enable_if< typename gtl_and_3< yes_ps_ose, typename is_mutable_polygon_set_type<geometry_type_1>::type,
- typename is_any_polygon_set_type<geometry_type_2>::type>::type,
+ typename enable_if< typename gtl_and_3< yes_ps_ose, typename is_mutable_polygon_set_type<geometry_type_1>::type,
+ typename is_any_polygon_set_type<geometry_type_2>::type>::type,
geometry_type_1>::type &
operator*=(geometry_type_1& lvalue, const geometry_type_2& rvalue) {
return self_assignment_boolean_op<geometry_type_1, geometry_type_2, 1>(lvalue, rvalue);
@@ -412,8 +412,8 @@
template <typename geometry_type_1, typename geometry_type_2>
typename enable_if<
- typename gtl_and_3< yes_ps_oae, typename is_mutable_polygon_set_type<geometry_type_1>::type,
- typename is_any_polygon_set_type<geometry_type_2>::type>::type,
+ typename gtl_and_3< yes_ps_oae, typename is_mutable_polygon_set_type<geometry_type_1>::type,
+ typename is_any_polygon_set_type<geometry_type_2>::type>::type,
geometry_type_1>::type &
operator&=(geometry_type_1& lvalue, const geometry_type_2& rvalue) {
return self_assignment_boolean_op<geometry_type_1, geometry_type_2, 1>(lvalue, rvalue);
@@ -422,8 +422,8 @@
struct yes_ps_oxe : gtl_yes {};
template <typename geometry_type_1, typename geometry_type_2>
- typename enable_if< typename gtl_and_3< yes_ps_oxe, typename is_mutable_polygon_set_type<geometry_type_1>::type,
- typename is_any_polygon_set_type<geometry_type_2>::type>::type,
+ typename enable_if< typename gtl_and_3< yes_ps_oxe, typename is_mutable_polygon_set_type<geometry_type_1>::type,
+ typename is_any_polygon_set_type<geometry_type_2>::type>::type,
geometry_type_1>::type &
operator^=(geometry_type_1& lvalue, const geometry_type_2& rvalue) {
return self_assignment_boolean_op<geometry_type_1, geometry_type_2, 2>(lvalue, rvalue);
@@ -432,9 +432,9 @@
struct yes_ps_ome : gtl_yes {};
template <typename geometry_type_1, typename geometry_type_2>
- typename enable_if<
- typename gtl_and_3< yes_ps_ome, typename is_mutable_polygon_set_type<geometry_type_1>::type,
- typename is_any_polygon_set_type<geometry_type_2>::type>::type,
+ typename enable_if<
+ typename gtl_and_3< yes_ps_ome, typename is_mutable_polygon_set_type<geometry_type_1>::type,
+ typename is_any_polygon_set_type<geometry_type_2>::type>::type,
geometry_type_1>::type &
operator-=(geometry_type_1& lvalue, const geometry_type_2& rvalue) {
return self_assignment_boolean_op<geometry_type_1, geometry_type_2, 3>(lvalue, rvalue);
@@ -550,13 +550,13 @@
return polygon_set.end();
}
- static inline orientation_2d orient(const view_of<polygon_45_set_concept, T>& polygon_set) {
+ static inline orientation_2d orient(const view_of<polygon_45_set_concept, T>& polygon_set) {
return polygon_set.orient(); }
- static inline bool clean(const view_of<polygon_45_set_concept, T>& polygon_set) {
+ static inline bool clean(const view_of<polygon_45_set_concept, T>& polygon_set) {
return polygon_set.clean(); }
- static inline bool sorted(const view_of<polygon_45_set_concept, T>& polygon_set) {
+ static inline bool sorted(const view_of<polygon_45_set_concept, T>& polygon_set) {
return polygon_set.sorted(); }
};
Modified: trunk/boost/polygon/polygon_set_data.hpp
==============================================================================
--- trunk/boost/polygon/polygon_set_data.hpp (original)
+++ trunk/boost/polygon/polygon_set_data.hpp 2012-05-09 15:33:59 EDT (Wed, 09 May 2012)
@@ -647,7 +647,7 @@
point_data<double> v;
assign(v, normal1);
double s2 = (v.x()*v.x()+v.y()*v.y());
- double s = sqrt(s2)/resizing;
+ double s = std::sqrt(s2)/resizing;
v = point_data<double>(v.x()/s,v.y()/s);
point_data<T> curr_prev;
if (prev_concave)
@@ -827,10 +827,10 @@
// handle the case of adding an intersection point
point_data<double> dn1( middle.y()-start.y(), start.x()-middle.x());
- double size = sizing_distance/sqrt( dn1.x()*dn1.x()+dn1.y()*dn1.y());
+ double size = sizing_distance/std::sqrt( dn1.x()*dn1.x()+dn1.y()*dn1.y());
dn1 = point_data<double>( dn1.x()*size, dn1.y()* size);
point_data<double> dn2( end.y()-middle.y(), middle.x()-end.x());
- size = sizing_distance/sqrt( dn2.x()*dn2.x()+dn2.y()*dn2.y());
+ size = sizing_distance/std::sqrt( dn2.x()*dn2.x()+dn2.y()*dn2.y());
dn2 = point_data<double>( dn2.x()*size, dn2.y()* size);
point_data<double> start_offset((start.x()+dn1.x()),(start.y()+dn1.y()));
point_data<double> mid1_offset((middle.x()+dn1.x()),(middle.y()+dn1.y()));
Modified: trunk/boost/polygon/polygon_set_traits.hpp
==============================================================================
--- trunk/boost/polygon/polygon_set_traits.hpp (original)
+++ trunk/boost/polygon/polygon_set_traits.hpp 2012-05-09 15:33:59 EDT (Wed, 09 May 2012)
@@ -1,6 +1,6 @@
/*
Copyright 2008 Intel Corporation
-
+
Use, modification and distribution are subject to the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
@@ -45,13 +45,13 @@
typedef typename is_polygonal_concept<typename geometry_concept<T>::type>::type type;
};
template <typename T>
- struct is_polygon_set_type<std::list<T> > {
+ struct is_polygon_set_type<std::list<T> > {
typedef typename gtl_or<
typename is_polygonal_concept<typename geometry_concept<std::list<T> >::type>::type,
typename is_polygonal_concept<typename geometry_concept<typename std::list<T>::value_type>::type>::type>::type type;
};
template <typename T>
- struct is_polygon_set_type<std::vector<T> > {
+ struct is_polygon_set_type<std::vector<T> > {
typedef typename gtl_or<
typename is_polygonal_concept<typename geometry_concept<std::vector<T> >::type>::type,
typename is_polygonal_concept<typename geometry_concept<typename std::vector<T>::value_type>::type>::type>::type type;
@@ -62,13 +62,13 @@
typedef typename gtl_same_type<polygon_set_concept, typename geometry_concept<T>::type>::type type;
};
template <typename T>
- struct is_mutable_polygon_set_type<std::list<T> > {
+ struct is_mutable_polygon_set_type<std::list<T> > {
typedef typename gtl_or<
- typename gtl_same_type<polygon_set_concept, typename geometry_concept<std::list<T> >::type>::type,
+ typename gtl_same_type<polygon_set_concept, typename geometry_concept<std::list<T> >::type>::type,
typename is_polygonal_concept<typename geometry_concept<typename std::list<T>::value_type>::type>::type>::type type;
};
template <typename T>
- struct is_mutable_polygon_set_type<std::vector<T> > {
+ struct is_mutable_polygon_set_type<std::vector<T> > {
typedef typename gtl_or<
typename gtl_same_type<polygon_set_concept, typename geometry_concept<std::vector<T> >::type>::type,
typename is_polygonal_concept<typename geometry_concept<typename std::vector<T>::value_type>::type>::type>::type type;
@@ -104,7 +104,7 @@
template <typename T>
struct polygon_set_mutable_traits<polygon_set_data<T> > {
template <typename input_iterator_type>
- static inline void set(polygon_set_data<T>& polygon_set,
+ static inline void set(polygon_set_data<T>& polygon_set,
input_iterator_type input_begin, input_iterator_type input_end) {
polygon_set.set(input_begin, input_end);
}
@@ -128,7 +128,6 @@
static inline bool sorted(const polygon_set_data<T>& polygon_set) { polygon_set.sort(); return true; }
};
-}
+}
}
#endif
-
Modified: trunk/boost/polygon/polygon_traits.hpp
==============================================================================
--- trunk/boost/polygon/polygon_traits.hpp (original)
+++ trunk/boost/polygon/polygon_traits.hpp 2012-05-09 15:33:59 EDT (Wed, 09 May 2012)
@@ -1,6 +1,6 @@
/*
Copyright 2008 Intel Corporation
-
+
Use, modification and distribution are subject to the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
@@ -18,17 +18,17 @@
static inline compact_iterator_type begin_compact(const T& t) {
return t.begin_compact();
}
-
+
// Get the end iterator
static inline compact_iterator_type end_compact(const T& t) {
return t.end_compact();
}
-
+
// Get the number of sides of the polygon
static inline std::size_t size(const T& t) {
return t.size();
}
-
+
// Get the winding direction of the polygon
static inline winding_direction winding(const T&) {
return unknown_winding;
@@ -45,17 +45,17 @@
static inline iterator_type begin_points(const T& t) {
return t.begin();
}
-
+
// Get the end iterator
static inline iterator_type end_points(const T& t) {
return t.end();
}
-
+
// Get the number of sides of the polygon
static inline std::size_t size(const T& t) {
return t.size();
}
-
+
// Get the winding direction of the polygon
static inline winding_direction winding(const T&) {
return unknown_winding;
@@ -73,18 +73,18 @@
return iterator_type(polygon_90_traits<T>::begin_compact(t),
polygon_90_traits<T>::end_compact(t));
}
-
+
// Get the end iterator
static inline iterator_type end_points(const T& t) {
return iterator_type(polygon_90_traits<T>::end_compact(t),
polygon_90_traits<T>::end_compact(t));
}
-
+
// Get the number of sides of the polygon
static inline std::size_t size(const T& t) {
return polygon_90_traits<T>::size(t);
}
-
+
// Get the winding direction of the polygon
static inline winding_direction winding(const T& t) {
return polygon_90_traits<T>::winding(t);
@@ -97,7 +97,7 @@
struct polygon_traits {};
template <typename T>
- struct polygon_traits<T,
+ struct polygon_traits<T,
typename gtl_or_4<
typename gtl_same_type<typename geometry_concept<T>::type, polygon_concept>::type,
typename gtl_same_type<typename geometry_concept<T>::type, polygon_45_concept>::type,
@@ -106,7 +106,7 @@
>::type> : public polygon_traits_general<T> {};
template <typename T>
- struct polygon_traits< T,
+ struct polygon_traits< T,
typename gtl_or<
typename gtl_same_type<typename geometry_concept<T>::type, polygon_90_concept>::type,
typename gtl_same_type<typename geometry_concept<T>::type, polygon_90_with_holes_concept>::type
@@ -161,7 +161,7 @@
return t.end_holes();
}
- // Get the number of holes
+ // Get the number of holes
static inline std::size_t size_holes(const T& t) {
return t.size_holes();
}
@@ -169,14 +169,14 @@
template <typename T, typename enable = void>
struct polygon_90_mutable_traits {
-
+
// Set the data of a polygon with the unique coordinates in an iterator, starting with an x
template <typename iT>
static inline T& set_compact(T& t, iT input_begin, iT input_end) {
t.set_compact(input_begin, input_end);
return t;
}
-
+
};
template <typename T>
@@ -199,7 +199,7 @@
t.set(input_begin, input_end);
return t;
}
-
+
};
template <typename T, typename enable = void>
@@ -251,7 +251,7 @@
struct polygon_45_with_holes_concept {};
struct polygon_90_concept {};
struct polygon_90_with_holes_concept {};
-
+
template <typename T>
struct is_polygon_90_type {
@@ -272,7 +272,7 @@
typedef typename gtl_or<typename is_polygon_45_type<T>::type,
typename gtl_same_type<polygon_concept, GC>::type>::type type;
};
-
+
template <typename T>
struct is_polygon_90_with_holes_type {
typedef typename geometry_concept<T>::type GC;
@@ -284,7 +284,7 @@
struct is_polygon_45_with_holes_type {
typedef typename geometry_concept<T>::type GC;
typedef typename gtl_or_3<typename is_polygon_90_with_holes_type<T>::type,
- typename is_polygon_45_type<T>::type,
+ typename is_polygon_45_type<T>::type,
typename gtl_same_type<polygon_45_with_holes_concept, GC>::type>::type type;
};
@@ -292,7 +292,7 @@
struct is_polygon_with_holes_type {
typedef typename geometry_concept<T>::type GC;
typedef typename gtl_or_3<typename is_polygon_45_with_holes_type<T>::type,
- typename is_polygon_type<T>::type,
+ typename is_polygon_type<T>::type,
typename gtl_same_type<polygon_with_holes_concept, GC>::type>::type type;
};
@@ -301,7 +301,7 @@
typedef typename geometry_concept<T>::type GC;
typedef typename gtl_same_type<polygon_90_concept, GC>::type type;
};
-
+
template <typename T>
struct is_mutable_polygon_45_type {
typedef typename geometry_concept<T>::type GC;
@@ -313,7 +313,7 @@
typedef typename geometry_concept<T>::type GC;
typedef typename gtl_same_type<polygon_concept, GC>::type type;
};
-
+
template <typename T>
struct is_mutable_polygon_90_with_holes_type {
typedef typename geometry_concept<T>::type GC;
@@ -341,10 +341,10 @@
template <typename T>
struct is_any_mutable_polygon_without_holes_type {
typedef typename gtl_or_3<
- typename is_mutable_polygon_90_type<T>::type,
- typename is_mutable_polygon_45_type<T>::type,
+ typename is_mutable_polygon_90_type<T>::type,
+ typename is_mutable_polygon_45_type<T>::type,
typename is_mutable_polygon_type<T>::type>::type type; };
-
+
template <typename T>
struct is_any_mutable_polygon_type {
typedef typename gtl_or<typename is_any_mutable_polygon_with_holes_type<T>::type,
@@ -372,7 +372,7 @@
template <typename domain_type, typename coordinate_type>
struct distance_type_by_domain { typedef typename coordinate_traits<coordinate_type>::coordinate_distance type; };
template <typename coordinate_type>
- struct distance_type_by_domain<manhattan_domain, coordinate_type> {
+ struct distance_type_by_domain<manhattan_domain, coordinate_type> {
typedef typename coordinate_traits<coordinate_type>::coordinate_difference type; };
// \brief Sets the boundary of the polygon to the points in the iterator range
@@ -399,9 +399,9 @@
/// \relatesalso polygon_90_concept
template <typename T, typename iT>
- typename enable_if <typename gtl_or<
- typename is_mutable_polygon_90_type<T>::type,
- typename is_mutable_polygon_90_with_holes_type<T>::type>::type, T>::type &
+ typename enable_if <typename gtl_or<
+ typename is_mutable_polygon_90_type<T>::type,
+ typename is_mutable_polygon_90_with_holes_type<T>::type>::type, T>::type &
set_compact(T& t, iT begin_compact_coordinates, iT end_compact_coordinates) {
polygon_90_mutable_traits<T>::set_compact(t, begin_compact_coordinates, end_compact_coordinates);
return t;
@@ -411,7 +411,7 @@
template <typename T, typename iT>
typename enable_if< typename gtl_and <
typename is_any_mutable_polygon_with_holes_type<T>::type,
- typename gtl_different_type<typename geometry_domain<typename geometry_concept<T>::type>::type,
+ typename gtl_different_type<typename geometry_domain<typename geometry_concept<T>::type>::type,
manhattan_domain>::type>::type,
T>::type &
set_compact(T& t, iT begin_compact_coordinates, iT end_compact_coordinates) {
@@ -434,29 +434,29 @@
typename polygon_90_traits<T>::compact_iterator_type
begin_compact(const T& polygon,
typename enable_if<
- typename gtl_and <typename is_polygon_with_holes_type<T>::type,
+ typename gtl_and <typename is_polygon_with_holes_type<T>::type,
typename gtl_same_type<typename geometry_domain<typename geometry_concept<T>::type>::type,
manhattan_domain>::type>::type>::type * = 0
) {
return polygon_90_traits<T>::begin_compact(polygon);
}
-
+
/// \relatesalso polygon_90_concept
template <typename T>
typename polygon_90_traits<T>::compact_iterator_type
end_compact(const T& polygon,
- typename enable_if<
- typename gtl_and <typename is_polygon_with_holes_type<T>::type,
+ typename enable_if<
+ typename gtl_and <typename is_polygon_with_holes_type<T>::type,
typename gtl_same_type<typename geometry_domain<typename geometry_concept<T>::type>::type,
manhattan_domain>::type>::type>::type * = 0
) {
return polygon_90_traits<T>::end_compact(polygon);
}
-
+
/// \relatesalso polygon_concept
template <typename T>
typename enable_if < typename gtl_if<
- typename is_polygon_with_holes_type<T>::type>::type,
+ typename is_polygon_with_holes_type<T>::type>::type,
typename polygon_traits<T>::iterator_type>::type
begin_points(const T& polygon) {
return polygon_traits<T>::begin_points(polygon);
@@ -465,7 +465,7 @@
/// \relatesalso polygon_concept
template <typename T>
typename enable_if < typename gtl_if<
- typename is_polygon_with_holes_type<T>::type>::type,
+ typename is_polygon_with_holes_type<T>::type>::type,
typename polygon_traits<T>::iterator_type>::type
end_points(const T& polygon) {
return polygon_traits<T>::end_points(polygon);
@@ -473,7 +473,7 @@
/// \relatesalso polygon_concept
template <typename T>
- typename enable_if <typename is_polygon_with_holes_type<T>::type,
+ typename enable_if <typename is_polygon_with_holes_type<T>::type,
std::size_t>::type
size(const T& polygon) {
return polygon_traits<T>::size(polygon);
@@ -482,7 +482,7 @@
/// \relatesalso polygon_with_holes_concept
template <typename T>
typename enable_if < typename gtl_if<
- typename is_polygon_with_holes_type<T>::type>::type,
+ typename is_polygon_with_holes_type<T>::type>::type,
typename polygon_with_holes_traits<T>::iterator_holes_type>::type
begin_holes(const T& polygon) {
return polygon_with_holes_traits<T>::begin_holes(polygon);
@@ -491,7 +491,7 @@
/// \relatesalso polygon_with_holes_concept
template <typename T>
typename enable_if < typename gtl_if<
- typename is_polygon_with_holes_type<T>::type>::type,
+ typename is_polygon_with_holes_type<T>::type>::type,
typename polygon_with_holes_traits<T>::iterator_holes_type>::type
end_holes(const T& polygon) {
return polygon_with_holes_traits<T>::end_holes(polygon);
@@ -499,7 +499,7 @@
/// \relatesalso polygon_with_holes_concept
template <typename T>
- typename enable_if <typename is_polygon_with_holes_type<T>::type,
+ typename enable_if <typename is_polygon_with_holes_type<T>::type,
std::size_t>::type
size_holes(const T& polygon) {
return polygon_with_holes_traits<T>::size_holes(polygon);
@@ -550,7 +550,7 @@
polygon_with_holes_traits<T2>::end_holes(rvalue));
return lvalue;
}
-
+
// \relatesalso polygon_90_concept
template <typename T1, typename T2>
typename enable_if<
@@ -561,7 +561,7 @@
polygon_90_traits<T2>::end_compact(rvalue));
return lvalue;
}
-
+
// \relatesalso polygon_90_with_holes_concept
template <typename T1, typename T2>
typename enable_if<
@@ -589,14 +589,14 @@
/// \relatesalso polygon_90_concept
template <typename polygon_type, typename point_type>
- typename enable_if< typename gtl_and< typename is_mutable_polygon_90_type<polygon_type>::type,
+ typename enable_if< typename gtl_and< typename is_mutable_polygon_90_type<polygon_type>::type,
typename is_point_concept<typename geometry_concept<point_type>::type>::type>::type,
polygon_type>::type &
convolve(polygon_type& polygon, const point_type& point) {
std::vector<typename polygon_90_traits<polygon_type>::coordinate_type> coords;
coords.reserve(size(polygon));
bool pingpong = true;
- for(typename polygon_90_traits<polygon_type>::compact_iterator_type iter = begin_compact(polygon);
+ for(typename polygon_90_traits<polygon_type>::compact_iterator_type iter = begin_compact(polygon);
iter != end_compact(polygon); ++iter) {
coords.push_back((*iter) + (pingpong ? x(point) : y(point)));
pingpong = !pingpong;
@@ -607,15 +607,15 @@
/// \relatesalso polygon_concept
template <typename polygon_type, typename point_type>
- typename enable_if< typename gtl_and< typename gtl_or<
- typename is_mutable_polygon_45_type<polygon_type>::type,
- typename is_mutable_polygon_type<polygon_type>::type>::type,
+ typename enable_if< typename gtl_and< typename gtl_or<
+ typename is_mutable_polygon_45_type<polygon_type>::type,
+ typename is_mutable_polygon_type<polygon_type>::type>::type,
typename is_point_concept<typename geometry_concept<point_type>::type>::type>::type,
polygon_type>::type &
convolve(polygon_type& polygon, const point_type& point) {
std::vector<typename std::iterator_traits<typename polygon_traits<polygon_type>::iterator_type>::value_type> points;
points.reserve(size(polygon));
- for(typename polygon_traits<polygon_type>::iterator_type iter = begin_points(polygon);
+ for(typename polygon_traits<polygon_type>::iterator_type iter = begin_points(polygon);
iter != end_points(polygon); ++iter) {
points.push_back(*iter);
convolve(points.back(), point);
@@ -623,11 +623,11 @@
polygon_mutable_traits<polygon_type>::set_points(polygon, points.begin(), points.end());
return polygon;
}
-
+
/// \relatesalso polygon_with_holes_concept
template <typename polygon_type, typename point_type>
typename enable_if<
- typename gtl_and< typename is_any_mutable_polygon_with_holes_type<polygon_type>::type,
+ typename gtl_and< typename is_any_mutable_polygon_with_holes_type<polygon_type>::type,
typename is_point_concept<typename geometry_concept<point_type>::type>::type>::type,
polygon_type>::type &
convolve(polygon_type& polygon, const point_type& point) {
@@ -654,7 +654,7 @@
typedef typename polygon_traits<T>::coordinate_type Unit;
if(orient == HORIZONTAL) return convolve(polygon, point_data<Unit>(displacement, Unit(0)));
return convolve(polygon, point_data<Unit>(Unit(0), displacement));
- }
+ }
/// \relatesalso polygon_concept
/// \brief Applies a transformation to the polygon.
@@ -667,7 +667,7 @@
transform(polygon_type& polygon, const transform_type& tr) {
std::vector<typename std::iterator_traits<typename polygon_traits<polygon_type>::iterator_type>::value_type> points;
points.reserve(size(polygon));
- for(typename polygon_traits<polygon_type>::iterator_type iter = begin_points(polygon);
+ for(typename polygon_traits<polygon_type>::iterator_type iter = begin_points(polygon);
iter != end_points(polygon); ++iter) {
points.push_back(*iter);
transform(points.back(), tr);
@@ -701,7 +701,7 @@
scale_up(polygon_type& polygon, typename coordinate_traits<typename polygon_traits<polygon_type>::coordinate_type>::unsigned_area_type factor) {
std::vector<typename std::iterator_traits<typename polygon_traits<polygon_type>::iterator_type>::value_type> points;
points.reserve(size(polygon));
- for(typename polygon_traits<polygon_type>::iterator_type iter = begin_points(polygon);
+ for(typename polygon_traits<polygon_type>::iterator_type iter = begin_points(polygon);
iter != end_points(polygon); ++iter) {
points.push_back(*iter);
scale_up(points.back(), factor);
@@ -732,15 +732,15 @@
//scale non-45 down
template <typename polygon_type>
typename enable_if<
- typename gtl_and< typename is_any_mutable_polygon_without_holes_type<polygon_type>::type,
+ typename gtl_and< typename is_any_mutable_polygon_without_holes_type<polygon_type>::type,
typename gtl_not<typename gtl_same_type
- < forty_five_domain,
+ < forty_five_domain,
typename geometry_domain<typename geometry_concept<polygon_type>::type>::type>::type>::type>::type,
polygon_type>::type &
scale_down(polygon_type& polygon, typename coordinate_traits<typename polygon_traits<polygon_type>::coordinate_type>::unsigned_area_type factor) {
std::vector<typename std::iterator_traits<typename polygon_traits<polygon_type>::iterator_type>::value_type> points;
points.reserve(size(polygon));
- for(typename polygon_traits<polygon_type>::iterator_type iter = begin_points(polygon);
+ for(typename polygon_traits<polygon_type>::iterator_type iter = begin_points(polygon);
iter != end_points(polygon); ++iter) {
points.push_back(*iter);
scale_down(points.back(), factor);
@@ -836,7 +836,7 @@
snap_to_45(polygon_type& polygon) {
std::vector<typename std::iterator_traits<typename polygon_traits<polygon_type>::iterator_type>::value_type> points;
points.reserve(size(polygon));
- for(typename polygon_traits<polygon_type>::iterator_type iter = begin_points(polygon);
+ for(typename polygon_traits<polygon_type>::iterator_type iter = begin_points(polygon);
iter != end_points(polygon); ++iter) {
points.push_back(*iter);
}
@@ -867,15 +867,15 @@
//scale specifically 45 down
template <typename polygon_type>
typename enable_if<
- typename gtl_and< typename is_any_mutable_polygon_without_holes_type<polygon_type>::type,
+ typename gtl_and< typename is_any_mutable_polygon_without_holes_type<polygon_type>::type,
typename gtl_same_type
- < forty_five_domain,
+ < forty_five_domain,
typename geometry_domain<typename geometry_concept<polygon_type>::type>::type>::type>::type,
polygon_type>::type &
scale_down(polygon_type& polygon, typename coordinate_traits<typename polygon_traits<polygon_type>::coordinate_type>::unsigned_area_type factor) {
std::vector<typename std::iterator_traits<typename polygon_traits<polygon_type>::iterator_type>::value_type> points;
points.reserve(size(polygon));
- for(typename polygon_traits<polygon_type>::iterator_type iter = begin_points(polygon);
+ for(typename polygon_traits<polygon_type>::iterator_type iter = begin_points(polygon);
iter != end_points(polygon); ++iter) {
points.push_back(*iter);
scale_down(points.back(), factor);
@@ -904,18 +904,18 @@
return polygon;
}
- //scale non-45
+ //scale non-45
template <typename polygon_type>
typename enable_if<
- typename gtl_and< typename is_any_mutable_polygon_without_holes_type<polygon_type>::type,
+ typename gtl_and< typename is_any_mutable_polygon_without_holes_type<polygon_type>::type,
typename gtl_not<typename gtl_same_type
- < forty_five_domain,
+ < forty_five_domain,
typename geometry_domain<typename geometry_concept<polygon_type>::type>::type>::type>::type>::type,
polygon_type>::type &
scale(polygon_type& polygon, double factor) {
std::vector<typename std::iterator_traits<typename polygon_traits<polygon_type>::iterator_type>::value_type> points;
points.reserve(size(polygon));
- for(typename polygon_traits<polygon_type>::iterator_type iter = begin_points(polygon);
+ for(typename polygon_traits<polygon_type>::iterator_type iter = begin_points(polygon);
iter != end_points(polygon); ++iter) {
points.push_back(*iter);
scale(points.back(), anisotropic_scale_factor<double>(factor, factor));
@@ -924,19 +924,19 @@
return polygon;
}
- //scale specifically 45
+ //scale specifically 45
template <typename polygon_type>
polygon_type&
scale(polygon_type& polygon, double factor,
typename enable_if<
- typename gtl_and< typename is_any_mutable_polygon_without_holes_type<polygon_type>::type,
+ typename gtl_and< typename is_any_mutable_polygon_without_holes_type<polygon_type>::type,
typename gtl_same_type
- < forty_five_domain,
+ < forty_five_domain,
typename geometry_domain<typename geometry_concept<polygon_type>::type>::type>::type>::type>::type * = 0
) {
std::vector<typename std::iterator_traits<typename polygon_traits<polygon_type>::iterator_type>::value_type> points;
points.reserve(size(polygon));
- for(typename polygon_traits<polygon_type>::iterator_type iter = begin_points(polygon);
+ for(typename polygon_traits<polygon_type>::iterator_type iter = begin_points(polygon);
iter != end_points(polygon); ++iter) {
points.push_back(*iter);
scale(points.back(), anisotropic_scale_factor<double>(factor, factor));
@@ -1010,7 +1010,7 @@
}
template <typename T>
- typename enable_if<
+ typename enable_if<
typename is_polygon_with_holes_type<T>::type,
typename area_type_by_domain< typename geometry_domain<typename geometry_concept<T>::type>::type,
typename polygon_traits<T>::coordinate_type>::type>::type
@@ -1095,7 +1095,7 @@
typename distance_type_by_domain
<typename geometry_domain<typename geometry_concept<T>::type>::type, typename polygon_traits<T>::coordinate_type>::type
perimeter(const T& polygon,
- typename enable_if<
+ typename enable_if<
typename is_polygon_with_holes_type<T>::type>::type * = 0
) {
typedef typename distance_type_by_domain
@@ -1113,7 +1113,7 @@
}
template <typename T>
- typename enable_if <typename is_polygon_with_holes_type<T>::type,
+ typename enable_if <typename is_polygon_with_holes_type<T>::type,
direction_1d>::type
winding(const T& polygon) {
winding_direction wd = polygon_traits<T>::winding(polygon);
@@ -1127,9 +1127,9 @@
}
template <typename T, typename input_point_type>
- typename enable_if<
- typename gtl_and< typename is_polygon_90_type<T>::type,
- typename gtl_same_type<typename geometry_concept<input_point_type>::type, point_concept>::type>::type,
+ typename enable_if<
+ typename gtl_and< typename is_polygon_90_type<T>::type,
+ typename gtl_same_type<typename geometry_concept<input_point_type>::type, point_concept>::type>::type,
bool>::type
contains(const T& polygon, const input_point_type& point, bool consider_touch = true) {
typedef T polygon_type;
@@ -1146,23 +1146,23 @@
if(i == num-1) iter = begin_points(polygon);
else ++iter;
point_type current_pt = *iter;
- if(x(current_pt) ==
+ if(x(current_pt) ==
x(prev_pt)) {
- unsigned int index = x(current_pt) >
+ unsigned int index = x(current_pt) >
x(point);
std::size_t increment = 0;
- interval_data<coordinate_type> ivl(y(current_pt),
+ interval_data<coordinate_type> ivl(y(current_pt),
y(prev_pt));
if(contains(ivl, y(point), true)) {
- if(x(current_pt) ==
+ if(x(current_pt) ==
x(point)) return consider_touch;
++increment;
- if(y(current_pt) !=
+ if(y(current_pt) !=
y(point) &&
- y(prev_pt) !=
+ y(prev_pt) !=
y(point)) {
++increment;
- }
+ }
counts[index] += increment;
}
}
@@ -1171,7 +1171,7 @@
//odd count implies boundary condition
if(counts[0] % 2 || counts[1] % 2) return consider_touch;
//an odd number of edges to the left implies interior pt
- return counts[winding(polygon) == COUNTERCLOCKWISE ? 0 : 1] % 4 != 0;
+ return counts[winding(polygon) == COUNTERCLOCKWISE ? 0 : 1] % 4 != 0;
}
//TODO: refactor to expose as user APIs
@@ -1198,7 +1198,7 @@
return lp(pt, pt2) && lp(pt1, pt);
return lp(pt, pt1) && lp(pt2, pt);
}
-
+
template <typename area_type>
static inline bool equal_slope(area_type dx1, area_type dy1, area_type dx2, area_type dy2) {
typedef typename coordinate_traits<Unit>::unsigned_area_type unsigned_product_type;
@@ -1238,7 +1238,7 @@
dy2 *= -1;
dx2 *= -1;
} else if(dx2 == 0) {
- //if the second slope is vertical the first is always less unless it is also vertical, in which case they are equal
+ //if the second slope is vertical the first is always less unless it is also vertical, in which case they are equal
return dx1 != 0;
}
typedef typename coordinate_traits<Unit>::unsigned_area_type unsigned_product_type;
@@ -1283,8 +1283,8 @@
};
template <typename T, typename input_point_type>
- typename enable_if<
- typename gtl_and< typename is_any_mutable_polygon_with_holes_type<T>::type,
+ typename enable_if<
+ typename gtl_and< typename is_any_mutable_polygon_with_holes_type<T>::type,
typename gtl_same_type<typename geometry_concept<input_point_type>::type, point_concept>::type>::type,
bool>::type
contains(const T& polygon, const input_point_type& point, bool consider_touch = true) {
@@ -1304,10 +1304,10 @@
}
template <typename T, typename input_point_type>
- typename enable_if<
- typename gtl_and_3<
- typename is_polygon_type<T>::type,
- typename gtl_different_type<typename geometry_domain<typename geometry_concept<T>::type>::type, manhattan_domain>::type,
+ typename enable_if<
+ typename gtl_and_3<
+ typename is_polygon_type<T>::type,
+ typename gtl_different_type<typename geometry_domain<typename geometry_concept<T>::type>::type, manhattan_domain>::type,
typename gtl_same_type<typename geometry_concept<input_point_type>::type, point_concept>::type>::type,
bool>::type
contains(const T& polygon, const input_point_type& point, bool consider_touch = true) {
@@ -1365,16 +1365,16 @@
}
}
he.first = he.second;
- }
+ }
return above % 2 != 0; //if the point is above an odd number of edges is must be inside polygon
}
/*
template <typename T, typename input_point_type>
- typename enable_if<
- typename gtl_and_3<
- typename is_polygon_with_holes_type<T>::type,
- typename gtl_different_type<typename geometry_domain<typename geometry_concept<T>::type>::type, manhattan_domain>::type,
+ typename enable_if<
+ typename gtl_and_3<
+ typename is_polygon_with_holes_type<T>::type,
+ typename gtl_different_type<typename geometry_domain<typename geometry_concept<T>::type>::type, manhattan_domain>::type,
typename gtl_same_type<typename geometry_concept<input_point_type>::type, point_concept>::type>::type,
bool>::type
contains(const T& polygon, const input_point_type& point, bool consider_touch = true) {
@@ -1418,7 +1418,7 @@
}
}
he.first = he.second;
- }
+ }
return above % 2 != 0; //if the point is above an odd number of edges is must be inside polygon
}
*/
@@ -1427,19 +1427,19 @@
typename enable_if<
typename gtl_and< typename is_mutable_point_concept<typename geometry_concept<T1>::type>::type,
typename is_polygon_with_holes_type<T2>::type>::type,
- bool>::type
+ bool>::type
center(T1& center_point, const T2& polygon) {
typedef typename polygon_traits<T2>::coordinate_type coordinate_type;
rectangle_data<coordinate_type> bbox;
extents(bbox, polygon);
return center(center_point, bbox);
}
-
+
template <typename T1, typename T2>
typename enable_if<
typename gtl_and< typename is_mutable_rectangle_concept<typename geometry_concept<T1>::type>::type,
typename is_polygon_with_holes_type<T2>::type>::type,
- bool>::type
+ bool>::type
extents(T1& bounding_box, const T2& polygon) {
typedef typename polygon_traits<T2>::iterator_type iterator;
bool first_iteration = true;
@@ -1546,7 +1546,7 @@
// };
template <typename T> struct get_void {};
template <> struct get_void<gtl_yes> { typedef void type; };
-
+
template <typename T> struct polygon_with_holes_traits<
T, typename get_void<typename is_any_mutable_polygon_without_holes_type<T>::type>::type > {
typedef T hole_type;
@@ -1563,7 +1563,7 @@
rectangle_data<coordinate_type> rect;
view_of(const T& obj) : rect() {
point_data<coordinate_type> pts[2];
- typename polygon_traits<T>::iterator_type itr =
+ typename polygon_traits<T>::iterator_type itr =
begin_points(obj), itre = end_points(obj);
if(itr == itre) return;
assign(pts[0], *itr);
@@ -1582,7 +1582,7 @@
struct geometry_concept<view_of<rectangle_concept, T> > {
typedef rectangle_concept type;
};
-
+
template <typename T>
struct view_of<polygon_45_concept, T> {
const T* t;
@@ -1595,17 +1595,17 @@
inline iterator_type begin() const {
return polygon_traits<T>::begin_points(*t);
}
-
+
/// Get the end iterator
inline iterator_type end() const {
return polygon_traits<T>::end_points(*t);
}
-
+
/// Get the number of sides of the polygon
inline std::size_t size() const {
return polygon_traits<T>::size(*t);
}
-
+
/// Get the winding direction of the polygon
inline winding_direction winding() const {
return polygon_traits<T>::winding(*t);
@@ -1616,7 +1616,7 @@
struct geometry_concept<view_of<polygon_45_concept, T> > {
typedef polygon_45_concept type;
};
-
+
template <typename T>
struct view_of<polygon_90_concept, T> {
const T* t;
@@ -1631,18 +1631,18 @@
return compact_iterator_type(polygon_traits<T>::begin_points(*t),
polygon_traits<T>::end_points(*t));
}
-
+
/// Get the end iterator
inline compact_iterator_type end_compact() const {
return compact_iterator_type(polygon_traits<T>::end_points(*t),
polygon_traits<T>::end_points(*t));
}
-
+
/// Get the number of sides of the polygon
inline std::size_t size() const {
return polygon_traits<T>::size(*t);
}
-
+
/// Get the winding direction of the polygon
inline winding_direction winding() const {
return polygon_traits<T>::winding(*t);
@@ -1687,26 +1687,26 @@
inline bool operator!=(const iterator_holes_type& that) const {
return (internal_itr != that.internal_itr);
}
- inline value_type operator*() const {
+ inline value_type operator*() const {
return view_as<polygon_45_concept>(*internal_itr);
}
};
-
+
/// Get the begin iterator
inline iterator_type begin() const {
return polygon_traits<T>::begin_points(*t);
}
-
+
/// Get the end iterator
inline iterator_type end() const {
return polygon_traits<T>::end_points(*t);
}
-
+
/// Get the number of sides of the polygon
inline std::size_t size() const {
return polygon_traits<T>::size(*t);
}
-
+
/// Get the winding direction of the polygon
inline winding_direction winding() const {
return polygon_traits<T>::winding(*t);
@@ -1716,24 +1716,24 @@
inline iterator_holes_type begin_holes() const {
return polygon_with_holes_traits<T>::begin_holes(*t);
}
-
+
/// Get the end iterator
inline iterator_holes_type end_holes() const {
return polygon_with_holes_traits<T>::end_holes(*t);
}
-
+
/// Get the number of sides of the polygon
inline std::size_t size_holes() const {
return polygon_with_holes_traits<T>::size_holes(*t);
}
-
+
};
template <typename T>
struct geometry_concept<view_of<polygon_45_with_holes_concept, T> > {
typedef polygon_45_with_holes_concept type;
};
-
+
template <typename T>
struct view_of<polygon_90_with_holes_concept, T> {
const T* t;
@@ -1768,28 +1768,28 @@
inline bool operator!=(const iterator_holes_type& that) const {
return (internal_itr != that.internal_itr);
}
- inline value_type operator*() const {
+ inline value_type operator*() const {
return view_as<polygon_90_concept>(*internal_itr);
}
};
-
+
/// Get the begin iterator
inline compact_iterator_type begin_compact() const {
return compact_iterator_type(polygon_traits<T>::begin_points(*t),
polygon_traits<T>::end_points(*t));
}
-
+
/// Get the end iterator
inline compact_iterator_type end_compact() const {
return compact_iterator_type(polygon_traits<T>::end_points(*t),
polygon_traits<T>::end_points(*t));
}
-
+
/// Get the number of sides of the polygon
inline std::size_t size() const {
return polygon_traits<T>::size(*t);
}
-
+
/// Get the winding direction of the polygon
inline winding_direction winding() const {
return polygon_traits<T>::winding(*t);
@@ -1799,17 +1799,17 @@
inline iterator_holes_type begin_holes() const {
return polygon_with_holes_traits<T>::begin_holes(*t);
}
-
+
/// Get the end iterator
inline iterator_holes_type end_holes() const {
return polygon_with_holes_traits<T>::end_holes(*t);
}
-
+
/// Get the number of sides of the polygon
inline std::size_t size_holes() const {
return polygon_with_holes_traits<T>::size_holes(*t);
}
-
+
};
template <typename T>
@@ -1829,17 +1829,17 @@
inline iterator_type begin() const {
return polygon_traits<T>::begin_points(*t);
}
-
+
/// Get the end iterator
inline iterator_type end() const {
return polygon_traits<T>::end_points(*t);
}
-
+
/// Get the number of sides of the polygon
inline std::size_t size() const {
return polygon_traits<T>::size(*t);
}
-
+
/// Get the winding direction of the polygon
inline winding_direction winding() const {
return polygon_traits<T>::winding(*t);
@@ -1854,4 +1854,3 @@
}
#endif
-
Modified: trunk/boost/polygon/polygon_with_holes_data.hpp
==============================================================================
--- trunk/boost/polygon/polygon_with_holes_data.hpp (original)
+++ trunk/boost/polygon/polygon_with_holes_data.hpp 2012-05-09 15:33:59 EDT (Wed, 09 May 2012)
@@ -1,6 +1,6 @@
/*
Copyright 2008 Intel Corporation
-
+
Use, modification and distribution are subject to the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
@@ -18,7 +18,7 @@
typedef T coordinate_type;
typedef typename polygon_data<T>::iterator_type iterator_type;
typedef typename std::list<polygon_data<coordinate_type> >::const_iterator iterator_holes_type;
- typedef polygon_data<coordinate_type> hole_type;
+ typedef polygon_data<coordinate_type> hole_type;
typedef typename coordinate_traits<T>::coordinate_distance area_type;
typedef point_data<T> point_type;
@@ -55,9 +55,9 @@
}
// copy constructor (since we have dynamic memory)
- inline polygon_with_holes_data(const polygon_with_holes_data& that) : self_(that.self_),
+ inline polygon_with_holes_data(const polygon_with_holes_data& that) : self_(that.self_),
holes_(that.holes_) {}
-
+
// assignment operator (since we have dynamic memory do a deep copy)
inline polygon_with_holes_data& operator=(const polygon_with_holes_data& that) {
self_ = that.self_;
@@ -80,7 +80,7 @@
inline std::size_t size() const {
return self_.size();
- }
+ }
// get begin iterator, returns a pointer to a const polygon
inline const iterator_holes_type begin_holes() const {
@@ -98,11 +98,10 @@
public:
polygon_data<coordinate_type> self_;
- std::list<hole_type> holes_;
+ std::list<hole_type> holes_;
};
-
+
}
}
#endif
-
Modified: trunk/boost/polygon/rectangle_concept.hpp
==============================================================================
--- trunk/boost/polygon/rectangle_concept.hpp (original)
+++ trunk/boost/polygon/rectangle_concept.hpp 2012-05-09 15:33:59 EDT (Wed, 09 May 2012)
@@ -1,6 +1,6 @@
/*
Copyright 2008 Intel Corporation
-
+
Use, modification and distribution are subject to the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
@@ -25,7 +25,7 @@
namespace boost { namespace polygon{
struct rectangle_concept {};
-
+
template <typename T>
struct is_rectangle_concept { typedef gtl_no type; };
template <>
@@ -62,7 +62,7 @@
template <typename T, typename CT>
struct rectangle_difference_type_by_concept { typedef void type; };
template <typename T>
- struct rectangle_difference_type_by_concept<T, gtl_yes> {
+ struct rectangle_difference_type_by_concept<T, gtl_yes> {
typedef typename coordinate_traits<typename rectangle_traits<T>::coordinate_type>::coordinate_difference type; };
template <typename T>
@@ -74,7 +74,7 @@
template <typename T, typename CT>
struct rectangle_distance_type_by_concept { typedef void type; };
template <typename T>
- struct rectangle_distance_type_by_concept<T, gtl_yes> {
+ struct rectangle_distance_type_by_concept<T, gtl_yes> {
typedef typename coordinate_traits<typename rectangle_coordinate_type<T>::type>::coordinate_distance type; };
template <typename T>
@@ -98,7 +98,7 @@
typename enable_if< typename gtl_and<y_r_h, typename is_rectangle_concept<typename geometry_concept<T>::type>::type>::type,
typename rectangle_interval_type<T>::type>::type
horizontal(const T& rectangle) {
- return rectangle_traits<T>::get(rectangle, HORIZONTAL);
+ return rectangle_traits<T>::get(rectangle, HORIZONTAL);
}
struct y_r_v : gtl_yes {};
@@ -107,68 +107,68 @@
typename enable_if< typename gtl_and<y_r_v, typename is_rectangle_concept<typename geometry_concept<T>::type>::type>::type,
typename rectangle_interval_type<T>::type>::type
vertical(const T& rectangle) {
- return rectangle_traits<T>::get(rectangle, VERTICAL);
+ return rectangle_traits<T>::get(rectangle, VERTICAL);
}
struct y_r_set : gtl_yes {};
template <orientation_2d_enum orient, typename T, typename T2>
- typename enable_if< typename gtl_and_3<y_r_set, typename is_mutable_rectangle_concept<typename geometry_concept<T>::type>::type,
+ typename enable_if< typename gtl_and_3<y_r_set, typename is_mutable_rectangle_concept<typename geometry_concept<T>::type>::type,
typename is_interval_concept<typename geometry_concept<T2>::type>::type>::type,
- void>::type
+ void>::type
set(T& rectangle, const T2& interval) {
- rectangle_mutable_traits<T>::set(rectangle, orient, interval);
+ rectangle_mutable_traits<T>::set(rectangle, orient, interval);
}
struct y_r_set2 : gtl_yes {};
template <typename T, typename T2>
- typename enable_if< typename gtl_and_3<y_r_set2, typename is_mutable_rectangle_concept<typename geometry_concept<T>::type>::type,
+ typename enable_if< typename gtl_and_3<y_r_set2, typename is_mutable_rectangle_concept<typename geometry_concept<T>::type>::type,
typename is_interval_concept<typename geometry_concept<T2>::type>::type>::type,
- void>::type
+ void>::type
set(T& rectangle, orientation_2d orient, const T2& interval) {
- rectangle_mutable_traits<T>::set(rectangle, orient, interval);
+ rectangle_mutable_traits<T>::set(rectangle, orient, interval);
}
struct y_r_h2 : gtl_yes {};
template <typename T, typename T2>
- typename enable_if< typename gtl_and_3<y_r_h2, typename is_mutable_rectangle_concept<typename geometry_concept<T>::type>::type,
+ typename enable_if< typename gtl_and_3<y_r_h2, typename is_mutable_rectangle_concept<typename geometry_concept<T>::type>::type,
typename is_interval_concept<typename geometry_concept<T2>::type>::type>::type,
- void>::type
+ void>::type
horizontal(T& rectangle, const T2& interval) {
- rectangle_mutable_traits<T>::set(rectangle, HORIZONTAL, interval);
+ rectangle_mutable_traits<T>::set(rectangle, HORIZONTAL, interval);
}
struct y_r_v2 : gtl_yes {};
template <typename T, typename T2>
- typename enable_if<
- typename gtl_and_3<y_r_v2, typename is_mutable_rectangle_concept<typename geometry_concept<T>::type>::type,
- typename is_interval_concept<typename geometry_concept<T2>::type>::type>::type, void>::type
+ typename enable_if<
+ typename gtl_and_3<y_r_v2, typename is_mutable_rectangle_concept<typename geometry_concept<T>::type>::type,
+ typename is_interval_concept<typename geometry_concept<T2>::type>::type>::type, void>::type
vertical(T& rectangle, const T2& interval) {
- rectangle_mutable_traits<T>::set(rectangle, VERTICAL, interval);
+ rectangle_mutable_traits<T>::set(rectangle, VERTICAL, interval);
}
struct y_r_construct : gtl_yes {};
template <typename T, typename T2, typename T3>
typename enable_if< typename gtl_and<y_r_construct, typename is_mutable_rectangle_concept<typename geometry_concept<T>::type>::type>::type,
- T>::type
+ T>::type
construct(const T2& interval_horizontal,
const T3& interval_vertical) {
return rectangle_mutable_traits<T>::construct(interval_horizontal, interval_vertical); }
-
+
struct y_r_construct2 : gtl_yes {};
template <typename T, typename coord_type>
typename enable_if< typename gtl_and<y_r_construct2, typename is_mutable_rectangle_concept<typename geometry_concept<T>::type>::type>::type,
- T>::type
+ T>::type
construct(coord_type xl, coord_type yl, coord_type xh, coord_type yh) {
- return rectangle_mutable_traits<T>::construct(interval_data<coord_type>(xl, xh),
- interval_data<coord_type>(yl, yh));
+ return rectangle_mutable_traits<T>::construct(interval_data<coord_type>(xl, xh),
+ interval_data<coord_type>(yl, yh));
}
-
+
struct y_r_cconstruct : gtl_yes {};
template <typename T, typename T2>
@@ -180,11 +180,11 @@
copy_construct(const T2& rectangle) {
return construct<T> (get(rectangle, HORIZONTAL), get(rectangle, VERTICAL));
}
-
+
struct y_r_assign : gtl_yes {};
template <typename rectangle_type_1, typename rectangle_type_2>
- typename enable_if<
+ typename enable_if<
typename gtl_and_3< y_r_assign,
typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type_1>::type>::type,
typename is_rectangle_concept<typename geometry_concept<rectangle_type_2>::type>::type>::type,
@@ -194,34 +194,34 @@
set(lvalue, VERTICAL, get(rvalue, VERTICAL));
return lvalue;
}
-
+
struct y_r_equiv : gtl_yes {};
template <typename T, typename T2>
- typename enable_if<
+ typename enable_if<
typename gtl_and_3< y_r_equiv,
typename is_rectangle_concept<typename geometry_concept<T>::type>::type,
typename is_rectangle_concept<typename geometry_concept<T2>::type>::type>::type,
- bool>::type
+ bool>::type
equivalence(const T& rect1, const T2& rect2) {
return equivalence(get(rect1, HORIZONTAL), get(rect2, HORIZONTAL)) &&
equivalence(get(rect1, VERTICAL), get(rect2, VERTICAL));
}
-
+
struct y_r_get : gtl_yes {};
template <typename rectangle_type>
typename enable_if< typename gtl_and<y_r_get, typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
typename rectangle_coordinate_type<rectangle_type>::type>::type
get(const rectangle_type& rectangle, orientation_2d orient, direction_1d dir) {
- return get(rectangle_traits<rectangle_type>::get(rectangle, orient), dir);
+ return get(rectangle_traits<rectangle_type>::get(rectangle, orient), dir);
}
-
+
struct y_r_set3 : gtl_yes {};
template <typename rectangle_type>
- typename enable_if<typename gtl_and<y_r_set3, typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type, void>::type
- set(rectangle_type& rectangle, orientation_2d orient, direction_1d dir,
+ typename enable_if<typename gtl_and<y_r_set3, typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type, void>::type
+ set(rectangle_type& rectangle, orientation_2d orient, direction_1d dir,
typename rectangle_coordinate_type<rectangle_type>::type value) {
typename rectangle_interval_type<rectangle_type>::type ivl = get(rectangle, orient);
set(ivl, dir, value);
@@ -240,7 +240,7 @@
struct y_r_xl2 : gtl_yes {};
template <typename rectangle_type>
- typename enable_if<typename gtl_and<y_r_xl2, typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type, void>::type
+ typename enable_if<typename gtl_and<y_r_xl2, typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type, void>::type
xl(rectangle_type& rectangle, typename rectangle_coordinate_type<rectangle_type>::type value) {
return set(rectangle, HORIZONTAL, LOW, value);
}
@@ -257,7 +257,7 @@
struct y_r_xh2 : gtl_yes {};
template <typename rectangle_type>
- typename enable_if<typename gtl_and<y_r_xh2, typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type, void>::type
+ typename enable_if<typename gtl_and<y_r_xh2, typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type, void>::type
xh(rectangle_type& rectangle, typename rectangle_coordinate_type<rectangle_type>::type value) {
return set(rectangle, HORIZONTAL, HIGH, value);
}
@@ -270,11 +270,11 @@
yl(const rectangle_type& rectangle) {
return get(rectangle, VERTICAL, LOW);
}
-
+
struct y_r_yl2 : gtl_yes {};
template <typename rectangle_type>
- typename enable_if<typename gtl_and<y_r_yl2, typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type, void>::type
+ typename enable_if<typename gtl_and<y_r_yl2, typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type, void>::type
yl(rectangle_type& rectangle, typename rectangle_coordinate_type<rectangle_type>::type value) {
return set(rectangle, VERTICAL, LOW, value);
}
@@ -291,7 +291,7 @@
struct y_r_yh2 : gtl_yes {};
template <typename rectangle_type>
- typename enable_if<typename gtl_and<y_r_yh2, typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type, void>::type
+ typename enable_if<typename gtl_and<y_r_yh2, typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type, void>::type
yh(rectangle_type& rectangle, typename rectangle_coordinate_type<rectangle_type>::type value) {
return set(rectangle, VERTICAL, HIGH, value);
}
@@ -337,8 +337,8 @@
template <typename rectangle_type, typename rectangle_type_2>
typename enable_if< typename gtl_and_3<y_r_contains, typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type,
typename is_rectangle_concept<typename geometry_concept<rectangle_type_2>::type>::type>::type,
- bool>::type
- contains(const rectangle_type& rectangle, const rectangle_type_2 rectangle_contained,
+ bool>::type
+ contains(const rectangle_type& rectangle, const rectangle_type_2 rectangle_contained,
bool consider_touch = true) {
return contains(horizontal(rectangle), horizontal(rectangle_contained), consider_touch) &&
contains(vertical(rectangle), vertical(rectangle_contained), consider_touch);
@@ -348,8 +348,8 @@
template <typename rectangle_type, typename point_type>
typename enable_if< typename gtl_and_3<y_r_contains2, typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type,
- typename is_point_concept<typename geometry_concept<point_type>::type>::type>::type, bool>::type
- contains(const rectangle_type& rectangle, const point_type point_contained,
+ typename is_point_concept<typename geometry_concept<point_type>::type>::type>::type, bool>::type
+ contains(const rectangle_type& rectangle, const point_type point_contained,
bool consider_touch = true) {
return contains(horizontal(rectangle), x(point_contained), consider_touch) &&
contains(vertical(rectangle), y(point_contained), consider_touch);
@@ -360,9 +360,9 @@
// set all four coordinates based upon two points
template <typename rectangle_type, typename point_type_1, typename point_type_2>
typename enable_if< typename gtl_and_4< y_r_set_points,
- typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type,
- typename is_point_concept<typename geometry_concept<point_type_1>::type>::type,
- typename is_point_concept<typename geometry_concept<point_type_2>::type>::type>::type,
+ typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type,
+ typename is_point_concept<typename geometry_concept<point_type_1>::type>::type,
+ typename is_point_concept<typename geometry_concept<point_type_2>::type>::type>::type,
rectangle_type>::type &
set_points(rectangle_type& rectangle, const point_type_1& p1,
const point_type_2& p2) {
@@ -382,7 +382,7 @@
template <typename rectangle_type>
typename enable_if< typename gtl_and<y_r_move, typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
rectangle_type>::type &
- move(rectangle_type& rectangle, orientation_2d orient,
+ move(rectangle_type& rectangle, orientation_2d orient,
typename coordinate_traits<typename rectangle_coordinate_type<rectangle_type>::type>::coordinate_difference delta) {
typename rectangle_interval_type<rectangle_type>::type ivl = get(rectangle, orient);
move(ivl, delta);
@@ -396,8 +396,8 @@
template <typename rectangle_type_1, typename rectangle_type_2>
typename enable_if<
typename gtl_and_3< y_r_convolve,
- typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type_1>::type>::type,
- typename is_rectangle_concept<typename geometry_concept<rectangle_type_2>::type>::type>::type,
+ typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type_1>::type>::type,
+ typename is_rectangle_concept<typename geometry_concept<rectangle_type_2>::type>::type>::type,
rectangle_type_1>::type &
convolve(rectangle_type_1& rectangle,
const rectangle_type_2& convolution_rectangle) {
@@ -407,7 +407,7 @@
vertical(rectangle, convolve(ivl, vertical(convolution_rectangle)));
return rectangle;
}
-
+
struct y_r_deconvolve : gtl_yes {};
// deconvolve this with b
@@ -423,7 +423,7 @@
vertical(rectangle, deconvolve(ivl, vertical(convolution_rectangle)));
return rectangle;
}
-
+
struct y_r_reconvolve : gtl_yes {};
// reflectedConvolve this with b
@@ -439,7 +439,7 @@
vertical(rectangle, reflected_convolve(ivl, vertical(convolution_rectangle)));
return rectangle;
}
-
+
struct y_r_redeconvolve : gtl_yes {};
// reflectedDeconvolve this with b
@@ -456,7 +456,7 @@
vertical(rectangle, reflected_deconvolve(ivl, vertical(convolution_rectangle)));
return rectangle;
}
-
+
struct y_r_convolve2 : gtl_yes {};
// convolve with point
@@ -476,7 +476,7 @@
// deconvolve with point
template <typename rectangle_type, typename point_type>
- typename enable_if<
+ typename enable_if<
typename gtl_and_3<y_r_deconvolve2, typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type,
typename is_point_concept<typename geometry_concept<point_type>::type>::type>::type, rectangle_type>::type &
deconvolve(rectangle_type& rectangle, const point_type& convolution_point) {
@@ -512,8 +512,8 @@
// returns the orientation of the longest side
template <typename rectangle_type>
- typename enable_if<typename gtl_and<y_r_go, typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
- orientation_2d>::type
+ typename enable_if<typename gtl_and<y_r_go, typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
+ orientation_2d>::type
guess_orientation(const rectangle_type& rectangle) {
return delta(rectangle, HORIZONTAL) >= delta(rectangle, VERTICAL) ?
HORIZONTAL : VERTICAL;
@@ -546,10 +546,10 @@
// [in] considerTouch If true, return true even if b touches the boundary
// [ret] . true if `t` intersects b
template <typename rectangle_type_1, typename rectangle_type_2>
- typename enable_if<
+ typename enable_if<
typename gtl_and_3<y_r_intersects, typename is_rectangle_concept<typename geometry_concept<rectangle_type_1>::type>::type,
typename is_rectangle_concept<typename geometry_concept<rectangle_type_2>::type>::type>::type,
- bool>::type
+ bool>::type
intersects(const rectangle_type_1& rectangle, const rectangle_type_2& b, bool consider_touch = true) {
return intersects(horizontal(rectangle), horizontal(b), consider_touch) &&
intersects(vertical(rectangle), vertical(b), consider_touch);
@@ -562,44 +562,44 @@
// [in] considerTouch If true, return true even if p is on the foundary
// [ret] . true if `t` contains p
template <typename rectangle_type_1, typename rectangle_type_2>
- typename enable_if<
+ typename enable_if<
typename gtl_and_3<y_r_b_intersect, typename is_rectangle_concept<typename geometry_concept<rectangle_type_1>::type>::type,
typename is_rectangle_concept<typename geometry_concept<rectangle_type_2>::type>::type>::type,
- bool>::type
+ bool>::type
boundaries_intersect(const rectangle_type_1& rectangle, const rectangle_type_2& b,
bool consider_touch = true) {
return (intersects(rectangle, b, consider_touch) &&
!(contains(rectangle, b, !consider_touch)) &&
!(contains(b, rectangle, !consider_touch)));
}
-
+
struct y_r_b_abuts : gtl_yes {};
// check if b is touching 'this' on the end specified by dir
template <typename rectangle_type_1, typename rectangle_type_2>
typename enable_if< typename gtl_and_3<y_r_b_abuts, typename is_rectangle_concept<typename geometry_concept<rectangle_type_1>::type>::type,
typename is_rectangle_concept<typename geometry_concept<rectangle_type_2>::type>::type>::type,
- bool>::type
+ bool>::type
abuts(const rectangle_type_1& rectangle, const rectangle_type_2& b,
direction_2d dir) {
- return
+ return
abuts(get(rectangle, orientation_2d(dir)),
get(b, orientation_2d(dir)),
direction_1d(dir)) &&
intersects(get(rectangle, orientation_2d(dir).get_perpendicular()),
get(b, orientation_2d(dir).get_perpendicular()), true);
}
-
+
struct y_r_b_abuts2 : gtl_yes {};
// check if they are touching in the given orientation
template <typename rectangle_type_1, typename rectangle_type_2>
typename enable_if< typename gtl_and_3<y_r_b_abuts2, typename is_rectangle_concept<typename geometry_concept<rectangle_type_1>::type>::type,
typename is_rectangle_concept<typename geometry_concept<rectangle_type_2>::type>::type>::type,
- bool>::type
+ bool>::type
abuts(const rectangle_type_1& rectangle, const rectangle_type_2& b,
orientation_2d orient) {
- return
+ return
abuts(get(rectangle, orient), get(b, orient)) &&
intersects(get(rectangle, orient.get_perpendicular()),
get(b, orient.get_perpendicular()), true);
@@ -611,7 +611,7 @@
template <typename rectangle_type_1, typename rectangle_type_2>
typename enable_if< typename gtl_and_3<y_r_b_abuts3, typename is_rectangle_concept<typename geometry_concept<rectangle_type_1>::type>::type,
typename is_rectangle_concept<typename geometry_concept<rectangle_type_2>::type>::type>::type,
- bool>::type
+ bool>::type
abuts(const rectangle_type_1& rectangle, const rectangle_type_2& b) {
return abuts(rectangle, b, HORIZONTAL) || abuts(rectangle, b, VERTICAL);
}
@@ -620,10 +620,10 @@
// intersect rectangle with interval on orient
template <typename rectangle_type, typename interval_type>
- typename enable_if<
+ typename enable_if<
typename gtl_and_3<y_r_b_intersect2, typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type,
typename is_interval_concept<typename geometry_concept<interval_type>::type>::type>::type,
- bool>::type
+ bool>::type
intersect(rectangle_type& rectangle, const interval_type& b,
orientation_2d orient, bool consider_touch = true) {
typename rectangle_interval_type<rectangle_type>::type ivl = get(rectangle, orient);
@@ -640,7 +640,7 @@
template <typename rectangle_type_1, typename rectangle_type_2>
typename enable_if< typename gtl_and_3<y_r_b_intersect3, typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type_1>::type>::type,
typename is_rectangle_concept<typename geometry_concept<rectangle_type_2>::type>::type>::type,
- bool>::type
+ bool>::type
intersect(rectangle_type_1& rectangle, const rectangle_type_2& b, bool consider_touch = true) {
if(intersects(rectangle, b)) {
intersect(rectangle, horizontal(b), HORIZONTAL, consider_touch);
@@ -672,9 +672,9 @@
// bloat the interval specified by orient by bloating
template <typename rectangle_type>
- typename enable_if<typename gtl_and<y_r_bloat, typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
+ typename enable_if<typename gtl_and<y_r_bloat, typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
rectangle_type>::type &
- bloat(rectangle_type& rectangle, orientation_2d orient,
+ bloat(rectangle_type& rectangle, orientation_2d orient,
typename rectangle_coordinate_type<rectangle_type>::type bloating) {
typename rectangle_interval_type<rectangle_type>::type ivl = get(rectangle, orient);
bloat(ivl, bloating);
@@ -686,7 +686,7 @@
// bloat the Rectangle by bloating
template <typename rectangle_type>
- typename enable_if<typename gtl_and<y_r_bloat2, typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
+ typename enable_if<typename gtl_and<y_r_bloat2, typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
rectangle_type>::type &
bloat(rectangle_type& rectangle,
typename rectangle_coordinate_type<rectangle_type>::type bloating) {
@@ -698,7 +698,7 @@
// bloat the interval cooresponding to orient by bloating in dir direction
template <typename rectangle_type>
- typename enable_if<typename gtl_and<y_r_bloat3, typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
+ typename enable_if<typename gtl_and<y_r_bloat3, typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
rectangle_type>::type &
bloat(rectangle_type& rectangle, direction_2d dir,
typename rectangle_coordinate_type<rectangle_type>::type bloating) {
@@ -712,9 +712,9 @@
// shrink the interval specified by orient by bloating
template <typename rectangle_type>
- typename enable_if<typename gtl_and<y_r_shrink, typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
+ typename enable_if<typename gtl_and<y_r_shrink, typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
rectangle_type>::type &
- shrink(rectangle_type& rectangle, orientation_2d orient,
+ shrink(rectangle_type& rectangle, orientation_2d orient,
typename rectangle_coordinate_type<rectangle_type>::type shrinking) {
return bloat(rectangle, orient, -shrinking);
}
@@ -723,9 +723,9 @@
// shrink the Rectangle by bloating
template <typename rectangle_type>
- typename enable_if<typename gtl_and<y_r_shrink2, typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
+ typename enable_if<typename gtl_and<y_r_shrink2, typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
rectangle_type>::type &
- shrink(rectangle_type& rectangle,
+ shrink(rectangle_type& rectangle,
typename rectangle_coordinate_type<rectangle_type>::type shrinking) {
return bloat(rectangle, -shrinking);
}
@@ -734,7 +734,7 @@
// shrink the interval cooresponding to orient by bloating in dir direction
template <typename rectangle_type>
- typename enable_if<typename gtl_and<y_r_shrink3, typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
+ typename enable_if<typename gtl_and<y_r_shrink3, typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
rectangle_type>::type &
shrink(rectangle_type& rectangle, direction_2d dir,
typename rectangle_coordinate_type<rectangle_type>::type shrinking) {
@@ -749,7 +749,7 @@
y_r_encompass,
typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type,
typename is_interval_concept<typename geometry_concept<interval_type>::type>::type>::type,
- bool>::type
+ bool>::type
encompass(rectangle_type& rectangle, const interval_type& b, orientation_2d orient) {
typename rectangle_interval_type<rectangle_type>::type ivl = get(rectangle, orient);
if(encompass(ivl, b)) {
@@ -782,7 +782,7 @@
y_r_encompass3,
typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type_1>::type>::type,
typename is_point_concept<typename geometry_concept<point_type>::type>::type>::type,
- bool>::type
+ bool>::type
encompass(rectangle_type_1& rectangle, const point_type& b) {
typename rectangle_interval_type<rectangle_type_1>::type hivl, vivl;
hivl = horizontal(rectangle);
@@ -803,7 +803,7 @@
typename enable_if<
typename gtl_and_3<y_r_center, typename is_mutable_point_concept<typename geometry_concept<point_type>::type>::type,
typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
- bool>::type
+ bool>::type
center(point_type& center_point, const rectangle_type& rectangle) {
center_point = construct<point_type>(center(horizontal(rectangle)),
center(vertical(rectangle)));
@@ -816,7 +816,7 @@
typename enable_if<
typename gtl_and_3<y_r_get_corner, typename is_mutable_point_concept<typename geometry_concept<point_type>::type>::type,
typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
- bool>::type
+ bool>::type
get_corner(point_type& corner_point, const rectangle_type& rectangle, direction_2d direction_facing, direction_1d direction_turning) {
typedef typename rectangle_coordinate_type<rectangle_type>::type Unit;
Unit u1 = get(rectangle, direction_facing);
@@ -829,8 +829,8 @@
struct y_r_get_half : gtl_yes {};
template <typename rectangle_type>
- typename enable_if<typename gtl_and<y_r_get_half, typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
- rectangle_type>::type
+ typename enable_if<typename gtl_and<y_r_get_half, typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
+ rectangle_type>::type
get_half(const rectangle_type& rectangle, direction_2d dir) {
rectangle_type retval(rectangle);
set(retval, orientation_2d(dir), get_half(get(rectangle, orientation_2d(dir)), direction_1d(dir)));
@@ -842,7 +842,7 @@
template <typename rectangle_type_1, typename rectangle_type_2>
typename enable_if< typename gtl_and_3<y_r_join_with, typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type_1>::type>::type,
typename is_rectangle_concept<typename geometry_concept<rectangle_type_2>::type>::type>::type,
- bool>::type
+ bool>::type
join_with(rectangle_type_1& rectangle, const rectangle_type_2& b) {
typedef typename rectangle_interval_type<rectangle_type_1>::type Interval1;
typedef typename rectangle_interval_type<rectangle_type_2>::type Interval2;
@@ -860,7 +860,7 @@
}
return false;
}
-
+
struct y_r_eda2 : gtl_yes {};
template <typename rectangle_type, typename point_type>
@@ -875,8 +875,8 @@
struct y_r_eda : gtl_yes {};
template <typename rectangle_type, typename rectangle_type_2>
- typename enable_if<
- typename gtl_and_3<y_r_eda,
+ typename enable_if<
+ typename gtl_and_3<y_r_eda,
typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type,
typename is_rectangle_concept<typename geometry_concept<rectangle_type_2>::type>::type>::type,
typename rectangle_difference_type<rectangle_type>::type>::type
@@ -901,9 +901,9 @@
struct y_r_sed2 : gtl_yes {};
template <typename rectangle_type, typename rectangle_type_2>
- typename enable_if<
- typename gtl_and_3<y_r_sed2, typename is_rectangle_concept< typename geometry_concept<rectangle_type>::type>::type,
- typename is_rectangle_concept< typename geometry_concept<rectangle_type_2>::type>::type>::type,
+ typename enable_if<
+ typename gtl_and_3<y_r_sed2, typename is_rectangle_concept< typename geometry_concept<rectangle_type>::type>::type,
+ typename is_rectangle_concept< typename geometry_concept<rectangle_type_2>::type>::type>::type,
typename rectangle_difference_type<rectangle_type>::type>::type
square_euclidean_distance(const rectangle_type& lvalue, const rectangle_type_2& rvalue) {
typename coordinate_traits<typename rectangle_coordinate_type<rectangle_type>::type>::coordinate_difference xdist, ydist;
@@ -917,10 +917,9 @@
template <typename rectangle_type, typename point_type>
typename enable_if< typename gtl_and_3<y_r_edist, typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type,
typename is_point_concept<typename geometry_concept<point_type>::type>::type>::type,
- typename rectangle_distance_type<rectangle_type>::type>::type
+ typename rectangle_distance_type<rectangle_type>::type>::type
euclidean_distance(rectangle_type& lvalue, const point_type& rvalue) {
- return sqrt((double)
- (square_euclidean_distance(lvalue, rvalue)));
+ return std::sqrt((double)(square_euclidean_distance(lvalue, rvalue)));
}
struct y_r_edist2 : gtl_yes {};
@@ -928,16 +927,16 @@
template <typename rectangle_type, typename rectangle_type_2>
typename enable_if< typename gtl_and_3<y_r_edist2, typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type,
typename is_rectangle_concept<typename geometry_concept<rectangle_type_2>::type>::type>::type,
- typename rectangle_distance_type<rectangle_type>::type>::type
+ typename rectangle_distance_type<rectangle_type>::type>::type
euclidean_distance(const rectangle_type& lvalue, const rectangle_type_2& rvalue) {
double val = (int)square_euclidean_distance(lvalue, rvalue);
- return sqrt(val);
+ return std::sqrt(val);
}
struct y_r_mdist : gtl_yes {};
template <typename rectangle_type, typename point_type>
- typename enable_if<
+ typename enable_if<
typename gtl_and_3<y_r_mdist, typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type,
typename is_point_concept<typename geometry_concept<point_type>::type>::type>::type,
typename rectangle_difference_type<rectangle_type>::type>::type
@@ -951,7 +950,7 @@
struct y_r_mdist2 : gtl_yes {};
template <typename rectangle_type, typename rectangle_type_2>
- typename enable_if<
+ typename enable_if<
typename gtl_and_3<y_r_mdist2, typename is_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type,
typename is_rectangle_concept<typename geometry_concept<rectangle_type_2>::type>::type>::type,
typename rectangle_difference_type<rectangle_type>::type>::type
@@ -965,21 +964,21 @@
struct y_r_scale_up : gtl_yes {};
template <typename rectangle_type>
- typename enable_if<typename gtl_and<y_r_scale_up, typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
+ typename enable_if<typename gtl_and<y_r_scale_up, typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
rectangle_type>::type &
- scale_up(rectangle_type& rectangle,
+ scale_up(rectangle_type& rectangle,
typename coordinate_traits<typename rectangle_coordinate_type<rectangle_type>::type>::unsigned_area_type factor) {
horizontal(rectangle, scale_up(horizontal(rectangle), factor));
vertical(rectangle, scale_up(vertical(rectangle), factor));
return rectangle;
}
-
+
struct y_r_scale_down : gtl_yes {};
-
+
template <typename rectangle_type>
- typename enable_if<typename gtl_and<y_r_scale_down, typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
+ typename enable_if<typename gtl_and<y_r_scale_down, typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
rectangle_type>::type &
- scale_down(rectangle_type& rectangle,
+ scale_down(rectangle_type& rectangle,
typename coordinate_traits<typename rectangle_coordinate_type<rectangle_type>::type>::unsigned_area_type factor) {
horizontal(rectangle, scale_down(horizontal(rectangle), factor));
vertical(rectangle, scale_down(vertical(rectangle), factor));
@@ -989,7 +988,7 @@
struct y_r_scale : gtl_yes {};
template <typename rectangle_type, typename scaling_type>
- typename enable_if<typename gtl_and<y_r_scale, typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
+ typename enable_if<typename gtl_and<y_r_scale, typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
rectangle_type>::type &
scale(rectangle_type& rectangle, const scaling_type& scaling) {
point_data<typename rectangle_coordinate_type<rectangle_type>::type> llp(xl(rectangle), yl(rectangle));
@@ -999,11 +998,11 @@
set_points(rectangle, llp, urp);
return rectangle;
}
-
+
struct y_r_transform : gtl_yes {};
-
+
template <typename rectangle_type, typename transformation_type>
- typename enable_if<typename gtl_and<y_r_transform, typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
+ typename enable_if<typename gtl_and<y_r_transform, typename is_mutable_rectangle_concept<typename geometry_concept<rectangle_type>::type>::type>::type,
rectangle_type>::type &
transform(rectangle_type& rectangle, const transformation_type& transformation) {
point_data<typename rectangle_coordinate_type<rectangle_type>::type> llp(xl(rectangle), yl(rectangle));
@@ -1013,7 +1012,7 @@
set_points(rectangle, llp, urp);
return rectangle;
}
-
+
template <typename rectangle_type_1, typename rectangle_type_2>
class less_rectangle_concept {
private:
@@ -1023,12 +1022,12 @@
typename enable_if<
typename gtl_and< typename is_rectangle_concept<typename geometry_concept<rectangle_type_1>::type>::type,
typename is_rectangle_concept<typename geometry_concept<rectangle_type_2>::type>::type>::type,
- bool>::type
+ bool>::type
operator () (const rectangle_type_1& a,
const rectangle_type_2& b) const {
typedef typename rectangle_coordinate_type<rectangle_type_1>::type Unit;
- Unit vl1 = get(get(a, orient_), LOW);
- Unit vl2 = get(get(b, orient_), LOW);
+ Unit vl1 = get(get(a, orient_), LOW);
+ Unit vl2 = get(get(b, orient_), LOW);
if(vl1 > vl2) return false;
if(vl1 == vl2) {
orientation_2d perp = orient_.get_perpendicular();
@@ -1036,8 +1035,8 @@
Unit hl2 = get(get(b, perp), LOW);
if(hl1 > hl2) return false;
if(hl1 == hl2) {
- Unit vh1 = get(get(a, orient_), HIGH);
- Unit vh2 = get(get(b, orient_), HIGH);
+ Unit vh1 = get(get(a, orient_), HIGH);
+ Unit vh2 = get(get(b, orient_), HIGH);
if(vh1 > vh2) return false;
if(vh1 == vh2) {
Unit hh1 = get(get(a, perp), HIGH);
@@ -1048,7 +1047,7 @@
}
return true;
}
-
+
};
template <typename T>
@@ -1063,7 +1062,7 @@
assign(*this, rvalue);
return *this;
}
-
+
template <class T>
template <class T2>
bool rectangle_data<T>::operator==(const T2& rvalue) const {
@@ -1077,4 +1076,3 @@
}
}
#endif
-
Modified: trunk/boost/polygon/rectangle_data.hpp
==============================================================================
--- trunk/boost/polygon/rectangle_data.hpp (original)
+++ trunk/boost/polygon/rectangle_data.hpp 2012-05-09 15:33:59 EDT (Wed, 09 May 2012)
@@ -1,6 +1,6 @@
/*
Copyright 2008 Intel Corporation
-
+
Use, modification and distribution are subject to the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
@@ -52,13 +52,12 @@
return ranges_[orientation_2d(dir).to_int()].set(direction_1d(dir), value);
}
template <typename interval_type_1>
- inline void set(orientation_2d orient, const interval_type_1& interval);
+ inline void set(orientation_2d orient, const interval_type_1& interval);
private:
- interval_data<coordinate_type> ranges_[2];
+ interval_data<coordinate_type> ranges_[2];
};
}
}
#endif
-
Modified: trunk/boost/polygon/rectangle_traits.hpp
==============================================================================
--- trunk/boost/polygon/rectangle_traits.hpp (original)
+++ trunk/boost/polygon/rectangle_traits.hpp 2012-05-09 15:33:59 EDT (Wed, 09 May 2012)
@@ -1,6 +1,6 @@
/*
Copyright 2008 Intel Corporation
-
+
Use, modification and distribution are subject to the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
@@ -35,4 +35,3 @@
}
}
#endif
-
Modified: trunk/boost/polygon/segment_concept.hpp
==============================================================================
--- trunk/boost/polygon/segment_concept.hpp (original)
+++ trunk/boost/polygon/segment_concept.hpp 2012-05-09 15:33:59 EDT (Wed, 09 May 2012)
@@ -336,7 +336,7 @@
uint_x2 b3 = (uint_x2)(b1 < 0 ? -b1 : b1) * (uint_x2)(a2 < 0 ? -a2 : a2);
if (a3 == b3)
return 0;
- return ((a3 < b3) ^ (sign1 == 1)) ? 1 : -1;
+ return ((a3 < b3) ^ (sign1 == 1)) ? 1 : -1;
}
struct y_s_orientation2 : gtl_yes {};
@@ -386,7 +386,7 @@
return false;
return true;
}
-
+
struct y_s_contains2 : gtl_yes {};
template <typename Segment1, typename Segment2>
Modified: trunk/boost/polygon/transform.hpp
==============================================================================
--- trunk/boost/polygon/transform.hpp (original)
+++ trunk/boost/polygon/transform.hpp 2012-05-09 15:33:59 EDT (Wed, 09 May 2012)
@@ -1,6 +1,6 @@
/*
Copyright 2008 Intel Corporation
-
+
Use, modification and distribution are subject to the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
@@ -22,7 +22,7 @@
// positive proximal direction to.
// The zero position bit (LSB) indicates whether the horizontal axis flips
// when transformed.
-// The 1st postion bit indicates whether the vertical axis flips when
+// The 1st postion bit indicates whether the vertical axis flips when
// transformed.
// The 2nd position bit indicates whether the horizontal and vertical axis
// swap positions when transformed.
@@ -39,110 +39,110 @@
// meaning of the 2nd position bit to mean that the horizontal and vertical are
// swapped in their new positions.
// Enum Values:
-// 000000 EAST NORTH UP
-// 000001 WEST NORTH UP
-// 000010 EAST SOUTH UP
-// 000011 WEST SOUTH UP
-// 000100 NORTH EAST UP
-// 000101 SOUTH EAST UP
-// 000110 NORTH WEST UP
-// 000111 SOUTH WEST UP
-// 001000 EAST NORTH DOWN
-// 001001 WEST NORTH DOWN
-// 001010 EAST SOUTH DOWN
-// 001011 WEST SOUTH DOWN
-// 001100 NORTH EAST DOWN
-// 001101 SOUTH EAST DOWN
-// 001110 NORTH WEST DOWN
-// 001111 SOUTH WEST DOWN
-// 010000 UP NORTH EAST
-// 010001 DOWN NORTH EAST
-// 010010 UP SOUTH EAST
-// 010011 DOWN SOUTH EAST
-// 010100 NORTH UP EAST
-// 010101 SOUTH UP EAST
-// 010110 NORTH DOWN EAST
-// 010111 SOUTH DOWN EAST
-// 011000 UP NORTH WEST
-// 011001 DOWN NORTH WEST
-// 011010 UP SOUTH WEST
-// 011011 DOWN SOUTH WEST
-// 011100 NORTH UP WEST
-// 011101 SOUTH UP WEST
-// 011110 NORTH DOWN WEST
-// 011111 SOUTH DOWN WEST
-// 100000 EAST UP NORTH
-// 100001 WEST UP NORTH
-// 100010 EAST DOWN NORTH
-// 100011 WEST DOWN NORTH
-// 100100 UP EAST NORTH
-// 100101 DOWN EAST NORTH
-// 100110 UP WEST NORTH
-// 100111 DOWN WEST NORTH
-// 101000 EAST UP SOUTH
-// 101001 WEST UP SOUTH
-// 101010 EAST DOWN SOUTH
-// 101011 WEST DOWN SOUTH
-// 101100 UP EAST SOUTH
-// 101101 DOWN EAST SOUTH
-// 101110 UP WEST SOUTH
-// 101111 DOWN WEST SOUTH
+// 000000 EAST NORTH UP
+// 000001 WEST NORTH UP
+// 000010 EAST SOUTH UP
+// 000011 WEST SOUTH UP
+// 000100 NORTH EAST UP
+// 000101 SOUTH EAST UP
+// 000110 NORTH WEST UP
+// 000111 SOUTH WEST UP
+// 001000 EAST NORTH DOWN
+// 001001 WEST NORTH DOWN
+// 001010 EAST SOUTH DOWN
+// 001011 WEST SOUTH DOWN
+// 001100 NORTH EAST DOWN
+// 001101 SOUTH EAST DOWN
+// 001110 NORTH WEST DOWN
+// 001111 SOUTH WEST DOWN
+// 010000 UP NORTH EAST
+// 010001 DOWN NORTH EAST
+// 010010 UP SOUTH EAST
+// 010011 DOWN SOUTH EAST
+// 010100 NORTH UP EAST
+// 010101 SOUTH UP EAST
+// 010110 NORTH DOWN EAST
+// 010111 SOUTH DOWN EAST
+// 011000 UP NORTH WEST
+// 011001 DOWN NORTH WEST
+// 011010 UP SOUTH WEST
+// 011011 DOWN SOUTH WEST
+// 011100 NORTH UP WEST
+// 011101 SOUTH UP WEST
+// 011110 NORTH DOWN WEST
+// 011111 SOUTH DOWN WEST
+// 100000 EAST UP NORTH
+// 100001 WEST UP NORTH
+// 100010 EAST DOWN NORTH
+// 100011 WEST DOWN NORTH
+// 100100 UP EAST NORTH
+// 100101 DOWN EAST NORTH
+// 100110 UP WEST NORTH
+// 100111 DOWN WEST NORTH
+// 101000 EAST UP SOUTH
+// 101001 WEST UP SOUTH
+// 101010 EAST DOWN SOUTH
+// 101011 WEST DOWN SOUTH
+// 101100 UP EAST SOUTH
+// 101101 DOWN EAST SOUTH
+// 101110 UP WEST SOUTH
+// 101111 DOWN WEST SOUTH
class axis_transformation {
public:
// Enum Names and values
// NULL_TRANSFORM = 0, BEGIN_TRANSFORM = 0,
- // ENU = 0, EAST_NORTH_UP = 0, EN = 0, EAST_NORTH = 0,
+ // ENU = 0, EAST_NORTH_UP = 0, EN = 0, EAST_NORTH = 0,
// WNU = 1, WEST_NORTH_UP = 1, WN = 1, WEST_NORTH = 1, FLIP_X = 1,
// ESU = 2, EAST_SOUTH_UP = 2, ES = 2, EAST_SOUTH = 2, FLIP_Y = 2,
- // WSU = 3, WEST_SOUTH_UP = 3, WS = 3, WEST_SOUTH = 3,
+ // WSU = 3, WEST_SOUTH_UP = 3, WS = 3, WEST_SOUTH = 3,
// NEU = 4, NORTH_EAST_UP = 4, NE = 4, NORTH_EAST = 4, SWAP_XY = 4,
- // SEU = 5, SOUTH_EAST_UP = 5, SE = 5, SOUTH_EAST = 5,
- // NWU = 6, NORTH_WEST_UP = 6, NW = 6, NORTH_WEST = 6,
- // SWU = 7, SOUTH_WEST_UP = 7, SW = 7, SOUTH_WEST = 7,
+ // SEU = 5, SOUTH_EAST_UP = 5, SE = 5, SOUTH_EAST = 5,
+ // NWU = 6, NORTH_WEST_UP = 6, NW = 6, NORTH_WEST = 6,
+ // SWU = 7, SOUTH_WEST_UP = 7, SW = 7, SOUTH_WEST = 7,
// END_2D_TRANSFORM = 7,
- // END = 8, EAST_NORTH_DOWN = 8,
- // WND = 9, WEST_NORTH_DOWN = 9,
- // ESD = 10, EAST_SOUTH_DOWN = 10,
- // WSD = 11, WEST_SOUTH_DOWN = 11,
- // NED = 12, NORTH_EAST_DOWN = 12,
- // SED = 13, SOUTH_EAST_DOWN = 13,
- // NWD = 14, NORTH_WEST_DOWN = 14,
- // SWD = 15, SOUTH_WEST_DOWN = 15,
- // UNE = 16, UP_NORTH_EAST = 16,
- // DNE = 17, DOWN_NORTH_EAST = 17,
- // USE = 18, UP_SOUTH_EAST = 18,
- // DSE = 19, DOWN_SOUTH_EAST = 19,
- // NUE = 20, NORTH_UP_EAST = 20,
- // SUE = 21, SOUTH_UP_EAST = 21,
- // NDE = 22, NORTH_DOWN_EAST = 22,
- // SDE = 23, SOUTH_DOWN_EAST = 23,
- // UNW = 24, UP_NORTH_WEST = 24,
- // DNW = 25, DOWN_NORTH_WEST = 25,
- // USW = 26, UP_SOUTH_WEST = 26,
- // DSW = 27, DOWN_SOUTH_WEST = 27,
- // NUW = 28, NORTH_UP_WEST = 28,
- // SUW = 29, SOUTH_UP_WEST = 29,
- // NDW = 30, NORTH_DOWN_WEST = 30,
- // SDW = 31, SOUTH_DOWN_WEST = 31,
- // EUN = 32, EAST_UP_NORTH = 32,
- // WUN = 33, WEST_UP_NORTH = 33,
- // EDN = 34, EAST_DOWN_NORTH = 34,
- // WDN = 35, WEST_DOWN_NORTH = 35,
- // UEN = 36, UP_EAST_NORTH = 36,
- // DEN = 37, DOWN_EAST_NORTH = 37,
- // UWN = 38, UP_WEST_NORTH = 38,
- // DWN = 39, DOWN_WEST_NORTH = 39,
- // EUS = 40, EAST_UP_SOUTH = 40,
- // WUS = 41, WEST_UP_SOUTH = 41,
- // EDS = 42, EAST_DOWN_SOUTH = 42,
- // WDS = 43, WEST_DOWN_SOUTH = 43,
- // UES = 44, UP_EAST_SOUTH = 44,
- // DES = 45, DOWN_EAST_SOUTH = 45,
- // UWS = 46, UP_WEST_SOUTH = 46,
- // DWS = 47, DOWN_WEST_SOUTH = 47, END_TRANSFORM = 47
+ // END = 8, EAST_NORTH_DOWN = 8,
+ // WND = 9, WEST_NORTH_DOWN = 9,
+ // ESD = 10, EAST_SOUTH_DOWN = 10,
+ // WSD = 11, WEST_SOUTH_DOWN = 11,
+ // NED = 12, NORTH_EAST_DOWN = 12,
+ // SED = 13, SOUTH_EAST_DOWN = 13,
+ // NWD = 14, NORTH_WEST_DOWN = 14,
+ // SWD = 15, SOUTH_WEST_DOWN = 15,
+ // UNE = 16, UP_NORTH_EAST = 16,
+ // DNE = 17, DOWN_NORTH_EAST = 17,
+ // USE = 18, UP_SOUTH_EAST = 18,
+ // DSE = 19, DOWN_SOUTH_EAST = 19,
+ // NUE = 20, NORTH_UP_EAST = 20,
+ // SUE = 21, SOUTH_UP_EAST = 21,
+ // NDE = 22, NORTH_DOWN_EAST = 22,
+ // SDE = 23, SOUTH_DOWN_EAST = 23,
+ // UNW = 24, UP_NORTH_WEST = 24,
+ // DNW = 25, DOWN_NORTH_WEST = 25,
+ // USW = 26, UP_SOUTH_WEST = 26,
+ // DSW = 27, DOWN_SOUTH_WEST = 27,
+ // NUW = 28, NORTH_UP_WEST = 28,
+ // SUW = 29, SOUTH_UP_WEST = 29,
+ // NDW = 30, NORTH_DOWN_WEST = 30,
+ // SDW = 31, SOUTH_DOWN_WEST = 31,
+ // EUN = 32, EAST_UP_NORTH = 32,
+ // WUN = 33, WEST_UP_NORTH = 33,
+ // EDN = 34, EAST_DOWN_NORTH = 34,
+ // WDN = 35, WEST_DOWN_NORTH = 35,
+ // UEN = 36, UP_EAST_NORTH = 36,
+ // DEN = 37, DOWN_EAST_NORTH = 37,
+ // UWN = 38, UP_WEST_NORTH = 38,
+ // DWN = 39, DOWN_WEST_NORTH = 39,
+ // EUS = 40, EAST_UP_SOUTH = 40,
+ // WUS = 41, WEST_UP_SOUTH = 41,
+ // EDS = 42, EAST_DOWN_SOUTH = 42,
+ // WDS = 43, WEST_DOWN_SOUTH = 43,
+ // UES = 44, UP_EAST_SOUTH = 44,
+ // DES = 45, DOWN_EAST_SOUTH = 45,
+ // UWS = 46, UP_WEST_SOUTH = 46,
+ // DWS = 47, DOWN_WEST_SOUTH = 47, END_TRANSFORM = 47
enum ATR {
NULL_TRANSFORM = 0, BEGIN_TRANSFORM = 0,
- ENU = 0, EAST_NORTH_UP = 0, EN = 0, EAST_NORTH = 0,
+ ENU = 0, EAST_NORTH_UP = 0, EN = 0, EAST_NORTH = 0,
WNU = 1, WEST_NORTH_UP = 1, WN = 1, WEST_NORTH = 1, FLIP_X = 1,
ESU = 2, EAST_SOUTH_UP = 2, ES = 2, EAST_SOUTH = 2, FLIP_Y = 2,
WSU = 3, WEST_SOUTH_UP = 3, WS = 3, WEST_SOUTH = 3, FLIP_XY = 3,
@@ -151,47 +151,47 @@
NWU = 6, NORTH_WEST_UP = 6, NW = 6, NORTH_WEST = 6, ROTATE_RIGHT = 6,
SWU = 7, SOUTH_WEST_UP = 7, SW = 7, SOUTH_WEST = 7, FLIP_SWAP_XY = 7, END_2D_TRANSFORM = 7,
END = 8, EAST_NORTH_DOWN = 8, FLIP_Z = 8,
- WND = 9, WEST_NORTH_DOWN = 9,
- ESD = 10, EAST_SOUTH_DOWN = 10,
- WSD = 11, WEST_SOUTH_DOWN = 11,
- NED = 12, NORTH_EAST_DOWN = 12,
- SED = 13, SOUTH_EAST_DOWN = 13,
- NWD = 14, NORTH_WEST_DOWN = 14,
- SWD = 15, SOUTH_WEST_DOWN = 15,
- UNE = 16, UP_NORTH_EAST = 16,
- DNE = 17, DOWN_NORTH_EAST = 17,
- USE = 18, UP_SOUTH_EAST = 18,
- DSE = 19, DOWN_SOUTH_EAST = 19,
- NUE = 20, NORTH_UP_EAST = 20,
- SUE = 21, SOUTH_UP_EAST = 21,
- NDE = 22, NORTH_DOWN_EAST = 22,
- SDE = 23, SOUTH_DOWN_EAST = 23,
- UNW = 24, UP_NORTH_WEST = 24,
- DNW = 25, DOWN_NORTH_WEST = 25,
- USW = 26, UP_SOUTH_WEST = 26,
- DSW = 27, DOWN_SOUTH_WEST = 27,
- NUW = 28, NORTH_UP_WEST = 28,
- SUW = 29, SOUTH_UP_WEST = 29,
- NDW = 30, NORTH_DOWN_WEST = 30,
- SDW = 31, SOUTH_DOWN_WEST = 31,
- EUN = 32, EAST_UP_NORTH = 32,
- WUN = 33, WEST_UP_NORTH = 33,
- EDN = 34, EAST_DOWN_NORTH = 34,
- WDN = 35, WEST_DOWN_NORTH = 35,
- UEN = 36, UP_EAST_NORTH = 36,
- DEN = 37, DOWN_EAST_NORTH = 37,
- UWN = 38, UP_WEST_NORTH = 38,
- DWN = 39, DOWN_WEST_NORTH = 39,
- EUS = 40, EAST_UP_SOUTH = 40,
- WUS = 41, WEST_UP_SOUTH = 41,
- EDS = 42, EAST_DOWN_SOUTH = 42,
- WDS = 43, WEST_DOWN_SOUTH = 43,
- UES = 44, UP_EAST_SOUTH = 44,
- DES = 45, DOWN_EAST_SOUTH = 45,
- UWS = 46, UP_WEST_SOUTH = 46,
- DWS = 47, DOWN_WEST_SOUTH = 47, END_TRANSFORM = 47
+ WND = 9, WEST_NORTH_DOWN = 9,
+ ESD = 10, EAST_SOUTH_DOWN = 10,
+ WSD = 11, WEST_SOUTH_DOWN = 11,
+ NED = 12, NORTH_EAST_DOWN = 12,
+ SED = 13, SOUTH_EAST_DOWN = 13,
+ NWD = 14, NORTH_WEST_DOWN = 14,
+ SWD = 15, SOUTH_WEST_DOWN = 15,
+ UNE = 16, UP_NORTH_EAST = 16,
+ DNE = 17, DOWN_NORTH_EAST = 17,
+ USE = 18, UP_SOUTH_EAST = 18,
+ DSE = 19, DOWN_SOUTH_EAST = 19,
+ NUE = 20, NORTH_UP_EAST = 20,
+ SUE = 21, SOUTH_UP_EAST = 21,
+ NDE = 22, NORTH_DOWN_EAST = 22,
+ SDE = 23, SOUTH_DOWN_EAST = 23,
+ UNW = 24, UP_NORTH_WEST = 24,
+ DNW = 25, DOWN_NORTH_WEST = 25,
+ USW = 26, UP_SOUTH_WEST = 26,
+ DSW = 27, DOWN_SOUTH_WEST = 27,
+ NUW = 28, NORTH_UP_WEST = 28,
+ SUW = 29, SOUTH_UP_WEST = 29,
+ NDW = 30, NORTH_DOWN_WEST = 30,
+ SDW = 31, SOUTH_DOWN_WEST = 31,
+ EUN = 32, EAST_UP_NORTH = 32,
+ WUN = 33, WEST_UP_NORTH = 33,
+ EDN = 34, EAST_DOWN_NORTH = 34,
+ WDN = 35, WEST_DOWN_NORTH = 35,
+ UEN = 36, UP_EAST_NORTH = 36,
+ DEN = 37, DOWN_EAST_NORTH = 37,
+ UWN = 38, UP_WEST_NORTH = 38,
+ DWN = 39, DOWN_WEST_NORTH = 39,
+ EUS = 40, EAST_UP_SOUTH = 40,
+ WUS = 41, WEST_UP_SOUTH = 41,
+ EDS = 42, EAST_DOWN_SOUTH = 42,
+ WDS = 43, WEST_DOWN_SOUTH = 43,
+ UES = 44, UP_EAST_SOUTH = 44,
+ DES = 45, DOWN_EAST_SOUTH = 45,
+ UWS = 46, UP_WEST_SOUTH = 46,
+ DWS = 47, DOWN_WEST_SOUTH = 47, END_TRANSFORM = 47
};
-
+
// Individual axis enum values indicate which axis an implicit individual
// axis will be mapped to.
// The value of the enum paired with an axis provides the information
@@ -224,10 +224,10 @@
explicit axis_transformation(const orientation_2d& orient);
explicit axis_transformation(const direction_2d& dir);
- // assignment operator
+ // assignment operator
axis_transformation& operator=(const axis_transformation& a);
- // assignment operator
+ // assignment operator
axis_transformation& operator=(const ATR& atr);
// equivalence operator
@@ -239,7 +239,7 @@
// ordering
bool operator<(const axis_transformation& a) const;
- // concatenation operator
+ // concatenation operator
axis_transformation operator+(const axis_transformation& a) const;
// concatenate this with that
@@ -255,7 +255,7 @@
direction_2d& vertical_dir) const {
bool bit2 = (atr_ & 4) != 0;
bool bit1 = (atr_ & 2) != 0;
- bool bit0 = (atr_ & 1) != 0;
+ bool bit0 = (atr_ & 1) != 0;
vertical_dir = direction_2d((direction_2d_enum)(((int)(!bit2) << 1) + !bit1));
horizontal_dir = direction_2d((direction_2d_enum)(((int)(bit2) << 1) + !bit0));
}
@@ -270,19 +270,19 @@
bool bit3 = (atr_ & 8) != 0;
bool bit2 = (atr_ & 4) != 0;
bool bit1 = (atr_ & 2) != 0;
- bool bit0 = (atr_ & 1) != 0;
+ bool bit0 = (atr_ & 1) != 0;
proximal_dir = direction_3d((direction_2d_enum)((((int)(!bit4 & !bit5)) << 2) +
- ((int)(bit5) << 1) +
+ ((int)(bit5) << 1) +
!bit3));
vertical_dir = direction_3d((direction_2d_enum)((((int)((bit4 & bit2) | (bit5 & !bit2))) << 2)+
- ((int)(!bit5 & !bit2) << 1) +
+ ((int)(!bit5 & !bit2) << 1) +
!bit1));
- horizontal_dir = direction_3d((direction_2d_enum)((((int)((bit5 & bit2) |
+ horizontal_dir = direction_3d((direction_2d_enum)((((int)((bit5 & bit2) |
(bit4 & !bit2))) << 2) +
- ((int)(bit2 & !bit5) << 1) +
+ ((int)(bit2 & !bit5) << 1) +
!bit0));
}
-
+
// combine_axis_arrays concatenates this_array and that_array overwriting
// the result into this_array
static void combine_axis_arrays (INDIVIDUAL_AXIS this_array[],
@@ -293,7 +293,7 @@
void write_back_axis_array(const INDIVIDUAL_AXIS this_array[]);
// behavior is deterministic but undefined in the case where illegal
- // combinations of directions are passed in.
+ // combinations of directions are passed in.
axis_transformation& set_directions(const direction_2d& horizontal_dir,
const direction_2d& vertical_dir);
// behavior is deterministic but undefined in the case where illegal
@@ -341,31 +341,31 @@
public:
inline anisotropic_scale_factor()
#ifndef BOOST_POLYGON_MSVC
- : scale_()
+ : scale_()
#endif
{
scale_[0] = 1;
scale_[1] = 1;
scale_[2] = 1;
- }
+ }
inline anisotropic_scale_factor(scale_factor_type xscale, scale_factor_type yscale)
#ifndef BOOST_POLYGON_MSVC
- : scale_()
-#endif
+ : scale_()
+#endif
{
scale_[0] = xscale;
scale_[1] = yscale;
scale_[2] = 1;
- }
- inline anisotropic_scale_factor(scale_factor_type xscale, scale_factor_type yscale, scale_factor_type zscale)
+ }
+ inline anisotropic_scale_factor(scale_factor_type xscale, scale_factor_type yscale, scale_factor_type zscale)
#ifndef BOOST_POLYGON_MSVC
- : scale_()
-#endif
+ : scale_()
+#endif
{
scale_[0] = xscale;
scale_[1] = yscale;
scale_[2] = zscale;
- }
+ }
// get a component of the anisotropic_scale_factor by orientation
scale_factor_type get(orientation_3d orient) const;
@@ -400,7 +400,7 @@
void scale(coordinate_type& x, coordinate_type& y, coordinate_type& z) const;
// invert this scale factor to give the reverse scale factor
- anisotropic_scale_factor& invert();
+ anisotropic_scale_factor& invert();
private:
scale_factor_type scale_[3];
@@ -428,16 +428,16 @@
transformation(axis_transformation atr, const point_type& referencePt, const point_type& destinationPt);
transformation(const transformation& tr);
- // equivalence operator
+ // equivalence operator
bool operator==(const transformation& tr) const;
- // inequivalence operator
+ // inequivalence operator
bool operator!=(const transformation& tr) const;
// ordering
bool operator<(const transformation& tr) const;
- // concatenation operator
+ // concatenation operator
transformation operator+(const transformation& tr) const;
// concatenate this with that
@@ -465,7 +465,7 @@
// invert this transformation
transformation& invert();
-
+
// get the inverse of this transformation
transformation inverse() const;
@@ -498,4 +498,3 @@
}
#include "detail/transform_detail.hpp"
#endif
-
Modified: trunk/boost/polygon/voronoi.hpp
==============================================================================
--- trunk/boost/polygon/voronoi.hpp (original)
+++ trunk/boost/polygon/voronoi.hpp 2012-05-09 15:33:59 EDT (Wed, 09 May 2012)
@@ -10,7 +10,10 @@
#ifndef BOOST_POLYGON_VORONOI
#define BOOST_POLYGON_VORONOI
-#include "polygon.hpp"
+#include "isotropy.hpp"
+#include "point_concept.hpp"
+#include "segment_concept.hpp"
+
#include "voronoi_builder.hpp"
#include "voronoi_diagram.hpp"
@@ -29,13 +32,9 @@
namespace boost {
namespace polygon {
-struct voronoi_insert_point_yes : gtl_yes {};
-
template <typename Point, typename VB>
-static inline
typename enable_if<
- typename gtl_and<
- voronoi_insert_point_yes,
+ typename gtl_if<
typename is_point_concept<
typename geometry_concept<Point>::type
>::type
@@ -46,13 +45,9 @@
vb->insert_point(x(point), y(point));
}
-struct voronoi_insert_points_yes : gtl_yes {};
-
template <typename PointIterator, typename VB>
-static inline
typename enable_if<
- typename gtl_and<
- voronoi_insert_points_yes,
+ typename gtl_if<
typename is_point_concept<
typename geometry_concept<
typename std::iterator_traits<PointIterator>::value_type
@@ -67,13 +62,9 @@
}
}
-struct voronoi_insert_segment_yes : gtl_yes {};
-
template <typename Segment, typename VB>
-static inline
typename enable_if<
- typename gtl_and<
- voronoi_insert_segment_yes,
+ typename gtl_if<
typename is_segment_concept<
typename geometry_concept<Segment>::type
>::type
@@ -84,13 +75,9 @@
vb->insert_segment(x(low(segment)), y(low(segment)), x(high(segment)), y(high(segment)));
}
-struct voronoi_insert_segments_yes : gtl_yes {};
-
template <typename SegmentIterator, typename VB>
-static inline
typename enable_if<
- typename gtl_and<
- voronoi_insert_segments_yes,
+ typename gtl_if<
typename is_segment_concept<
typename geometry_concept<
typename std::iterator_traits<SegmentIterator>::value_type
@@ -105,13 +92,9 @@
}
}
-struct voronoi_construct_points_yes : gtl_yes {};
-
template <typename PointIterator, typename VD>
-static inline
typename enable_if<
- typename gtl_and<
- voronoi_construct_points_yes,
+ typename gtl_if<
typename is_point_concept<
typename geometry_concept<
typename std::iterator_traits<PointIterator>::value_type
@@ -126,13 +109,9 @@
builder.construct(vd);
}
-struct voronoi_construct_segments_yes : gtl_yes {};
-
template <typename SegmentIterator, typename VD>
-static inline
typename enable_if<
- typename gtl_and<
- voronoi_construct_segments_yes,
+ typename gtl_if<
typename is_segment_concept<
typename geometry_concept<
typename std::iterator_traits<SegmentIterator>::value_type
@@ -147,13 +126,9 @@
builder.construct(vd);
}
-struct voronoi_construct_points_and_segments_yes : gtl_yes {};
-
template <typename PointIterator, typename SegmentIterator, typename VD>
-static inline
typename enable_if<
- typename gtl_and_3<
- voronoi_construct_points_and_segments_yes,
+ typename gtl_and<
typename gtl_if<
typename is_point_concept<
typename geometry_concept<
Modified: trunk/boost/polygon/voronoi_builder.hpp
==============================================================================
--- trunk/boost/polygon/voronoi_builder.hpp (original)
+++ trunk/boost/polygon/voronoi_builder.hpp 2012-05-09 15:33:59 EDT (Wed, 09 May 2012)
@@ -157,7 +157,7 @@
event_comparison_predicate());
// Remove duplicates.
- site_events_.erase(unique(
+ site_events_.erase(std::unique(
site_events_.begin(), site_events_.end()), site_events_.end());
// Index sites.
Modified: trunk/boost/polygon/voronoi_diagram.hpp
==============================================================================
--- trunk/boost/polygon/voronoi_diagram.hpp (original)
+++ trunk/boost/polygon/voronoi_diagram.hpp 2012-05-09 15:33:59 EDT (Wed, 09 May 2012)
@@ -504,7 +504,7 @@
e1->twin(e2);
e2->twin(e1);
if (e1->prev()) {
- e1->prev()->next(e1);
+ e1->prev()->next(e1);
e2->next()->prev(e2);
}
if (e2->prev()) {
Modified: trunk/boost/polygon/voronoi_utils.hpp
==============================================================================
--- trunk/boost/polygon/voronoi_utils.hpp (original)
+++ trunk/boost/polygon/voronoi_utils.hpp 2012-05-09 15:33:59 EDT (Wed, 09 May 2012)
@@ -114,7 +114,7 @@
// Get scaled by a factor bounding rectangle.
template <typename CT>
- static brect_type scale(const bounding_rectangle<CT> &brect,
+ static brect_type scale(const bounding_rectangle<CT> &brect,
coordinate_type factor) {
coordinate_type x_len = to_fpt(brect.x_max()) - to_fpt(brect.x_min());
coordinate_type y_len = to_fpt(brect.y_max()) - to_fpt(brect.y_min());
@@ -131,7 +131,7 @@
// Discretizes finite Voronoi edge.
// Discretization absolute error is defined by max_error value.
template <typename CT>
- static void discretize(const voronoi_edge<CT> &edge,
+ static void discretize(const voronoi_edge<CT> &edge,
coordinate_type max_error, point_set_type &discretization) {
// Don't process infinite edges.
if (!edge.is_finite())
Modified: trunk/libs/polygon/test/voronoi_robust_fpt_test.cpp
==============================================================================
--- trunk/libs/polygon/test/voronoi_robust_fpt_test.cpp (original)
+++ trunk/libs/polygon/test/voronoi_robust_fpt_test.cpp 2012-05-09 15:33:59 EDT (Wed, 09 May 2012)
@@ -310,12 +310,12 @@
A[j] = a[j];
B[j] = b[j];
expected_val += static_cast<fpt64>(a[j]) *
- sqrt(static_cast<fpt64>(b[j]));
+ std::sqrt(static_cast<fpt64>(b[j]));
} else {
A[j] = -a[j];
B[j] = b[j];
expected_val -= static_cast<fpt64>(a[j]) *
- sqrt(static_cast<fpt64>(b[j]));
+ std::sqrt(static_cast<fpt64>(b[j]));
}
}
fpt64 received_val = to_fpt(sqrt_expr_.eval4(A, B));
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk