1 // Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 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 // VISU OBJECT : interactive object for VISU entities implementation
24 // File: VISU_PipeLine.hxx
25 // Author: Alexey PETROV
28 #ifndef VISU_PipeLine_HeaderFile
29 #define VISU_PipeLine_HeaderFile
31 #include "VISUPipeline.hxx"
32 #include "VISU_IDMapper.hxx"
34 #include <vtkObject.h>
35 #include <vtkSmartPointer.h>
42 class vtkImplicitFunction;
44 class VISU_MapperHolder;
46 //----------------------------------------------------------------------------
47 class VISU_PIPELINE_EXPORT VISU_PipeLine : public vtkObject
49 friend class VISU_MapperHolder;
52 vtkTypeMacro(VISU_PipeLine, vtkObject);
54 //! Gets memory size used by the instance (bytes).
63 //----------------------------------------------------------------------------
66 ShallowCopy(VISU_PipeLine *thePipeLine,
71 SameAs(VISU_PipeLine *thePipeLine);
73 //----------------------------------------------------------------------------
75 SetMapperHolder(VISU_MapperHolder* theHolder);
80 const VISU::PIDMapper&
95 //----------------------------------------------------------------------------
104 //----------------------------------------------------------------------------
107 GetNodeObjID(vtkIdType theID);
111 GetNodeVTKID(vtkIdType theID);
114 vtkFloatingPointType*
115 GetNodeCoord(vtkIdType theObjID);
119 GetElemObjID(vtkIdType theID);
123 GetElemVTKID(vtkIdType theID);
127 GetElemCell(vtkIdType theObjID);
129 //----------------------------------------------------------------------------
137 IsFeatureEdgesAllowed();
139 //----------------------------------------------------------------------------
141 SetImplicitFunction(vtkImplicitFunction *theFunction);
144 GetImplicitFunction();
147 SetExtractInside(bool theMode);
150 SetExtractBoundaryCells(bool theMode);
152 //----------------------------------------------------------------------------
155 RemoveAllClippingPlanes();
158 GetNumberOfClippingPlanes();
162 AddClippingPlane(vtkPlane* thePlane);
166 GetClippingPlane(vtkIdType theID);
168 virtual void RemoveClippingPlane(vtkIdType theID);
172 SetPlaneParam(vtkFloatingPointType theDir[3],
173 vtkFloatingPointType theDist,
178 GetPlaneParam(vtkFloatingPointType theDir[3],
179 vtkFloatingPointType& theDist,
182 //----------------------------------------------------------------------------
185 CheckAvailableMemory(double theSize);
189 GetAvailableMemory(double theSize,
190 double theMinSize = 1024*1024);
193 //----------------------------------------------------------------------------
199 //----------------------------------------------------------------------------
206 OnCreateMapperHolder() = 0;
210 DoShallowCopy(VISU_PipeLine *thePipeLine,
211 bool theIsCopyInput);
213 //----------------------------------------------------------------------------
218 SetIsShrinkable(bool theIsShrinkable);
221 SetIsFeatureEdgesAllowed(bool theIsFeatureEdgesAllowed);
224 //----------------------------------------------------------------------------
225 vtkSmartPointer<VISU_MapperHolder> myMapperHolder;
227 bool myIsFeatureEdgesAllowed;