Version: 6.3.1

src/PIPELINE/VISU_Plot3DPL.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_CutPlanesPL.hxx
00025 // Author:  Alexey PETROV
00026 // Module : VISU
00027 //
00028 #ifndef VISU_Plot3DPL_HeaderFile
00029 #define VISU_Plot3DPL_HeaderFile
00030 
00031 #include "VISUPipeline.hxx"
00032 #include "VISU_ScalarMapPL.hxx"
00033 #include "VISU_CutPlanesPL.hxx"
00034 
00035 class vtkWarpScalar;
00036 class vtkContourFilter;
00037 class vtkGeometryFilter;
00038 class VISU_CellDataToPointData;
00039 
00040 
00041 //----------------------------------------------------------------------------
00042 class VISU_PIPELINE_EXPORT VISU_Plot3DPL : public VISU_ScalarMapPL
00043 {
00044 public:
00045   vtkTypeMacro(VISU_Plot3DPL, VISU_ScalarMapPL);
00046 
00047   static
00048   VISU_Plot3DPL* 
00049   New();
00050 
00051   virtual
00052   unsigned long int 
00053   GetMTime();
00054 
00055   //----------------------------------------------------------------------------
00056   VISU_CutPlanesPL::PlaneOrientation
00057   GetPlaneOrientation();
00058 
00059   vtkFloatingPointType
00060   GetRotateX();
00061 
00062   vtkFloatingPointType
00063   GetRotateY();
00064 
00065   void
00066   SetOrientation(VISU_CutPlanesPL::PlaneOrientation theOrientation,
00067                  vtkFloatingPointType theXAngle = 0.0,
00068                  vtkFloatingPointType theYAngle = 0.0);
00069 
00070   vtkFloatingPointType
00071   GetPlanePosition();
00072 
00073   bool
00074   IsPositionRelative();
00075 
00076   void
00077   SetPlanePosition(vtkFloatingPointType thePosition,
00078                    bool theIsRelative);
00079 
00080   void
00081   SetScaleFactor(vtkFloatingPointType theScaleFactor);
00082 
00083   vtkFloatingPointType
00084   GetScaleFactor();
00085 
00086   void
00087   SetContourPrs(bool theIsContourPrs );
00088 
00089   bool
00090   GetIsContourPrs();
00091 
00092   void
00093   SetNumberOfContours(int theNumber);
00094 
00095   int
00096   GetNumberOfContours();
00097 
00098   void
00099   GetBasePlane (vtkFloatingPointType theOrigin[3],
00100                 vtkFloatingPointType theNormal[3],
00101                 bool  theCenterOrigine = false );
00102   
00103   void
00104   GetMinMaxPosition( vtkFloatingPointType& minPos, 
00105                      vtkFloatingPointType& maxPos );
00106   
00107 public:
00108   virtual
00109   void
00110   Init();
00111 
00112   virtual
00113   void
00114   Update();
00115 
00117   virtual
00118   unsigned long int
00119   GetMemorySize();
00120 
00121   static
00122   VISU_CutPlanesPL::PlaneOrientation
00123   GetOrientation(vtkDataSet* theDataSet);
00124 
00125   static
00126   vtkFloatingPointType
00127   GetScaleFactor( VISU_ColoredPL* theColoredPL,
00128                   vtkDataSet* theDataSet );
00129 
00130   void 
00131   SetMapScale(vtkFloatingPointType theMapScale);
00132 
00133 protected:
00134   VISU_Plot3DPL();
00135 
00136   virtual 
00137   ~VISU_Plot3DPL();
00138 
00139   virtual
00140   vtkDataSet* 
00141   InsertCustomPL();
00142 
00143   virtual
00144   void
00145   DoShallowCopy(VISU_PipeLine *thePipeLine,
00146                 bool theIsCopyInput);
00147 
00148   vtkFloatingPointType myAngle[3];
00149   bool myIsRelative, myIsContour;
00150   vtkFloatingPointType myPosition, myScaleFactor, myMapScaleFactor;
00151   VISU_CutPlanesPL::PlaneOrientation myOrientation;
00152 
00153   vtkSmartPointer<VISU_CellDataToPointData> myCellDataToPointData;
00154   vtkSmartPointer<vtkAppendPolyData> myAppendPolyData;
00155   vtkSmartPointer<vtkGeometryFilter> myGeometryFilter;
00156   vtkSmartPointer<vtkContourFilter> myContourFilter;
00157   vtkSmartPointer<vtkWarpScalar> myWarpScalar;
00158 
00159 private:
00160   VISU_Plot3DPL(const VISU_Plot3DPL&);;  // Not implemented.
00161   void operator=(const VISU_Plot3DPL&);  // Not implemented.
00162 };
00163 
00164 #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