From: ouv Date: Mon, 28 Nov 2005 09:18:20 +0000 (+0000) Subject: Added Deformed Shape presentation of Gauss Points. X-Git-Tag: TG-D5-38-2003_D2005-20-12~107 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=73d3b36787a3b6af92d02ba6155781082eed02e3;p=modules%2Fvisu.git Added Deformed Shape presentation of Gauss Points. --- diff --git a/src/PIPELINE/VISU_GaussPointsPL.cxx b/src/PIPELINE/VISU_GaussPointsPL.cxx index bd753a1e..af546a3f 100644 --- a/src/PIPELINE/VISU_GaussPointsPL.cxx +++ b/src/PIPELINE/VISU_GaussPointsPL.cxx @@ -27,6 +27,7 @@ #include "VISU_GaussPointsPL.hxx" +#include "VISU_DeformedShapePL.hxx" #include "VISU_PipeLineUtils.hxx" #include "SALOME_ExtractGeometry.h" #include "VISU_DeformedShapePL.hxx" @@ -38,6 +39,7 @@ #include #include #include +#include //---------------------------------------------------------------------------- vtkStandardNewMacro(VISU_GaussPointsPL); @@ -45,6 +47,8 @@ vtkStandardNewMacro(VISU_GaussPointsPL); //---------------------------------------------------------------------------- VISU_GaussPointsPL ::VISU_GaussPointsPL(): + myIsDeformed(false), + myScaleFactor(0.0), myPrimitiveType(0), myClamp(200.0), mySize(10), @@ -59,6 +63,9 @@ VISU_GaussPointsPL myPSMapper = VISU_OpenGLPointSpriteMapper::New(); myGeomFilter = vtkGeometryFilter::New(); + + myWarpVector = vtkWarpVector::New(); + myCellDataToPointData = vtkCellDataToPointData::New(); } void @@ -82,6 +89,9 @@ VISU_GaussPointsPL SetMagnification(aPipeLine->GetMagnification()); SetMagnificationIncrement(aPipeLine->GetMagnificationIncrement()); SetAlphaThreshold(aPipeLine->GetAlphaThreshold()); + + SetIsDeformed( aPipeLine->GetIsDeformed() ); + SetScale( aPipeLine->GetScale() ); } Superclass::ShallowCopy(thePipeLine); } @@ -115,15 +125,31 @@ void VISU_GaussPointsPL ::Build() { + myPSMapper->SetColorModeToMapScalars(); + myPSMapper->ScalarVisibilityOn(); + myExtractor->SetInput( GetInput2() ); myFieldTransform->SetInput( myExtractor->GetOutput() ); - //myPSMapper->SetQuadraticPointDistanceAttenuation( 1.0, 20.0, 0.0 ); - //myPSMapper->SetImmediateModeRendering( 1 ); - myPSMapper->SetColorModeToMapScalars(); - myPSMapper->ScalarVisibilityOn(); + if( myIsDeformed ) + { + //cout << "DEFORMED SHAPE" << endl; + + //myWarpVector->SetInput( myFieldTransform->GetUnstructuredGridOutput() ); + //myCellDataToPointData->SetInput( myFieldTransform->GetUnstructuredGridOutput() ); + //myWarpVector->SetInput( myCellDataToPointData->GetUnstructuredGridOutput() ); + + VISU::CellDataToPoint( myWarpVector, myCellDataToPointData, + myFieldTransform->GetUnstructuredGridOutput(), myFieldTransform ); + + myGeomFilter->SetInput( myWarpVector->GetOutput() ); + } + else + { + //cout << "RESULTS / GEOMETRY" << endl; + myGeomFilter->SetInput( myFieldTransform->GetUnstructuredGridOutput() ); + } - myGeomFilter->SetInput( myFieldTransform->GetUnstructuredGridOutput() ); myPSMapper->SetInput( myGeomFilter->GetOutput() ); SetSourceRange(); @@ -164,6 +190,12 @@ VISU_GaussPointsPL this->myGeomFilter->Delete(); this->myGeomFilter = NULL; } + + myWarpVector->UnRegisterAllOutputs(); + myWarpVector->Delete(); + + myCellDataToPointData->UnRegisterAllOutputs(); + myCellDataToPointData->Delete(); } //---------------------------------------------------------------------------- @@ -418,3 +450,32 @@ VISU_GaussPointsPL return aCompositeImageData; } + +void VISU_GaussPointsPL::SetScale( float theScale ) +{ + myWarpVector->SetScaleFactor( theScale ); + myScaleFactor = theScale; + Modified(); +} + +float VISU_GaussPointsPL::GetScale() +{ + if( !myScaleFactor ) + myScaleFactor = VISU_DeformedShapePL::GetScaleFactor( GetMapper()->GetInput() ); + + return myScaleFactor; +} + +vtkPointSet* VISU_GaussPointsPL::doHook() +{ + VISU::CellDataToPoint( myWarpVector, myCellDataToPointData, GetInput2(), myFieldTransform ); + return myWarpVector->GetOutput(); +} + +void VISU_GaussPointsPL::SetMapScale( float theMapScale ) +{ + VISU_ScalarMapPL::SetMapScale( theMapScale ); + + myWarpVector->SetScaleFactor( myScaleFactor * theMapScale ); + Modified(); +} diff --git a/src/PIPELINE/VISU_GaussPointsPL.hxx b/src/PIPELINE/VISU_GaussPointsPL.hxx index bbc8ac04..8ecdeabb 100644 --- a/src/PIPELINE/VISU_GaussPointsPL.hxx +++ b/src/PIPELINE/VISU_GaussPointsPL.hxx @@ -31,11 +31,20 @@ #include "VISU_ScalarMapPL.hxx" #include "VISU_Convertor.hxx" +#include "VTKViewer_PassThroughFilter.h" + +#include + class VISU_OpenGLPointSpriteMapper; class vtkGeometryFilter; class vtkDataArray; class vtkImageData; +class vtkPointSet; + +class vtkCellDataToPointData; +class vtkWarpVector; +class SALOME_Transform; class VISU_GaussPointsPL : public VISU_ScalarMapPL { @@ -159,6 +168,24 @@ public: MakeTexture( const char* theMainTexture, const char* theAlphaTexture ); +public: + virtual void SetIsDeformed( bool theIsDeformed ) { myIsDeformed = theIsDeformed; } + virtual bool GetIsDeformed() const { return myIsDeformed; } + + virtual void SetScale( float theScale ); + virtual float GetScale(); + virtual void SetMapScale( float theMapScale = 1.0 ); + +protected: + vtkPointSet* doHook(); + + bool myIsDeformed; + float myScaleFactor; + vtkWarpVector *myWarpVector; + vtkCellDataToPointData* myCellDataToPointData; + + std::vector myPassFilter; + protected: VISU_OpenGLPointSpriteMapper* myPSMapper; vtkGeometryFilter* myGeomFilter; diff --git a/src/VISUGUI/VISUM_msg_en.po b/src/VISUGUI/VISUM_msg_en.po index 7a2e945b..88a91075 100644 --- a/src/VISUGUI/VISUM_msg_en.po +++ b/src/VISUGUI/VISUM_msg_en.po @@ -73,6 +73,12 @@ msgstr "Size of points (%)" msgid "VisuGUI_Module::VISU_GAUSS_PREF_COLOR" msgstr "Color" +msgid "VisuGUI_Module::VISU_GAUSS_PREF_DEFORMED_SHAPE_GROUP_TTL" +msgstr "Deformed Shape" + +msgid "VisuGUI_Module::VISU_GAUSS_PREF_SCALE_FACTOR" +msgstr "Scale factor" + msgid "VisuGUI_Module::VISU_GAUSS_SCALAR_BAR_PREF_TAB_TTL" msgstr "Gauss Points Scalar Bar" @@ -370,6 +376,15 @@ msgstr "Results" msgid "VisuGUI_GaussPointsDlg::GEOMETRY" msgstr "Geometry" +msgid "VisuGUI_GaussPointsDlg::DEFORMED_SHAPE" +msgstr "Deformed Shape" + +msgid "VisuGUI_GaussPointsDlg::DEFORMED_SHAPE_TITLE" +msgstr "Deformed Shape" + +msgid "VisuGUI_GaussPointsDlg::SCALE_FACTOR" +msgstr "Scale Factor :" + msgid "VisuGUI_GaussScalarBarPane::ACTIVE_BAR_GRP" msgstr "Active bar" diff --git a/src/VISUGUI/VisuGUI.cxx b/src/VISUGUI/VisuGUI.cxx index aed697b0..99b80b0e 100644 --- a/src/VISUGUI/VisuGUI.cxx +++ b/src/VISUGUI/VisuGUI.cxx @@ -61,6 +61,7 @@ #include "SPlot2d_ViewModel.h" #include "VisuGUI_SetupPlot2dDlg.h" #include "Plot2d_SetupCurveDlg.h" +#include "Plot2d_ViewManager.h" #include "OB_Browser.h" @@ -166,7 +167,8 @@ OnImportFromFile() aTimer.Start(); if(MYDEBUG) MESSAGE("VisuGUI::OnImportFromFile()"); - CheckLock(GetCStudy(GetAppStudy(this))); + if ( CheckLock(GetCStudy(GetAppStudy(this))) ) + return; SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr(); QStringList aFilter; @@ -222,7 +224,8 @@ OnExploreMEDFile() { if(MYDEBUG) MESSAGE("VisuGUI::OnExploreMEDFile()"); _PTR(Study) aStudy = GetCStudy(GetAppStudy(this)); - CheckLock(aStudy); + if ( CheckLock(aStudy) ) + return; SALOME_MED::MED_Gen_var aGen = GetMEDEngine(); @@ -262,7 +265,8 @@ VisuGUI:: OnImportTableFromFile() { if(MYDEBUG) MESSAGE("VisuGUI::OnImportTableFromFile()"); - CheckLock(GetCStudy(GetAppStudy(this))); + if ( CheckLock(GetCStudy(GetAppStudy(this))) ) + return; QStringList aFilter; aFilter.append( tr("FLT_TABLE_FILES") ); @@ -622,7 +626,9 @@ OnDisplayPrs() VISU::Prs3d_i* aPrsObject = dynamic_cast(VISU::GetServant(anObject).in()); if(aPrsObject){ if(MYDEBUG) MESSAGE("VisuGUI::OnDisplayPrs : Prs3d object"); - UpdateViewer( this, aPrsObject ); + //UpdateViewer( this, aPrsObject ); + displayer()->Display( anIO->getEntry() ); + SVTK_ViewWindow* vw = GetViewWindow( this, /*create=*/true ); if ( vw ) { vw->highlight(anIO, 1); @@ -633,21 +639,24 @@ OnDisplayPrs() VISU::Curve_i* aCurve = dynamic_cast(VISU::GetServant(anObject).in()); if(aCurve){ if(MYDEBUG) MESSAGE("VisuGUI::OnDisplayPrs : Curve object"); - PlotCurve( this, aCurve, VISU::eDisplay ); + //PlotCurve( this, aCurve, VISU::eDisplay ); + displayer()->Display( anIO->getEntry() ); continue; } // is it Container ? VISU::Container_i* aContainer = dynamic_cast(VISU::GetServant(anObject).in()); if(aContainer){ if(MYDEBUG) MESSAGE("VisuGUI::DisplayPrs : Container object"); - PlotContainer( this, aContainer, VISU::eDisplay ); + //PlotContainer( this, aContainer, VISU::eDisplay ); + displayer()->Display( anIO->getEntry() ); continue; } // is it Table ? VISU::Table_i* aTable = dynamic_cast(VISU::GetServant(anObject).in()); if(aTable){ if(MYDEBUG) MESSAGE("VisuGUI::DisplayPrs : Table object"); - PlotTable( this, aTable, VISU::eDisplay ); + //PlotTable( this, aTable, VISU::eDisplay ); + displayer()->Display( anIO->getEntry() ); continue; } } @@ -814,6 +823,7 @@ void VisuGUI:: OnEraseAll() { + startOperation( myEraseAll ); if (SVTK_ViewWindow* vw = GetViewWindow()) { vw->unHighlightAll(); if (vtkRenderer *aRen = vw->getRenderer()) { @@ -1532,6 +1542,20 @@ OnRename() // rename the study object aName->SetValue(Name.latin1()); // rename the SObject anIO->setName(Name.latin1()); // rename the InteractiveObject + + ViewManagerList pvm_list; + getApp()->viewManagers( SPlot2d_Viewer::Type(), pvm_list ); + for( SUIT_ViewManager* mgr = pvm_list.first(); mgr; mgr = pvm_list.next() ) + { + Plot2d_ViewManager* pvm = dynamic_cast( mgr ); + if( pvm ) + { + SPlot2d_Viewer* pv = dynamic_cast( pvm->getViewModel() ); + if( pv ) + pv->renameAll( anIO, Name.latin1() ); + } + } + UpdateObjBrowser(this, false); QApplication::restoreOverrideCursor(); @@ -2629,6 +2653,36 @@ void VisuGUI::contextMenuPopup( const QString& theClient, QPopupMenu* theMenu, Q action( VISU_DELETE_OBJS )->addTo(theMenu); } + // Check if some curves selected (for bug PAL10611) + bool isCurves = false; + SALOME_ListIteratorOfListIO It1 (aListIO); + for (; It1.More() && !isCurves; It1.Next()) { + Handle(SALOME_InteractiveObject)& anIO = It1.Value(); + + if (!anIO.IsNull() && anIO->hasEntry()) { + _PTR(SObject) aSObject = aCStudy->FindObjectID(anIO->getEntry()); + _PTR(GenericAttribute) anAttr; + if (aSObject->FindAttribute(anAttr, "AttributeComment")) { + _PTR(AttributeComment) aComment (anAttr); + string aComm = aComment->Value(); + QString strIn (aComm.c_str()); + VISU::Storable::TRestoringMap pMap; + VISU::Storable::StrToMap(strIn, pMap); + bool isExist; + VISU::VISUType aType = (VISU::VISUType)VISU::Storable::FindValue(pMap,"myType",&isExist).toInt(); + if (isExist && aType == VISU::TCURVE) { + isCurves = true; + } + } + } + } + if (isCurves) { + action( myDisplay )->removeFrom(theMenu); + action( myErase )->removeFrom(theMenu); + action( myDisplayOnly )->removeFrom(theMenu); + action( myEraseAll )->removeFrom(theMenu); + } + // Check single selection if (aListIO.Extent() != 1) return; @@ -2902,7 +2956,7 @@ VisuGUI LightApp_Displayer* VisuGUI::displayer() { if( !myDisplayer ) - myDisplayer = new VisuGUI_Displayer( dynamic_cast( getApp()->activeStudy() ) ); + myDisplayer = new VisuGUI_Displayer( getApp() ); return myDisplayer; } diff --git a/src/VISUGUI/VisuGUI_GaussPointsDlg.cxx b/src/VISUGUI/VisuGUI_GaussPointsDlg.cxx index 898d296c..3b8e345c 100644 --- a/src/VISUGUI/VisuGUI_GaussPointsDlg.cxx +++ b/src/VISUGUI/VisuGUI_GaussPointsDlg.cxx @@ -21,8 +21,8 @@ // // // -// File : VisuGUI_MagnitudeDlg.cxx -// Author : Laurent CORNABE & Hubert ROLLAND +// File : VisuGUI_GaussPointsDlg.cxx +// Author : Oleg UVAROV // Module : VISU #include "VisuGUI_GaussPointsDlg.h" @@ -506,13 +506,14 @@ VisuGUI_GaussPointsDlg::VisuGUI_GaussPointsDlg(SalomeApp_Module* theModule, bool // Presentation - QButtonGroup* PrsGroup = new QButtonGroup( 2, Qt::Horizontal, tr( "PRS_TITLE" ), this, "PrimitiveTypeGroup" ); + QButtonGroup* PrsGroup = new QButtonGroup( 3, Qt::Horizontal, tr( "PRS_TITLE" ), this, "PrimitiveTypeGroup" ); PrsGroup->setRadioButtonExclusive( true ); PrsGroup->layout()->setMargin( 11 ); PrsGroup->layout()->setSpacing(6); myResultsButton = new QRadioButton( tr( "RESULTS" ), PrsGroup ); myGeometryButton = new QRadioButton( tr( "GEOMETRY" ), PrsGroup ); + myDefShapeButton = new QRadioButton( tr( "DEFORMED_SHAPE" ), PrsGroup ); QTabWidget* aTabBox = new QTabWidget (this); @@ -527,13 +528,34 @@ VisuGUI_GaussPointsDlg::VisuGUI_GaussPointsDlg(SalomeApp_Module* theModule, bool // Size mySizeBox = new VVTK_SizeBox( aBox ); - connect( myResultsButton, SIGNAL( clicked() ), mySizeBox, SLOT( onToggleResults() ) ); - connect( myGeometryButton, SIGNAL( clicked() ), mySizeBox, SLOT( onToggleGeometry() ) ); + // Deformed Shape + myDefShapeBox = new QGroupBox( tr( "DEFORMED_SHAPE_TITLE" ), aBox ); + myDefShapeBox->setColumnLayout(0, Qt::Vertical ); + myDefShapeBox->layout()->setSpacing( 0 ); + myDefShapeBox->layout()->setMargin( 0 ); + QGridLayout* aDefShapeLayout = new QGridLayout( myDefShapeBox->layout() ); + aDefShapeLayout->setAlignment(Qt::AlignTop); + aDefShapeLayout->setSpacing(6); + aDefShapeLayout->setMargin(11); + + QLabel* aScaleLabel = new QLabel( tr( "SCALE_FACTOR" ), myDefShapeBox ); + myScaleSpinBox = new QtxDblSpinBox( 0.0, 10.0, 0.1, myDefShapeBox ); + + aDefShapeLayout->addWidget( aScaleLabel, 0, 0 ); + aDefShapeLayout->addWidget( myScaleSpinBox, 0, 1 ); + + // Scalar Bar pane myScalarPane = new VisuGUI_GaussScalarBarPane(this, SetPref); myScalarPane->setMargin(5); + connect( myResultsButton, SIGNAL( clicked() ), mySizeBox, SLOT( onToggleResults() ) ); + connect( myResultsButton, SIGNAL( toggled( bool ) ), myScalarPane, SLOT( setEnabled( bool ) ) ); + connect( myGeometryButton, SIGNAL( clicked() ), mySizeBox, SLOT( onToggleGeometry() ) ); + connect( myDefShapeButton, SIGNAL( toggled( bool ) ), this, SLOT( onToggleDefShape( bool ) ) ); + connect( myDefShapeButton, SIGNAL( toggled( bool ) ), myScalarPane, SLOT( setEnabled( bool ) ) ); + aTabBox->addTab(aBox, tr("GAUSS_POINTS_TAB")); aTabBox->addTab(myScalarPane, tr("SCALAR_BAR_TAB")); @@ -567,9 +589,14 @@ VisuGUI_GaussPointsDlg::VisuGUI_GaussPointsDlg(SalomeApp_Module* theModule, bool void VisuGUI_GaussPointsDlg::initFromPrsObject( VISU::GaussPoints_i* thePrs ) { + bool isDeformed = thePrs->GetIsDeformed(); + myScaleSpinBox->setValue( thePrs->GetScaleFactor() ); + myDefShapeButton->setChecked( isDeformed ); + onToggleDefShape( isDeformed ); + bool isResults = thePrs->GetIsColored(); - myResultsButton->setChecked( isResults ); - myGeometryButton->setChecked( !isResults ); + myResultsButton->setChecked( isResults && !isDeformed ); + myGeometryButton->setChecked( !isResults && !isDeformed ); myPrimitiveBox->setPrimitiveType( thePrs->GetPrimitiveType() ); myPrimitiveBox->setClampMaximum( thePrs->GetMaximumSupportedSize() ); @@ -578,7 +605,7 @@ void VisuGUI_GaussPointsDlg::initFromPrsObject( VISU::GaussPoints_i* thePrs ) myPrimitiveBox->setAlphaTexture( thePrs->GetAlphaTexture() ); myPrimitiveBox->setAlphaThreshold( thePrs->GetAlphaThreshold() ); - mySizeBox->setType( isResults ? VVTK_SizeBox::Results : VVTK_SizeBox::Geometry ); + mySizeBox->setType( isResults || isDeformed ? VVTK_SizeBox::Results : VVTK_SizeBox::Geometry ); mySizeBox->setGeomSize( thePrs->GetGeomSize() ); mySizeBox->setMinSize( thePrs->GetMinSize() ); mySizeBox->setMaxSize( thePrs->GetMaxSize() ); @@ -591,6 +618,9 @@ void VisuGUI_GaussPointsDlg::initFromPrsObject( VISU::GaussPoints_i* thePrs ) int VisuGUI_GaussPointsDlg::storeToPrsObject( VISU::GaussPoints_i* thePrs ) { + thePrs->SetIsDeformed( myDefShapeButton->isChecked() ); + thePrs->SetScaleFactor( myScaleSpinBox->value() ); + thePrs->SetPrimitiveType( myPrimitiveBox->getPrimitiveType() ); thePrs->SetClamp( myPrimitiveBox->getClamp() ); @@ -605,9 +635,8 @@ int VisuGUI_GaussPointsDlg::storeToPrsObject( VISU::GaussPoints_i* thePrs ) thePrs->SetAlphaThreshold( myPrimitiveBox->getAlphaThreshold() ); - - bool isResults = myResultsButton->isChecked(); - if( isResults ) + bool isColored = !myGeometryButton->isChecked(); + if( isColored ) { thePrs->SetIsColored( true ); thePrs->SetMinSize( mySizeBox->getMinSize() ); @@ -626,6 +655,17 @@ int VisuGUI_GaussPointsDlg::storeToPrsObject( VISU::GaussPoints_i* thePrs ) return myScalarPane->storeToPrsObject(thePrs); } +void VisuGUI_GaussPointsDlg::onToggleDefShape( bool on ) +{ + if( on )//myDefShapeButton->isChecked() ) + { + myDefShapeBox->show(); + mySizeBox->setType( VVTK_SizeBox::Results ); + } + else + myDefShapeBox->hide(); +} + void VisuGUI_GaussPointsDlg::accept() { //if( myScalarPane->check() ) diff --git a/src/VISUGUI/VisuGUI_GaussPointsDlg.h b/src/VISUGUI/VisuGUI_GaussPointsDlg.h index f8514cae..6ffd3bd4 100644 --- a/src/VISUGUI/VisuGUI_GaussPointsDlg.h +++ b/src/VISUGUI/VisuGUI_GaussPointsDlg.h @@ -21,10 +21,9 @@ // // // -// File : VisuGUI_MagnitudeDlg.h -// Author : Laurent CORNABE & Hubert ROLLAND +// File : VisuGUI_GaussPointsDlg.h +// Author : Oleg UVAROV // Module : VISU -// $Header$ #ifndef VISUGUI_GAUSSPOINTSDLS_H #define VISUGUI_GAUSSPOINTSDLS_H @@ -130,6 +129,8 @@ public: int storeToPrsObject(VISU::GaussPoints_i* thePrs); protected slots: + void onToggleDefShape( bool ); + void accept(); private: @@ -137,9 +138,13 @@ private: QRadioButton* myResultsButton; QRadioButton* myGeometryButton; + QRadioButton* myDefShapeButton; VVTK_PrimitiveBox* myPrimitiveBox; VVTK_SizeBox* mySizeBox; + + QGroupBox* myDefShapeBox; + QtxDblSpinBox* myScaleSpinBox; }; #endif // VISUGUI_GAUSSPOINTSDLS_H diff --git a/src/VISU_I/VISU_GaussPoints_i.cc b/src/VISU_I/VISU_GaussPoints_i.cc index 951e5fcc..6c0d4a64 100644 --- a/src/VISU_I/VISU_GaussPoints_i.cc +++ b/src/VISU_I/VISU_GaussPoints_i.cc @@ -154,6 +154,9 @@ VISU::GaussPoints_i float aSpacing = aResourceMgr->doubleValue( "VISU", "scalar_bar_spacing", GetSpacing() ); SetSpacing( aSpacing ); + float aScaleFactor = aResourceMgr->doubleValue( "VISU", "deformed_shape_scale_factor", GetScaleFactor() ); + SetScaleFactor( aScaleFactor ); + int aPrimitiveType = aResourceMgr->integerValue( "VISU", "point_sprite_primitive_type", GetPrimitiveType() ); SetPrimitiveType( aPrimitiveType ); @@ -217,6 +220,9 @@ VISU::GaussPoints_i SetMagnification(Storable::FindValue(theMap,"myMagnification").toDouble()); SetMagnificationIncrement(Storable::FindValue(theMap,"myMagnificationIncrement").toDouble()); + SetIsDeformed(Storable::FindValue(theMap,"myIsDeformed").toInt()); + SetScaleFactor(Storable::FindValue(theMap,"myScaleFactor").toDouble()); + SetIsColored(Storable::FindValue(theMap,"myIsColored").toInt()); int aRed = Storable::FindValue(theMap,"myColor.R").toInt(); int aGreen = Storable::FindValue(theMap,"myColor.G").toInt(); @@ -253,6 +259,9 @@ VISU::GaussPoints_i Storable::DataToStream( theStr, "myMagnification", GetMagnification() ); Storable::DataToStream( theStr, "myMagnificationIncrement", GetMagnificationIncrement() ); + Storable::DataToStream( theStr, "myIsDeformed", GetIsDeformed() ); + Storable::DataToStream( theStr, "myScaleFactor", GetScaleFactor() ); + Storable::DataToStream( theStr, "myIsColored", GetIsColored() ); QColor aColor = GetColor(); Storable::DataToStream( theStr, "myColor.R", aColor.red() ); @@ -280,6 +289,34 @@ VISU::GaussPoints_i return myGaussPointsPL; } +void +VISU::GaussPoints_i +::SetIsDeformed( bool theIsDeformed ) +{ + myGaussPointsPL->SetIsDeformed( theIsDeformed ); +} + +bool +VISU::GaussPoints_i +::GetIsDeformed() +{ + return myGaussPointsPL->GetIsDeformed(); +} + +void +VISU::GaussPoints_i +::SetScaleFactor( float theScaleFactor ) +{ + myGaussPointsPL->SetScale( theScaleFactor ); +} + +float +VISU::GaussPoints_i +::GetScaleFactor() +{ + return myGaussPointsPL->GetScale(); +} + void VISU::GaussPoints_i ::SetIsColored( bool theIsColored ) diff --git a/src/VISU_I/VISU_GaussPoints_i.hh b/src/VISU_I/VISU_GaussPoints_i.hh index 52541737..3ae3acd0 100644 --- a/src/VISU_I/VISU_GaussPoints_i.hh +++ b/src/VISU_I/VISU_GaussPoints_i.hh @@ -68,6 +68,18 @@ namespace VISU VISU_GaussPointsPL* GetGaussPointsPL(); + bool + GetIsDeformed(); + + void + SetIsDeformed( bool theIsDeformed ); + + float + GetScaleFactor(); + + void + SetScaleFactor( float theScaleFactor ); + QColor GetColor() { return myColor; } @@ -200,6 +212,9 @@ namespace VISU VISU_GaussPointsPL *myGaussPointsPL; + //bool myIsDeformed; + //float myScaleFactor; + bool myIsColored; bool myIsDispGlobalScalarBar; bool myIsActiveLocalScalarBar;