Go to the documentation of this file.
27 template<
typename GetVisual,
typename GetPos>
32 VisualImpl(
const std::string &
name, GetVisual get_visual_fn, GetPos get_pos_fn)
33 :
Element(
name), get_visual_fn_(get_visual_fn), get_pos_fn_(get_pos_fn)
36 "Visual element visual callback must return an rbd::parsers::Visual");
38 "Visual element position callback must return an sva::PTransformd or an Eigen::Vector3d");
49 visual_.
add(
"data", get_visual_fn_());
50 builder.
write(visual_(
"data"));
51 builder.
write(get_pos_fn_());
55 GetVisual get_visual_fn_;
63 template<
typename GetVisual,
typename GetPos>
64 auto Visual(
const std::string & name, GetVisual get_visual_fn, GetPos get_pos_fn)
Definition: elements.h:58
Simplify access to values hold within a JSON file.
Definition: Configuration.h:165
Definition: MessagePackBuilder.h:86
void write(mc_rtc::MessagePackBuilder &)
Definition: elements.h:83
VisualImpl(const std::string &name, GetVisual get_visual_fn, GetPos get_pos_fn)
Definition: Visual.h:32
void write(mc_rtc::MessagePackBuilder &builder)
Definition: Visual.h:46
void add(const std::string &key, bool value)
Add a bool element to the Configuration.
auto Visual(const std::string &name, GetVisual get_visual_fn, GetPos get_pos_fn)
Definition: Visual.h:64
constexpr static size_t write_size()
Definition: Visual.h:44
static constexpr size_t write_size()
Definition: elements.h:76
VisualImpl()
Definition: Visual.h:42
static constexpr auto type
Definition: Visual.h:30
Definition: Observer.h:15
const std::string & name() const
Definition: elements.h:61