Go to the documentation of this file.
56 template<
typename T,
typename... Args>
68 template<
typename T,
typename... Args>
81 static constexpr
double inf = std::numeric_limits<double>::infinity();
86 Range(
double min,
double max) : min(min), max(max) {}
90 std::array<double, 2> data = config;
129 name =
static_cast<std::string
>(config[0]);
137 range.
write(builder);
168 : points_(points), outline_(outline)
174 return points_ == rhs.points_ && outline_ == rhs.outline_ && style_ == rhs.style_ && fill_ == rhs.fill_
175 && closed_ == rhs.closed_;
181 std::vector<std::array<double, 2>> &
points() {
return points_; }
187 const std::vector<std::array<double, 2>> &
points()
const {
return points_; }
189 const Style &
style()
const {
return style_; };
203 style_ =
static_cast<Style
>(
static_cast<uint64_t
>(data[2]));
211 builder.
write(points_);
212 outline_.write(builder);
213 builder.
write(
static_cast<uint64_t
>(style_));
214 fill_.write(builder);
215 builder.
write(closed_);
221 std::vector<std::array<double, 2>> points_;
PolygonDescription & style(const Style &style)
Definition: types.h:194
Simplify access to values hold within a JSON file.
Definition: Configuration.h:165
Definition: MessagePackBuilder.h:86
const Style & style() const
Definition: types.h:189
void fromMessagePack(const mc_rtc::Configuration &config)
Definition: types.h:88
constexpr bool is_Abscissa()
Definition: types.h:45
Color & outline()
Definition: types.h:182
const std::vector< std::array< double, 2 > > & points() const
Definition: types.h:187
std::vector< std::array< double, 2 > > & points()
Definition: types.h:181
Style & style()
Definition: types.h:183
const Color & outline() const
Definition: types.h:188
bool operator==(const PolygonDescription &rhs) const
Definition: types.h:172
PolygonDescription()
Definition: types.h:165
Plot
Definition: types.h:21
PolygonDescription & closed(bool closed)
Definition: types.h:196
Range range
Definition: types.h:108
void write(mc_rtc::MessagePackBuilder &builder) const
Definition: types.h:95
PolygonDescription(const std::vector< std::array< double, 2 >> &points, Color outline)
Definition: types.h:167
static Configuration fromMessagePack(const char *data, size_t size)
Static constructor to load from MessagePack data.
AxisConfiguration(std::string_view name)
Definition: types.h:111
AxisConfiguration & min(double min)
Definition: types.h:115
bool closed()
Definition: types.h:185
void fromMessagePack(const mc_rtc::Configuration &data)
Definition: types.h:199
PolygonDescription & fill(const Color &fill)
Definition: types.h:195
AxisConfiguration(Range range)
Definition: types.h:112
void fromMessagePack(const mc_rtc::Configuration &config)
Definition: types.h:127
void start_array(size_t size)
constexpr bool is_2d()
Definition: types.h:63
double max
Definition: types.h:83
const Color & fill() const
Definition: types.h:190
Range(double min, double max)
Definition: types.h:86
Color & fill()
Definition: types.h:184
bool operator!=(const PolygonDescription &rhs) const
Definition: types.h:178
Solid
Definition: types.h:146
bool closed() const
Definition: types.h:191
AxisConfiguration(std::string_view name, Range range)
Definition: types.h:113
double min
Definition: types.h:82
void write(mc_rtc::MessagePackBuilder &builder) const
Definition: types.h:133
constexpr bool is_not_Abscissa()
Definition: types.h:51
Dashed
Definition: types.h:150
void write(mc_rtc::MessagePackBuilder &builder) const
Definition: types.h:208
std::string name
Definition: types.h:107
Type
Definition: types.h:30
Dotted
Definition: types.h:148
PolygonDescription & outline(const Color &outline)
Definition: types.h:193
Left
Definition: types.h:158
#define MC_RTC_GUI_DLLAPI
Definition: api.h:50
AxisConfiguration & max(double max)
Definition: types.h:121