本文整理汇总了C++中Router::existsOrthogonalFixedSegmentOverlap方法的典型用法代码示例。如果您正苦于以下问题:C++ Router::existsOrthogonalFixedSegmentOverlap方法的具体用法?C++ Router::existsOrthogonalFixedSegmentOverlap怎么用?C++ Router::existsOrthogonalFixedSegmentOverlap使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Router
的用法示例。
在下文中一共展示了Router::existsOrthogonalFixedSegmentOverlap方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main(void) {
Router *router = new Router(
PolyLineRouting | OrthogonalRouting);
router->setRoutingPenalty((PenaltyType)0, 50);
router->setRoutingPenalty((PenaltyType)1, 0);
router->setRoutingPenalty((PenaltyType)2, 0);
router->setRoutingPenalty((PenaltyType)3, 4000);
router->setRoutingPenalty((PenaltyType)4, 110);
router->setRoutingParameter(idealNudgingDistance, 25);
Polygon poly421433292(4);
poly421433292.ps[0] = Point(51335, 50215);
poly421433292.ps[1] = Point(51335, 50385);
poly421433292.ps[2] = Point(51065, 50385);
poly421433292.ps[3] = Point(51065, 50215);
new ShapeRef(router, poly421433292, 421433292);
Polygon poly174734866(4);
poly174734866.ps[0] = Point(51335, 50490);
poly174734866.ps[1] = Point(51335, 50660);
poly174734866.ps[2] = Point(51065, 50660);
poly174734866.ps[3] = Point(51065, 50490);
new ShapeRef(router, poly174734866, 174734866);
Polygon poly564884274(4);
poly564884274.ps[0] = Point(50635, 50500);
poly564884274.ps[1] = Point(50635, 50583);
poly564884274.ps[2] = Point(50515, 50583);
poly564884274.ps[3] = Point(50515, 50500);
new ShapeRef(router, poly564884274, 564884274);
ConnRef *connRef103176525 = new ConnRef(router, 103176525);
ConnEnd srcPt103176525(Point(51085, 50550), 4);
connRef103176525->setSourceEndpoint(srcPt103176525);
ConnEnd dstPt103176525(Point(50575, 50510), 1);
connRef103176525->setDestEndpoint(dstPt103176525);
connRef103176525->setRoutingType((ConnType)2);
ConnRef *connRef223495632 = new ConnRef(router, 223495632);
ConnEnd srcPt223495632(Point(51085, 50325), 4);
connRef223495632->setSourceEndpoint(srcPt223495632);
ConnEnd dstPt223495632(Point(50575, 50550), 14);
connRef223495632->setDestEndpoint(dstPt223495632);
connRef223495632->setRoutingType((ConnType)2);
router->processTransaction();
router->outputInstanceToSVG("output/inlineoverlap03");
bool overlap = router->existsOrthogonalFixedSegmentOverlap();
delete router;
return (overlap) ? 1 : 0;
};
示例2: main
int main(void) {
Router *router = new Router(OrthogonalRouting);
router->setRoutingPenalty((Avoid::PenaltyType)0, 50);
router->setRoutingPenalty((Avoid::PenaltyType)1, 0);
router->setRoutingPenalty((Avoid::PenaltyType)2, 200);
router->setRoutingPenalty((Avoid::PenaltyType)3, 4000);
router->setRoutingPenalty((Avoid::PenaltyType)4, 110);
router->setRoutingParameter(idealNudgingDistance, 25);
Rectangle rect548374163(Point(51900, 50400), Point(52300, 50900));
new ShapeRef(router, rect548374163, 548374163);
Rectangle rect901116812(Point(51131, 49750), Point(51531, 50100));
new ShapeRef(router, rect901116812, 901116812);
Rectangle rect335855988(Point(51125, 50175), Point(51525, 50900));
new ShapeRef(router, rect335855988, 335855988);
Rectangle rect448725420(Point(52375, 50750), Point(52575, 50900));
new ShapeRef(router, rect448725420, 448725420);
Rectangle rect74263573(Point(51900, 49750), Point(52300, 50100));
new ShapeRef(router, rect74263573, 74263573);
ConnEnd srcPt463223880(Point(51500, 50275), 8);
ConnEnd dstPt463223880(Point(51150, 50275), 4);
ConnEnd srcPt144520410(Point(51150, 49850), 4);
ConnEnd dstPt144520410(Point(51500, 50350), 8);
ConnEnd srcPt45398340(Point(52400, 50825), 4);
ConnEnd dstPt45398340(Point(51500, 49925), 8);
ConnEnd srcPt29344262(Point(51150, 50500), 4);
ConnEnd dstPt29344262(Point(51925, 50000), 4);
new ConnRef(router, srcPt29344262, dstPt29344262, 29344262);
new ConnRef(router, srcPt45398340, dstPt45398340, 45398340);
new ConnRef(router, srcPt144520410, dstPt144520410, 144520410);
new ConnRef(router, srcPt463223880, dstPt463223880, 463223880);
router->processTransaction();
router->outputInstanceToSVG("output/nudgeintobug");
bool overlap = router->existsOrthogonalFixedSegmentOverlap();
bool touching = router->existsOrthogonalTouchingPaths();
delete router;
return (overlap || touching) ? 1 : 0;
};
示例3: main
//.........这里部分代码省略.........
ConnEnd dstPt39(Point(318, 384), 8);
connRef39->setDestEndpoint(dstPt39);
connRef39->setRoutingType((ConnType)2);
ConnRef *connRef40 = new ConnRef(router, 40);
ConnEnd srcPt40(Point(376, 508), 4);
connRef40->setSourceEndpoint(srcPt40);
ConnEnd dstPt40(Point(318, 508), 8);
connRef40->setDestEndpoint(dstPt40);
connRef40->setRoutingType((ConnType)2);
ConnRef *connRef41 = new ConnRef(router, 41);
ConnEnd srcPt41(Point(376, 645), 4);
connRef41->setSourceEndpoint(srcPt41);
ConnEnd dstPt41(Point(318, 645), 8);
connRef41->setDestEndpoint(dstPt41);
connRef41->setRoutingType((ConnType)2);
ConnRef *connRef42 = new ConnRef(router, 42);
ConnEnd srcPt42(Point(495.857, 268), 2);
connRef42->setSourceEndpoint(srcPt42);
ConnEnd dstPt42(Point(495.857, 318), 1);
connRef42->setDestEndpoint(dstPt42);
connRef42->setRoutingType((ConnType)2);
ConnRef *connRef43 = new ConnRef(router, 43);
ConnEnd srcPt43(Point(566.357, 645), 4);
connRef43->setSourceEndpoint(srcPt43);
ConnEnd dstPt43(Point(508.357, 645), 8);
connRef43->setDestEndpoint(dstPt43);
connRef43->setRoutingType((ConnType)2);
ConnRef *connRef44 = new ConnRef(router, 44);
ConnEnd srcPt44(Point(89.5, 442), 8);
connRef44->setSourceEndpoint(srcPt44);
ConnEnd dstPt44(Point(147.5, 442), 4);
connRef44->setDestEndpoint(dstPt44);
connRef44->setRoutingType((ConnType)2);
ConnRef *connRef45 = new ConnRef(router, 45);
ConnEnd srcPt45(Point(318, 318), 15);
connRef45->setSourceEndpoint(srcPt45);
ConnEnd dstPt45(Point(318, 369), 1);
connRef45->setDestEndpoint(dstPt45);
connRef45->setRoutingType((ConnType)2);
*/
ConnRef *connRef46 = new ConnRef(router, 46);
ConnEnd srcPt46(Point(609.857, 367), 15);
connRef46->setSourceEndpoint(srcPt46);
ConnEnd dstPt46(Point(318, 369), 1);
connRef46->setDestEndpoint(dstPt46);
connRef46->setRoutingType((ConnType)2);
/*
ConnRef *connRef47 = new ConnRef(router, 47);
ConnEnd srcPt47(Point(318, 583), 15);
connRef47->setSourceEndpoint(srcPt47);
ConnEnd dstPt47(Point(318, 630), 1);
connRef47->setDestEndpoint(dstPt47);
connRef47->setRoutingType((ConnType)2);
ConnRef *connRef48 = new ConnRef(router, 48);
ConnEnd srcPt48(Point(318, 318), 15);
connRef48->setSourceEndpoint(srcPt48);
ConnEnd dstPt48(Point(378.357, 271.5), 2);
connRef48->setDestEndpoint(dstPt48);
connRef48->setRoutingType((ConnType)2);
ConnRef *connRef49 = new ConnRef(router, 49);
ConnEnd srcPt49(Point(318, 318), 15);
connRef49->setSourceEndpoint(srcPt49);
ConnEnd dstPt49(Point(551.357, 240.5), 4);
connRef49->setDestEndpoint(dstPt49);
connRef49->setRoutingType((ConnType)2);
*/
ConnRef *connRef50 = new ConnRef(router, 50);
ConnEnd srcPt50(Point(609.857, 367), 15);
connRef50->setSourceEndpoint(srcPt50);
ConnEnd dstPt50(Point(577.857, 439.5), 4);
connRef50->setDestEndpoint(dstPt50);
connRef50->setRoutingType((ConnType)2);
/*
ConnRef *connRef51 = new ConnRef(router, 51);
ConnEnd srcPt51(Point(318, 583), 15);
connRef51->setSourceEndpoint(srcPt51);
ConnEnd dstPt51(Point(271.5, 628.155), 8);
connRef51->setDestEndpoint(dstPt51);
connRef51->setRoutingType((ConnType)2);
*/
router->processTransaction();
router->outputDiagram("output/finalSegmentNudging2");
bool atEnds = true;
bool overlap = router->existsOrthogonalFixedSegmentOverlap(atEnds);
delete router;
return (overlap) ? 1 : 0;
};