From: ouv Date: Wed, 28 Sep 2005 11:01:30 +0000 (+0000) Subject: Outside Cursor settings added X-Git-Tag: BR-D5-38-2003_D2005-12-10~123 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7d14d276654d7dfeba5ebce15c013b188144bf31;p=modules%2Fvisu.git Outside Cursor settings added --- diff --git a/src/OBJECT/VISU_GaussPtsAct.cxx b/src/OBJECT/VISU_GaussPtsAct.cxx index 049819c4..a718248e 100644 --- a/src/OBJECT/VISU_GaussPtsAct.cxx +++ b/src/OBJECT/VISU_GaussPtsAct.cxx @@ -76,6 +76,21 @@ static int MYDEBUG = 1; static int MYDEBUG = 0; #endif +//---------------------------------------------------------------- +vtkStandardNewMacro( VISU_OutsideCursorSettings ); + +//---------------------------------------------------------------- +VISU_OutsideCursorSettings::VISU_OutsideCursorSettings() +{ + this->MainTexture = NULL; + this->AlphaTexture = NULL; +} + +VISU_OutsideCursorSettings::~VISU_OutsideCursorSettings() +{ + this->SetMainTexture( NULL ); + this->SetAlphaTexture( NULL ); +} //============================================================================ vtkStandardNewMacro(VISU_GaussPtsAct); @@ -294,6 +309,21 @@ VISU_GaussPtsAct return myChangeMagnification; } +//---------------------------------------------------------------- +void +VISU_GaussPtsAct +::SetOutsideCursorSettings(VISU_OutsideCursorSettings* theOutsideCursorSettings) +{ + myOutsideCursorSettings = theOutsideCursorSettings; +} + +//---------------------------------------------------------------- +void +VISU_GaussPtsAct +::UpdateOutsideCursorSettings() +{ + // update actor from myOutsideCursorSettings +} //---------------------------------------------------------------------------- namespace diff --git a/src/OBJECT/VISU_GaussPtsAct.h b/src/OBJECT/VISU_GaussPtsAct.h index 657c8a34..b3efd873 100644 --- a/src/OBJECT/VISU_GaussPtsAct.h +++ b/src/OBJECT/VISU_GaussPtsAct.h @@ -56,6 +56,45 @@ class vtkDataSetMapper; class vtkInteractorObserver; class vtkCallbackCommand; +class VTKOCC_EXPORT VISU_OutsideCursorSettings : public vtkObject +{ + public: + vtkTypeMacro( VISU_OutsideCursorSettings, vtkObject ); + + VISU_OutsideCursorSettings(); + virtual ~VISU_OutsideCursorSettings(); + + static + VISU_OutsideCursorSettings* + New(); + + vtkSetMacro( Clamp, float ); + vtkGetMacro( Clamp, float ); + + vtkSetStringMacro( MainTexture ); + vtkGetStringMacro( MainTexture ); + + vtkSetStringMacro( AlphaTexture ); + vtkGetStringMacro( AlphaTexture ); + + vtkSetMacro( AlphaThreshold, float ); + vtkGetMacro( AlphaThreshold, float ); + + vtkSetMacro( Size, float ); + vtkGetMacro( Size, float ); + + vtkSetVector3Macro( Color, float ); + vtkGetVector3Macro( Color, float ); + +private: + float Clamp; + char* MainTexture; + char* AlphaTexture; + float AlphaThreshold; + float Size; + float Color[3]; +}; + //---------------------------------------------------------------------------- class VTKOCC_EXPORT VISU_GaussPtsAct : public VISU_ScalarMapAct { @@ -133,6 +172,12 @@ class VTKOCC_EXPORT VISU_GaussPtsAct : public VISU_ScalarMapAct void SetImplicitFunctionWidget(VISU_ImplicitFunctionWidget* theWidget); + void + SetOutsideCursorSettings(VISU_OutsideCursorSettings* theOutsideCursorSettings); + + void + UpdateOutsideCursorSettings(); + bool ChangeMagnification(); @@ -201,6 +246,8 @@ class VTKOCC_EXPORT VISU_GaussPtsAct : public VISU_ScalarMapAct vtkSmartPointer myCellSource; vtkSmartPointer myCellActor; + + vtkSmartPointer myOutsideCursorSettings; };