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_DataSetMapperHolder.hxx
25 // Author: Alexey PETROV
28 #ifndef VISU_DataSetMapperHolder_HeaderFile
29 #define VISU_DataSetMapperHolder_HeaderFile
31 #include "VISU_MapperHolder.hxx"
33 class vtkDataSetMapper;
34 class vtkUnstructuredGrid;
35 class SALOME_ExtractGeometry;
36 class VISU_ElnoDisassembleFilter;
39 //----------------------------------------------------------------------------
40 class VISU_DataSetMapperHolder : public VISU_MapperHolder
43 vtkTypeMacro(VISU_DataSetMapperHolder, VISU_MapperHolder);
46 VISU_DataSetMapperHolder*
49 //----------------------------------------------------------------------------
52 ShallowCopy(VISU_MapperHolder *theMapperHolder,
56 SetElnoDisassembleState( bool theIsShrunk );
58 //! Gets memory size used by the instance (bytes).
63 //----------------------------------------------------------------------------
65 SetUnstructuredGridIDMapper(const VISU::PUnstructuredGridIDMapper& theIDMapper);
67 const VISU::PUnstructuredGridIDMapper&
68 GetUnstructuredGridIDMapper();
72 GetUnstructuredGridInput();
78 //----------------------------------------------------------------------------
81 GetNodeObjID(vtkIdType theID);
85 GetNodeVTKID(vtkIdType theID);
89 GetNodeCoord(vtkIdType theObjID);
93 GetElemObjID(vtkIdType theID);
97 GetElemVTKID(vtkIdType theID);
101 GetElemCell(vtkIdType theObjID);
103 //----------------------------------------------------------------------------
106 SetImplicitFunction(vtkImplicitFunction *theFunction);
110 GetImplicitFunction();
114 SetExtractInside(bool theMode);
118 SetExtractBoundaryCells(bool theMode);
120 //----------------------------------------------------------------------------
124 RemoveAllClippingPlanes();
128 GetNumberOfClippingPlanes();
132 AddClippingPlane(vtkPlane* thePlane);
136 GetClippingPlane(vtkIdType theID);
138 virtual void RemoveClippingPlane(vtkIdType theID);
141 //----------------------------------------------------------------------------
142 VISU_DataSetMapperHolder();
143 VISU_DataSetMapperHolder(const VISU_DataSetMapperHolder&);
146 ~VISU_DataSetMapperHolder();
148 //----------------------------------------------------------------------------
154 SetDataSetMapper(vtkDataSetMapper* theMapper);
156 //----------------------------------------------------------------------------
159 SetLookupTable(VISU_LookupTable* theLookupTable);
166 //----------------------------------------------------------------------------
167 VISU::PUnstructuredGridIDMapper myUnstructuredGridIDMapper;
168 vtkSmartPointer< VISU_ElnoDisassembleFilter > myElnoDisassembleFilter; //!< Handling ELNO data
169 vtkSmartPointer< SALOME_ExtractGeometry > myExtractGeometry; //!< Clipping
170 vtkSmartPointer< vtkDataSetMapper > myDataSetMapper;