aView3d->SetEye( anItem.eyeX, anItem.eyeY, anItem.eyeZ );
aView3d->SetProj( anItem.projX, anItem.projY, anItem.projZ );
aView3d->SetAxialScale( anItem.scaleX, anItem.scaleY, anItem.scaleZ );
-
+ // Trihedron
+ myModel->setTrihedronShown( anItem.isVisible );
+ myModel->setTrihedronSize( anItem.size );
+
myRestoreFlag = 0;
}
double centerX, centerY, projX, projY, projZ, twist;
double atX, atY, atZ, eyeX, eyeY, eyeZ;
Standard_Real aScaleX, aScaleY, aScaleZ;
+ bool isShown;
+ double size;
Handle(V3d_View) aView3d = myViewPort->getView();
aView3d->AxialScale(aScaleX,aScaleY,aScaleZ);
+ isShown = myModel->isTrihedronVisible();
+ size = myModel->trihedronSize();
+
QString aName = QTime::currentTime().toString() + QString::fromLatin1( " h:m:s" );
viewAspect params;
params.scaleX = aScaleX;
params.scaleY = aScaleY;
params.scaleZ = aScaleZ;
+ params.isVisible= isShown;
+ params.size = size;
return params;
}
params.centerX, params.centerY, params.projX, params.projY, params.projZ, params.twist,
params.atX, params.atY, params.atZ, params.eyeX, params.eyeY, params.eyeZ,
params.scaleX, params.scaleY, params.scaleZ );
+ retStr += QString().sprintf("*%u*%.2f", params.isVisible, params.size );
return retStr;
}
void OCCViewer_ViewWindow::setVisualParameters( const QString& parameters )
{
QStringList paramsLst = QStringList::split( '*', parameters, true );
- if ( paramsLst.size() >= 13 ) {
+ if ( paramsLst.size() >= 15 ) {
viewAspect params;
params.scale = paramsLst[0].toDouble();
params.centerX = paramsLst[1].toDouble();
params.eyeX = paramsLst[10].toDouble();
params.eyeY = paramsLst[11].toDouble();
params.eyeZ = paramsLst[12].toDouble();
- if(paramsLst.size() == 16) {
+ if(paramsLst.size() == 18) {
params.scaleX = paramsLst[13].toDouble();
params.scaleY = paramsLst[14].toDouble();
params.scaleZ = paramsLst[15].toDouble();
params.scaleY = 1.;
params.scaleZ = 1.;
}
+ params.isVisible = paramsLst[16].toDouble();
+ params.size = paramsLst[17].toDouble();
performRestoring( params );
}
#include "SUIT_Accel.h"
#include "VTKViewer_Utilities.h"
+#include "VTKViewer_Trihedron.h"
#include "SVTK_View.h"
#include "SVTK_MainWindow.h"
retStr += ::getGradAxisVisualParams( gradAxesActor->GetZAxisActor2D() );
}
+ // save trihedron parameters
+ bool isVisible = isTrihedronDisplayed();
+ vtkFloatingPointType size = GetTrihedronSize();
+ retStr += QString().sprintf("* Trihedron: *%u*%.2f", isVisible, size);
+
return retStr;
}
else
gradAxesActor->VisibilityOff();
}
+
+ if ( paramsLst[14].toUShort() )
+ GetTrihedron()->VisibilityOn();
+ else
+ GetTrihedron()->VisibilityOff();
+
+ SetTrihedronSize(paramsLst[15].toDouble());
}
}