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 #ifndef VTKVIEWER_GEOMETRYFILTER_H
23 #define VTKVIEWER_GEOMETRYFILTER_H
25 #include "VTKViewer.h"
27 #include <vtkGeometryFilter.h>
32 #pragma warning ( disable:4251 )
35 /*! \brief This class used same as vtkGeometryFilter. See documentation on VTK for more information.
37 class VTKVIEWER_EXPORT VTKViewer_GeometryFilter : public vtkGeometryFilter
40 /*! \fn static VTKViewer_GeometryFilter *New()
42 static VTKViewer_GeometryFilter *New();
44 /*! \fn vtkTypeRevisionMacro(VTKViewer_GeometryFilter, vtkGeometryFilter)
45 * \brief VTK type revision macros.
47 vtkTypeRevisionMacro(VTKViewer_GeometryFilter, vtkGeometryFilter);
48 /*! \fn void SetInside(int theShowInside)
49 * \brief Sets \a myShowInside flag. \a myShowInside is changed, call this->Modified().
50 * \param theShowInside - used for changing value of \a myShowInside variable.
52 void SetInside(int theShowInside);
53 /*! \fn int GetInside()
54 * \brief Return value of \a myShowInside
55 * \retval myShowInside
58 /*! \fn void SetWireframeMode(int theIsWireframeMode)
59 * \brief Sets \a myIsWireframeMode flag. \a myIsWireframeMode is changed, call this->Modified().
60 * \param theIsWireframeMode - used for changing value of \a myIsWireframeMode variable.
62 void SetWireframeMode(int theIsWireframeMode);
63 /*! \fn int GetWireframeMode()
64 * \brief Return value of \a myIsWireframeMode
65 * \retval myIsWireframeMode
67 int GetWireframeMode();
68 /*! \fn void SetStoreMapping(int theStoreMapping);
69 * \brief Sets \a myStoreMapping flag and call this->Modified()
70 * \param theStoreMapping - used for changing value of \a myStoreMapping variable.
72 void SetStoreMapping(int theStoreMapping);
73 /*! \fn int GetStoreMapping()
74 * \brief Return value of \a myStoreMapping
75 * \retval myStoreMapping
77 int GetStoreMapping();
78 /*! \fn virtual vtkIdType GetNodeObjId(int theVtkID)
79 * \brief Return input value theVtkID
82 virtual vtkIdType GetNodeObjId(int theVtkID) { return theVtkID;}
83 /*! \fn virtual vtkIdType GetElemObjId(int theVtkID);
84 * \brief Return object ID by VTK ID cell
85 * \retval myVTK2ObjIds[theVtkID]
87 virtual vtkIdType GetElemObjId(int theVtkID);
90 /*! \fn VTKViewer_GeometryFilter();
91 * \brief Constructor which sets \a myShowInside = 0 and \a myStoreMapping = 0
93 VTKViewer_GeometryFilter();
94 /*! \fn ~VTKViewer_GeometryFilter();
97 ~VTKViewer_GeometryFilter();
99 virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
101 //special cases for performance
103 /*! \fn void UnstructuredGridExecute();
104 * \brief Filter culculation method for data object type is VTK_UNSTRUCTURED_GRID.
106 int UnstructuredGridExecute (vtkDataSet *, vtkPolyData *, vtkInformation *);
109 typedef std::vector<vtkIdType> TVectorId;
112 TVectorId myVTK2ObjIds;
115 int myIsWireframeMode;
119 #pragma warning ( default:4251 )