* 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 <VAR>Color</VAR> 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.
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) {
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() );
mySizeBox->setMaxSize( myPrsCopy->GetMaxSize() );
mySizeBox->setMagnification( myPrsCopy->GetMagnification() );
mySizeBox->setIncrement( myPrsCopy->GetMagnificationIncrement() );
- mySizeBox->setColor( myPrsCopy->GetColor() );
+ mySizeBox->setColor( myPrsCopy->GetQColor() );
if( !theInit )
return;
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 );
else
{
myPrsCopy->SetIsColored( false );
- myPrsCopy->SetColor( mySizeBox->getColor() );
+ myPrsCopy->SetQColor( mySizeBox->getColor() );
myPrsCopy->SetGeomSize( mySizeBox->getGeomSize() );
}
Storable
::DataToStream(std::ostringstream& theStr,
const QString& theName,
- const int theVal)
+ int theVal)
+ {
+ QString output = ( !theName.isNull() ? theName : QString("") )
+ + QString( "=" )
+ + QString::number( theVal );
+ theStr<<output.latin1()<<";";
+ }
+
+
+ //---------------------------------------------------------------
+ void
+ Storable
+ ::DataToStream(std::ostringstream& theStr,
+ const QString& theName,
+ long theVal)
{
QString output = ( !theName.isNull() ? theName : QString("") )
+ QString( "=" )
Storable
::DataToStream(std::ostringstream& theStr,
const QString& theName,
- const double theVal)
+ double theVal)
{
QString output = ( !theName.isNull() ? theName : QString("") )
+ QString( "=" )
void
DataToStream(std::ostringstream& theStr,
const QString& theName,
- const int theVal);
+ int theVal);
+
+ static
+ void
+ DataToStream(std::ostringstream& theStr,
+ const QString& theName,
+ long theVal);
static
void
DataToStream(std::ostringstream& theStr,
const QString& theName,
- const double theVal);
+ double theVal);
//---------------------------------------------------------------
virtual
namespace VISU
{
+ //---------------------------------------------------------------------------
static std::string PREFIX(" ");
typedef std::map<std::string,std::string> TName2EntryMap;
typedef std::map<std::string,std::string> TEntry2NameMap;
+
+ //---------------------------------------------------------------------------
inline
std::string
GenerateName(std::string theName,
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)
return aName;
}
+
+ //---------------------------------------------------------------------------
inline
std::string
GenerateName(SALOMEDS::SObject_ptr theSObject,
return "False";
}
+
+ //---------------------------------------------------------------------------
+ inline
+ std::string
+ GetColor(const SALOMEDS::Color& theColor)
+ {
+ std::ostringstream aStream;
+ aStream<<"SALOMEDS.Color("<<theColor.R<<", "<<theColor.G<<", "<<theColor.B<<")";
+ return aStream.str();
+ }
+
+
//---------------------------------------------------------------------------
typedef void (*TDumpToPython)(SALOMEDS::Study_ptr theStudy,
CORBA::Boolean theIsPublished,
theStr<<thePrefix<<theName<<".SetScalarMode("<<theServant->GetScalarMode()<<")"<<endl;
- theStr<<thePrefix<<theName<<".SetRange("<<theServant->GetMin()<<", "<<theServant->GetMax()<<")"<<endl;
+ if(theServant->IsRangeFixed())
+ theStr<<thePrefix<<theName<<".SetRange("<<theServant->GetMin()<<", "<<theServant->GetMax()<<")"<<endl;
+ else
+ theStr<<thePrefix<<theName<<".SetSourceRange()"<<endl;
+
+ return thePrefix;
+ }
+
+
+ //---------------------------------------------------------------------------
+ std::string
+ GaussPointsToPython(SALOMEDS::SObject_ptr theSObject,
+ VISU::GaussPoints_i* theServant,
+ std::ostream& theStr,
+ const std::string& theName,
+ TColoredPrs3dFactory& thePrsFactory,
+ std::string thePrefix)
+ {
+ thePrefix = ColoredPrs3dToPython(theSObject, theServant, theStr, theName, thePrsFactory, thePrefix);
+ theStr<<thePrefix<<endl;
+
+ bool aBoolean = theServant->GetIsActiveLocalScalarBar();
+ theStr<<thePrefix<<theName<<".SetIsActiveLocalScalarBar("<<GetBoolean(aBoolean)<<")"<<endl;
+
+ if(aBoolean){
+ aBoolean = theServant->GetIsDispGlobalScalarBar();
+ theStr<<thePrefix<<theName<<".SetIsDispGlobalScalarBar("<<GetBoolean(aBoolean)<<")"<<endl;
+ }
+
+ theStr<<thePrefix<<theName<<".SetSpacing("<<theServant->GetSpacing()<<")"<<endl;
+
+ aBoolean = theServant->GetBiColor();
+ theStr<<thePrefix<<theName<<".SetBiColor("<<GetBoolean(aBoolean)<<")"<<endl;
+
+ aBoolean = theServant->GetIsDeformed();
+ theStr<<thePrefix<<theName<<".SetIsDeformed("<<GetBoolean(aBoolean)<<")"<<endl;
+ theStr<<thePrefix<<theName<<".SetScaleFactor("<<theServant->GetScaleFactor()<<")"<<endl;
+
+ std::string aParam;
+ switch(theServant->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<<thePrefix<<theName<<".SetPrimitiveType("<<aParam<<")"<<endl;
+
+ theStr<<thePrefix<<theName<<".SetClamp("<<theServant->GetClamp()<<")"<<endl;
+
+ QString aMainTexture = theServant->GetQMainTexture();
+ QString anAlphaTexture = theServant->GetQAlphaTexture();
+ theStr<<thePrefix<<theName<<".SetTextures('"<<aMainTexture.latin1()<<"', '"<<anAlphaTexture.latin1()<<"')"<<endl;
+
+ theStr<<thePrefix<<theName<<".SetAlphaThreshold("<<theServant->GetAlphaThreshold()<<")"<<endl;
+
+ theStr<<thePrefix<<theName<<".SetResolution("<<theServant->GetResolution()<<")"<<endl;
+
+ theStr<<thePrefix<<theName<<".SetFaceLimit("<<theServant->GetFaceLimit()<<")"<<endl;
+
+ aBoolean = theServant->GetIsColored();
+ theStr<<thePrefix<<theName<<".SetIsColored("<<GetBoolean(aBoolean)<<")"<<endl;
+
+ if(aBoolean){
+ theStr<<thePrefix<<theName<<".SetMinSize("<<theServant->GetMinSize()<<")"<<endl;
+ theStr<<thePrefix<<theName<<".SetMaxSize("<<theServant->GetMaxSize()<<")"<<endl;
+ }else{
+ theStr<<thePrefix<<theName<<".SetColor("<<GetColor(theServant->GetColor())<<")"<<endl;
+ theStr<<thePrefix<<theName<<".SetGeomSize("<<theServant->GetGeomSize()<<")"<<endl;
+ }
+
+ theStr<<thePrefix<<theName<<".SetMagnification("<<theServant->GetMagnification()<<")"<<endl;
+ theStr<<thePrefix<<theName<<".SetMagnificationIncrement("<<theServant->GetMagnificationIncrement()<<")"<<endl;
return thePrefix;
}
+
//---------------------------------------------------------------------------
std::string
ScalarMapToPython(SALOMEDS::SObject_ptr theSObject,
std::string thePrefix)
{
thePrefix = ColoredPrs3dToPython(theSObject, theServant, theStr, theName, thePrsFactory, thePrefix);
+ theStr<<thePrefix<<endl;
std::string aParam;
switch(theServant->GetScaling()){
std::string thePrefix)
{
thePrefix = ScalarMapToPython(theSObject, theServant, theStr, theName, thePrsFactory, thePrefix);
+ theStr<<thePrefix<<endl;
+
theStr<<thePrefix<<theName<<".SetScale("<<theServant->GetScale()<<")"<<endl;
- theStr<<thePrefix<<theName<<".ShowColored("<<theServant->IsColored()<<")"<<endl;
- SALOMEDS::Color aColor = theServant->GetColor();
- theStr<<thePrefix<<theName<<".SetColor(SALOMEDS.Color("<<
- aColor.R<<", "<<aColor.G<<", "<<aColor.B<<"))"<<endl;
+ theStr<<thePrefix<<theName<<".ShowColored("<<GetBoolean(theServant->IsColored())<<")"<<endl;
+ theStr<<thePrefix<<theName<<".SetColor("<<GetColor(theServant->GetColor())<<")"<<endl;
return thePrefix;
}
std::string thePrefix)
{
thePrefix = DeformedShapeToPython(theSObject, theServant, theStr, theName, thePrsFactory, thePrefix);
+ theStr<<thePrefix<<endl;
std::string aParam;
switch(theServant->GetDirection()){
std::string thePrefix)
{
thePrefix = ScalarMapToPython(theSObject, theServant, theStr, theName, thePrsFactory, thePrefix);
+ theStr<<thePrefix<<endl;
theStr<<thePrefix<<theName<<".SetRange("<<theServant->GetMin()<<", "<<theServant->GetMax()<<")"<<endl;
theStr<<thePrefix<<theName<<".SetScale("<<theServant->GetScale()<<")"<<endl;
std::string thePrefix)
{
thePrefix = DeformedShapeToPython(theSObject, theServant, theStr, theName, thePrsFactory, thePrefix);
+ theStr<<thePrefix<<endl;
theStr<<thePrefix<<theName<<".SetLineWidth("<<theServant->GetLineWidth()<<")"<<endl;
std::string thePrefix)
{
thePrefix = ScalarMapToPython(theSObject, theServant, theStr, theName, thePrsFactory, thePrefix);
+ theStr<<thePrefix<<endl;
+
theStr<<thePrefix<<theName<<".SetNbSurfaces("<<theServant->GetNbSurfaces()<<")"<<endl;
return thePrefix;
std::string thePrefix)
{
thePrefix = ScalarMapToPython(theSObject, theServant, theStr, theName, thePrsFactory, thePrefix);
+ theStr<<thePrefix<<endl;
std::string aParam;
switch(theServant->GetOrientationType()){
std::string thePrefix)
{
thePrefix = ScalarMapToPython(theSObject, theServant, theStr, theName, thePrsFactory, thePrefix);
+ theStr<<thePrefix<<endl;
std::string aParam;
switch(theServant->GetOrientationType()){
std::string thePrefix)
{
thePrefix = ScalarMapToPython(theSObject, theServant, theStr, theName, thePrsFactory, thePrefix);
+ theStr<<thePrefix<<endl;
std::string aParam;
switch(theServant->GetOrientationType()){
<< aName << "_cTitles )" << endl;
if(theSObject->FindAttribute(anAttr,"AttributeIOR")){
- theStr<<endl;
+ theStr<<thePrefix<<endl;
std::string aName = "aTable";
theStr<<thePrefix<<"anID = "<<aSObjectName<<".GetID()"<<endl;
theStr<<thePrefix<<aName<<" = aVisu.CreateTable(anID)"<<endl;
break;
}
theStr<<thePrefix<<aName<<".SetPresentationType("<<aParam<<")"<<endl;
- theStr<<endl;
+ theStr<<thePrefix<<endl;
DumpChildrenToPython(theStudy,
theIsPublished,
case VISU::TGAUSSPOINTS:
if(GaussPoints_i* aServant = dynamic_cast<GaussPoints_i*>(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<<thePrefix<<"pass"<<endl<<endl;
}
return;
// Set name (as this object could be renamed by user)
theStr<<thePrefix<<aName<<".SetTitle('"<<aNameInStudy.in()<<"') # 2"<<endl;
- theStr<<endl;
+ theStr<<thePrefix<<endl;
theArgumentName = aName;
DumpChildrenToPython(theStudy,
// Set name (as this object could be renamed by user)
theStr<<thePrefix<<aName<<".SetTitle('"<<aNameInStudy.in()<<"') # 3"<<endl;
- theStr<<endl;
+ theStr<<thePrefix<<endl;
theArgumentName = aName;
DumpChildrenToPython(theStudy,
continue;
if(aBase->GetType() == VISU::TCONTAINER){
- theStr<<endl;
+ theStr<<thePrefix<<endl;
std::string aName = GenerateName(aSObject,theName2EntryMap,theEntry2NameMap);
theStr<<thePrefix<<aName<<" = aVisu.CreateContainer()"<<endl;
theStr<<thePrefix<<"if "<<aName<<":"<<endl;
}
case VISU::TGAUSSPOINTS:
if(GaussPoints_i* aServant = dynamic_cast<GaussPoints_i*>(aDevice)){
- ColoredPrs3dToPython(aSObject, aServant, theStr, "aDevice", aPrsFactory, aPrefix3);
+ GaussPointsToPython(aSObject, aServant, theStr, "aDevice", aPrsFactory, aPrefix3);
break;
}
}
if(!isExist || aTypeName != "ANIMATION") continue;
//ANIMATION
- theStr<<endl;
+ theStr<<thePrefix<<endl;
QString animName = aSObject->GetName();
theStr<<thePrefix<<"#Animation: "<<animName<<endl;
- theStr<<endl;
+ theStr<<thePrefix<<endl;
theStr<<thePrefix<<"animSO = aBuilder.NewObject(aSComponent)"<<endl;
theStr<<thePrefix<<"aBuilder.SetName(animSO, '"<<animName<<"')"<< endl;
theStr<<thePrefix<<"strAttr = aBuilder.FindOrCreateAttribute(animSO, 'AttributeString')"<< endl;
}
- theStr<<endl;
+ theStr<<thePrefix<<endl;
}
//---------------------------------------------------------------------------
SetScaleFactor( aScaleFactor );
int aPrimitiveType = aResourceMgr->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 );
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 );
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());
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());
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() );
}
//----------------------------------------------------------------------------
-int
+CORBA::Long
VISU::GaussPoints_i
::GetFaceLimit()
{
//----------------------------------------------------------------------------
void
VISU::GaussPoints_i
-::SetFaceLimit( int theFaceLimit )
+::SetFaceLimit( CORBA::Long theFaceLimit )
{
if( myFaceLimit != theFaceLimit ){
myFaceLimit = theFaceLimit;
//----------------------------------------------------------------------------
void
VISU::GaussPoints_i
-::SetIsDeformed( bool theIsDeformed )
+::SetIsDeformed( CORBA::Boolean theIsDeformed )
{
myGaussPointsPL->SetIsDeformed( theIsDeformed );
}
-bool
+CORBA::Boolean
VISU::GaussPoints_i
::GetIsDeformed()
{
//----------------------------------------------------------------------------
void
VISU::GaussPoints_i
-::SetScaleFactor( vtkFloatingPointType theScaleFactor )
+::SetScaleFactor( CORBA::Double theScaleFactor )
{
myGaussPointsPL->SetScale( theScaleFactor );
}
-vtkFloatingPointType
+CORBA::Double
VISU::GaussPoints_i
::GetScaleFactor()
{
//----------------------------------------------------------------------------
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
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
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()
{
//----------------------------------------------------------------------------
void
VISU::GaussPoints_i
-::SetResolution( int theResolution )
+::SetResolution( CORBA::Long theResolution )
{
myGaussPointsPL->SetResolution( theResolution );
}
-int
+CORBA::Long
VISU::GaussPoints_i
::GetResolution()
{
//----------------------------------------------------------------------------
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;
}
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
void
VISU::GaussPoints_i
-::SetClamp(vtkFloatingPointType theClamp)
+::SetClamp(CORBA::Double theClamp)
{
myGaussPointsPL->SetClamp( theClamp );
}
-vtkFloatingPointType
+CORBA::Double
VISU::GaussPoints_i
::GetClamp()
{
//----------------------------------------------------------------------------
void
VISU::GaussPoints_i
-::SetGeomSize( vtkFloatingPointType theGeomSize )
+::SetGeomSize( CORBA::Double theGeomSize )
{
myGaussPointsPL->SetSize( theGeomSize );
}
-vtkFloatingPointType
+CORBA::Double
VISU::GaussPoints_i
::GetGeomSize()
{
//----------------------------------------------------------------------------
void
VISU::GaussPoints_i
-::SetMinSize( vtkFloatingPointType theMinSize )
+::SetMinSize( CORBA::Double theMinSize )
{
myGaussPointsPL->SetMinSize( theMinSize );
}
-vtkFloatingPointType
+CORBA::Double
VISU::GaussPoints_i
::GetMinSize()
{
//----------------------------------------------------------------------------
void
VISU::GaussPoints_i
-::SetMaxSize( vtkFloatingPointType theMaxSize )
+::SetMaxSize( CORBA::Double theMaxSize )
{
myGaussPointsPL->SetMaxSize( theMaxSize );
}
-vtkFloatingPointType
+CORBA::Double
VISU::GaussPoints_i
::GetMaxSize()
{
//----------------------------------------------------------------------------
void
VISU::GaussPoints_i
-::SetMagnification( vtkFloatingPointType theMagnification )
+::SetMagnification( CORBA::Double theMagnification )
{
myGaussPointsPL->SetMagnification( theMagnification );
}
-vtkFloatingPointType
+CORBA::Double
VISU::GaussPoints_i
::GetMagnification()
{
//----------------------------------------------------------------------------
void
VISU::GaussPoints_i
-::SetMagnificationIncrement( vtkFloatingPointType theIncrement )
+::SetMagnificationIncrement( CORBA::Double theIncrement )
{
myGaussPointsPL->SetMagnificationIncrement( theIncrement );
}
-vtkFloatingPointType
+CORBA::Double
VISU::GaussPoints_i
::GetMagnificationIncrement()
{
//----------------------------------------------------------------------------
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 );
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;
}
}
-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;
//----------------------------------------------------------------------------
-bool
+CORBA::Boolean
VISU::GaussPoints_i
-::GetIsDispGlobalScalarBar() const
+::GetIsDispGlobalScalarBar()
{
return myIsDispGlobalScalarBar;
}
void
VISU::GaussPoints_i
-::SetBiColor(bool theIsBiColor)
+::SetBiColor(CORBA::Boolean theIsBiColor)
{
GetSpecificPL()->SetBicolor(theIsBiColor);
}
-bool
+CORBA::Boolean
VISU::GaussPoints_i
::GetBiColor()
{
void
VISU::GaussPoints_i
-::SetSpacing(const vtkFloatingPointType theSpacing)
+::SetSpacing(CORBA::Double theSpacing)
{
if(!VISU::CheckIsSameValue(mySpacing, theSpacing)){
mySpacing = theSpacing;
}
}
-vtkFloatingPointType
+CORBA::Double
VISU::GaussPoints_i
-::GetSpacing() const
+::GetSpacing()
{
return mySpacing;
}
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. */
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.
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.
//! 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