Version: 6.3.1

src/PIPELINE/VISU_MapperHolder.hxx

Go to the documentation of this file.
00001 // Copyright (C) 2007-2011  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00005 //
00006 // This library is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 2.1 of the License.
00010 //
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 // Lesser General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00019 //
00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 
00023 //  VISU OBJECT : interactive object for VISU entities implementation
00024 // File:    VISU_MapperHolder.hxx
00025 // Author:  Alexey PETROV
00026 // Module : VISU
00027 //
00028 #ifndef VISU_MapperHolder_HeaderFile
00029 #define VISU_MapperHolder_HeaderFile
00030 
00031 #include "VISU_IDMapper.hxx"
00032 
00033 #include <vtkObject.h>
00034 #include <vtkSmartPointer.h>
00035 
00036 class vtkCell;
00037 class vtkPlane;
00038 class vtkMapper;
00039 class vtkDataSet;
00040 class vtkPointSet;
00041 class vtkImplicitFunction;
00042 
00043 class VISU_PipeLine;
00044 class VISU_LookupTable;
00045 
00046 
00047 //----------------------------------------------------------------------------
00048 class VISU_MapperHolder : public vtkObject
00049 {
00050 public:
00051   vtkTypeMacro(VISU_MapperHolder, vtkObject);
00052 
00053   //----------------------------------------------------------------------------
00054   virtual
00055   void
00056   ShallowCopy(VISU_MapperHolder *theMapperHolder,
00057               bool theIsCopyInput);
00058 
00060   virtual
00061   unsigned long int
00062   GetMemorySize();
00063 
00064   virtual
00065   unsigned long int 
00066   GetMTime();
00067 
00068   //----------------------------------------------------------------------------
00069   void
00070   SetPipeLine(VISU_PipeLine* thePipeLine);
00071 
00072   const VISU::PIDMapper&  
00073   GetIDMapper();
00074 
00075   virtual
00076   vtkDataSet* 
00077   GetInput();
00078 
00079   virtual 
00080   vtkMapper* 
00081   GetMapper();
00082 
00083   virtual
00084   vtkDataSet* 
00085   GetOutput();
00086 
00087   virtual
00088   void
00089   Update();
00090 
00091   //----------------------------------------------------------------------------
00092   virtual
00093   vtkIdType
00094   GetNodeObjID(vtkIdType theID);
00095 
00096   virtual
00097   vtkIdType
00098   GetNodeVTKID(vtkIdType theID);
00099 
00100   virtual
00101   vtkFloatingPointType* 
00102   GetNodeCoord(vtkIdType theObjID);
00103 
00104   virtual
00105   vtkIdType
00106   GetElemObjID(vtkIdType theID);
00107 
00108   virtual
00109   vtkIdType
00110   GetElemVTKID(vtkIdType theID);
00111 
00112   virtual
00113   vtkCell*
00114   GetElemCell(vtkIdType theObjID);
00115 
00116   //----------------------------------------------------------------------------
00117   virtual
00118   void
00119   SetImplicitFunction(vtkImplicitFunction *theFunction) = 0;
00120 
00121   virtual
00122   vtkImplicitFunction* 
00123   GetImplicitFunction() = 0;
00124 
00125   //----------------------------------------------------------------------------
00126   // Clipping planes
00127   virtual
00128   void 
00129   RemoveAllClippingPlanes() = 0;
00130 
00131   virtual
00132   vtkIdType
00133   GetNumberOfClippingPlanes() = 0;
00134 
00135   virtual
00136   bool
00137   AddClippingPlane(vtkPlane* thePlane) = 0;
00138 
00139   virtual
00140   vtkPlane* 
00141   GetClippingPlane(vtkIdType theID) = 0;
00142 
00143   virtual void RemoveClippingPlane(vtkIdType theID) = 0;
00144 
00145   //----------------------------------------------------------------------------
00146   virtual
00147   void
00148   SetLookupTable(VISU_LookupTable* theLookupTable) = 0;
00149 
00150   virtual
00151   vtkPointSet* 
00152   GetClippedInput() = 0;
00153 
00154   //----------------------------------------------------------------------------
00155   virtual
00156   void
00157   SetExtractInside(bool theMode) = 0;
00158 
00159   virtual
00160   void
00161   SetExtractBoundaryCells(bool theMode) = 0;
00162 
00163 protected:
00164   //----------------------------------------------------------------------------
00165   VISU_MapperHolder();
00166   VISU_MapperHolder(const VISU_MapperHolder&);
00167 
00168   virtual
00169   ~VISU_MapperHolder();
00170 
00171   //----------------------------------------------------------------------------
00172   virtual
00173   void
00174   OnCreateMapper() = 0;
00175 
00176   void 
00177   SetMapper(vtkMapper* theMapper);
00178 
00179   void 
00180   SetIDMapper(const VISU::PIDMapper& theIDMapper);
00181 
00182 private:
00183   //----------------------------------------------------------------------------
00184   vtkSmartPointer<vtkMapper> myMapper;
00185   VISU::PIDMapper myIDMapper;
00186   VISU_PipeLine* myPipeLine;
00187 };
00188 
00189 #endif
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS