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.salome-platform.org/ or email : webmaster.salome@opencascade.com
29 #ifndef VISU_GaussPtsSettings_HeaderFile
30 #define VISU_GaussPtsSettings_HeaderFile
32 #include <vtkObject.h>
33 #include <vtkCommand.h>
35 #include "VTKViewer.h"
39 #include "VISU_Actor.h"
41 //============================================================================
44 const vtkIdType UpdateFromSettingsEvent = vtkCommand::UserEvent + 100;
45 const vtkIdType UpdateInsideSettingsEvent = vtkCommand::UserEvent + 101;
46 const vtkIdType UpdateOutsideSettingsEvent = vtkCommand::UserEvent + 102;
47 const vtkIdType UpdatePickingSettingsEvent = vtkCommand::UserEvent + 103;
51 //! Base class of Gauss Points settings.
52 class VTKOCC_EXPORT VISU_GaussPtsSettings : public vtkObject
55 vtkTypeMacro( VISU_GaussPtsSettings, vtkObject );
57 VISU_GaussPtsSettings();
58 virtual ~VISU_GaussPtsSettings();
61 VISU_GaussPtsSettings*
64 vtkSetMacro( Initial, bool );
65 vtkGetMacro( Initial, bool );
67 vtkSetMacro( PrimitiveType, int );
68 vtkGetMacro( PrimitiveType, int );
70 vtkSetMacro( Clamp, vtkFloatingPointType );
71 vtkGetMacro( Clamp, vtkFloatingPointType );
73 vtkSetMacro( Texture, vtkImageData* );
74 vtkGetMacro( Texture, vtkImageData* );
76 vtkSetMacro( AlphaThreshold, vtkFloatingPointType );
77 vtkGetMacro( AlphaThreshold, vtkFloatingPointType );
79 vtkSetMacro( Resolution, int );
80 vtkGetMacro( Resolution, int );
82 vtkSetMacro( Magnification, vtkFloatingPointType );
83 vtkGetMacro( Magnification, vtkFloatingPointType );
85 vtkSetMacro( Increment, vtkFloatingPointType );
86 vtkGetMacro( Increment, vtkFloatingPointType );
92 vtkFloatingPointType Clamp;
93 vtkImageData* Texture;
94 vtkFloatingPointType AlphaThreshold;
96 vtkFloatingPointType Magnification;
97 vtkFloatingPointType Increment;
101 //! Class of Inside Cursor Gauss Points settings.
103 * Contains information about the point sprite parameters:
104 * Clamp, Texture, Alpha threshold, Const size and Color.
105 * Used by Gauss Points Actor.
107 class VTKOCC_EXPORT VISU_InsideCursorSettings : public VISU_GaussPtsSettings
110 vtkTypeMacro( VISU_InsideCursorSettings, vtkObject );
112 VISU_InsideCursorSettings();
113 virtual ~VISU_InsideCursorSettings();
116 VISU_InsideCursorSettings*
119 vtkSetMacro( MinSize, vtkFloatingPointType );
120 vtkGetMacro( MinSize, vtkFloatingPointType );
122 vtkSetMacro( MaxSize, vtkFloatingPointType );
123 vtkGetMacro( MaxSize, vtkFloatingPointType );
126 vtkFloatingPointType MinSize;
127 vtkFloatingPointType MaxSize;
131 //============================================================================
132 //! Class of Outside Cursor Gauss Points settings.
134 * Contains information about the point sprite parameters:
135 * Clamp, Texture, Alpha threshold, Const size and Color.
136 * Used by Gauss Points Actor.
138 class VTKOCC_EXPORT VISU_OutsideCursorSettings : public VISU_GaussPtsSettings
141 vtkTypeMacro( VISU_OutsideCursorSettings, vtkObject );
143 VISU_OutsideCursorSettings();
144 virtual ~VISU_OutsideCursorSettings();
147 VISU_OutsideCursorSettings*
150 vtkSetMacro( Size, vtkFloatingPointType );
151 vtkGetMacro( Size, vtkFloatingPointType );
153 vtkSetMacro( Uniform, bool );
154 vtkGetMacro( Uniform, bool );
156 vtkSetVector3Macro( Color, vtkFloatingPointType );
157 vtkGetVector3Macro( Color, vtkFloatingPointType );
160 vtkFloatingPointType Size;
162 vtkFloatingPointType Color[3];
166 //! Class of Picking settings.
168 * Contains information about the following parameters:
169 * Cursor Pyramid height, Info Window transparency,
170 * Info Window position, Zoom factor on first selected point,
171 * Camera movement steps number and Display parent mesh.
172 * Used by Gauss Points Actor.
174 class VTKOCC_EXPORT VISU_PickingSettings : public vtkObject
177 enum { BelowPoint = 0, TopLeftCorner };
180 vtkTypeMacro( VISU_PickingSettings, vtkObject );
182 VISU_PickingSettings();
183 virtual ~VISU_PickingSettings();
186 VISU_PickingSettings*
189 vtkSetMacro( Initial, bool );
190 vtkGetMacro( Initial, bool );
192 vtkSetMacro( PyramidHeight, vtkFloatingPointType );
193 vtkGetMacro( PyramidHeight, vtkFloatingPointType );
195 vtkSetMacro( CursorSize, vtkFloatingPointType );
196 vtkGetMacro( CursorSize, vtkFloatingPointType );
198 vtkSetVector3Macro( Color, vtkFloatingPointType );
199 vtkGetVector3Macro( Color, vtkFloatingPointType );
201 vtkSetMacro( PointTolerance, vtkFloatingPointType );
202 vtkGetMacro( PointTolerance, vtkFloatingPointType );
204 vtkSetMacro( InfoWindowTransparency, vtkFloatingPointType );
205 vtkGetMacro( InfoWindowTransparency, vtkFloatingPointType );
207 vtkSetMacro( InfoWindowPosition, int );
208 vtkGetMacro( InfoWindowPosition, int );
210 vtkSetMacro( ZoomFactor, vtkFloatingPointType );
211 vtkGetMacro( ZoomFactor, vtkFloatingPointType );
213 vtkSetMacro( StepNumber, int );
214 vtkGetMacro( StepNumber, int );
216 vtkSetMacro( DisplayParentMesh, bool );
217 vtkGetMacro( DisplayParentMesh, bool );
222 vtkFloatingPointType PyramidHeight;
223 vtkFloatingPointType CursorSize;
224 vtkFloatingPointType PointTolerance;
225 vtkFloatingPointType Color[3];
226 vtkFloatingPointType InfoWindowTransparency;
227 int InfoWindowPosition;
228 vtkFloatingPointType ZoomFactor;
230 bool DisplayParentMesh;