Trivial code formatting for some {.cpp,.h} files
This commit is contained in:
@@ -425,29 +425,29 @@ void Polygon2d::Intersect (const Polygon2d &rclPolygon, std::list<Polygon2d> &rc
|
||||
}
|
||||
|
||||
bool Polygon2d::Intersect (const Polygon2d &other) const {
|
||||
if(other.GetCtVectors()<2 || GetCtVectors() < 2)
|
||||
if (other.GetCtVectors()<2 || GetCtVectors() < 2)
|
||||
return false;
|
||||
|
||||
for(auto &v : _aclVct) {
|
||||
if(other.Contains(v))
|
||||
for (auto &v : _aclVct) {
|
||||
if (other.Contains(v))
|
||||
return true;
|
||||
}
|
||||
|
||||
if(Contains(other[0]))
|
||||
if (Contains(other[0]))
|
||||
return true;
|
||||
|
||||
for(size_t j=1; j<other.GetCtVectors(); ++j) {
|
||||
for (size_t j=1; j<other.GetCtVectors(); ++j) {
|
||||
auto &v0 = other[j-1];
|
||||
auto &v1 = other[j];
|
||||
|
||||
if(Contains(v1))
|
||||
if (Contains(v1))
|
||||
return true;
|
||||
|
||||
Line2d line(v0, v1);
|
||||
for(size_t i=0; i<GetCtVectors(); ++i) {
|
||||
for (size_t i=0; i<GetCtVectors(); ++i) {
|
||||
Line2d line2(At(i), At((i+1)%GetCtVectors()));
|
||||
Vector2d v;
|
||||
if(line.IntersectAndContain(line2, v))
|
||||
if (line.IntersectAndContain(line2, v))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user