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_PipeLine.hxx
24 // Author: Alexey PETROV
27 #ifndef VISU_PipeLine_HeaderFile
28 #define VISU_PipeLine_HeaderFile
31 #include <vtkObject.h>
32 #include <vtkSmartPointer.h>
34 #include "VISU_IDMapper.hxx"
38 class vtkImplicitFunction;
41 class TVTKSmartPtr: public vtkSmartPointer<T>
47 TVTKSmartPtr(T* r, bool theIsOwner = false): vtkSmartPointer<T>(r)
53 TVTKSmartPtr& operator()(T* r, bool theIsOwner = false)
55 vtkSmartPointer<T>::operator=(r);
61 TVTKSmartPtr& operator=(T* r)
63 vtkSmartPointer<T>::operator=(r);
69 return vtkSmartPointer<T>::GetPointer();
74 class vtkDataSetMapper;
75 class vtkUnstructuredGrid;
76 class vtkExtractGeometry;
77 class vtkImplicitBoolean;
80 class SALOME_ExtractGeometry;
82 typedef VISU::TVTKOutput TInput;
84 class VISU_PipeLine : public vtkObject{
86 vtkTypeMacro(VISU_PipeLine,vtkObject);
100 ShallowCopy(VISU_PipeLine *thePipeLine);
104 SameAs(VISU_PipeLine *thePipeLine);
109 SetInput(TInput* theInput);
120 IsPlanarInput() const;
122 typedef vtkMapper TMapper;
138 CheckAvailableMemory(const float& theSize);
142 GetAvailableMemory(float theSize = 16*1024*1024.0,
143 float theMinSize = 1024*1024.0);
147 RemoveAllClippingPlanes();
150 GetNumberOfClippingPlanes() const;
153 AddClippingPlane(vtkPlane* thePlane);
156 GetClippingPlane(vtkIdType theID) const;
159 SetPlaneParam(float theDir[3],
164 GetPlaneParam(float theDir[3],
169 IsShrinkable() { return myIsShrinkable; }
173 GetNodeObjID(vtkIdType theID);
177 GetNodeVTKID(vtkIdType theID);
181 GetNodeCoord(vtkIdType theObjID);
185 GetElemObjID(vtkIdType theID);
189 GetElemVTKID(vtkIdType theID);
193 GetElemCell(vtkIdType theObjID);
196 SetIDMapper(const VISU::PIDMapper& theIDMapper);
198 const VISU::PIDMapper&
202 SetImplicitFunction(vtkImplicitFunction *theFunction);
205 GetImplicitFunction();
207 SALOME_ExtractGeometry*
208 GetExtractGeometryFilter();
212 VISU_PipeLine(const VISU_PipeLine&);
224 TVTKSmartPtr<TInput> myInput;
225 VISU::PIDMapper myIDMapper;
226 TVTKSmartPtr<vtkDataSetMapper> myMapper;
229 TVTKSmartPtr<SALOME_ExtractGeometry> myExtractGeometry;