当前位置: 首页>>代码示例>>C++>>正文


C++ Router::existsOrthogonalPathOverlap方法代码示例

本文整理汇总了C++中Router::existsOrthogonalPathOverlap方法的典型用法代码示例。如果您正苦于以下问题:C++ Router::existsOrthogonalPathOverlap方法的具体用法?C++ Router::existsOrthogonalPathOverlap怎么用?C++ Router::existsOrthogonalPathOverlap使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Router的用法示例。


在下文中一共展示了Router::existsOrthogonalPathOverlap方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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->setOrthogonalNudgeDistance(25);

    Polygon poly231469760(4);
    poly231469760.ps[0] = Point(6385, 9390);
    poly231469760.ps[1] = Point(6385, 9560);
    poly231469760.ps[2] = Point(6200, 9560);
    poly231469760.ps[3] = Point(6200, 9390);
    ShapeRef *shapeRef231469760 = new ShapeRef(router, poly231469760, 231469760);
    router->addShape(shapeRef231469760);

    Polygon poly7136376(4);
    poly7136376.ps[0] = Point(6560, 9290);
    poly7136376.ps[1] = Point(6560, 9460);
    poly7136376.ps[2] = Point(6375, 9460);
    poly7136376.ps[3] = Point(6375, 9290);
    ShapeRef *shapeRef7136376 = new ShapeRef(router, poly7136376, 7136376);
    router->addShape(shapeRef7136376);

    Polygon poly215821749(4);
    poly215821749.ps[0] = Point(6510, 9540);
    poly215821749.ps[1] = Point(6510, 9710);
    poly215821749.ps[2] = Point(6325, 9710);
    poly215821749.ps[3] = Point(6325, 9540);
    ShapeRef *shapeRef215821749 = new ShapeRef(router, poly215821749, 215821749);
    router->addShape(shapeRef215821749);

    Polygon poly83086994(4);
    poly83086994.ps[0] = Point(5925, 9240);
    poly83086994.ps[1] = Point(5925, 10085);
    poly83086994.ps[2] = Point(5575, 10085);
    poly83086994.ps[3] = Point(5575, 9240);
    ShapeRef *shapeRef83086994 = new ShapeRef(router, poly83086994, 83086994);
    router->addShape(shapeRef83086994);

    ConnRef *connRef292408794 = new ConnRef(router, 292408794);
    ConnEnd srcPt292408794(Point(5915, 9625), 8);
    connRef292408794->setSourceEndpoint(srcPt292408794);
    ConnEnd dstPt292408794(Point(6210, 9475), 4);
    connRef292408794->setDestEndpoint(dstPt292408794);
    connRef292408794->setRoutingType((ConnType)2);

    ConnRef *connRef40917776 = new ConnRef(router, 40917776);
    ConnEnd srcPt40917776(Point(5915, 9550), 8);
    connRef40917776->setSourceEndpoint(srcPt40917776);
    ConnEnd dstPt40917776(Point(6385, 9375), 4);
    connRef40917776->setDestEndpoint(dstPt40917776);
    connRef40917776->setRoutingType((ConnType)2);

    ConnRef *connRef629564142 = new ConnRef(router, 629564142);
    ConnEnd srcPt629564142(Point(5915, 9475), 8);
    connRef629564142->setSourceEndpoint(srcPt629564142);
    ConnEnd dstPt629564142(Point(6335, 9625), 4);
    connRef629564142->setDestEndpoint(dstPt629564142);
    connRef629564142->setRoutingType((ConnType)2);

    router->processTransaction();
    router->outputInstanceToSVG("test-inlineoverlap-05");
    bool overlap = router->existsOrthogonalPathOverlap();
    delete router;
    return (overlap) ? 1 : 0;
};
开发者ID:TheProjecter,项目名称:pockemul,代码行数:69,代码来源:inlineoverlap05.cpp


注:本文中的Router::existsOrthogonalPathOverlap方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。