Matrix4fWidgets.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "Basic.h"
4 
6 {
8  : public ValueMixin<PosRPYSpinBoxes, Eigen::Matrix4f, PosRPYSpinBoxesBuilder>
9  , public ToolTipMixin<PosRPYSpinBoxesBuilder>
10  {
11  PosRPYSpinBoxesBuilder(std::string const& name, float limpos = 1000, float limrpy = M_PI) : ValueMixin(name)
12  {
13  widget().stepsPos = toIceI(Eigen::Vector3i::Ones() * static_cast<int>(2 * limpos + 1));
14  widget().stepsRPY = toIceI(Eigen::Vector3i::Ones() * static_cast<int>(200 * limrpy + 1));
15  widget().decimalsPos = toIceI(Eigen::Vector3i::Ones() * 2);
16  widget().decimalsRPY = toIceI(Eigen::Vector3i::Ones() * 2);
17  widget().minPos = toIceF(Eigen::Vector3f::Ones() * -limpos);
18  widget().maxPos = toIceF(Eigen::Vector3f::Ones() * +limpos);
19  widget().minRPY = toIceF(Eigen::Vector3f::Ones() * -limrpy);
20  widget().maxRPY = toIceF(Eigen::Vector3f::Ones() * +limrpy);
22  }
23 
24 
25  PosRPYSpinBoxesBuilder& minPos(const Eigen::Vector3f min)
26  {
27  widget().minPos = toIceF(min);
28  return *this;
29  }
30  PosRPYSpinBoxesBuilder& minRPY(const Eigen::Vector3f min)
31  {
32  widget().minRPY = toIceF(min);
33  return *this;
34  }
35 
36  PosRPYSpinBoxesBuilder& maxPos(const Eigen::Vector3f max)
37  {
38  widget().maxPos = toIceF(max);
39  return *this;
40  }
41  PosRPYSpinBoxesBuilder& maxRPY(const Eigen::Vector3f max)
42  {
43  widget().maxRPY = toIceF(max);
44  return *this;
45  }
46 
47  PosRPYSpinBoxesBuilder& stepsPos(const Eigen::Vector3i steps)
48  {
49  widget().stepsPos = toIceI(steps);
50  return *this;
51  }
52  PosRPYSpinBoxesBuilder& stepsRPY(const Eigen::Vector3i steps)
53  {
54  widget().stepsRPY = toIceI(steps);
55  return *this;
56  }
57 
58  PosRPYSpinBoxesBuilder& decimalsPos(const Eigen::Vector3i decimals)
59  {
60  widget().decimalsPos = toIceI(decimals);
61  return *this;
62  }
63  PosRPYSpinBoxesBuilder& decimalsRPY(const Eigen::Vector3i decimals)
64  {
65  widget().decimalsRPY = toIceI(decimals);
66  return *this;
67  }
68  };
69 }
70 
71 
72 namespace armarx::RemoteGui
73 {
74  inline detail::PosRPYSpinBoxesBuilder makePosRPYSpinBoxes(std::string const& name, float limpos = 1000, float limrpy = M_PI)
75  {
76  return {name, limpos, limrpy};
77  }
78 }
79 
armarx::RemoteGui::detail::PosRPYSpinBoxesBuilder::decimalsRPY
PosRPYSpinBoxesBuilder & decimalsRPY(const Eigen::Vector3i decimals)
Definition: Matrix4fWidgets.h:63
armarx::RemoteGui::toIceF
Vector3f toIceF(Eigen::Vector3f v)
Definition: Storage.cpp:73
Basic.h
armarx::RemoteGui
Definition: LightweightRemoteGuiComponentPlugin.h:30
armarx::RemoteGui::detail::PosRPYSpinBoxesBuilder::maxPos
PosRPYSpinBoxesBuilder & maxPos(const Eigen::Vector3f max)
Definition: Matrix4fWidgets.h:36
armarx::RemoteGui::detail
Definition: Basic.h:10
armarx::max
std::vector< T > max(const std::vector< T > &v1, const std::vector< T > &v2)
Definition: VectorHelpers.h:267
armarx::RemoteGui::detail::PosRPYSpinBoxesBuilder::minPos
PosRPYSpinBoxesBuilder & minPos(const Eigen::Vector3f min)
Definition: Matrix4fWidgets.h:25
armarx::RemoteGui::detail::WidgetMixin< PosRPYSpinBoxes, PosRPYSpinBoxesBuilder >::widget
PosRPYSpinBoxes & widget()
Definition: Basic.h:50
GfxTL::Identity
void Identity(MatrixXX< N, N, T > *a)
Definition: MatrixXX.h:523
armarx::RemoteGui::toIceI
Vector3i toIceI(Eigen::Vector3i v)
Definition: Storage.cpp:82
M_PI
#define M_PI
Definition: MathTools.h:17
armarx::RemoteGui::detail::PosRPYSpinBoxesBuilder::stepsPos
PosRPYSpinBoxesBuilder & stepsPos(const Eigen::Vector3i steps)
Definition: Matrix4fWidgets.h:47
armarx::RemoteGui::detail::PosRPYSpinBoxesBuilder::maxRPY
PosRPYSpinBoxesBuilder & maxRPY(const Eigen::Vector3f max)
Definition: Matrix4fWidgets.h:41
armarx::RemoteGui::detail::ToolTipMixin
Definition: Basic.h:200
armarx::RemoteGui::makeValue
ValueVariant makeValue(bool value)
Definition: Storage.cpp:133
armarx::RemoteGui::detail::PosRPYSpinBoxesBuilder::PosRPYSpinBoxesBuilder
PosRPYSpinBoxesBuilder(std::string const &name, float limpos=1000, float limrpy=M_PI)
Definition: Matrix4fWidgets.h:11
armarx::RemoteGui::detail::PosRPYSpinBoxesBuilder::minRPY
PosRPYSpinBoxesBuilder & minRPY(const Eigen::Vector3f min)
Definition: Matrix4fWidgets.h:30
GfxTL::Matrix4f
MatrixXX< 4, 4, float > Matrix4f
Definition: MatrixXX.h:601
armarx::RemoteGui::makePosRPYSpinBoxes
detail::PosRPYSpinBoxesBuilder makePosRPYSpinBoxes(std::string const &name, float limpos=1000, float limrpy=M_PI)
Definition: Matrix4fWidgets.h:74
armarx::min
std::vector< T > min(const std::vector< T > &v1, const std::vector< T > &v2)
Definition: VectorHelpers.h:294
armarx::RemoteGui::detail::PosRPYSpinBoxesBuilder
Definition: Matrix4fWidgets.h:7
armarx::RemoteGui::detail::PosRPYSpinBoxesBuilder::decimalsPos
PosRPYSpinBoxesBuilder & decimalsPos(const Eigen::Vector3i decimals)
Definition: Matrix4fWidgets.h:58
armarx::RemoteGui::detail::ValueMixin
Definition: Basic.h:68
armarx::RemoteGui::detail::PosRPYSpinBoxesBuilder::stepsRPY
PosRPYSpinBoxesBuilder & stepsRPY(const Eigen::Vector3i steps)
Definition: Matrix4fWidgets.h:52