Code: Select all
void CIDQTUserFunctions::Draw(CFootBotEntity& c_entity) {
/* The position of the text is expressed wrt the reference point of the footbot
* For a foot-bot, the reference point is the center of its base.
* See also the description in
* $ argos3 -q foot-bot
*/
CFootBotPhysarum& cController = dynamic_cast<CFootBotPhysarum&>(c_entity.GetControllableEntity().GetController());
UInt8 type = cController.GetTypeData();
std::string str=std::to_string(type);
DrawText(CVector3(0.0, 0.0, 0.3), // position
str); // text
}
Code: Select all
// UInt8 GetTypeData();
inline UInt8 GetTypeData() {
return m_robot_type;
}