8#include <QPushButton.h>
25 QHBoxLayout* nameLayout =
new QHBoxLayout;
26 QLabel* name =
new QLabel();
29 QPushButton* addItembutton =
new QPushButton(
"add Item",
this);
30 addItembutton->setFixedSize(100, 40);
32 nameLayout->addWidget(name);
33 nameLayout->addWidget(addItembutton);
38 QObject::connect(addItembutton, SIGNAL(pressed()),
this, SLOT(
addItemWidget()));
53 for (
size_t i = 0; i <
mVec.size(); i++)
72 for (
size_t i = 0; i <
mItems.size(); i++)
83 QObject::connect(itemLayout, SIGNAL(valueChange(
double)),
this, SLOT(
updateVector()));
86 mItems.push_back(itemLayout);
96 for (
size_t i = 0; i <
mItems.size(); i++)
112 QObject::connect(itemLayout, SIGNAL(valueChange(
double)),
this, SLOT(
updateVector()));
115 mItems.push_back(itemLayout);
126 index =
new QLabel(std::to_string(
id).c_str());
152 QHBoxLayout* layout_T =
new QHBoxLayout();
153 QHBoxLayout* layout_R =
new QHBoxLayout();
154 QHBoxLayout* layout_S =
new QHBoxLayout();
155 layout_T->setSpacing(5);
156 layout_R->setSpacing(5);
157 layout_S->setSpacing(5);
160 mTLabel =
new QLabel(
"Location");
162 layout_T->addWidget(
mT0);
163 layout_T->addWidget(
mT1);
164 layout_T->addWidget(
mT2);
166 mRLabel =
new QLabel(
"Rotation");
168 layout_R->addWidget(
mR0);
169 layout_R->addWidget(
mR1);
170 layout_R->addWidget(
mR2);
174 layout_S->addWidget(
mS0);
175 layout_S->addWidget(
mS1);
176 layout_S->addWidget(
mS2);
178 mTLabel->setMinimumWidth(width);
179 mRLabel->setMinimumWidth(width);
180 mSLabel->setMinimumWidth(width);
181 mT0->setMinimumWidth(width);
182 mT1->setMinimumWidth(width);
183 mT2->setMinimumWidth(width);
184 mR0->setMinimumWidth(width);
185 mR1->setMinimumWidth(width);
186 mR2->setMinimumWidth(width);
187 mS0->setMinimumWidth(width);
188 mS1->setMinimumWidth(width);
189 mS2->setMinimumWidth(width);
191 QVBoxLayout* list =
new QVBoxLayout();
194 list->addItem(layout_T);
195 list->addItem(layout_R);
196 list->addItem(layout_S);
198 QHBoxLayout* groupLayout =
new QHBoxLayout;
199 mGroup->setLayout(groupLayout);
201 groupLayout->addWidget(
index);
202 groupLayout->addLayout(list);
209 QObject::connect(
mT0, SIGNAL(valueChanged(
double)),
this, SLOT(
emitChange(
double)));
210 QObject::connect(
mT1, SIGNAL(valueChanged(
double)),
this, SLOT(
emitChange(
double)));
211 QObject::connect(
mT2, SIGNAL(valueChanged(
double)),
this, SLOT(
emitChange(
double)));
212 QObject::connect(
mR0, SIGNAL(valueChanged(
double)),
this, SLOT(
emitChange(
double)));
213 QObject::connect(
mR1, SIGNAL(valueChanged(
double)),
this, SLOT(
emitChange(
double)));
214 QObject::connect(
mR2, SIGNAL(valueChanged(
double)),
this, SLOT(
emitChange(
double)));
215 QObject::connect(
mS0, SIGNAL(valueChanged(
double)),
this, SLOT(
emitChange(
double)));
216 QObject::connect(
mS1, SIGNAL(valueChanged(
double)),
this, SLOT(
emitChange(
double)));
217 QObject::connect(
mS2, SIGNAL(valueChanged(
double)),
this, SLOT(
emitChange(
double)));
246 auto rot =
Vec3f(
mR0->getRealValue(),
mR1->getRealValue(),
mR2->getRealValue());
255 Vec3f(
mT0->getRealValue(),
mT1->getRealValue(),
mT2->getRealValue()),
257 Vec3f(
mS0->getRealValue(),
mS1->getRealValue(),
mS2->getRealValue())
265 mT0->setValue(v.translation()[0]);
266 mT1->setValue(v.translation()[1]);
267 mT2->setValue(v.translation()[2]);
273 mR0->setValue(rot[0] * 180 /
M_PI);
274 mR1->setValue(rot[1] * 180 /
M_PI);
275 mR2->setValue(rot[2] * 180 /
M_PI);
277 mS0->setValue(v.scale()[0]);
278 mS1->setValue(v.scale()[1]);
279 mS2->setValue(v.scale()[2]);
DYN_FUNC Quat< Real > & normalize()
DYN_FUNC void toEulerAngle(Real &yaw, Real &pitch, Real &roll) const
DYN_FUNC SquareMatrix< Real, 3 > toMatrix3x3() const
This is an implementation of AdditiveCCD based on peridyno.
QString FormatFieldWidgetName(std::string name)
Transform< float, 3 > Transform3f