17 #ifndef GZ_SIM_GUI_COMPONENTINSPECTOR_POSE3D_HH_
18 #define GZ_SIM_GUI_COMPONENTINSPECTOR_POSE3D_HH_
20 #include <gz/math/Pose3.hh>
30 #include <QStandardItem>
36 class ComponentInspector;
49 public:
explicit Pose3d(ComponentInspector *_inspector);
56 template<
typename ComponentType>
63 auto comp = _ecm.
Component<ComponentType>(this->inspector->GetEntity());
67 auto pose = comp->Data();
69 _item->setData(QString(
"Pose3d"),
70 ComponentsModel::RoleNames().key(
"dataType"));
71 _item->setData(QList({
72 QVariant(pose.Pos().X()),
73 QVariant(pose.Pos().Y()),
74 QVariant(pose.Pos().Z()),
75 QVariant(pose.Rot().Roll()),
76 QVariant(pose.Rot().Pitch()),
77 QVariant(pose.Rot().Yaw())
78 }), ComponentsModel::RoleNames().key(
"data"));
88 public: Q_INVOKABLE
void OnPose(
double _x,
double _y,
double _z,
89 double _roll,
double _pitch,
double _yaw);
93 private: ComponentInspector *inspector{
nullptr};