1 // Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 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
22 // VISU OBJECT : interactive object for VISU entities implementation
23 // File : VISU_PickingSettings.cxx
24 // Author : Oleg UVAROV
27 #ifndef VISU_PickingSettings_HeaderFile
28 #define VISU_PickingSettings_HeaderFile
30 #include "VISU_OBJECT.h"
31 #include <vtkObject.h>
32 #include <vtkCommand.h>
34 #include "VTKViewer.h"
36 #include "VISU_Actor.h"
38 //============================================================================
41 const vtkIdType UpdatePickingSettingsEvent = vtkCommand::UserEvent + 103;
44 //! Class of Picking settings.
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.
51 class VISU_OBJECT_EXPORT VISU_PickingSettings : public vtkObject
54 enum { BelowPoint = 0, TopLeftCorner };
57 vtkTypeMacro( VISU_PickingSettings, vtkObject );
67 vtkSetMacro( IsInitial, bool );
68 vtkGetMacro( IsInitial, bool );
70 vtkSetMacro( PyramidHeight, vtkFloatingPointType );
71 vtkGetMacro( PyramidHeight, vtkFloatingPointType );
73 vtkSetMacro( CursorSize, vtkFloatingPointType );
74 vtkGetMacro( CursorSize, vtkFloatingPointType );
76 vtkSetVector3Macro( Color, vtkFloatingPointType );
77 vtkGetVector3Macro( Color, vtkFloatingPointType );
79 vtkSetMacro( PointTolerance, vtkFloatingPointType );
80 vtkGetMacro( PointTolerance, vtkFloatingPointType );
82 vtkSetMacro( InfoWindowEnabled, bool );
83 vtkGetMacro( InfoWindowEnabled, bool );
85 vtkSetMacro( InfoWindowTransparency, vtkFloatingPointType );
86 vtkGetMacro( InfoWindowTransparency, vtkFloatingPointType );
88 vtkSetMacro( InfoWindowPosition, int );
89 vtkGetMacro( InfoWindowPosition, int );
91 vtkSetMacro( CameraMovementEnabled, bool );
92 vtkGetMacro( CameraMovementEnabled, bool );
94 vtkSetMacro( ZoomFactor, vtkFloatingPointType );
95 vtkGetMacro( ZoomFactor, vtkFloatingPointType );
97 vtkSetMacro( StepNumber, int );
98 vtkGetMacro( StepNumber, int );
100 vtkSetMacro( DisplayParentMesh, bool );
101 vtkGetMacro( DisplayParentMesh, bool );
104 VISU_PickingSettings();
105 virtual ~VISU_PickingSettings();
110 vtkFloatingPointType PyramidHeight;
111 vtkFloatingPointType CursorSize;
113 vtkFloatingPointType PointTolerance;
115 vtkFloatingPointType Color[3];
117 bool InfoWindowEnabled;
118 vtkFloatingPointType InfoWindowTransparency;
119 int InfoWindowPosition;
121 bool CameraMovementEnabled;
122 vtkFloatingPointType ZoomFactor;
125 bool DisplayParentMesh;