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


C++ SmartPointer::ActivateEvent方法代码示例

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


在下文中一共展示了SmartPointer::ActivateEvent方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: Start

  void Start()
  {
    Assert(sim.robotControllers[0] != NULL);
    Assert(sim.robotControllers[0]->command != NULL);
    Assert(sim.robotControllers[0]->sensors != NULL);

    //choose and set the collision avoidance margin
    collisionMargin = 0.0;
    CopyWorld(*world,planningWorld);
    Robot* robot = planningWorld.robots[0].robot;
    for(size_t i=0;i<robot->geometry.size();i++) {
      robot->geometry[i].margin += collisionMargin;
    }

    settings.InitializeDefault(planningWorld);
    drawCommanded = 0;
    drawDesired = 1;
    drawPath = 0;
    drawUI = 1;
    drawContacts = 1;

    MapButtonToggle("draw_commanded",&drawCommanded);
    MapButtonToggle("draw_desired",&drawDesired);
    MapButtonToggle("draw_path",&drawPath);
    MapButtonToggle("draw_ui",&drawUI);
    MapButtonToggle("draw_contacts",&drawContacts);

    ///Hack to initialize motion queue before the planner tries to get a hold of it
    sim.robotControllers[0]->Update(0); 

    //set up user interface
    robotInterface = new DefaultMotionQueueInterface(GetMotionQueue(sim.robotControllers[0]));
#ifdef MULTITHREADED
    printf("Constructing multi-threaded RRT user interface...\n");
    ui = new MTRRTCommandInterface;
#else
    printf("Constructing single-threaded RRT user interface...\n");
    ui = new RRTCommandInterface;
#endif //WIN32
    ui->world = world;
    ui->settings = &settings;
    ui->planningWorld = &planningWorld;
    ui->robotInterface = robotInterface;
    ui->viewport = &viewport;
    inputProcessor = new MyInputProcessor;
    ui->SetProcessor(inputProcessor);

    //activate current UI
    string res=ui->ActivateEvent(true);

    //enable simulation (this flag is in SimulationGUI)
    simulate=1;

    SimGUIBackend::Start();
  }
开发者ID:stevekuznetsov,项目名称:Klampt,代码行数:55,代码来源:realtimeplanning.cpp


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