1 // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 // VISU OBJECT : interactive object for VISU entities implementation
21 // File : VISU_PickingSettings.cxx
22 // Author : Oleg UVAROV
25 #ifndef VISU_PickingSettings_HeaderFile
26 #define VISU_PickingSettings_HeaderFile
28 #include "VISU_OBJECT.h"
29 #include <vtkObject.h>
30 #include <vtkCommand.h>
32 #include "VTKViewer.h"
34 #include "VISU_Actor.h"
36 //============================================================================
39 const vtkIdType UpdatePickingSettingsEvent = vtkCommand::UserEvent + 103;
42 //! Class of Picking settings.
44 * Contains information about the following parameters:
45 * Cursor Pyramid height, Info Window transparency,
46 * Info Window position, Zoom factor on first selected point,
47 * Camera movement steps number and Display parent mesh.
49 class VISU_OBJECT_EXPORT VISU_PickingSettings : public vtkObject
52 enum { BelowPoint = 0, TopLeftCorner };
55 vtkTypeMacro( VISU_PickingSettings, vtkObject );
65 vtkSetMacro( IsInitial, bool );
66 vtkGetMacro( IsInitial, bool );
68 vtkSetMacro( PyramidHeight, vtkFloatingPointType );
69 vtkGetMacro( PyramidHeight, vtkFloatingPointType );
71 vtkSetMacro( CursorSize, vtkFloatingPointType );
72 vtkGetMacro( CursorSize, vtkFloatingPointType );
74 vtkSetVector3Macro( Color, vtkFloatingPointType );
75 vtkGetVector3Macro( Color, vtkFloatingPointType );
77 vtkSetMacro( PointTolerance, vtkFloatingPointType );
78 vtkGetMacro( PointTolerance, vtkFloatingPointType );
80 vtkSetMacro( InfoWindowEnabled, bool );
81 vtkGetMacro( InfoWindowEnabled, bool );
83 vtkSetMacro( InfoWindowTransparency, vtkFloatingPointType );
84 vtkGetMacro( InfoWindowTransparency, vtkFloatingPointType );
86 vtkSetMacro( InfoWindowPosition, int );
87 vtkGetMacro( InfoWindowPosition, int );
89 vtkSetMacro( CameraMovementEnabled, bool );
90 vtkGetMacro( CameraMovementEnabled, bool );
92 vtkSetMacro( ZoomFactor, vtkFloatingPointType );
93 vtkGetMacro( ZoomFactor, vtkFloatingPointType );
95 vtkSetMacro( StepNumber, int );
96 vtkGetMacro( StepNumber, int );
98 vtkSetMacro( DisplayParentMesh, bool );
99 vtkGetMacro( DisplayParentMesh, bool );
102 VISU_PickingSettings();
103 virtual ~VISU_PickingSettings();
108 vtkFloatingPointType PyramidHeight;
109 vtkFloatingPointType CursorSize;
111 vtkFloatingPointType PointTolerance;
113 vtkFloatingPointType Color[3];
115 bool InfoWindowEnabled;
116 vtkFloatingPointType InfoWindowTransparency;
117 int InfoWindowPosition;
119 bool CameraMovementEnabled;
120 vtkFloatingPointType ZoomFactor;
123 bool DisplayParentMesh;