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.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 // File: VISU_CutPlanesPL.hxx
24 // Author: Alexey PETROV
27 #ifndef VISU_CutPlanesPL_HeaderFile
28 #define VISU_CutPlanesPL_HeaderFile
30 #include "VISUPipeline.hxx"
31 #include "VISU_ScalarMapPL.hxx"
35 class vtkAppendPolyData;
38 //----------------------------------------------------------------------------
39 class VISU_PIPELINE_EXPORT VISU_CutPlanesPL : public VISU_ScalarMapPL
42 vtkTypeMacro(VISU_CutPlanesPL, VISU_ScalarMapPL);
52 //----------------------------------------------------------------------------
53 enum PlaneOrientation {XY, YZ, ZX};
57 SetOrientation(const VISU_CutPlanesPL::PlaneOrientation& theOrient,
58 vtkFloatingPointType theXAng,
59 vtkFloatingPointType theYAng,
63 const PlaneOrientation&
64 GetPlaneOrientation(int theNum = 0);
68 GetRotateX(int theNum = 0);
72 GetRotateY(int theNum = 0);
76 GetDisplacement(int theNum = 0);
80 SetDisplacement(vtkFloatingPointType theDisp,
85 SetPartPosition(int thePartNumber,
86 vtkFloatingPointType thePartPosition);
90 GetPartPosition(int thePartNumber,
95 SetPartDefault(int thePartNumber);
99 IsPartDefault(int thePartNumber);
103 SetNbParts(int theNb);
118 //! Gets memory size used by the instance (bytes).
127 return myAppendPolyData;
132 vtkFloatingPointType*
133 GetRx(vtkFloatingPointType theRx[3][3],
134 vtkFloatingPointType thaAng);
137 vtkFloatingPointType*
138 GetRy(vtkFloatingPointType theRy[3][3],
139 vtkFloatingPointType thaAng);
142 vtkFloatingPointType*
143 GetRz(vtkFloatingPointType theRz[3][3],
144 vtkFloatingPointType thaAng);
148 CorrectPnt(vtkFloatingPointType thePnt[3],
149 const vtkFloatingPointType BoundPrj[6]);
153 GetBoundProject(vtkFloatingPointType BoundPrj[3],
154 const vtkFloatingPointType BoundBox[6],
155 const vtkFloatingPointType Dir[3]);
159 GetDir(vtkFloatingPointType theDir[3],
160 const vtkFloatingPointType theAng[3],
161 const PlaneOrientation& theBasePlane);
165 ClearAppendPolyData(vtkAppendPolyData *theAppendPolyData);
169 CutWithPlane(vtkAppendPolyData* theAppendPolyData,
170 vtkDataSet* theDataSet,
171 vtkFloatingPointType theDir[3],
172 vtkFloatingPointType theOrig[3]);
176 CutWithPlanes(vtkAppendPolyData* theAppendPolyData,
177 vtkDataSet* theDataSet,
179 vtkFloatingPointType theDir[3],
180 vtkFloatingPointType theBounds[6],
181 const std::vector<vtkFloatingPointType>& thePlanePosition,
182 const std::vector<int>& thePlaneCondition,
183 vtkFloatingPointType theDisplacement);
197 DoShallowCopy(VISU_PipeLine *thePipeLine,
198 bool theIsCopyInput);
201 SetPartPosition(int theNum = 0);
204 PlaneOrientation myBasePlane[2];
205 vtkFloatingPointType myAng[2][3], myDisplacement[2];
206 vtkAppendPolyData *myAppendPolyData;
207 std::vector<vtkFloatingPointType> myPartPosition;
208 std::vector<int> myPartCondition;
211 VISU_CutPlanesPL(const VISU_CutPlanesPL&); // Not implemented.
212 void operator=(const VISU_CutPlanesPL&); // Not implemented.