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
30 #include <vtkObject.h>
31 #include <vtkSmartPointer.h>
36 class TVTKSmartPtr: public vtkSmartPointer<T>
40 TVTKSmartPtr(T* r, bool theIsOwner = false): vtkSmartPointer<T>(r) {
44 TVTKSmartPtr& operator()(T* r, bool theIsOwner = false){
45 vtkSmartPointer<T>::operator=(r);
50 TVTKSmartPtr& operator=(T* r){
51 vtkSmartPointer<T>::operator=(r);
54 operator T* () const {
55 return vtkSmartPointer<T>::GetPointer();
59 class vtkDataSetMapper;
60 class vtkUnstructuredGrid;
61 class vtkExtractGeometry;
62 class vtkImplicitBoolean;
65 class SALOME_ExtractGeometry;
67 typedef vtkUnstructuredGrid TInput;
69 class VISU_PipeLine : public vtkObject{
71 vtkTypeMacro(VISU_PipeLine,vtkObject);
72 virtual ~VISU_PipeLine();
74 virtual void ShallowCopy(VISU_PipeLine *thePipeLine);
75 virtual void SameAs(VISU_PipeLine *thePipeLine);
78 virtual void SetInput(TInput* theInput);
79 virtual TInput* GetInput() const;
81 bool IsPlanarInput() const;
83 typedef vtkDataSetMapper TMapper;
84 virtual TMapper* GetMapper();
86 virtual void Init() = 0;
87 virtual void Update();
89 static int CheckAvailableMemory(const float& theSize);
90 static float GetAvailableMemory(float theSize = 16*1024*1024.0,
91 float theMinSize = 1024*1024.0);
94 void RemoveAllClippingPlanes();
95 vtkIdType GetNumberOfClippingPlanes() const;
96 void AddClippingPlane(vtkPlane* thePlane);
97 vtkPlane* GetClippingPlane(vtkIdType theID) const;
99 void SetPlaneParam(float theDir[3], float theDist, vtkPlane* thePlane);
100 void GetPlaneParam(float theDir[3], float& theDist, vtkPlane* thePlane);
102 bool IsShrinkable() { return myIsShrinkable; }
106 VISU_PipeLine(const VISU_PipeLine&);
108 virtual TInput* GetInput2() const;
109 virtual void Build() = 0;
117 TVTKSmartPtr<SALOME_ExtractGeometry> myExtractGeometry;