1 // VISU OBJECT : interactive object for VISU entities implementation
3 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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.
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.
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
20 // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
29 #ifndef VISU_GaussPtsSettings_HeaderFile
30 #define VISU_GaussPtsSettings_HeaderFile
32 #include <vtkObject.h>
33 #include <vtkCommand.h>
35 #include "VTKViewer.h"
40 //============================================================================
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;
50 //! Base class of Gauss Points settings.
51 class VISU_GaussPtsSettings : public vtkObject
54 vtkTypeMacro( VISU_GaussPtsSettings, vtkObject );
56 VISU_GaussPtsSettings();
57 virtual ~VISU_GaussPtsSettings();
60 VISU_GaussPtsSettings*
63 vtkSetMacro( Initial, bool );
64 vtkGetMacro( Initial, bool );
66 vtkSetMacro( PrimitiveType, int );
67 vtkGetMacro( PrimitiveType, int );
69 vtkSetMacro( Clamp, vtkFloatingPointType );
70 vtkGetMacro( Clamp, vtkFloatingPointType );
72 vtkSetMacro( Texture, vtkImageData* );
73 vtkGetMacro( Texture, vtkImageData* );
75 vtkSetMacro( AlphaThreshold, vtkFloatingPointType );
76 vtkGetMacro( AlphaThreshold, vtkFloatingPointType );
78 vtkSetMacro( Resolution, int );
79 vtkGetMacro( Resolution, int );
81 vtkSetMacro( Magnification, vtkFloatingPointType );
82 vtkGetMacro( Magnification, vtkFloatingPointType );
84 vtkSetMacro( Increment, vtkFloatingPointType );
85 vtkGetMacro( Increment, vtkFloatingPointType );
91 vtkFloatingPointType Clamp;
92 vtkImageData* Texture;
93 vtkFloatingPointType AlphaThreshold;
95 vtkFloatingPointType Magnification;
96 vtkFloatingPointType Increment;
100 //! Class of Inside Cursor Gauss Points settings.
102 * Contains information about the point sprite parameters:
103 * Clamp, Texture, Alpha threshold, Const size and Color.
104 * Used by Gauss Points Actor.
106 class VISU_InsideCursorSettings : public VISU_GaussPtsSettings
109 vtkTypeMacro( VISU_InsideCursorSettings, vtkObject );
111 VISU_InsideCursorSettings();
112 virtual ~VISU_InsideCursorSettings();
115 VISU_InsideCursorSettings*
118 vtkSetMacro( MinSize, vtkFloatingPointType );
119 vtkGetMacro( MinSize, vtkFloatingPointType );
121 vtkSetMacro( MaxSize, vtkFloatingPointType );
122 vtkGetMacro( MaxSize, vtkFloatingPointType );
125 vtkFloatingPointType MinSize;
126 vtkFloatingPointType MaxSize;
130 //============================================================================
131 //! Class of Outside Cursor Gauss Points settings.
133 * Contains information about the point sprite parameters:
134 * Clamp, Texture, Alpha threshold, Const size and Color.
135 * Used by Gauss Points Actor.
137 class VISU_OutsideCursorSettings : public VISU_GaussPtsSettings
140 vtkTypeMacro( VISU_OutsideCursorSettings, vtkObject );
142 VISU_OutsideCursorSettings();
143 virtual ~VISU_OutsideCursorSettings();
146 VISU_OutsideCursorSettings*
149 vtkSetMacro( Size, vtkFloatingPointType );
150 vtkGetMacro( Size, vtkFloatingPointType );
152 vtkSetMacro( Uniform, bool );
153 vtkGetMacro( Uniform, bool );
155 vtkSetVector3Macro( Color, vtkFloatingPointType );
156 vtkGetVector3Macro( Color, vtkFloatingPointType );
159 vtkFloatingPointType Size;
161 vtkFloatingPointType Color[3];
165 //! Class of Picking settings.
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.
173 class VISU_PickingSettings : public vtkObject
176 enum { BelowPoint = 0, TopLeftCorner };
179 vtkTypeMacro( VISU_PickingSettings, vtkObject );
181 VISU_PickingSettings();
182 virtual ~VISU_PickingSettings();
185 VISU_PickingSettings*
188 vtkSetMacro( Initial, bool );
189 vtkGetMacro( Initial, bool );
191 vtkSetMacro( PyramidHeight, vtkFloatingPointType );
192 vtkGetMacro( PyramidHeight, vtkFloatingPointType );
194 vtkSetMacro( CursorSize, vtkFloatingPointType );
195 vtkGetMacro( CursorSize, vtkFloatingPointType );
197 vtkSetVector3Macro( Color, vtkFloatingPointType );
198 vtkGetVector3Macro( Color, vtkFloatingPointType );
200 vtkSetMacro( PointTolerance, vtkFloatingPointType );
201 vtkGetMacro( PointTolerance, vtkFloatingPointType );
203 vtkSetMacro( InfoWindowTransparency, vtkFloatingPointType );
204 vtkGetMacro( InfoWindowTransparency, vtkFloatingPointType );
206 vtkSetMacro( InfoWindowPosition, int );
207 vtkGetMacro( InfoWindowPosition, int );
209 vtkSetMacro( ZoomFactor, vtkFloatingPointType );
210 vtkGetMacro( ZoomFactor, vtkFloatingPointType );
212 vtkSetMacro( StepNumber, int );
213 vtkGetMacro( StepNumber, int );
215 vtkSetMacro( DisplayParentMesh, bool );
216 vtkGetMacro( DisplayParentMesh, bool );
221 vtkFloatingPointType PyramidHeight;
222 vtkFloatingPointType CursorSize;
223 vtkFloatingPointType PointTolerance;
224 vtkFloatingPointType Color[3];
225 vtkFloatingPointType InfoWindowTransparency;
226 int InfoWindowPosition;
227 vtkFloatingPointType ZoomFactor;
229 bool DisplayParentMesh;