X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FVTKViewer%2FVTKViewer_AppendFilter.h;h=880c8f9c135ac70195c06656f4aa3e5d83caef7e;hb=c257b5026d52dfc12641811662f11a8432e84735;hp=c9a756381b9b5a16d6460f29a33ba349d8764cc7;hpb=399155730966dfc225fbb24f66204b05664385f2;p=modules%2Fgui.git diff --git a/src/VTKViewer/VTKViewer_AppendFilter.h b/src/VTKViewer/VTKViewer_AppendFilter.h index c9a756381..880c8f9c1 100644 --- a/src/VTKViewer/VTKViewer_AppendFilter.h +++ b/src/VTKViewer/VTKViewer_AppendFilter.h @@ -1,11 +1,14 @@ -// Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D +// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either -// version 2.1 of the License. +// version 2.1 of the License, or (at your option) any later version. // -// This library is distributed in the hope that it will be useful +// This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. @@ -16,6 +19,7 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #ifndef VTKVIEWER_APPENDFILTER_H #define VTKVIEWER_APPENDFILTER_H @@ -27,7 +31,11 @@ #include #include -class vtkPoints; +class vtkPointSet; + +#ifdef WIN32 +#pragma warning ( disable:4251 ) +#endif /*! \brief This class used same as vtkAppendFilter. See documentation on VTK for more information. */ @@ -38,40 +46,40 @@ public: */ static VTKViewer_AppendFilter *New(); - /*! \fn vtkTypeRevisionMacro(VTKViewer_AppendFilter, vtkAppendFilter) + /*! \fn vtkTypeMacro(VTKViewer_AppendFilter, vtkAppendFilter) * \brief VTK type revision macros. */ - vtkTypeRevisionMacro(VTKViewer_AppendFilter, vtkAppendFilter); + vtkTypeMacro(VTKViewer_AppendFilter, vtkAppendFilter); void SetDoMappingFlag(const bool theFlag); bool DoMappingFlag() const; void - SetPoints(vtkPoints* thePoints); + SetSharedPointsDataSet(vtkPointSet* thePointsDataSet); - vtkPoints* - GetPoints(); + vtkPointSet* + GetSharedPointsDataSet(); vtkIdType GetPointOutputID(vtkIdType theInputID, - vtkIdType theInputDataSetID); + vtkIdType theInputDataSetID); vtkIdType GetCellOutputID(vtkIdType theInputID, - vtkIdType theInputDataSetID); + vtkIdType theInputDataSetID); void GetPointInputID(vtkIdType theOutputID, - vtkIdType& theInputID, - vtkIdType& theStartID, - vtkIdType& theInputDataSetID); + vtkIdType& theInputID, + vtkIdType& theStartID, + vtkIdType& theInputDataSetID); void GetCellInputID(vtkIdType theOutputID, - vtkIdType& theInputID, - vtkIdType& theStartID, - vtkIdType& theInputDataSetID); + vtkIdType& theInputID, + vtkIdType& theStartID, + vtkIdType& theInputDataSetID); typedef std::vector TVectorIds; @@ -84,21 +92,26 @@ protected: * \brief Destructor. */ ~VTKViewer_AppendFilter(); - /*! \fn void Execute(); - * \brief Filter culculation method. - */ - virtual void Execute(); - // + + // Usual data generation method + virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); + + virtual int FillInputPortInformation(int port, vtkInformation *info); + void DoMapping(); void Reset(); - void MakeOutput(); + int MakeOutput(vtkInformation *, vtkInformationVector **, vtkInformationVector *); bool myDoMappingFlag; TVectorIds myNodeRanges; TVectorIds myCellRanges; - vtkSmartPointer myPoints; + vtkSmartPointer mySharedPointsDataSet; }; +#ifdef WIN32 +#pragma warning ( default:4251 ) +#endif + #endif