]> SALOME platform Git repositories - modules/visu.git/blob - src/OBJECT/VISU_GaussPtsSettings.h
Salome HOME
627d8980eb7c61c417049dbcb5ad89ac0cfd588d
[modules/visu.git] / src / OBJECT / VISU_GaussPtsSettings.h
1 //  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 //  Copyright (C) 2003-2007  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.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22 //  VISU OBJECT : interactive object for VISU entities implementation
23 //  File   : 
24 //  Author : 
25 //  Module : VISU
26 //  $Header$
27 //
28 #ifndef VISU_GaussPtsSettings_HeaderFile
29 #define VISU_GaussPtsSettings_HeaderFile
30
31 #include "VISU_OBJECT.h"
32
33 #include <vtkObject.h>
34 #include <vtkCommand.h>
35
36 #include "VTKViewer.h"
37
38 class vtkImageData;
39
40 #include "VISU_Actor.h"
41
42 //============================================================================
43 namespace VISU
44 {
45   const vtkIdType UpdateFromSettingsEvent        = vtkCommand::UserEvent + 100; 
46   const vtkIdType UpdateInsideSettingsEvent      = vtkCommand::UserEvent + 101; 
47   const vtkIdType UpdateOutsideSettingsEvent     = vtkCommand::UserEvent + 102; 
48 }
49
50
51 //! Base class of Gauss Points settings.
52 class VISU_OBJECT_EXPORT VISU_GaussPtsSettings : public vtkObject
53 {
54  public:
55   vtkTypeMacro( VISU_GaussPtsSettings, vtkObject );
56
57   VISU_GaussPtsSettings();
58   virtual ~VISU_GaussPtsSettings();
59
60   static
61   VISU_GaussPtsSettings*
62   New();
63
64   vtkSetMacro( Initial, bool );
65   vtkGetMacro( Initial, bool );
66
67   vtkSetMacro( PrimitiveType, int );
68   vtkGetMacro( PrimitiveType, int );
69
70   vtkSetMacro( Clamp, vtkFloatingPointType );
71   vtkGetMacro( Clamp, vtkFloatingPointType );
72
73   vtkSetMacro( Texture, vtkImageData* );
74   vtkGetMacro( Texture, vtkImageData* );
75
76   vtkSetMacro( AlphaThreshold, vtkFloatingPointType );
77   vtkGetMacro( AlphaThreshold, vtkFloatingPointType );
78
79   vtkSetMacro( Resolution, int );
80   vtkGetMacro( Resolution, int );
81
82   vtkSetMacro( Magnification, vtkFloatingPointType );
83   vtkGetMacro( Magnification, vtkFloatingPointType );
84
85   vtkSetMacro( Increment, vtkFloatingPointType );
86   vtkGetMacro( Increment, vtkFloatingPointType );
87
88  protected:
89   bool                Initial;
90
91   int                 PrimitiveType;
92   vtkFloatingPointType Clamp;
93   vtkImageData*       Texture;
94   vtkFloatingPointType AlphaThreshold;
95   int                 Resolution;
96   vtkFloatingPointType Magnification;
97   vtkFloatingPointType Increment;
98 };
99
100
101 //! Class of Inside Cursor Gauss Points settings.
102 /*!
103  * Contains information about the point sprite parameters:
104  * Clamp, Texture, Alpha threshold, Const size and Color.
105  * Used by Gauss Points Actor.
106  */
107 class VISU_OBJECT_EXPORT VISU_InsideCursorSettings : public VISU_GaussPtsSettings
108 {
109  public:
110   vtkTypeMacro( VISU_InsideCursorSettings, vtkObject );
111
112   VISU_InsideCursorSettings();
113   virtual ~VISU_InsideCursorSettings();
114
115   static
116   VISU_InsideCursorSettings*
117   New();
118
119   vtkSetMacro( MinSize, vtkFloatingPointType );
120   vtkGetMacro( MinSize, vtkFloatingPointType );
121
122   vtkSetMacro( MaxSize, vtkFloatingPointType );
123   vtkGetMacro( MaxSize, vtkFloatingPointType );
124
125  protected:
126   vtkFloatingPointType MinSize;
127   vtkFloatingPointType MaxSize;
128 };
129
130
131 //============================================================================
132 //! Class of Outside Cursor Gauss Points settings.
133 /*!
134  * Contains information about the point sprite parameters:
135  * Clamp, Texture, Alpha threshold, Const size and Color.
136  * Used by Gauss Points Actor.
137  */
138 class VISU_OBJECT_EXPORT VISU_OutsideCursorSettings : public VISU_GaussPtsSettings
139 {
140  public:
141   vtkTypeMacro( VISU_OutsideCursorSettings, vtkObject );
142
143   VISU_OutsideCursorSettings();
144   virtual ~VISU_OutsideCursorSettings();
145
146   static
147   VISU_OutsideCursorSettings*
148   New();
149
150   vtkSetMacro( Size, vtkFloatingPointType );
151   vtkGetMacro( Size, vtkFloatingPointType );
152
153   vtkSetMacro( Uniform, bool );
154   vtkGetMacro( Uniform, bool );
155
156   vtkSetVector3Macro( Color, vtkFloatingPointType );
157   vtkGetVector3Macro( Color, vtkFloatingPointType );
158
159  protected:
160   vtkFloatingPointType Size;
161   bool                Uniform;
162   vtkFloatingPointType Color[3];
163 };
164
165 #endif