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_PipeLine.hxx 00025 // Author: Alexey PETROV 00026 // Module : VISU 00027 // 00028 #ifndef VISU_VectorsPL_HeaderFile 00029 #define VISU_VectorsPL_HeaderFile 00030 00031 #include "VISUPipeline.hxx" 00032 #include "VISU_DeformedShapePL.hxx" 00033 00034 class VTKViewer_TransformFilter; 00035 class VTKViewer_Transform; 00036 class VTKViewer_CellCenters; 00037 00038 class vtkGlyphSource2D; 00039 class vtkConeSource; 00040 class vtkLineSource; 00041 00042 class vtkGlyph3D; 00043 00044 class VISU_UsedPointsFilter; 00045 00046 //---------------------------------------------------------------------------- 00047 class VISU_PIPELINE_EXPORT VISU_VectorsPL : public VISU_DeformedShapePL 00048 { 00049 public: 00050 vtkTypeMacro(VISU_VectorsPL, VISU_DeformedShapePL); 00051 00052 static 00053 VISU_VectorsPL* 00054 New(); 00055 00056 virtual 00057 unsigned long int 00058 GetMTime(); 00059 00060 //---------------------------------------------------------------------------- 00061 virtual 00062 void 00063 SetScale(vtkFloatingPointType theScale); 00064 00065 virtual 00066 vtkFloatingPointType 00067 GetScale(); 00068 00069 enum GlyphType{ ARROW, CONE2, CONE6, NONE}; 00070 00071 virtual 00072 void 00073 SetGlyphType(GlyphType theType); 00074 00075 virtual 00076 GlyphType 00077 GetGlyphType() const; 00078 00079 enum GlyphPos{ CENTER, TAIL,HEAD}; 00080 00081 virtual 00082 void 00083 SetGlyphPos(GlyphPos thePos); 00084 00085 virtual 00086 GlyphPos 00087 GetGlyphPos() const; 00088 00089 public: 00090 virtual 00091 void 00092 Init(); 00093 00094 virtual 00095 void 00096 Build(); 00097 00098 virtual 00099 void 00100 Update(); 00101 00103 virtual 00104 unsigned long int 00105 GetMemorySize(); 00106 00107 vtkDataSet* 00108 GetOutput(); 00109 00110 virtual 00111 void 00112 SetTransform(VTKViewer_Transform* theTransform); 00113 00114 virtual 00115 VTKViewer_Transform* 00116 GetTransform(); 00117 00118 virtual 00119 void 00120 SetMapScale(vtkFloatingPointType theMapScale = 1.0); 00121 00122 protected: 00123 VISU_VectorsPL(); 00124 00125 virtual 00126 ~VISU_VectorsPL(); 00127 00128 virtual 00129 vtkDataSet* 00130 InsertCustomPL(); 00131 00132 virtual 00133 void 00134 DoShallowCopy(VISU_PipeLine *thePipeLine, 00135 bool theIsCopyInput); 00136 00137 GlyphType myTypeGlyph; 00138 GlyphPos myPosGlyph; 00139 vtkGlyph3D *myGlyph; 00140 00141 vtkGlyphSource2D *myGlyphSource; 00142 vtkLineSource *myLineSource; 00143 vtkConeSource *myConeSource; 00144 00145 VTKViewer_CellCenters* myCenters; 00146 VTKViewer_TransformFilter *myTransformFilter; 00147 00148 VISU_UsedPointsFilter* myUsedPointsFilter; 00149 00150 private: 00151 VISU_VectorsPL(const VISU_VectorsPL&); // Not implemented. 00152 void operator=(const VISU_VectorsPL&); // Not implemented. 00153 }; 00154 00155 00156 #endif