movejointto.cc

来自「2007年机器人足球世界杯3D仿真组亚军于07年底的源程序。该队还于2008年获」· CC 代码 · 共 32 行

CC
32
字号
#include "movejointto.ih"MoveJointTo::MoveJointTo(string const &id, string const &playerClass)  : Behavior("MoveJointTo", id, playerClass),    d_gain(0.1){  d_gain = getParam("/gain", d_gain);/*  XMLNodeSet params = getParams("/gain");    if(params && !params.empty())  {    XMLNode gainNode = params.front();    d_gain = atof(gainNode.getContent().c_str());  }*/  XMLNodeSet params = getParams("/joint");    if(!params || params.empty())    throw new BatsException("MoveJointTo behavior requires a joint parameter");  else  {    XMLNode jointNode = params.front();    d_joint = (Types::Joint)atoi(jointNode.getContent().c_str());  }    d_tree = new AST::Node(sequenceType);  d_tree->addChild(new AST::Node(andType));  d_tree->getChild(0)->addChild(new AST::Node(orType));}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?