Version: 6.3.1

src/PIPELINE/VISU_FieldTransform.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_FieldTransform.hxx
00025 //  Author : Alexey PETROV
00026 //  Module : VISU
00027 //
00028 #ifndef VISU_FieldTransform_HeaderFile
00029 #define VISU_FieldTransform_HeaderFile
00030 
00031 #include <vtkDataSetAlgorithm.h>
00032 
00033 #include "VISUPipeline.hxx"
00034 
00035 class VTKViewer_Transform;
00036 
00037 class VISU_PIPELINE_EXPORT VISU_FieldTransform : public vtkDataSetAlgorithm
00038 {
00039 public:
00040   vtkTypeMacro(VISU_FieldTransform, vtkDataSetAlgorithm);
00041 
00042   static 
00043   VISU_FieldTransform
00044   *New();
00045 
00046   virtual
00047   unsigned long 
00048   GetMTime();
00049   
00050   static
00051   double
00052   Ident(double theArg);
00053 
00054   static
00055   double
00056   Log10(double theArg);
00057 
00058   typedef double (*TTransformFun)(double);
00059 
00060   void
00061   SetScalarTransform(TTransformFun theFunction);
00062 
00063   TTransformFun
00064   GetScalarTransform() 
00065   {
00066     return myFunction;
00067   }
00068 
00069   void
00070   SetSpaceTransform(VTKViewer_Transform* theTransform);
00071 
00072   VTKViewer_Transform* 
00073   GetSpaceTransform() 
00074   {
00075     return myTransform;
00076   }
00077 
00078   vtkFloatingPointType* 
00079   GetScalarRange()
00080   {
00081     return myScalarRange; 
00082   }
00083   
00084   void
00085   SetScalarRange(vtkFloatingPointType theScalarRange[2]);
00086 
00087   void
00088   SetScalarMin(vtkFloatingPointType theValue);
00089 
00090   void
00091   SetScalarMax(vtkFloatingPointType theValue);
00092 
00093 protected:
00094   VISU_FieldTransform();
00095 
00096   virtual
00097   ~VISU_FieldTransform();
00098 
00099   virtual
00100   int
00101   RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00102 
00103   VTKViewer_Transform *myTransform;
00104   TTransformFun myFunction;
00105   vtkFloatingPointType myScalarRange[2];
00106   
00107 private:
00108   VISU_FieldTransform(const VISU_FieldTransform&);
00109   void operator=(const VISU_FieldTransform&);
00110 };
00111 
00112 #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