From e61ba87401278a718f09cb5dc2ce9bb8b3d199e1 Mon Sep 17 00:00:00 2001 From: apo Date: Thu, 19 Jul 2007 11:13:13 +0000 Subject: [PATCH] Publication of IDL API for GaussPoints --- idl/VISU_Gen.idl | 147 +++++++++++++++++++++- src/VISUGUI/VisuGUI_GaussPointsDlg.cxx | 25 ++-- src/VISU_I/VISUConfig.cc | 18 ++- src/VISU_I/VISUConfig.hh | 10 +- src/VISU_I/VISU_DumpPython.cc | 140 ++++++++++++++++++--- src/VISU_I/VISU_GaussPoints_i.cc | 161 +++++++++++++++++-------- src/VISU_I/VISU_GaussPoints_i.hh | 98 ++++++++------- 7 files changed, 472 insertions(+), 127 deletions(-) diff --git a/idl/VISU_Gen.idl b/idl/VISU_Gen.idl index b8a1984c..f092a2a7 100644 --- a/idl/VISU_Gen.idl +++ b/idl/VISU_Gen.idl @@ -721,14 +721,157 @@ module VISU { * Presentation parameters of the Gauss Points presentation. */ //------------------------------------------------------- - interface GaussPoints : ColoredPrs3d { + interface GaussPoints : ColoredPrs3d + { + //! Set flag indicating which scalar bar is active. + void SetIsActiveLocalScalarBar(in boolean theFlag); + + //! Get flag indicating which scalar bar is active. + boolean GetIsActiveLocalScalarBar(); + + //! Set flag indicating visibility of global scalar bar. + void SetIsDispGlobalScalarBar(in boolean theFlag); + + //! Get flag indicating visibility of global scalar bar. + boolean GetIsDispGlobalScalarBar(); + + //! Set value of the distance between global and local scalar bars. + void SetSpacing(in double theSpacing); + + //! Get value of the distance between global and local scalar bars. + double GetSpacing(); + + /*! + * Set the Multicolored mode. + * \param theIsColored is used to switch between Results and Geometry modes. + * Multiple colors are using when the presentation is + * drawing in the Results mode, one color - in the Geometry mode. + */ + void SetIsColored(in boolean theIsColored); + + //! Gets current color mode + boolean GetIsColored(); + + /*! Sets the color of this presentation in case of IsColored switched off. + * \param theColor The color of this presentation. This parameter + * is taken from the Color enumeration. + */ + void SetColor(in SALOMEDS::Color theColor); + + /*! + * When the Bicolor parameter is set to true, scalar bars are + * drawing with two colors : red color correspoonds to positive + * scalar values, blue color - to negative values. + */ + void SetBiColor(in boolean theIsBiColor); + + //! Get the Bicolor mode. + boolean GetBiColor(); + + //! Checks whether the Gauss Points will be deformed or not + boolean GetIsDeformed(); + + //! Apply deformation on the Gauss Points + void SetIsDeformed(in boolean theIsDeformed); + + /*! + * Sets the scale factor for scalar values + * (how much corresponding mesh elements should be translated). + * \param theScaleFactor The scaling factor. + */ + void SetScaleFactor(in double theScaleFactor); + + /*! + * Gets the scale factor for scalar values. + * (how much corresponding mesh elements is translated) + */ + double GetScaleFactor(); + + /*! + * This enumeration contains a set of elements defining the type of representation of the vector head. + */ + enum PrimitiveType { + SPRITE, + POINT, + SPHERE + }; + + //! Set type of the primitives which is used for drawing the Gauss Points + void SetPrimitiveType(in PrimitiveType thePrimitiveType); + + //! Get type of the primitives which is used for drawing the Gauss Points + PrimitiveType GetPrimitiveType(); + + //! Sets Point Sprite clamp + void SetClamp(in double theClamp); + + //! Gets Point Sprite clamp + double GetClamp(); + + //! Sets minimum size of Point Sprites + void SetMinSize(in double theMinSize); + + //! Gets minimum size of Point Sprites + double GetMinSize(); + + //! Sets maximum size of Point Sprites + void SetMaxSize(in double theMaxSize); + + //! Gets maximum size of Point Sprites + double GetMaxSize(); + + //! Sets magnification for Point Sprites + void SetMagnification(in double theMagnification); + + //! Gets magnification for Point Sprites + double GetMagnification(); + + //! Sets the increment of changing Magnification parameter + void SetMagnificationIncrement(in double theIncrement); + + //! Gets the increment of changing Magnification parameter + double GetMagnificationIncrement(); + + //! Sets Point Sprites size + void SetGeomSize(in double theGeomSize); + + //! Sets size of Point Sprite + double GetGeomSize(); + + //! Get path to the image using for Main Point Sprite texture + string GetMainTexture(); + + //! Get path to the image using for Alpha Point Sprite texture + string GetAlphaTexture(); + + //! Points Main and AlphaMask images to be used by Point Sprites + void SetTextures(in string theMainTexture, in string theAlphaTexture); + + //! Sets Point Sprite Alpha threshold + void SetAlphaThreshold(in double theAlphaThreshold); + + //! Gets Point Sprite Alpha threshold + double GetAlphaThreshold(); + + //! Sets resolution of the Geometrical Sphere + void SetResolution(in long theResolution); + + //! Sets resolution of the Geometrical Sphere + long GetResolution(); + + //! Sets how many faces of can be drawn in the Geometrical Sphere primitive mode + void SetFaceLimit(in long theFaceLimit); + + //! Defines how many faces of can be drawn in the Geometrical Sphere primitive mode + long GetFaceLimit(); }; /*! \brief Deformed shape presentation interface * * Presentation parameters of the deformed shape presentation. */ - interface DeformedShape : ScalarMap { + interface DeformedShape : ScalarMap + { /*! * Sets the scale of the presentatable object. * \param theScale Double value defining the scale of this presentable object. diff --git a/src/VISUGUI/VisuGUI_GaussPointsDlg.cxx b/src/VISUGUI/VisuGUI_GaussPointsDlg.cxx index 3b955d93..02ff6a74 100644 --- a/src/VISUGUI/VisuGUI_GaussPointsDlg.cxx +++ b/src/VISUGUI/VisuGUI_GaussPointsDlg.cxx @@ -508,17 +508,17 @@ int VisuGUI_GaussScalarBarPane::storeToPrsObject(VISU::GaussPoints_i* thePrs) { thePrs->SetRange(MinEdit->text().toDouble(), MaxEdit->text().toDouble()); } - thePrs->SetPosition(XSpin->value(), YSpin->value()); - thePrs->SetSize(WidthSpin->value(), HeightSpin->value()); thePrs->SetSpacing(SpacingSpin->value()); - thePrs->SetBarOrientation((RBvert->isChecked())? VISU::ColoredPrs3d::VERTICAL : VISU::ColoredPrs3d::HORIZONTAL); thePrs->SetIsActiveLocalScalarBar(myRBLocal->isChecked()); thePrs->SetIsDispGlobalScalarBar(myCBDisplayed->isChecked()); + thePrs->SetBiColor(BicolorButton->isChecked()); + + thePrs->SetPosition(XSpin->value(), YSpin->value()); + thePrs->SetSize(WidthSpin->value(), HeightSpin->value()); + thePrs->SetBarOrientation((RBvert->isChecked())? VISU::ColoredPrs3d::VERTICAL : VISU::ColoredPrs3d::HORIZONTAL); thePrs->SetNbColors(ColorSpin->value()); thePrs->SetLabels(LabelSpin->value()); - thePrs->GetSpecificPL()->SetBicolor(BicolorButton->isChecked()); - //if (isToSave()) storeToResources(); if (myIsStoreTextProp) { @@ -804,8 +804,8 @@ void VisuGUI_GaussPointsDlg::initFromPrsObject(VISU::ColoredPrs3d_i* thePrs, boo myPrimitiveBox->setPrimitiveType( myPrsCopy->GetPrimitiveType() ); myPrimitiveBox->setClampMaximum( myPrsCopy->GetMaximumSupportedSize() ); myPrimitiveBox->setClamp( myPrsCopy->GetClamp() ); - myPrimitiveBox->setMainTexture( myPrsCopy->GetMainTexture() ); - myPrimitiveBox->setAlphaTexture( myPrsCopy->GetAlphaTexture() ); + myPrimitiveBox->setMainTexture( myPrsCopy->GetQMainTexture() ); + myPrimitiveBox->setAlphaTexture( myPrsCopy->GetQAlphaTexture() ); myPrimitiveBox->setAlphaThreshold( myPrsCopy->GetAlphaThreshold() ); myPrimitiveBox->setResolution( myPrsCopy->GetResolution() ); myPrimitiveBox->setFaceLimit( myPrsCopy->GetFaceLimit() ); @@ -816,7 +816,7 @@ void VisuGUI_GaussPointsDlg::initFromPrsObject(VISU::ColoredPrs3d_i* thePrs, boo mySizeBox->setMaxSize( myPrsCopy->GetMaxSize() ); mySizeBox->setMagnification( myPrsCopy->GetMagnification() ); mySizeBox->setIncrement( myPrsCopy->GetMagnificationIncrement() ); - mySizeBox->setColor( myPrsCopy->GetColor() ); + mySizeBox->setColor( myPrsCopy->GetQColor() ); if( !theInit ) return; @@ -836,15 +836,16 @@ int VisuGUI_GaussPointsDlg::storeToPrsObject( VISU::ColoredPrs3d_i* thePrs ) myPrsCopy->SetIsDeformed( myDefShapeButton->isChecked() ); myPrsCopy->SetScaleFactor( myScaleSpinBox->value() ); - myPrsCopy->SetPrimitiveType( myPrimitiveBox->getPrimitiveType() ); + int aPrimitiveType = myPrimitiveBox->getPrimitiveType(); + myPrsCopy->SetPrimitiveType( VISU::GaussPoints::PrimitiveType( aPrimitiveType ) ); myPrsCopy->SetClamp( myPrimitiveBox->getClamp() ); QString aMainTexture = myPrimitiveBox->getMainTexture(); QString anAlphaTexture = myPrimitiveBox->getAlphaTexture(); - aMainTexture = aMainTexture.isNull() ? myPrsCopy->GetMainTexture() : aMainTexture; - anAlphaTexture = anAlphaTexture.isNull() ? myPrsCopy->GetAlphaTexture() : anAlphaTexture; + aMainTexture = aMainTexture.isNull() ? myPrsCopy->GetQMainTexture() : aMainTexture; + anAlphaTexture = anAlphaTexture.isNull() ? myPrsCopy->GetQAlphaTexture() : anAlphaTexture; myPrsCopy->SetTextures( aMainTexture, anAlphaTexture ); @@ -863,7 +864,7 @@ int VisuGUI_GaussPointsDlg::storeToPrsObject( VISU::ColoredPrs3d_i* thePrs ) else { myPrsCopy->SetIsColored( false ); - myPrsCopy->SetColor( mySizeBox->getColor() ); + myPrsCopy->SetQColor( mySizeBox->getColor() ); myPrsCopy->SetGeomSize( mySizeBox->getGeomSize() ); } diff --git a/src/VISU_I/VISUConfig.cc b/src/VISU_I/VISUConfig.cc index 9b23b281..312941a4 100644 --- a/src/VISU_I/VISUConfig.cc +++ b/src/VISU_I/VISUConfig.cc @@ -431,7 +431,21 @@ namespace VISU Storable ::DataToStream(std::ostringstream& theStr, const QString& theName, - const int theVal) + int theVal) + { + QString output = ( !theName.isNull() ? theName : QString("") ) + + QString( "=" ) + + QString::number( theVal ); + theStr< TName2EntryMap; typedef std::map TEntry2NameMap; + + //--------------------------------------------------------------------------- inline std::string GenerateName(std::string theName, @@ -84,13 +87,18 @@ namespace VISU return theName; } - struct TReplacePredicate{ + + //--------------------------------------------------------------------------- + struct TReplacePredicate + { bool operator()(char theChar) const { return !(isdigit(theChar) || isalpha(theChar) || theChar == '_'); } }; + + //--------------------------------------------------------------------------- inline std::string GetName(SALOMEDS::SObject_ptr theSObject) @@ -108,6 +116,8 @@ namespace VISU return aName; } + + //--------------------------------------------------------------------------- inline std::string GenerateName(SALOMEDS::SObject_ptr theSObject, @@ -131,6 +141,18 @@ namespace VISU return "False"; } + + //--------------------------------------------------------------------------- + inline + std::string + GetColor(const SALOMEDS::Color& theColor) + { + std::ostringstream aStream; + aStream<<"SALOMEDS.Color("<GetScalarMode()<<")"<GetMin()<<", "<GetMax()<<")"<IsRangeFixed()) + theStr<GetMin()<<", "<GetMax()<<")"<GetIsActiveLocalScalarBar(); + theStr<GetIsDispGlobalScalarBar(); + theStr<GetSpacing()<<")"<GetBiColor(); + theStr<GetIsDeformed(); + theStr<GetScaleFactor()<<")"<GetPrimitiveType()){ + case VISU::GaussPoints::SPRITE : + aParam = "VISU.GaussPoints.SPRITE"; + break; + case VISU::GaussPoints::POINT : + aParam = "VISU.GaussPoints.POINT"; + break; + case VISU::GaussPoints::SPHERE : + aParam = "VISU.GaussPoints.SPHERE"; + break; + } + theStr<GetClamp()<<")"<GetQMainTexture(); + QString anAlphaTexture = theServant->GetQAlphaTexture(); + theStr<GetAlphaThreshold()<<")"<GetResolution()<<")"<GetFaceLimit()<<")"<GetIsColored(); + theStr<GetMinSize()<<")"<GetMaxSize()<<")"<GetColor())<<")"<GetGeomSize()<<")"<GetMagnification()<<")"<GetMagnificationIncrement()<<")"<GetScaling()){ @@ -325,11 +425,11 @@ namespace VISU std::string thePrefix) { thePrefix = ScalarMapToPython(theSObject, theServant, theStr, theName, thePrsFactory, thePrefix); + theStr<GetScale()<<")"<IsColored()<<")"<GetColor(); - theStr<IsColored())<<")"<GetColor())<<")"<GetDirection()){ @@ -396,6 +497,7 @@ namespace VISU std::string thePrefix) { thePrefix = ScalarMapToPython(theSObject, theServant, theStr, theName, thePrsFactory, thePrefix); + theStr<GetMin()<<", "<GetMax()<<")"<GetScale()<<")"<GetLineWidth()<<")"<GetNbSurfaces()<<")"<GetOrientationType()){ @@ -541,6 +647,7 @@ namespace VISU std::string thePrefix) { thePrefix = ScalarMapToPython(theSObject, theServant, theStr, theName, thePrsFactory, thePrefix); + theStr<GetOrientationType()){ @@ -599,6 +706,7 @@ namespace VISU std::string thePrefix) { thePrefix = ScalarMapToPython(theSObject, theServant, theStr, theName, thePrsFactory, thePrefix); + theStr<GetOrientationType()){ @@ -744,7 +852,7 @@ namespace VISU << aName << "_cTitles )" << endl; if(theSObject->FindAttribute(anAttr,"AttributeIOR")){ - theStr<(GetServant(anObj).in())){ TCreateFromResult aPrsFactory(theSObject, aServant, aName, "GaussPointsOnField", theArgumentName); - thePrefix = ColoredPrs3dToPython(theSObject, aServant, theStr, aName, aPrsFactory, thePrefix); + thePrefix = GaussPointsToPython(theSObject, aServant, theStr, aName, aPrsFactory, thePrefix); theStr<GetType() == VISU::TCONTAINER){ - theStr<(aDevice)){ - ColoredPrs3dToPython(aSObject, aServant, theStr, "aDevice", aPrsFactory, aPrefix3); + GaussPointsToPython(aSObject, aServant, theStr, "aDevice", aPrsFactory, aPrefix3); break; } } @@ -1690,10 +1798,10 @@ namespace VISU if(!isExist || aTypeName != "ANIMATION") continue; //ANIMATION - theStr<GetName(); theStr<integerValue( "VISU", "point_sprite_primitive_type", GetPrimitiveType() ); - SetPrimitiveType( aPrimitiveType ); + SetPrimitiveType( VISU::GaussPoints::PrimitiveType(aPrimitiveType) ); vtkFloatingPointType aClamp = aResourceMgr->doubleValue( "VISU", "point_sprite_clamp", GetClamp() ); SetClamp( aClamp ); @@ -191,8 +191,8 @@ VISU::GaussPoints_i bool isColored = aResourceMgr->booleanValue( "VISU", "point_sprite_results", GetIsColored() ); SetIsColored( isColored ); - QColor aColor = aResourceMgr->colorValue( "VISU", "point_sprite_color", GetColor() ); - SetColor( aColor ); + QColor aColor = aResourceMgr->colorValue( "VISU", "point_sprite_color", GetQColor() ); + SetQColor( aColor ); vtkFloatingPointType anAlphaThreshold = aResourceMgr->doubleValue( "VISU", "point_sprite_alpha_threshold", GetAlphaThreshold() ); SetAlphaThreshold( anAlphaThreshold ); @@ -271,7 +271,8 @@ VISU::GaussPoints_i SetBiColor(Storable::FindValue(theMap,"myIsBiColor").toInt()); SetSpacing(Storable::FindValue(theMap,"mySpacing").toDouble()); - SetPrimitiveType(Storable::FindValue(theMap,"myPrimitiveType").toInt()); + int aPrimitiveType = Storable::FindValue(theMap,"myPrimitiveType").toInt(); + SetPrimitiveType(VISU::GaussPoints::PrimitiveType(aPrimitiveType)); SetClamp(Storable::FindValue(theMap,"myClamp").toDouble()); SetMinSize(Storable::FindValue(theMap,"myMinSize").toDouble()); SetMaxSize(Storable::FindValue(theMap,"myMaxSize").toDouble()); @@ -289,7 +290,7 @@ VISU::GaussPoints_i int aRed = Storable::FindValue(theMap,"myColor.R").toInt(); int aGreen = Storable::FindValue(theMap,"myColor.G").toInt(); int aBlue = Storable::FindValue(theMap,"myColor.B").toInt(); - SetColor( QColor(aRed,aGreen,aBlue) ); + SetQColor( QColor(aRed, aGreen, aBlue) ); SetAlphaThreshold(Storable::FindValue(theMap,"myAlphaThreshold").toDouble()); @@ -329,14 +330,14 @@ VISU::GaussPoints_i Storable::DataToStream( theStr, "myFaceLimit", GetFaceLimit() ); Storable::DataToStream( theStr, "myIsColored", GetIsColored() ); - QColor aColor = GetColor(); + QColor aColor = GetQColor(); Storable::DataToStream( theStr, "myColor.R", aColor.red() ); Storable::DataToStream( theStr, "myColor.G", aColor.green() ); Storable::DataToStream( theStr, "myColor.B", aColor.blue() ); Storable::DataToStream( theStr, "myAlphaThreshold", GetAlphaThreshold() ); - Storable::DataToStream( theStr, "myMainTexture", GetMainTexture() ); - Storable::DataToStream( theStr, "myAlphaTexture", GetAlphaTexture() ); + Storable::DataToStream( theStr, "myMainTexture", GetQMainTexture() ); + Storable::DataToStream( theStr, "myAlphaTexture", GetQAlphaTexture() ); Storable::DataToStream( theStr, "myResolution", GetResolution() ); } @@ -350,7 +351,7 @@ VISU::GaussPoints_i //---------------------------------------------------------------------------- -int +CORBA::Long VISU::GaussPoints_i ::GetFaceLimit() { @@ -360,7 +361,7 @@ VISU::GaussPoints_i //---------------------------------------------------------------------------- void VISU::GaussPoints_i -::SetFaceLimit( int theFaceLimit ) +::SetFaceLimit( CORBA::Long theFaceLimit ) { if( myFaceLimit != theFaceLimit ){ myFaceLimit = theFaceLimit; @@ -371,12 +372,12 @@ VISU::GaussPoints_i //---------------------------------------------------------------------------- void VISU::GaussPoints_i -::SetIsDeformed( bool theIsDeformed ) +::SetIsDeformed( CORBA::Boolean theIsDeformed ) { myGaussPointsPL->SetIsDeformed( theIsDeformed ); } -bool +CORBA::Boolean VISU::GaussPoints_i ::GetIsDeformed() { @@ -386,12 +387,12 @@ VISU::GaussPoints_i //---------------------------------------------------------------------------- void VISU::GaussPoints_i -::SetScaleFactor( vtkFloatingPointType theScaleFactor ) +::SetScaleFactor( CORBA::Double theScaleFactor ) { myGaussPointsPL->SetScale( theScaleFactor ); } -vtkFloatingPointType +CORBA::Double VISU::GaussPoints_i ::GetScaleFactor() { @@ -401,19 +402,43 @@ VISU::GaussPoints_i //---------------------------------------------------------------------------- QColor VISU::GaussPoints_i -::GetColor() +::GetQColor() { return myColor; } +SALOMEDS::Color +VISU::GaussPoints_i +::GetColor() +{ + SALOMEDS::Color aColor; + aColor.R = myColor.red(); + aColor.G = myColor.green(); + aColor.B = myColor.blue(); + return aColor; +} + + +//---------------------------------------------------------------------------- void VISU::GaussPoints_i -::SetColor( const QColor& theColor ) +::SetQColor( const QColor& theColor ) { + if(myColor == theColor) + return; + myColor = theColor; myParamsTime.Modified(); } +void +VISU::GaussPoints_i +::SetColor( const SALOMEDS::Color& theColor ) +{ + SetQColor(QColor(int(theColor.R), int(theColor.G), int(theColor.B))); +} + + //---------------------------------------------------------------------------- void VISU::GaussPoints_i @@ -439,13 +464,21 @@ VISU::GaussPoints_i return update; } -const QString& +QString VISU::GaussPoints_i -::GetMainTexture() +::GetQMainTexture() { return myMainTexture; } +char* +VISU::GaussPoints_i +::GetMainTexture() +{ + return CORBA::string_dup(myMainTexture.latin1()); +} + + //---------------------------------------------------------------------------- bool VISU::GaussPoints_i @@ -456,22 +489,30 @@ VISU::GaussPoints_i return update; } -const QString& +QString VISU::GaussPoints_i -::GetAlphaTexture() +::GetQAlphaTexture() { return myAlphaTexture; } +char* +VISU::GaussPoints_i +::GetAlphaTexture() +{ + return CORBA::string_dup(myAlphaTexture.latin1()); +} + + //---------------------------------------------------------------------------- void VISU::GaussPoints_i -::SetAlphaThreshold( vtkFloatingPointType theAlphaThreshold ) +::SetAlphaThreshold( CORBA::Double theAlphaThreshold ) { myGaussPointsPL->SetAlphaThreshold( theAlphaThreshold ); } -vtkFloatingPointType +CORBA::Double VISU::GaussPoints_i ::GetAlphaThreshold() { @@ -481,12 +522,12 @@ VISU::GaussPoints_i //---------------------------------------------------------------------------- void VISU::GaussPoints_i -::SetResolution( int theResolution ) +::SetResolution( CORBA::Long theResolution ) { myGaussPointsPL->SetResolution( theResolution ); } -int +CORBA::Long VISU::GaussPoints_i ::GetResolution() { @@ -496,16 +537,24 @@ VISU::GaussPoints_i //---------------------------------------------------------------------------- void VISU::GaussPoints_i -::SetPrimitiveType(int thePrimitiveType) +::SetPrimitiveType(VISU::GaussPoints::PrimitiveType thePrimitiveType) { myGaussPointsPL->SetPrimitiveType( thePrimitiveType ); } -int +VISU::GaussPoints::PrimitiveType VISU::GaussPoints_i ::GetPrimitiveType() { - return myGaussPointsPL->GetPrimitiveType(); + int aPrimitiveType = myGaussPointsPL->GetPrimitiveType(); + + if(aPrimitiveType == VISU_OpenGLPointSpriteMapper::OpenGLPoint) + return VISU::GaussPoints::POINT; + + if(aPrimitiveType == VISU_OpenGLPointSpriteMapper::GeomSphere) + return VISU::GaussPoints::SPHERE; + + return VISU::GaussPoints::SPRITE; } //---------------------------------------------------------------------------- @@ -519,12 +568,12 @@ VISU::GaussPoints_i //---------------------------------------------------------------------------- void VISU::GaussPoints_i -::SetClamp(vtkFloatingPointType theClamp) +::SetClamp(CORBA::Double theClamp) { myGaussPointsPL->SetClamp( theClamp ); } -vtkFloatingPointType +CORBA::Double VISU::GaussPoints_i ::GetClamp() { @@ -534,12 +583,12 @@ VISU::GaussPoints_i //---------------------------------------------------------------------------- void VISU::GaussPoints_i -::SetGeomSize( vtkFloatingPointType theGeomSize ) +::SetGeomSize( CORBA::Double theGeomSize ) { myGaussPointsPL->SetSize( theGeomSize ); } -vtkFloatingPointType +CORBA::Double VISU::GaussPoints_i ::GetGeomSize() { @@ -549,12 +598,12 @@ VISU::GaussPoints_i //---------------------------------------------------------------------------- void VISU::GaussPoints_i -::SetMinSize( vtkFloatingPointType theMinSize ) +::SetMinSize( CORBA::Double theMinSize ) { myGaussPointsPL->SetMinSize( theMinSize ); } -vtkFloatingPointType +CORBA::Double VISU::GaussPoints_i ::GetMinSize() { @@ -564,12 +613,12 @@ VISU::GaussPoints_i //---------------------------------------------------------------------------- void VISU::GaussPoints_i -::SetMaxSize( vtkFloatingPointType theMaxSize ) +::SetMaxSize( CORBA::Double theMaxSize ) { myGaussPointsPL->SetMaxSize( theMaxSize ); } -vtkFloatingPointType +CORBA::Double VISU::GaussPoints_i ::GetMaxSize() { @@ -579,12 +628,12 @@ VISU::GaussPoints_i //---------------------------------------------------------------------------- void VISU::GaussPoints_i -::SetMagnification( vtkFloatingPointType theMagnification ) +::SetMagnification( CORBA::Double theMagnification ) { myGaussPointsPL->SetMagnification( theMagnification ); } -vtkFloatingPointType +CORBA::Double VISU::GaussPoints_i ::GetMagnification() { @@ -594,12 +643,12 @@ VISU::GaussPoints_i //---------------------------------------------------------------------------- void VISU::GaussPoints_i -::SetMagnificationIncrement( vtkFloatingPointType theIncrement ) +::SetMagnificationIncrement( CORBA::Double theIncrement ) { myGaussPointsPL->SetMagnificationIncrement( theIncrement ); } -vtkFloatingPointType +CORBA::Double VISU::GaussPoints_i ::GetMagnificationIncrement() { @@ -864,8 +913,8 @@ VISU::GaussPoints_i //---------------------------------------------------------------------------- void VISU::GaussPoints_i -::SetTextures( const QString& theMainTexture, - const QString& theAlphaTexture ) +::SetQTextures( const QString& theMainTexture, + const QString& theAlphaTexture ) { bool updateMainTexture = SetMainTexture( theMainTexture ); bool updateAlphaTexture = SetAlphaTexture( theAlphaTexture ); @@ -877,11 +926,19 @@ VISU::GaussPoints_i myGaussPointsPL->SetImageData( aTextureValue.GetPointer() ); } +void +VISU::GaussPoints_i +::SetTextures( const char* theMainTexture, + const char* theAlphaTexture ) +{ + SetQTextures(theMainTexture, theAlphaTexture); +} + //---------------------------------------------------------------------------- void VISU::GaussPoints_i -::SetIsActiveLocalScalarBar(const bool theIsActiveLocalScalarBar) +::SetIsActiveLocalScalarBar(CORBA::Boolean theIsActiveLocalScalarBar) { if(myIsActiveLocalScalarBar != theIsActiveLocalScalarBar){ myIsActiveLocalScalarBar = theIsActiveLocalScalarBar; @@ -889,16 +946,16 @@ VISU::GaussPoints_i } } -bool +CORBA::Boolean VISU::GaussPoints_i -::GetIsActiveLocalScalarBar() const +::GetIsActiveLocalScalarBar() { return myIsActiveLocalScalarBar; } void VISU::GaussPoints_i -::SetIsDispGlobalScalarBar(const bool theIsDispGlobalScalarBar) +::SetIsDispGlobalScalarBar(CORBA::Boolean theIsDispGlobalScalarBar) { if(myIsDispGlobalScalarBar != theIsDispGlobalScalarBar){ myIsDispGlobalScalarBar = theIsDispGlobalScalarBar; @@ -960,9 +1017,9 @@ VISU::GaussPoints_i //---------------------------------------------------------------------------- -bool +CORBA::Boolean VISU::GaussPoints_i -::GetIsDispGlobalScalarBar() const +::GetIsDispGlobalScalarBar() { return myIsDispGlobalScalarBar; } @@ -970,12 +1027,12 @@ VISU::GaussPoints_i void VISU::GaussPoints_i -::SetBiColor(bool theIsBiColor) +::SetBiColor(CORBA::Boolean theIsBiColor) { GetSpecificPL()->SetBicolor(theIsBiColor); } -bool +CORBA::Boolean VISU::GaussPoints_i ::GetBiColor() { @@ -984,7 +1041,7 @@ VISU::GaussPoints_i void VISU::GaussPoints_i -::SetSpacing(const vtkFloatingPointType theSpacing) +::SetSpacing(CORBA::Double theSpacing) { if(!VISU::CheckIsSameValue(mySpacing, theSpacing)){ mySpacing = theSpacing; @@ -992,9 +1049,9 @@ VISU::GaussPoints_i } } -vtkFloatingPointType +CORBA::Double VISU::GaussPoints_i -::GetSpacing() const +::GetSpacing() { return mySpacing; } diff --git a/src/VISU_I/VISU_GaussPoints_i.hh b/src/VISU_I/VISU_GaussPoints_i.hh index bfe90d1c..767e4c52 100644 --- a/src/VISU_I/VISU_GaussPoints_i.hh +++ b/src/VISU_I/VISU_GaussPoints_i.hh @@ -70,31 +70,37 @@ namespace VISU GetMemorySize(); //---------------------------------------------------------------------------- - int + CORBA::Long GetFaceLimit(); void - SetFaceLimit( int theFaceLimit ); + SetFaceLimit( CORBA::Long theFaceLimit ); - bool + CORBA::Boolean GetIsDeformed(); void - SetIsDeformed( bool theIsDeformed ); + SetIsDeformed( CORBA::Boolean theIsDeformed ); - vtkFloatingPointType + CORBA::Double GetScaleFactor(); void - SetScaleFactor( vtkFloatingPointType theScaleFactor ); + SetScaleFactor( CORBA::Double theScaleFactor ); //! Get color for Geometry mode of the presentation. - QColor + SALOMEDS::Color GetColor(); + QColor + GetQColor(); + //! Set color for Geometry mode of the presentation. void - SetColor( const QColor& theColor ); + SetColor( const SALOMEDS::Color& theColor ); + + void + SetQColor( const QColor& theColor ); //! Get flag indicating which mode of the presentation is active. /*! When Results mode is active, returns true. Geometry - false. */ @@ -110,7 +116,10 @@ namespace VISU SetMainTexture( const QString& theMainTexture ); //! Get path to the image using for Main Point Sprite texture. - const QString& + QString + GetQMainTexture(); + + char* GetMainTexture(); //! Set path to the image using for Alpha Point Sprite texture. @@ -118,34 +127,41 @@ namespace VISU SetAlphaTexture( const QString& theAlphaTexture ); //! Get path to the image using for Alpha Point Sprite texture. - const QString& + QString + GetQAlphaTexture(); + + char* GetAlphaTexture(); //! Convert Main and AlphaMask images to VTI format and set them to pipeline. void - SetTextures( const QString& theMainTexture, - const QString& theAlphaTexture ); + SetQTextures( const QString& theMainTexture, + const QString& theAlphaTexture ); + + void + SetTextures( const char* theMainTexture, + const char* theAlphaTexture ); //! Redirect the request to VISU_GaussPointsPL::SetAlphaThreshold. void - SetAlphaThreshold(vtkFloatingPointType theAlphaThreshold); + SetAlphaThreshold(CORBA::Double theAlphaThreshold); //! Redirect the request to VISU_GaussPointsPL::GetAlphaThreshold. - vtkFloatingPointType + CORBA::Double GetAlphaThreshold(); //! Redirect the request to VISU_GaussPointsPL::SetResolution. void - SetResolution(int theResolution); + SetResolution(CORBA::Long theResolution); //! Redirect the request to VISU_GaussPointsPL::GetResolution. - int + CORBA::Long GetResolution(); void - SetPrimitiveType(int thePrimitiveType); + SetPrimitiveType(VISU::GaussPoints::PrimitiveType thePrimitiveType); - int + VISU::GaussPoints::PrimitiveType GetPrimitiveType(); //! Redirect the request to VISU_GaussPointsPL::GetMaximumSupportedSize. @@ -154,83 +170,83 @@ namespace VISU //! Redirect the request to VISU_GaussPointsPL::SetClamp. void - SetClamp(vtkFloatingPointType theClamp); + SetClamp(CORBA::Double theClamp); //! Redirect the request to VISU_GaussPointsPL::GetClamp. - vtkFloatingPointType + CORBA::Double GetClamp(); //! Redirect the request to VISU_GaussPointsPL::SetSize. void - SetGeomSize(vtkFloatingPointType theGeomSize); + SetGeomSize(CORBA::Double theGeomSize); //! Redirect the request to VISU_GaussPointsPL::GetSize. - vtkFloatingPointType + CORBA::Double GetGeomSize(); //! Redirect the request to VISU_GaussPointsPL::SetMinSize. void - SetMinSize(vtkFloatingPointType theMinSize); + SetMinSize(CORBA::Double theMinSize); //! Redirect the request to VISU_GaussPointsPL::GetMinSize. - vtkFloatingPointType + CORBA::Double GetMinSize(); //! Redirect the request to VISU_GaussPointsPL::SetMaxSize. void - SetMaxSize(vtkFloatingPointType theMaxSize); + SetMaxSize(CORBA::Double theMaxSize); //! Redirect the request to VISU_GaussPointsPL::GetMaxSize. - vtkFloatingPointType + CORBA::Double GetMaxSize(); //! Redirect the request to VISU_GaussPointsPL::SetMagnification. void - SetMagnification(vtkFloatingPointType theMagnification); + SetMagnification(CORBA::Double theMagnification); //! Redirect the request to VISU_GaussPointsPL::GetMagnification. - vtkFloatingPointType + CORBA::Double GetMagnification(); //! Redirect the request to VISU_GaussPointsPL::SetMagnificationIncrement. void - SetMagnificationIncrement(vtkFloatingPointType theIncrement); + SetMagnificationIncrement(CORBA::Double theIncrement); //! Redirect the request to VISU_GaussPointsPL::GetMagnificationIncrement. - vtkFloatingPointType + CORBA::Double GetMagnificationIncrement(); //! Set flag indicating which scalar bar is active. void - SetIsActiveLocalScalarBar(const bool theFlag); + SetIsActiveLocalScalarBar(CORBA::Boolean theIsActiveLocalScalarBar); //! Get flag indicating which scalar bar is active. - bool - GetIsActiveLocalScalarBar() const; + CORBA::Boolean + GetIsActiveLocalScalarBar(); //! Set flag indicating visibility of global scalar bar. void - SetIsDispGlobalScalarBar(const bool theFlag); + SetIsDispGlobalScalarBar(CORBA::Boolean theIsDispGlobalScalarBar); //! Get flag indicating visibility of global scalar bar. - bool - GetIsDispGlobalScalarBar() const; + CORBA::Boolean + GetIsDispGlobalScalarBar(); //! Redirect the request to VISU_GaussPointsPL::SetBicolor. void - SetBiColor(bool theIsBiColor); + SetBiColor(CORBA::Boolean theIsBiColor); //! Redirect the request to VISU_GaussPointsPL::GetBicolor. - bool + CORBA::Boolean GetBiColor(); //! Set value of the distance between global and local scalar bars. void - SetSpacing(const vtkFloatingPointType theSpacing); + SetSpacing(CORBA::Double theSpacing); //! Get value of the distance between global and local scalar bars. - vtkFloatingPointType - GetSpacing() const; + CORBA::Double + GetSpacing(); //! Let know is the global range is already calculated bool -- 2.39.2