3#include <SimoxUtility/math/compare/value_in_limits_of.h>
7#include <ArmarXGui/interface/RemoteGuiInterface.h>
32 operator WidgetPtr()
const
41 template <
typename W
idgetT,
typename Derived>
49 widget_->defaultValue = Derived::defaultValue();
56 return *
dynamic_cast<WidgetT*
>(
widget_.get());
60 template <
typename W
idgetT,
typename Derived>
68 return ValueVariant();
72 template <
typename W
idgetT,
typename ValueT,
typename Derived>
86 Derived& this_ = *
static_cast<Derived*
>(
this);
92 template <
typename Derived,
typename Type>
98 Derived& this_ = *
static_cast<Derived*
>(
this);
99 this_.widget().min =
min;
104 min(std::array<Type, 1> v)
110 std::enable_if_t<simox::meta::are_arithmetic_v<Type, T>, Derived&>
113 ARMARX_CHECK(simox::math::value_in_limits_of_type<Type>(v))
115 return min(
static_cast<Type
>(v));
119 std::enable_if_t<simox::meta::are_arithmetic_v<Type, T>, Derived&>
122 ARMARX_CHECK(simox::math::value_in_limits_of_type<Type>(v.at(0)))
124 return min(
static_cast<Type
>(v.at(0)));
130 Derived& this_ = *
static_cast<Derived*
>(
this);
131 this_.widget().max =
max;
136 max(std::array<Type, 1> v)
142 std::enable_if_t<simox::meta::are_arithmetic_v<Type, T>, Derived&>
145 ARMARX_CHECK(simox::math::value_in_limits_of_type<Type>(v))
147 return max(
static_cast<Type
>(v));
151 std::enable_if_t<simox::meta::are_arithmetic_v<Type, T>, Derived&>
154 ARMARX_CHECK(simox::math::value_in_limits_of_type<Type>(v.at(0)))
156 return max(
static_cast<Type
>(v.at(0)));
159 template <
class T0,
class T1>
163 Derived& this_ = *
static_cast<Derived*
>(
this);
165 return this_.max(
hi);
169 template <
typename Derived>
170 struct MinMaxMixin<Derived,
Eigen::Vector3f>
172 using Type = Eigen::Vector3f;
177 Derived& this_ = *
static_cast<Derived*
>(
this);
183 min(std::array<Type, 1> v)
191 Derived& this_ = *
static_cast<Derived*
>(
this);
197 max(std::array<Type, 1> v)
202 template <
class T0,
class T1>
206 Derived& this_ = *
static_cast<Derived*
>(
this);
208 return this_.max(
hi);
212 template <
typename Derived>
218 Derived& this_ = *
static_cast<Derived*
>(
this);
219 this_.widget().label =
label;
224 template <
typename Derived>
230 Derived& this_ = *
static_cast<Derived*
>(
this);
231 this_.widget().toolTip =
toolTip;
#define ARMARX_CHECK(expression)
Shortcut for ARMARX_CHECK_EXPRESSION.
Vector3f toIceF(Eigen::Vector3f v)
ValueVariant makeValue(bool value)
double v(double t, double v0, double a0, double j)
std::string GetTypeString(const std::type_info &tinf, bool withoutNamespaceSpecifier=false)
std::vector< T > min(const std::vector< T > &v1, const std::vector< T > &v2)
Derived & label(std::string const &label)
std::enable_if_t< simox::meta::are_arithmetic_v< Type, T >, Derived & > max(std::array< T, 1 > v)
std::enable_if_t< simox::meta::are_arithmetic_v< Type, T >, Derived & > max(T v)
std::enable_if_t< simox::meta::are_arithmetic_v< Type, T >, Derived & > min(T v)
Derived & max(std::array< Type, 1 > v)
Derived & minmax(T0 lo, T1 hi)
Derived & min(std::array< Type, 1 > v)
std::enable_if_t< simox::meta::are_arithmetic_v< Type, T >, Derived & > min(std::array< T, 1 > v)
static ValueVariant defaultValue()
Derived & value(ValueT const &value)
static ValueVariant defaultValue()