1 // Copyright (C) 2007-2008 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
22 // VISU OBJECT : interactive object for VISU entities implementation
23 // File: VISU_DataSetMapperHolder.hxx
24 // Author: Alexey PETROV
27 #ifndef VISU_DataSetMapperHolder_HeaderFile
28 #define VISU_DataSetMapperHolder_HeaderFile
30 #include "VISU_MapperHolder.hxx"
32 class vtkDataSetMapper;
33 class vtkUnstructuredGrid;
34 class SALOME_ExtractGeometry;
35 class VISU_ElnoDisassembleFilter;
38 //----------------------------------------------------------------------------
39 class VISU_DataSetMapperHolder : public VISU_MapperHolder
42 vtkTypeMacro(VISU_DataSetMapperHolder, VISU_MapperHolder);
45 VISU_DataSetMapperHolder*
48 //----------------------------------------------------------------------------
51 ShallowCopy(VISU_MapperHolder *theMapperHolder,
55 SetElnoDisassembleState( bool theIsShrunk );
57 //! Gets memory size used by the instance (bytes).
62 //----------------------------------------------------------------------------
64 SetUnstructuredGridIDMapper(const VISU::PUnstructuredGridIDMapper& theIDMapper);
66 const VISU::PUnstructuredGridIDMapper&
67 GetUnstructuredGridIDMapper();
71 GetUnstructuredGridInput();
77 //----------------------------------------------------------------------------
80 GetNodeObjID(vtkIdType theID);
84 GetNodeVTKID(vtkIdType theID);
88 GetNodeCoord(vtkIdType theObjID);
92 GetElemObjID(vtkIdType theID);
96 GetElemVTKID(vtkIdType theID);
100 GetElemCell(vtkIdType theObjID);
102 //----------------------------------------------------------------------------
105 SetImplicitFunction(vtkImplicitFunction *theFunction);
109 GetImplicitFunction();
113 SetExtractInside(bool theMode);
117 SetExtractBoundaryCells(bool theMode);
119 //----------------------------------------------------------------------------
123 RemoveAllClippingPlanes();
127 GetNumberOfClippingPlanes();
131 AddClippingPlane(vtkPlane* thePlane);
135 GetClippingPlane(vtkIdType theID);
137 virtual void RemoveClippingPlane(vtkIdType theID);
140 //----------------------------------------------------------------------------
141 VISU_DataSetMapperHolder();
142 VISU_DataSetMapperHolder(const VISU_DataSetMapperHolder&);
145 ~VISU_DataSetMapperHolder();
147 //----------------------------------------------------------------------------
153 SetDataSetMapper(vtkDataSetMapper* theMapper);
155 //----------------------------------------------------------------------------
158 SetLookupTable(VISU_LookupTable* theLookupTable);
165 //----------------------------------------------------------------------------
166 VISU::PUnstructuredGridIDMapper myUnstructuredGridIDMapper;
167 vtkSmartPointer< VISU_ElnoDisassembleFilter > myElnoDisassembleFilter; //!< Handling ELNO data
168 vtkSmartPointer< SALOME_ExtractGeometry > myExtractGeometry; //!< Clipping
169 vtkSmartPointer< vtkDataSetMapper > myDataSetMapper;