]> SALOME platform Git repositories - modules/visu.git/blob - src/OBJECT/VISU_PickingSettings.h
Salome HOME
Bug 0020164: EDF 954 VISU : Constant field with Gauss points.
[modules/visu.git] / src / OBJECT / VISU_PickingSettings.h
1 //  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 //  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 //  This library is free software; you can redistribute it and/or
7 //  modify it under the terms of the GNU Lesser General Public
8 //  License as published by the Free Software Foundation; either
9 //  version 2.1 of the License.
10 //
11 //  This library is distributed in the hope that it will be useful,
12 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
13 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 //  Lesser General Public License for more details.
15 //
16 //  You should have received a copy of the GNU Lesser General Public
17 //  License along with this library; if not, write to the Free Software
18 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 //
20 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22 //  VISU OBJECT : interactive object for VISU entities implementation
23 //  File   : VISU_PickingSettings.cxx
24 //  Author : Oleg UVAROV
25 //  Module : VISU
26 //
27 #ifndef VISU_PickingSettings_HeaderFile
28 #define VISU_PickingSettings_HeaderFile
29
30 #include "VISU_OBJECT.h"
31 #include <vtkObject.h>
32 #include <vtkCommand.h>
33
34 #include "VTKViewer.h"
35
36 #include "VISU_Actor.h"
37
38 //============================================================================
39 namespace VISU
40 {
41   const vtkIdType UpdatePickingSettingsEvent     = vtkCommand::UserEvent + 103; 
42 }
43
44 //! Class of Picking settings.
45 /*!
46  * Contains information about the following parameters:
47  * Cursor Pyramid height, Info Window transparency,
48  * Info Window position, Zoom factor on first selected point,
49  * Camera movement steps number and Display parent mesh.
50  */
51 class VISU_OBJECT_EXPORT VISU_PickingSettings : public vtkObject
52 {
53  public:
54   enum { BelowPoint = 0, TopLeftCorner };
55
56  public:
57   vtkTypeMacro( VISU_PickingSettings, vtkObject );
58
59   static
60   VISU_PickingSettings*
61   Get();
62
63   static
64   VISU_PickingSettings*
65   New();
66
67   vtkSetMacro( IsInitial, bool );
68   vtkGetMacro( IsInitial, bool );
69
70   vtkSetMacro( PyramidHeight, vtkFloatingPointType );
71   vtkGetMacro( PyramidHeight, vtkFloatingPointType );
72
73   vtkSetMacro( CursorSize, vtkFloatingPointType );
74   vtkGetMacro( CursorSize, vtkFloatingPointType );
75
76   vtkSetVector3Macro( Color, vtkFloatingPointType );
77   vtkGetVector3Macro( Color, vtkFloatingPointType );
78
79   vtkSetMacro( PointTolerance, vtkFloatingPointType );
80   vtkGetMacro( PointTolerance, vtkFloatingPointType );
81
82   vtkSetMacro( InfoWindowEnabled, bool );
83   vtkGetMacro( InfoWindowEnabled, bool );
84
85   vtkSetMacro( InfoWindowTransparency, vtkFloatingPointType );
86   vtkGetMacro( InfoWindowTransparency, vtkFloatingPointType );
87
88   vtkSetMacro( InfoWindowPosition, int );
89   vtkGetMacro( InfoWindowPosition, int );
90
91   vtkSetMacro( CameraMovementEnabled, bool );
92   vtkGetMacro( CameraMovementEnabled, bool );
93
94   vtkSetMacro( ZoomFactor, vtkFloatingPointType );
95   vtkGetMacro( ZoomFactor, vtkFloatingPointType );
96
97   vtkSetMacro( StepNumber, int );
98   vtkGetMacro( StepNumber, int );
99
100   vtkSetMacro( DisplayParentMesh, bool );
101   vtkGetMacro( DisplayParentMesh, bool );
102
103 private:
104   VISU_PickingSettings();
105   virtual ~VISU_PickingSettings();
106
107 private:
108   bool                 IsInitial;
109
110   vtkFloatingPointType PyramidHeight;
111   vtkFloatingPointType CursorSize;
112
113   vtkFloatingPointType PointTolerance;
114
115   vtkFloatingPointType Color[3];
116
117   bool                 InfoWindowEnabled;
118   vtkFloatingPointType InfoWindowTransparency;
119   int                  InfoWindowPosition;
120
121   bool                 CameraMovementEnabled;
122   vtkFloatingPointType ZoomFactor;
123   int                  StepNumber;
124
125   bool                 DisplayParentMesh;
126 };
127
128 #endif