Back to index

salome-paravis  6.5.0
vtkMedFraction.h
Go to the documentation of this file.
00001 // Copyright (C) 2010-2012  CEA/DEN, EDF R&D
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 __vtkMedFraction_h_
00021 #define __vtkMedFraction_h_
00022 
00023 #include "vtkObject.h"
00024 
00025 class vtkIntArray;
00026 class vtkDoubleArray;
00027 
00028 class VTK_EXPORT vtkMedFraction : public vtkObject
00029 {
00030 public:
00031   static vtkMedFraction* New();
00032   vtkTypeRevisionMacro(vtkMedFraction, vtkObject)
00033   void PrintSelf(ostream& os, vtkIndent indent);
00034 
00035   // Description:
00036   // the powers of this polynomial function
00037   // the number of components of this array is equal to the maximum degree
00038   // and the number of tuples to the numner of coefficients
00039   virtual vtkIntArray* GetPowers();
00040 
00041   // Description:
00042   // The coefficients of this polynomial function
00043   virtual vtkDoubleArray* GetCoefficients();
00044 
00045   // Description:
00046   // the powers of this polynomial function
00047   // the number of components of this array is equal to the maximum degree
00048   // and the number of tuples to the numner of coefficients
00049   virtual vtkIntArray* GetDenominatorPowers();
00050 
00051   // Description:
00052   // The coefficients of this polynomial function
00053   virtual vtkDoubleArray* GetDenominatorCoefficients();
00054 
00055   // Description:
00056   // This sets the number of coefficients in this polynom
00057   void  SetNumberOfCoefficients(int);
00058 
00059   // Description:
00060   // This sets the number of coefficients in this polynom
00061   void  SetNumberOfDenominatorCoefficients(int);
00062 
00063   // Description:
00064   // This sets the maximum degree of this polynom.
00065   // This also allocates the array to store the powers of this
00066   // polynom
00067   void  SetNumberOfVariable(int);
00068   vtkGetMacro(NumberOfVariable, int);
00069 
00070   // Description:
00071   // Evaluate the value of this function at this point.
00072   virtual double Evaluate(double*);
00073   virtual double Evaluate1(double);
00074   virtual double Evaluate2(double, double);
00075   virtual double Evaluate3(double, double, double);
00076 
00077 protected :
00078   vtkMedFraction();
00079   ~vtkMedFraction();
00080 
00081   vtkIntArray* Powers;
00082   vtkDoubleArray* Coefficients;
00083 
00084   vtkIntArray* DenominatorPowers;
00085   vtkDoubleArray* DenominatorCoefficients;
00086 
00087   int NumberOfVariable;
00088 
00089 private :
00090     vtkMedFraction(const vtkMedFraction&); // Not implemented.
00091     void operator=(const vtkMedFraction&); // Not implemented.
00092 };
00093 
00094 #endif //__vtkMedFraction_h_