本文整理汇总了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();
}