1 // Copyright (C) 2007-2012 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;
45 class VISU_MapperHolder;
47 //----------------------------------------------------------------------------
48 class VISU_PIPELINE_EXPORT VISU_PipeLine : public vtkObject
50 friend class VISU_MapperHolder;
53 vtkTypeMacro(VISU_PipeLine, vtkObject);
55 //! Gets memory size used by the instance (bytes).
64 //----------------------------------------------------------------------------
67 ShallowCopy(VISU_PipeLine *thePipeLine,
72 SameAs(VISU_PipeLine *thePipeLine);
74 //----------------------------------------------------------------------------
76 SetMapperHolder(VISU_MapperHolder* theHolder);
81 const VISU::PIDMapper&
96 //----------------------------------------------------------------------------
105 //----------------------------------------------------------------------------
108 GetNodeObjID(vtkIdType theID);
112 GetNodeVTKID(vtkIdType theID);
115 vtkFloatingPointType*
116 GetNodeCoord(vtkIdType theObjID);
120 GetElemObjID(vtkIdType theID);
124 GetElemVTKID(vtkIdType theID);
128 GetElemCell(vtkIdType theObjID);
130 //----------------------------------------------------------------------------
138 IsFeatureEdgesAllowed();
140 //----------------------------------------------------------------------------
142 SetImplicitFunction(vtkImplicitFunction *theFunction);
145 GetImplicitFunction();
148 SetExtractInside(bool theMode);
151 SetExtractBoundaryCells(bool theMode);
153 //----------------------------------------------------------------------------
156 RemoveAllClippingPlanes();
159 GetNumberOfClippingPlanes();
163 AddClippingPlane(vtkPlane* thePlane);
167 GetClippingPlane(vtkIdType theID);
169 virtual void RemoveClippingPlane(vtkIdType theID);
173 SetPlaneParam(vtkFloatingPointType theDir[3],
174 vtkFloatingPointType theDist,
179 GetPlaneParam(vtkFloatingPointType theDir[3],
180 vtkFloatingPointType& theDist,
184 GetVisibleBounds(vtkFloatingPointType theBounds[6]);
186 //----------------------------------------------------------------------------
189 CheckAvailableMemory(double theSize);
193 GetAvailableMemory(double theSize,
194 double theMinSize = 1024*1024);
197 //----------------------------------------------------------------------------
203 //----------------------------------------------------------------------------
210 OnCreateMapperHolder() = 0;
214 DoShallowCopy(VISU_PipeLine *thePipeLine,
215 bool theIsCopyInput);
219 ComputeVisibleBounds();
221 //----------------------------------------------------------------------------
226 SetIsShrinkable(bool theIsShrinkable);
229 SetIsFeatureEdgesAllowed(bool theIsFeatureEdgesAllowed);
231 //Visible bounds xmin, xmax, ymin, ymax, zmin, zmax
232 vtkFloatingPointType myVisibleBounds[6];
233 vtkTimeStamp myVisibleComputeTime; // Time at which visible bounds computed
236 //----------------------------------------------------------------------------
237 vtkSmartPointer<VISU_MapperHolder> myMapperHolder;
239 bool myIsFeatureEdgesAllowed;