Gui: Rework TaskCSysDragger into new Transform Dialog
This commit refactor ViewProviderDragger and TaskCSysDragger to be more modern and to support selecting TransformOrigin.
This commit is contained in:
@@ -56,6 +56,8 @@
|
||||
#include "ViewProviderLink.h"
|
||||
#include "ViewProviderPy.h"
|
||||
|
||||
#include <Utilities.h>
|
||||
|
||||
|
||||
FC_LOG_LEVEL_INIT("ViewProvider", true, true)
|
||||
|
||||
@@ -345,13 +347,7 @@ QIcon ViewProvider::mergeColorfulOverlayIcons (const QIcon & orig) const
|
||||
|
||||
void ViewProvider::setTransformation(const Base::Matrix4D &rcMatrix)
|
||||
{
|
||||
double dMtrx[16];
|
||||
rcMatrix.getGLMatrix(dMtrx);
|
||||
|
||||
pcTransform->setMatrix(SbMatrix(dMtrx[0], dMtrx[1], dMtrx[2], dMtrx[3],
|
||||
dMtrx[4], dMtrx[5], dMtrx[6], dMtrx[7],
|
||||
dMtrx[8], dMtrx[9], dMtrx[10], dMtrx[11],
|
||||
dMtrx[12],dMtrx[13],dMtrx[14], dMtrx[15]));
|
||||
pcTransform->setMatrix(convert(rcMatrix));
|
||||
}
|
||||
|
||||
void ViewProvider::setTransformation(const SbMatrix &rcMatrix)
|
||||
@@ -361,24 +357,12 @@ void ViewProvider::setTransformation(const SbMatrix &rcMatrix)
|
||||
|
||||
SbMatrix ViewProvider::convert(const Base::Matrix4D &rcMatrix)
|
||||
{
|
||||
//NOLINTBEGIN
|
||||
double dMtrx[16];
|
||||
rcMatrix.getGLMatrix(dMtrx);
|
||||
return SbMatrix(dMtrx[0], dMtrx[1], dMtrx[2], dMtrx[3], // clazy:exclude=rule-of-two-soft
|
||||
dMtrx[4], dMtrx[5], dMtrx[6], dMtrx[7],
|
||||
dMtrx[8], dMtrx[9], dMtrx[10], dMtrx[11],
|
||||
dMtrx[12],dMtrx[13],dMtrx[14], dMtrx[15]);
|
||||
//NOLINTEND
|
||||
return Base::convertTo<SbMatrix>(rcMatrix);
|
||||
}
|
||||
|
||||
Base::Matrix4D ViewProvider::convert(const SbMatrix &smat)
|
||||
{
|
||||
Base::Matrix4D mat;
|
||||
for(int i=0;i<4;++i) {
|
||||
for(int j=0;j<4;++j)
|
||||
mat[i][j] = smat[j][i];
|
||||
}
|
||||
return mat;
|
||||
return Base::convertTo<Base::Matrix4D>(smat);
|
||||
}
|
||||
|
||||
void ViewProvider::addDisplayMaskMode(SoNode *node, const char* type)
|
||||
|
||||
Reference in New Issue
Block a user