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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
23 // File: VISU_CutPlanesPL.hxx
24 // Author: Alexey PETROV
27 #ifndef VISU_Plot3DPL_HeaderFile
28 #define VISU_Plot3DPL_HeaderFile
30 #include "VISU_ScalarMapPL.hxx"
31 #include "VISU_CutPlanesPL.hxx"
34 class vtkContourFilter;
35 class vtkGeometryFilter;
36 class vtkCellDataToPointData;
38 class VISU_Plot3DPL : public VISU_ScalarMapPL{
41 VISU_Plot3DPL(const VISU_Plot3DPL&);
44 vtkTypeMacro(VISU_Plot3DPL,VISU_ScalarMapPL);
45 static VISU_Plot3DPL* New();
46 virtual ~VISU_Plot3DPL();
50 ShallowCopy(VISU_PipeLine *thePipeLine);
52 VISU_CutPlanesPL::PlaneOrientation
53 GetPlaneOrientation() const;
62 SetOrientation(VISU_CutPlanesPL::PlaneOrientation theOrientation,
63 vtkFloatingPointType theXAngle = 0.0,
64 vtkFloatingPointType theYAngle = 0.0);
67 GetPlanePosition() const;
70 IsPositionRelative() const;
73 SetPlanePosition(vtkFloatingPointType thePosition,
77 SetScaleFactor(vtkFloatingPointType theScaleFactor);
80 GetScaleFactor() const;
83 SetContourPrs (bool theIsContourPrs ) { myIsContour = theIsContourPrs; }
86 GetIsContourPrs() { return myIsContour; }
89 SetNumberOfContours(int theNumber);
92 GetNumberOfContours() const;
94 void GetBasePlane (vtkFloatingPointType theOrigin[3],
95 vtkFloatingPointType theNormal[3],
96 bool theCenterOrigine = false ) const;
98 void GetMinMaxPosition( vtkFloatingPointType& minPos,
99 vtkFloatingPointType& maxPos ) const;
103 virtual void Update();
106 VISU_CutPlanesPL::PlaneOrientation
107 GetOrientation(vtkDataSet* theDataSet);
110 GetScaleFactor(vtkDataSet* theDataSet);
112 void SetMapScale(vtkFloatingPointType theMapScale);
115 virtual THook* DoHook();
117 vtkFloatingPointType myAngle[3];
118 bool myIsRelative, myIsContour;
119 vtkFloatingPointType myPosition, myScaleFactor;
120 VISU_CutPlanesPL::PlaneOrientation myOrientation;
122 TVTKSmartPtr<vtkCellDataToPointData> myCellDataToPointData;
123 TVTKSmartPtr<vtkAppendPolyData> myAppendPolyData;
124 TVTKSmartPtr<vtkGeometryFilter> myGeometryFilter;
125 TVTKSmartPtr<vtkContourFilter> myContourFilter;
126 TVTKSmartPtr<vtkWarpScalar> myWarpScalar;