From: ouv Date: Tue, 4 Oct 2005 12:48:31 +0000 (+0000) Subject: Picking preferences X-Git-Tag: BR-D5-38-2003_D2005-12-10~74 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ddd60f1057af1f26fae43cf595174d6ffd1c1565;p=modules%2Fvisu.git Picking preferences --- diff --git a/src/OBJECT/VISU_GaussPtsAct.cxx b/src/OBJECT/VISU_GaussPtsAct.cxx index 3b1e226c..f8583ce5 100644 --- a/src/OBJECT/VISU_GaussPtsAct.cxx +++ b/src/OBJECT/VISU_GaussPtsAct.cxx @@ -84,6 +84,7 @@ static int MYDEBUG2 = 0; //---------------------------------------------------------------- vtkStandardNewMacro( VISU_OutsideCursorSettings ); +vtkStandardNewMacro( VISU_PickingSettings ); //---------------------------------------------------------------- VISU_OutsideCursorSettings::VISU_OutsideCursorSettings() @@ -98,6 +99,18 @@ VISU_OutsideCursorSettings::~VISU_OutsideCursorSettings() this->SetTexture( NULL ); } +//---------------------------------------------------------------- +VISU_PickingSettings::VISU_PickingSettings() +{ + this->Initial = true; +} + +VISU_PickingSettings::~VISU_PickingSettings() +{ +} + + + //============================================================================ vtkStandardNewMacro(VISU_GaussPtsAct); @@ -121,7 +134,8 @@ VISU_GaussPtsAct myCellSource(vtkUnstructuredGrid::New()), myCellActor(vtkActor::New()), myScalarBarCtrl(VISU_ScalarBarCtrl::New()), - myBarVisibility(true) + myBarVisibility(true), + myPickingSettings(NULL) { if(MYDEBUG) MESSAGE("VISU_GaussPtsAct::VISU_GaussPtsAct - this = "<GetAlphaThreshold() << endl; Update(); } diff --git a/src/OBJECT/VISU_GaussPtsAct.h b/src/OBJECT/VISU_GaussPtsAct.h index 207f2ba0..8456a26f 100644 --- a/src/OBJECT/VISU_GaussPtsAct.h +++ b/src/OBJECT/VISU_GaussPtsAct.h @@ -101,6 +101,51 @@ private: }; +//============================================================================ +class VISU_PickingSettings : public vtkObject +{ + public: + enum { BelowPoint = 0, TopLeftCorner }; + + public: + vtkTypeMacro( VISU_PickingSettings, vtkObject ); + + VISU_PickingSettings(); + virtual ~VISU_PickingSettings(); + + static + VISU_PickingSettings* + New(); + + vtkSetMacro( Initial, bool ); + vtkGetMacro( Initial, bool ); + + vtkSetMacro( PyramidHeight, float ); + vtkGetMacro( PyramidHeight, float ); + + vtkSetMacro( InfoWindowTransparency, float ); + vtkGetMacro( InfoWindowTransparency, float ); + + vtkSetMacro( InfoWindowPosition, int ); + vtkGetMacro( InfoWindowPosition, int ); + + vtkSetMacro( ZoomFactor, float ); + vtkGetMacro( ZoomFactor, float ); + + vtkSetMacro( StepNumber, int ); + vtkGetMacro( StepNumber, int ); + +private: + bool Initial; + + float PyramidHeight; + float InfoWindowTransparency; + int InfoWindowPosition; + float ZoomFactor; + int StepNumber; +}; + + //============================================================================ class VTKOCC_EXPORT VISU_GaussPtsAct : public VISU_Actor { @@ -208,6 +253,13 @@ class VTKOCC_EXPORT VISU_GaussPtsAct : public VISU_Actor SVTK_SelectionEvent* theSelectionEvent, bool theIsHighlight); + //---------------------------------------------------------------------------- + void + SetPickingSettings(VISU_PickingSettings* thePickingSettings); + + void + UpdatePickingSettings(); + protected: //---------------------------------------------------------------------------- VISU_GaussPtsAct(); @@ -263,6 +315,8 @@ class VTKOCC_EXPORT VISU_GaussPtsAct : public VISU_Actor bool myBarVisibility; vtkSmartPointer myScalarBarCtrl; + + VISU_PickingSettings* myPickingSettings; };