Salome HOME
Join modifications from branch BR_DEBUG_3_2_0b1
[modules/visu.git] / src / PIPELINE / VISU_Plot3DPL.hxx
1 //  VISU OBJECT : interactive object for VISU entities implementation
2 //
3 //  Copyright (C) 2003  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 //
23 // File:    VISU_CutPlanesPL.hxx
24 // Author:  Alexey PETROV
25 // Module : VISU
26
27 #ifndef VISU_Plot3DPL_HeaderFile
28 #define VISU_Plot3DPL_HeaderFile
29
30 #include "VISU_ScalarMapPL.hxx"
31 #include "VISU_CutPlanesPL.hxx"
32
33 class vtkWarpScalar;
34 class vtkContourFilter;
35 class vtkGeometryFilter;
36 class vtkCellDataToPointData;
37
38 class VISU_Plot3DPL : public VISU_ScalarMapPL{
39 protected:
40   VISU_Plot3DPL();
41   VISU_Plot3DPL(const VISU_Plot3DPL&);
42
43 public:
44   vtkTypeMacro(VISU_Plot3DPL,VISU_ScalarMapPL);
45   static VISU_Plot3DPL* New();
46   virtual ~VISU_Plot3DPL();
47
48   virtual
49   void
50   ShallowCopy(VISU_PipeLine *thePipeLine);
51
52   VISU_CutPlanesPL::PlaneOrientation
53   GetPlaneOrientation() const;
54
55   vtkFloatingPointType
56   GetRotateX();
57
58   vtkFloatingPointType
59   GetRotateY();
60
61   void
62   SetOrientation(VISU_CutPlanesPL::PlaneOrientation theOrientation,
63                  vtkFloatingPointType theXAngle = 0.0,
64                  vtkFloatingPointType theYAngle = 0.0);
65
66   vtkFloatingPointType
67   GetPlanePosition() const;
68
69   bool
70   IsPositionRelative() const;
71
72   void
73   SetPlanePosition(vtkFloatingPointType thePosition,
74                    bool theIsRelative);
75
76   void
77   SetScaleFactor(vtkFloatingPointType theScaleFactor);
78
79   vtkFloatingPointType
80   GetScaleFactor() const;
81
82   void
83   SetContourPrs (bool theIsContourPrs ) { myIsContour = theIsContourPrs; }
84
85   bool
86   GetIsContourPrs() { return myIsContour; }
87
88   void
89   SetNumberOfContours(int theNumber);
90
91   int
92   GetNumberOfContours() const;
93
94   void GetBasePlane (vtkFloatingPointType theOrigin[3],
95                      vtkFloatingPointType theNormal[3],
96                      bool  theCenterOrigine = false ) const;
97
98   void GetMinMaxPosition( vtkFloatingPointType& minPos, 
99                           vtkFloatingPointType& maxPos ) const;
100
101 public:
102   virtual void Init();
103   virtual void Update();
104
105   static
106   VISU_CutPlanesPL::PlaneOrientation
107   GetOrientation(vtkDataSet* theDataSet);
108
109   vtkFloatingPointType
110   GetScaleFactor(vtkDataSet* theDataSet);
111
112   void SetMapScale(vtkFloatingPointType theMapScale);
113
114 protected:
115   virtual THook* DoHook();
116
117   vtkFloatingPointType myAngle[3];
118   bool myIsRelative, myIsContour;
119   vtkFloatingPointType myPosition, myScaleFactor;
120   VISU_CutPlanesPL::PlaneOrientation myOrientation;
121
122   TVTKSmartPtr<vtkCellDataToPointData> myCellDataToPointData;
123   TVTKSmartPtr<vtkAppendPolyData> myAppendPolyData;
124   TVTKSmartPtr<vtkGeometryFilter> myGeometryFilter;
125   TVTKSmartPtr<vtkContourFilter> myContourFilter;
126   TVTKSmartPtr<vtkWarpScalar> myWarpScalar;
127 };
128
129 #endif