]> SALOME platform Git repositories - modules/visu.git/blob - src/PIPELINE/VISU_CutLinesPL.hxx
Salome HOME
Merge from BR_V5_DEV 16Feb09
[modules/visu.git] / src / PIPELINE / VISU_CutLinesPL.hxx
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:    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   vtkDataSet*
68   InsertCustomPL();
69
70   virtual
71   void
72   Update();
73
74   static
75   void
76   CutWithPlanes(vtkAppendPolyData* theAppendPolyData, 
77                 vtkDataSet* theDataSet,
78                 int theNbPlanes, 
79                 vtkFloatingPointType theDir[3], 
80                 vtkFloatingPointType theBounds[6], 
81                 vtkFloatingPointType thePlanePosition, 
82                 int thePlaneCondition,
83                 vtkFloatingPointType theDisplacement);
84
85   //! Returns direction that is defined by position & orientation of the basic and tool planes
86   const vtkFloatingPointType* 
87   GetRealDirLn()
88   {
89     return myRealDirLn;
90   }
91
92   /*! 
93     Returns direction that corresponds to the myRealDirLn,
94     but has the same direction as main axis.
95   */
96   const vtkFloatingPointType* 
97   GetDirLn()
98   {
99     return myDirLn;
100   }
101
102   /*!
103     Returns coordinates of 3D point that shows 
104     where is the first intersection of the given mesh.
105     with the defined direction.
106   */
107   const vtkFloatingPointType* 
108   GetBasePnt()
109   { 
110     return myBasePnt;
111   }
112
113   /*!
114     Returns three floating point numbers that defines the following values:
115     1. Distance between the initial point of intersection and origin of coordinates;
116     2. Distance between the last point of intersection and origin of coordinates;
117     3. Distance between the last point and initial points of intersection.
118     with the defined direction.
119   */
120   const vtkFloatingPointType* 
121   GetBoundPrjLn()
122   {
123     return myBoundPrjLn;
124   }
125
126 protected:
127   VISU_CutLinesPL();
128
129   virtual
130   void
131   DoShallowCopy(VISU_PipeLine *thePipeLine,
132                 bool theIsCopyInput);
133
134   vtkFloatingPointType myDirLn[3];
135   vtkFloatingPointType myRealDirLn[3];
136   vtkFloatingPointType myBoundPrjLn[3];
137   vtkFloatingPointType myBasePnt[3];
138   vtkFloatingPointType myPosition;
139   int myCondition;
140
141 private:
142   VISU_CutLinesPL(const VISU_CutLinesPL&);  // Not implemented.
143   void operator=(const VISU_CutLinesPL&);  // Not implemented.
144 };
145
146
147 #endif