#include "VISU_OpenGLPointSpriteMapper.hxx"
#include "VISU_ScalarBarCtrl.hxx"
+#include "SUIT_ResourceMgr.h"
+
#include <vtkImageData.h>
#include <vtkXMLImageDataReader.h>
#include <vtkScalarBarActor.h>
ScalarMap_i(theResult,theAddToStudy),
myGaussPointsPL(NULL),
myIsColored(true),
+ myColor(Qt::blue),
myIsActiveLocalScalarBar(true),
- myIsDispGlobalScalarBar(true),
- myColor(Qt::blue)
+ myIsDispGlobalScalarBar(true)
{
if(MYDEBUG) MESSAGE("GaussPoints_i::GaussPoints_i - this = "<<this);
}
Prs3d_i(theResult,theSObject),
ScalarMap_i(theResult,theSObject),
myGaussPointsPL(NULL),
+ myIsColored(true),
+ myColor(Qt::blue),
myIsActiveLocalScalarBar(true),
myIsDispGlobalScalarBar(true)
{
::Create(const char* theMeshName, VISU::Entity theEntity,
const char* theFieldName, int theIteration)
{
- return VISU::ScalarMap_i::Create(theMeshName,theEntity,theFieldName,theIteration);
+ VISU::ScalarMap_i::Create(theMeshName,theEntity,theFieldName,theIteration);
+
+ SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
+
+ float aClamp = aResourceMgr->doubleValue( "VISU", "point_sprite_clamp", GetClamp() );
+ SetClamp( aClamp );
+
+ float aConstSize = aResourceMgr->doubleValue( "VISU", "point_sprite_size", GetConstSize() );
+ SetConstSize( aConstSize );
+
+ float aMinSize = aResourceMgr->doubleValue( "VISU", "point_sprite_min_size", GetMinSize() );
+ SetMinSize( aMinSize );
+
+ float aMaxSize = aResourceMgr->doubleValue( "VISU", "point_sprite_max_size", GetMaxSize() );
+ SetMaxSize( aMaxSize );
+
+ float aMagnification = aResourceMgr->doubleValue( "VISU", "point_sprite_magnification", GetMagnification() );
+ SetMagnification( aMagnification );
+
+ float anIncrement = aResourceMgr->doubleValue( "VISU", "point_sprite_increment", GetMagnificationIncrement() );
+ SetMagnificationIncrement( anIncrement );
+
+ bool isColored = aResourceMgr->booleanValue( "VISU", "point_sprite_results", GetIsColored() );
+ SetIsColored( isColored );
+
+ QColor aColor = aResourceMgr->colorValue( "VISU", "point_sprite_color", GetColor() );
+ SetColor( aColor );
+
+ float anAlphaThreshold = aResourceMgr->doubleValue( "VISU", "point_sprite_alpha_threshold", GetAlphaThreshold() );
+ SetAlphaThreshold( anAlphaThreshold );
+
+ QString aMainTexture = QString( getenv( "VISU_ROOT_DIR") ) + "/share/salome/resources/sprite_texture.bmp";
+ aMainTexture = aResourceMgr->stringValue( "VISU", "point_sprite_main_texture", aMainTexture );
+
+ QString anAlphaTexture = QString( getenv( "VISU_ROOT_DIR") ) + "/share/salome/resources/sprite_alpha.bmp";
+ anAlphaTexture = aResourceMgr->stringValue( "VISU", "point_sprite_alpha_texture", anAlphaTexture );
+
+ SetTextures( aMainTexture, anAlphaTexture );
+
+ return this;
}
return myGaussPointsPL;
}
-QColor
-VISU::GaussPoints_i
-::GetColor()
-{
- return myColor;
-}
-
-void
-VISU::GaussPoints_i
-::SetColor( const QColor& theColor )
-{
- myColor = theColor;
-}
-
-bool
-VISU::GaussPoints_i
-::IsColored()
-{
- return myIsColored;
-}
-
-void
-VISU::GaussPoints_i
-::ShowColored( bool theColored )
-{
- myIsColored = theColored;
-}
-
bool
VISU::GaussPoints_i
::SetMainTexture( const QString& theMainTexture )
return myAlphaTexture;
}
+void
+VISU::GaussPoints_i
+::SetAlphaThreshold( float theAlphaThreshold )
+{
+ myGaussPointsPL->SetAlphaThreshold( theAlphaThreshold );
+}
+
+float
+VISU::GaussPoints_i
+::GetAlphaThreshold()
+{
+ return myGaussPointsPL->GetAlphaThreshold();
+}
+
+float
+VISU::GaussPoints_i
+::GetMaximumSupportedSize()
+{
+ return myGaussPointsPL->GetMaximumSupportedSize();
+}
+
+void
+VISU::GaussPoints_i
+::SetClamp(float theClamp)
+{
+ myGaussPointsPL->SetClamp( theClamp );
+}
+
+float
+VISU::GaussPoints_i
+::GetClamp()
+{
+ return myGaussPointsPL->GetClamp();
+}
+
+void
+VISU::GaussPoints_i
+::SetConstSize( float theConstSize )
+{
+ myGaussPointsPL->SetSize( theConstSize );
+}
+
+float
+VISU::GaussPoints_i
+::GetConstSize()
+{
+ return myGaussPointsPL->GetSize();
+}
+
+void
+VISU::GaussPoints_i
+::SetMinSize( float theMinSize )
+{
+ myGaussPointsPL->SetMinSize( theMinSize );
+}
+
+float
+VISU::GaussPoints_i
+::GetMinSize()
+{
+ return myGaussPointsPL->GetMinSize();
+}
+
+void
+VISU::GaussPoints_i
+::SetMaxSize( float theMaxSize )
+{
+ myGaussPointsPL->SetMaxSize( theMaxSize );
+}
+
+float
+VISU::GaussPoints_i
+::GetMaxSize()
+{
+ return myGaussPointsPL->GetMaxSize();
+}
+
+void
+VISU::GaussPoints_i
+::SetMagnification( float theMagnification )
+{
+ myGaussPointsPL->SetMagnification( theMagnification );
+}
+
+float
+VISU::GaussPoints_i
+::GetMagnification()
+{
+ return myGaussPointsPL->GetMagnification();
+}
+
+void
+VISU::GaussPoints_i
+::SetMagnificationIncrement( float theIncrement )
+{
+ myGaussPointsPL->SetMagnificationIncrement( theIncrement );
+}
+
+float
+VISU::GaussPoints_i
+::GetMagnificationIncrement()
+{
+ return myGaussPointsPL->GetMagnificationIncrement();
+}
//----------------------------------------------------------------------------
void
myGaussPointsPL = dynamic_cast<VISU_GaussPointsPL*>(myPipeLine);
ScalarMap_i::DoHook();
-
- SetTextures( QString( getenv( "VISU_ROOT_DIR") ) + "/share/salome/resources/sprite_texture.bmp",
- QString( getenv( "VISU_ROOT_DIR") ) + "/share/salome/resources/sprite_alpha.bmp" );
}
void VISU::GaussPoints_i::UpdateActor(VISU_Actor* theActor)
{
if(VISU_GaussPtsAct* anActor = dynamic_cast<VISU_GaussPtsAct*>(theActor)){
- if(IsColored()){
+ if(GetIsColored()){
anActor->SetBarVisibility(true);
myPipeLine->GetMapper()->SetScalarVisibility(1);
}
GetGaussPointsPL();
QColor
- GetColor();
+ GetColor() { return myColor; }
void
- SetColor( const QColor& theColor );
+ SetColor( const QColor& theColor ) { myColor = theColor; }
bool
- IsColored();
+ GetIsColored() { return myIsColored; }
void
- ShowColored( bool theColored );
+ SetIsColored( bool theIsColored ) { myIsColored = theIsColored; }
bool
SetMainTexture( const QString& theMainTexture );
SetTextures( const QString& theMainTexture,
const QString& theAlphaTexture );
+ void
+ SetAlphaThreshold(float theAlphaThreshold);
+
+ float
+ GetAlphaThreshold();
+
+ float
+ GetMaximumSupportedSize();
+
+ void
+ SetClamp(float theClamp);
+
+ float
+ GetClamp();
+
+ void
+ SetConstSize(float theConstSize);
+
+ float
+ GetConstSize();
+
+ void
+ SetMinSize(float theMinSize);
+
+ float
+ GetMinSize();
+
+ void
+ SetMaxSize(float theMaxSize);
+
+ float
+ GetMaxSize();
+
+ float
+ GetMaxPointSize();
+
+ void
+ SetMagnification(float theMagnification);
+
+ float
+ GetMagnification();
+
+ void
+ SetMagnificationIncrement(float theIncrement);
+
+ float
+ GetMagnificationIncrement();
+
void
SetIsActiveLocalScalarBar(const bool theFlag);