]> SALOME platform Git repositories - modules/visu.git/blob - src/PIPELINE/VISU_CutLinesPL.hxx
Salome HOME
Join modifications from BR_Dev_For_4_0 tag V4_1_1.
[modules/visu.git] / src / PIPELINE / VISU_CutLinesPL.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_PipeLine.hxx
24 // Author:  Alexey PETROV
25 // Module : VISU
26
27 #ifndef VISU_CutLinesPL_HeaderFile
28 #define VISU_CutLinesPL_HeaderFile
29
30 #include "VISUPipeline.hxx"
31 #include "VISU_CutPlanesPL.hxx"
32
33 class vtkAppendPolyData;
34
35
36 //----------------------------------------------------------------------------
37 class VISU_PIPELINE_EXPORT VISU_CutLinesPL : public VISU_CutPlanesPL
38 {
39 public:
40   vtkTypeMacro(VISU_CutLinesPL,VISU_CutPlanesPL);
41
42   static 
43   VISU_CutLinesPL* 
44   New();
45
46   virtual
47   void
48   SetPosition(vtkFloatingPointType thePosition);
49
50   virtual
51   vtkFloatingPointType 
52   GetPosition();
53
54   virtual
55   void
56   SetDefault();
57
58   virtual
59   int
60   IsDefault();
61
62 public:
63   virtual
64   void
65   Init();
66
67   virtual
68   void
69   Update();
70
71   static
72   void
73   CutWithPlanes(vtkAppendPolyData* theAppendPolyData, 
74                 vtkDataSet* theDataSet,
75                 int theNbPlanes, 
76                 vtkFloatingPointType theDir[3], 
77                 vtkFloatingPointType theBounds[6], 
78                 vtkFloatingPointType thePlanePosition, 
79                 int thePlaneCondition,
80                 vtkFloatingPointType theDisplacement);
81
82   //! Returns direction that is defined by position & orientation of the basic and tool planes
83   const vtkFloatingPointType* 
84   GetRealDirLn()
85   {
86     return myRealDirLn;
87   }
88
89   /*! 
90     Returns direction that corresponds to the myRealDirLn,
91     but has the same direction as main axis.
92   */
93   const vtkFloatingPointType* 
94   GetDirLn()
95   {
96     return myDirLn;
97   }
98
99   /*!
100     Returns coordinates of 3D point that shows 
101     where is the first intersection of the given mesh.
102     with the defined direction.
103   */
104   const vtkFloatingPointType* 
105   GetBasePnt()
106   { 
107     return myBasePnt;
108   }
109
110   /*!
111     Returns three floating point numbers that defines the following values:
112     1. Distance between the initial point of intersection and origin of coordinates;
113     2. Distance between the last point of intersection and origin of coordinates;
114     3. Distance between the last point and initial points of intersection.
115     with the defined direction.
116   */
117   const vtkFloatingPointType* 
118   GetBoundPrjLn()
119   {
120     return myBoundPrjLn;
121   }
122
123 protected:
124   VISU_CutLinesPL();
125
126   virtual
127   void
128   DoShallowCopy(VISU_PipeLine *thePipeLine,
129                 bool theIsCopyInput);
130
131   vtkFloatingPointType myDirLn[3];
132   vtkFloatingPointType myRealDirLn[3];
133   vtkFloatingPointType myBoundPrjLn[3];
134   vtkFloatingPointType myBasePnt[3];
135   vtkFloatingPointType myPosition;
136   int myCondition;
137
138 private:
139   VISU_CutLinesPL(const VISU_CutLinesPL&);  // Not implemented.
140   void operator=(const VISU_CutLinesPL&);  // Not implemented.
141 };
142
143
144 #endif