]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Outside Cursor settings added
authorouv <ouv@opencascade.com>
Wed, 28 Sep 2005 11:01:30 +0000 (11:01 +0000)
committerouv <ouv@opencascade.com>
Wed, 28 Sep 2005 11:01:30 +0000 (11:01 +0000)
src/OBJECT/VISU_GaussPtsAct.cxx
src/OBJECT/VISU_GaussPtsAct.h

index 049819c446cae2d1665f2cd11df33246dcefea29..a718248eb1a483735283cafd69d5c46c0eb9dfe0 100644 (file)
@@ -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
index 657c8a349ac75a8f829d08391e13c2d78b10f99a..b3efd873a7aec00f596e9a8d7dc69eb5d569f415 100644 (file)
@@ -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<vtkUnstructuredGrid> myCellSource;
   vtkSmartPointer<vtkActor> myCellActor;
+
+  vtkSmartPointer<VISU_OutsideCursorSettings> myOutsideCursorSettings;
 };