Searched refs:vertInfs (Results 1 - 1 of 1) sorted by relevance
/inkscape/src/libavoid/ |
H A D | orthogonal.cpp | 623 vertInfs.insert(bvi); 627 vertInfs.insert(fvi); 639 vertInfs.insert(bfvi); 687 vertInfs.insert(segment.vertInfs.begin(), segment.vertInfs.end()); 692 if (vertInfs.empty()) 696 return *vertInfs.begin(); 700 if (vertInfs.empty()) 704 return *vertInfs 619 COLA_ASSERT(begin < finish); if (bvi) { vertInfs.insert(bvi); } if (fvi) { vertInfs.insert(fvi); } } LineSegment(const double& bf, const double& p, VertInf *bfvi = NULL) : begin(bf), finish(bf), pos(p), shapeSide(false) { if (bfvi) { vertInfs.insert(bfvi); } } bool operator<(const LineSegment& rhs) const { if (begin != rhs.begin) { return begin < rhs.begin; } if (pos != rhs.pos) { return pos < rhs.pos; } if (finish != rhs.finish) { return finish < rhs.finish; } COLA_ASSERT(shapeSide == rhs.shapeSide); return false; } bool overlaps(const LineSegment& rhs) const { if ((begin == rhs.begin) && (pos == rhs.pos) && (finish == rhs.finish)) { return true; } if (pos == rhs.pos) { if (((begin >= rhs.begin) && (begin <= rhs.finish)) || ((rhs.begin >= begin) && (rhs.begin <= finish)) ) { return true; } } return false; } void mergeVertInfs(const LineSegment& segment) { begin = std::min(begin, segment.begin); finish = std::max(finish, segment.finish); vertInfs.insert(segment.vertInfs.begin(), segment.vertInfs.end()); } VertInf *beginVertInf(void) const { if (vertInfs.empty()) { return NULL; } return *vertInfs.begin(); } VertInf *finishVertInf(void) const { if (vertInfs.empty()) { return NULL; } return *vertInfs.rbegin(); } VertInf *commitPositionX(Router *router, double posX) { VertInf *found = NULL; for (VertSet::iterator v = vertInfs.begin(); v != vertInfs.end(); ++v) { if ((*v)->point.x == posX) { found = *v; break; } } if (!found) { found = new VertInf(router, dummyOrthogID, Point(posX, pos)); vertInfs.insert(found); } return found; } void commitBegin(Router *router, VertInf *vert = NULL) { if (vert) { vertInfs.insert(vert); } if (vertInfs.empty() || ((*vertInfs.begin())->point.x != begin)) { vertInfs.insert(new VertInf(router, dummyOrthogID, Point(begin, pos))); } } void commitFinish(Router *router, VertInf *vert = NULL) { if (vert) { vertInfs.insert(vert); } if (vertInfs.empty() || ((*vertInfs.rbegin())->point.x != finish)) { vertInfs.insert(new VertInf(router, dummyOrthogID, Point(finish, pos))); } } VertSet::iterator addSegmentsUpTo(Router * , double finishPos) { VertSet::iterator firstIntersectionPt = vertInfs.end(); for (VertSet::iterator vert = vertInfs.begin(); vert != vertInfs.end(); ++vert) { if ((*vert)->point.x > finishPos) argument 1006 VertSet vertInfs; member in namespace:Avoid [all...] |
Completed in 17 milliseconds