]> SALOME platform Git repositories - modules/visu.git/blob - src/OBJECT/VISU_GaussPtsSettings.h
Salome HOME
Join modifications from branch OCC_debug_for_3_2_0b1
[modules/visu.git] / src / OBJECT / VISU_GaussPtsSettings.h
1 //  VISU OBJECT : interactive object for VISU entities implementation
2 //
3 //  Copyright (C) 2003  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
21 //
22 //
23 //
24 //  File   : 
25 //  Author : 
26 //  Module : VISU
27 //  $Header$
28
29 #ifndef VISU_GaussPtsSettings_HeaderFile
30 #define VISU_GaussPtsSettings_HeaderFile
31
32 #include <vtkObject.h>
33 #include <vtkCommand.h>
34
35 #include "VTKViewer.h"
36
37 class vtkImageData;
38
39
40 //============================================================================
41 namespace VISU
42 {
43   const vtkIdType UpdateFromSettingsEvent        = vtkCommand::UserEvent + 100; 
44   const vtkIdType UpdateInsideSettingsEvent      = vtkCommand::UserEvent + 101; 
45   const vtkIdType UpdateOutsideSettingsEvent     = vtkCommand::UserEvent + 102; 
46   const vtkIdType UpdatePickingSettingsEvent     = vtkCommand::UserEvent + 103; 
47 }
48
49
50 //! Base class of Gauss Points settings.
51 class VISU_GaussPtsSettings : public vtkObject
52 {
53  public:
54   vtkTypeMacro( VISU_GaussPtsSettings, vtkObject );
55
56   VISU_GaussPtsSettings();
57   virtual ~VISU_GaussPtsSettings();
58
59   static
60   VISU_GaussPtsSettings*
61   New();
62
63   vtkSetMacro( Initial, bool );
64   vtkGetMacro( Initial, bool );
65
66   vtkSetMacro( PrimitiveType, int );
67   vtkGetMacro( PrimitiveType, int );
68
69   vtkSetMacro( Clamp, vtkFloatingPointType );
70   vtkGetMacro( Clamp, vtkFloatingPointType );
71
72   vtkSetMacro( Texture, vtkImageData* );
73   vtkGetMacro( Texture, vtkImageData* );
74
75   vtkSetMacro( AlphaThreshold, vtkFloatingPointType );
76   vtkGetMacro( AlphaThreshold, vtkFloatingPointType );
77
78   vtkSetMacro( Resolution, int );
79   vtkGetMacro( Resolution, int );
80
81   vtkSetMacro( Magnification, vtkFloatingPointType );
82   vtkGetMacro( Magnification, vtkFloatingPointType );
83
84   vtkSetMacro( Increment, vtkFloatingPointType );
85   vtkGetMacro( Increment, vtkFloatingPointType );
86
87  protected:
88   bool                Initial;
89
90   int                 PrimitiveType;
91   vtkFloatingPointType Clamp;
92   vtkImageData*       Texture;
93   vtkFloatingPointType AlphaThreshold;
94   int                 Resolution;
95   vtkFloatingPointType Magnification;
96   vtkFloatingPointType Increment;
97 };
98
99
100 //! Class of Inside Cursor Gauss Points settings.
101 /*!
102  * Contains information about the point sprite parameters:
103  * Clamp, Texture, Alpha threshold, Const size and Color.
104  * Used by Gauss Points Actor.
105  */
106 class VISU_InsideCursorSettings : public VISU_GaussPtsSettings
107 {
108  public:
109   vtkTypeMacro( VISU_InsideCursorSettings, vtkObject );
110
111   VISU_InsideCursorSettings();
112   virtual ~VISU_InsideCursorSettings();
113
114   static
115   VISU_InsideCursorSettings*
116   New();
117
118   vtkSetMacro( MinSize, vtkFloatingPointType );
119   vtkGetMacro( MinSize, vtkFloatingPointType );
120
121   vtkSetMacro( MaxSize, vtkFloatingPointType );
122   vtkGetMacro( MaxSize, vtkFloatingPointType );
123
124  protected:
125   vtkFloatingPointType MinSize;
126   vtkFloatingPointType MaxSize;
127 };
128
129
130 //============================================================================
131 //! Class of Outside Cursor Gauss Points settings.
132 /*!
133  * Contains information about the point sprite parameters:
134  * Clamp, Texture, Alpha threshold, Const size and Color.
135  * Used by Gauss Points Actor.
136  */
137 class VISU_OutsideCursorSettings : public VISU_GaussPtsSettings
138 {
139  public:
140   vtkTypeMacro( VISU_OutsideCursorSettings, vtkObject );
141
142   VISU_OutsideCursorSettings();
143   virtual ~VISU_OutsideCursorSettings();
144
145   static
146   VISU_OutsideCursorSettings*
147   New();
148
149   vtkSetMacro( Size, vtkFloatingPointType );
150   vtkGetMacro( Size, vtkFloatingPointType );
151
152   vtkSetMacro( Uniform, bool );
153   vtkGetMacro( Uniform, bool );
154
155   vtkSetVector3Macro( Color, vtkFloatingPointType );
156   vtkGetVector3Macro( Color, vtkFloatingPointType );
157
158  protected:
159   vtkFloatingPointType Size;
160   bool                Uniform;
161   vtkFloatingPointType Color[3];
162 };
163
164
165 //! Class of Picking settings.
166 /*!
167  * Contains information about the following parameters:
168  * Cursor Pyramid height, Info Window transparency,
169  * Info Window position, Zoom factor on first selected point,
170  * Camera movement steps number and Display parent mesh.
171  * Used by Gauss Points Actor.
172  */
173 class VISU_PickingSettings : public vtkObject
174 {
175  public:
176   enum { BelowPoint = 0, TopLeftCorner };
177
178  public:
179   vtkTypeMacro( VISU_PickingSettings, vtkObject );
180
181   VISU_PickingSettings();
182   virtual ~VISU_PickingSettings();
183
184   static
185   VISU_PickingSettings*
186   New();
187
188   vtkSetMacro( Initial, bool );
189   vtkGetMacro( Initial, bool );
190
191   vtkSetMacro( PyramidHeight, vtkFloatingPointType );
192   vtkGetMacro( PyramidHeight, vtkFloatingPointType );
193
194   vtkSetMacro( CursorSize, vtkFloatingPointType );
195   vtkGetMacro( CursorSize, vtkFloatingPointType );
196
197   vtkSetVector3Macro( Color, vtkFloatingPointType );
198   vtkGetVector3Macro( Color, vtkFloatingPointType );
199
200   vtkSetMacro( PointTolerance, vtkFloatingPointType );
201   vtkGetMacro( PointTolerance, vtkFloatingPointType );
202
203   vtkSetMacro( InfoWindowTransparency, vtkFloatingPointType );
204   vtkGetMacro( InfoWindowTransparency, vtkFloatingPointType );
205
206   vtkSetMacro( InfoWindowPosition, int );
207   vtkGetMacro( InfoWindowPosition, int );
208
209   vtkSetMacro( ZoomFactor, vtkFloatingPointType );
210   vtkGetMacro( ZoomFactor, vtkFloatingPointType );
211
212   vtkSetMacro( StepNumber, int );
213   vtkGetMacro( StepNumber, int );
214
215   vtkSetMacro( DisplayParentMesh, bool );
216   vtkGetMacro( DisplayParentMesh, bool );
217
218 private:
219   bool                Initial;
220
221   vtkFloatingPointType PyramidHeight;
222   vtkFloatingPointType CursorSize;
223   vtkFloatingPointType PointTolerance;
224   vtkFloatingPointType Color[3];
225   vtkFloatingPointType InfoWindowTransparency;
226   int                 InfoWindowPosition;
227   vtkFloatingPointType ZoomFactor;
228   int                 StepNumber;
229   bool                DisplayParentMesh;
230 };
231
232
233 #endif