RobotConvex.h
Go to the documentation of this file.
1 /*
2  * Copyright 2015-2024 CNRS-UM LIRMM, CNRS-AIST JRL
3  */
4 
5 #pragma once
6 
7 #include <mc_rbdyn/Robot.h>
8 
10 #include <mc_rtc/gui/types.h>
11 
12 namespace mc_rbdyn::gui
13 {
14 
15 static const mc_rtc::gui::PolyhedronConfig defaultConvexConfig = []()
16 {
18  cfg.triangle_color = {0, 0.8, 0, 0.5};
19  cfg.edge_config.color = {0, 1, 0, 1};
20  cfg.edge_config.width = 0.001;
21  cfg.show_edges = true;
22  cfg.show_vertices = false;
23  return cfg;
24 }();
25 
42  const std::vector<std::string> & category,
43  const mc_rbdyn::Robot & robot,
44  const std::string & name,
45  const mc_rtc::gui::PolyhedronConfig & cfg = defaultConvexConfig,
46  const std::optional<std::string> & publishName = std::nullopt);
47 
48 } // namespace mc_rbdyn::gui
mc_rtc::gui::PolyhedronConfig
Definition: types.h:398
mc_rtc::gui::LineConfig::color
Color color
Definition: types.h:137
types.h
mc_rtc::gui::LineConfig::width
double width
Definition: types.h:138
mc_rbdyn::Robot
Definition: Robot.h:62
StateBuilder.h
mc_rbdyn::gui
Definition: RobotConvex.h:12
mc_rtc::gui::StateBuilder
Definition: StateBuilder.h:27
Robot.h
MC_RBDYN_DLLAPI
#define MC_RBDYN_DLLAPI
Definition: api.h:50
mc_rtc::gui::PolyhedronConfig::edge_config
LineConfig edge_config
Definition: types.h:469
mc_rtc::gui::PolyhedronConfig::show_vertices
bool show_vertices
Definition: types.h:474
mc_rtc::gui::PolyhedronConfig::triangle_color
Color triangle_color
Definition: types.h:465
mc_rbdyn::gui::addConvexToGUI
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_rtc::gui::PolyhedronConfig::show_edges
bool show_edges
When true, use edge colors from edges_config. Else interpolate between each vertex color.
Definition: types.h:470