Version: 6.3.1

src/PIPELINE/VISU_PolyDataMapperHolder.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_PolyDataMapperHolder.hxx
00025 // Author:  Alexey PETROV
00026 // Module : VISU
00027 //
00028 #ifndef VISU_PolyDataMapperHolder_HeaderFile
00029 #define VISU_PolyDataMapperHolder_HeaderFile
00030 
00031 #include "VISU_MapperHolder.hxx"
00032 
00033 class vtkPolyDataMapper;
00034 class vtkPolyData;
00035 class SALOME_ExtractPolyDataGeometry;
00036 
00037 
00038 //----------------------------------------------------------------------------
00039 class VISU_PolyDataMapperHolder : public VISU_MapperHolder
00040 {
00041 public:
00042   vtkTypeMacro(VISU_PolyDataMapperHolder, VISU_MapperHolder);
00043 
00044   static 
00045   VISU_PolyDataMapperHolder* 
00046   New();
00047 
00048   //----------------------------------------------------------------------------
00049   virtual
00050   void
00051   ShallowCopy(VISU_MapperHolder *theMapperHolder,
00052               bool theIsCopyInput);
00053 
00055   virtual
00056   unsigned long int
00057   GetMemorySize();
00058 
00059   //----------------------------------------------------------------------------
00060   void 
00061   SetPolyDataIDMapper(const VISU::PPolyDataIDMapper& theIDMapper);
00062 
00063   const VISU::PPolyDataIDMapper&
00064   GetPolyDataIDMapper();
00065 
00066   virtual
00067   vtkPolyData* 
00068   GetPolyDataInput();
00069 
00070   virtual 
00071   vtkPolyDataMapper* 
00072   GetPolyDataMapper();
00073 
00074   //----------------------------------------------------------------------------
00075   virtual
00076   vtkIdType
00077   GetNodeObjID(vtkIdType theID);
00078 
00079   virtual
00080   vtkIdType
00081   GetNodeVTKID(vtkIdType theID);
00082 
00083   virtual
00084   vtkFloatingPointType* 
00085   GetNodeCoord(vtkIdType theObjID);
00086 
00087   virtual
00088   vtkIdType
00089   GetElemObjID(vtkIdType theID);
00090 
00091   virtual
00092   vtkIdType
00093   GetElemVTKID(vtkIdType theID);
00094 
00095   virtual
00096   vtkCell*
00097   GetElemCell(vtkIdType theObjID);
00098 
00099   //----------------------------------------------------------------------------
00100   virtual
00101   void
00102   SetImplicitFunction(vtkImplicitFunction *theFunction);
00103 
00104   virtual
00105   vtkImplicitFunction* 
00106   GetImplicitFunction();
00107 
00108   virtual
00109   void
00110   SetExtractInside(bool theMode);
00111 
00112   virtual
00113   void
00114   SetExtractBoundaryCells(bool theMode);
00115 
00116   //----------------------------------------------------------------------------
00117   // Clipping planes
00118   virtual
00119   void 
00120   RemoveAllClippingPlanes();
00121 
00122   virtual
00123   vtkIdType
00124   GetNumberOfClippingPlanes();
00125 
00126   virtual
00127   bool
00128   AddClippingPlane(vtkPlane* thePlane);
00129 
00130   virtual
00131   vtkPlane* 
00132   GetClippingPlane(vtkIdType theID);
00133   
00134   void RemoveClippingPlane(vtkIdType theID);
00135 
00136 protected:
00137   //----------------------------------------------------------------------------
00138   VISU_PolyDataMapperHolder();
00139   VISU_PolyDataMapperHolder(const VISU_PolyDataMapperHolder&);
00140 
00141   virtual
00142   ~VISU_PolyDataMapperHolder();
00143 
00144   //----------------------------------------------------------------------------
00145   virtual
00146   void
00147   OnCreateMapper();
00148 
00149   void 
00150   SetPolyDataMapper(vtkPolyDataMapper* theMapper);
00151 
00152   //----------------------------------------------------------------------------
00153   virtual
00154   void
00155   SetLookupTable(VISU_LookupTable* theLookupTable);
00156 
00157   virtual
00158   vtkPointSet* 
00159   GetClippedInput();
00160 
00161 private:
00162   //----------------------------------------------------------------------------
00163   VISU::PPolyDataIDMapper myPolyDataIDMapper;
00164   vtkSmartPointer<vtkPolyDataMapper> myPolyDataMapper;
00165 
00166 protected:
00167   vtkSmartPointer<SALOME_ExtractPolyDataGeometry> myExtractPolyDataGeometry; 
00168 };
00169 
00170 #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