mc_rbdyn::gui Namespace Reference

Functions

MC_RBDYN_DLLAPI void addConvexToGUI (mc_rtc::gui::StateBuilder &gui, const std::vector< std::string > &category, const mc_rbdyn::Robot &robot, const std::string &name, const mc_rtc::gui::PolyhedronConfig &cfg=defaultConvexConfig, const std::optional< std::string > &publishName=std::nullopt)
 
MC_RBDYN_DLLAPI std::vector< std::string > addSurfaceToGUI (mc_rtc::gui::StateBuilder &gui, const std::vector< std::string > &category, const mc_rbdyn::Robot &robot, const std::string &name, const mc_rtc::gui::LineConfig &cfg=defaultSurfaceConfig, const std::optional< std::string > &publishName=std::nullopt)
 

Function Documentation

◆ addConvexToGUI()

MC_RBDYN_DLLAPI void mc_rbdyn::gui::addConvexToGUI ( mc_rtc::gui::StateBuilder gui,
const std::vector< std::string > &  category,
const mc_rbdyn::Robot robot,
const std::string &  name,
const mc_rtc::gui::PolyhedronConfig cfg = defaultConvexConfig,
const std::optional< std::string > &  publishName = std::nullopt 
)

Helper function to create a GUI element from a convex object inside a robot

Parameters
guiState builder where the object is added (typically controller.gui()
categoryCategory where the object is added
cfgConfiguration of the appearance of the convex object
robotRobot that the convex belongs to, this reference is captured by the GUI and should survive
nameName of the collision object added to the GUI, the object should remain in the robot while it is in the GUI
publishNameName of the object in the GUI, defaults to
name

◆ addSurfaceToGUI()

MC_RBDYN_DLLAPI std::vector<std::string> mc_rbdyn::gui::addSurfaceToGUI ( mc_rtc::gui::StateBuilder gui,
const std::vector< std::string > &  category,
const mc_rbdyn::Robot robot,
const std::string &  name,
const mc_rtc::gui::LineConfig cfg = defaultSurfaceConfig,
const std::optional< std::string > &  publishName = std::nullopt 
)

Helper function to create a GUI element from a surface object inside a robot

Multiple elements can be added based on the surface type (e.g. for a planar surface, the polygon and the normal are added) so this function returns the names of the elements that were added

Parameters
guiState builder where the object is added (typically controller.gui()
categoryCategory where the object is added
cfgConfiguration for the surface polygon
robotRobot that the surfaces belongs to, this reference is captured by the GUI and should survive
nameName of the surface added to the GUI, the object should remain in the robot while it is in the GUI
publishNameName of the object in the GUI, defaults to
name
Returns
The names of the elements added by the function