⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 getcapability.cc

📁 The Little Green BATS is the first and so far only Dutch team in the 3D simulation league. We are a
💻 CC
字号:
#include "beam.ih"Behavior::ConfidenceInterval Beam::getCapability(rf<Behavior::State> s, rf<Behavior::Goal> g){  /*_debugLevel4("Beam::getCapability");  rf<StateVarNode> gameStateNode, xNode;    gameStateNode = rf_cast<StateVarNode>(s->findDeep("GameState"));    if(!gameStateNode)  {    _debugLevel1("Beam doesn't understand state!");    return ConfidenceInterval(-1.0, 0.0);  }        StateVar gameState = gameStateNode->getVar();    // If we aren't in BEFORE_KICKOFF, our capability is -1.0 with infinite confidence  if ((int)gameState.second.first != WorldModel::BEFORE_KICKOFF)    return ConfidenceInterval(-1.0, 0.0);    if (!(xNode = rf_cast<StateVarNode>(g->findDeep("X"))))  {    _debugLevel1("Beam doesn't understand goal!");    return ConfidenceInterval(-1.0, 0.0);  }      StateVar x = xNode->getVar();  Range xRange = x.second;    double xTarget = (xRange.first + xRange.second) / 2.0;    // If we want to beam to a position on other side of the field, we can't do it either  if (xTarget > 0)    return ConfidenceInterval(-1.0, 0.0);    // Else we can certainly do it  return ConfidenceInterval(1.0, 0.0);*/    return ConfidenceInterval(1.0, 0.0);}

⌨️ 快捷键说明

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