00001 // Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE 00002 // 00003 // This library is free software; you can redistribute it and/or 00004 // modify it under the terms of the GNU Lesser General Public 00005 // License as published by the Free Software Foundation; either 00006 // version 2.1 of the License. 00007 // 00008 // This library is distributed in the hope that it will be useful, 00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00011 // Lesser General Public License for more details. 00012 // 00013 // You should have received a copy of the GNU Lesser General Public 00014 // License along with this library; if not, write to the Free Software 00015 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00016 // 00017 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com 00018 // 00019 00020 #ifndef GEOM_DEVICEACTOR_H 00021 #define GEOM_DEVICEACTOR_H 00022 00023 #include "GEOM_SmartPtr.h" 00024 00025 class vtkPoints; 00026 typedef GEOM_SmartPtr<vtkPoints> PPoints; 00027 00028 class vtkPolyData; 00029 typedef GEOM_SmartPtr<vtkPolyData> PPolyData; 00030 00031 class vtkStripper; 00032 typedef GEOM_SmartPtr<vtkStripper> PStripper; 00033 00034 class vtkPolyDataNormals; 00035 typedef GEOM_SmartPtr<vtkPolyDataNormals> PPolyDataNormals; 00036 00037 //class vtkActor; 00038 class VTKViewer_Actor; 00039 typedef GEOM_SmartPtr<VTKViewer_Actor> PActor; 00040 00041 class vtkProperty; 00042 class vtkRenderer; 00043 00044 #include <vtkObject.h> 00045 00046 00047 class VTK_EXPORT GEOM_DeviceActor: public vtkObject 00048 { 00049 public: 00050 vtkTypeMacro(GEOM_DeviceActor,vtkObject); 00051 static GEOM_DeviceActor* New(); 00052 00053 void SetProperty(vtkProperty* theProperty); 00054 vtkProperty* GetProperty(); 00055 00056 void SetVisibility(int theVisibility); 00057 int GetVisibility(); 00058 00059 void SetInput(vtkPolyData* thePolyData, bool theUseStripper); 00060 00061 void AddToRender(vtkRenderer* theRenderer); 00062 void RemoveFromRender(vtkRenderer* theRenderer); 00063 00064 PActor GetDeviceActor() {return myActor;} 00065 00066 protected: 00067 PPolyDataNormals myPolyDataNormals; 00068 PPolyDataMapper myPolyDataMapper; 00069 PStripper myStripper; 00070 PActor myActor; 00071 00072 GEOM_DeviceActor(); 00073 ~GEOM_DeviceActor(); 00074 00075 private: 00076 // Not implememnted 00077 GEOM_DeviceActor(const GEOM_DeviceActor&); 00078 void operator=(const GEOM_DeviceActor&); 00079 }; 00080 00081 00082 #endif //GEOM_DEVICEACTOR_H