Salome HOME
Merge from V6_main_20120808 08Aug12
[modules/paravis.git] / src / Plugins / MedReader / IO / vtkMedCurvilinearGrid.h
1 // Copyright (C) 2010-2012  CEA/DEN, EDF R&D
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 #ifndef __vtkMedCurvilinearGrid_h_
21 #define __vtkMedCurvilinearGrid_h_
22
23 #include "vtkMedGrid.h"
24 #include "vtkMed.h"
25
26 class vtkDataArray;
27 #include <vector>
28
29 class VTK_EXPORT vtkMedCurvilinearGrid : public vtkMedGrid
30 {
31 public :
32   static vtkMedCurvilinearGrid* New();
33   vtkTypeRevisionMacro(vtkMedCurvilinearGrid, vtkMedGrid)
34   void PrintSelf(ostream& os, vtkIndent indent);
35
36   // Description:
37   // overloaded to allocate memory for the grid size
38   virtual void  SetDimension(int);
39   virtual int GetDimension();
40
41   // Description:
42   // The number of nodes of this grid. This method do not
43   // perform any allocation.
44   vtkSetMacro(NumberOfPoints, med_int);
45   vtkGetMacro(NumberOfPoints, med_int);
46
47   // Description:
48   // this array contains the coordinates of the points used by this grid.
49   virtual void  SetCoordinates(vtkDataArray*);
50   vtkGetObjectMacro(Coordinates, vtkDataArray);
51
52   // Description:
53   // Set/Get the size of each axis.
54   // Note that the number of points must match the product of the
55   // size of each axis.
56   virtual void  SetAxisSize(int axis, med_int size);
57   virtual med_int GetAxisSize(int axis);
58
59   virtual void  LoadCoordinates();
60   virtual int IsCoordinatesLoaded();
61
62   virtual double* GetCoordTuple(med_int index);
63
64   virtual vtkDataSet* CreateVTKDataSet(vtkMedFamilyOnEntityOnProfile*);
65
66 protected:
67   vtkMedCurvilinearGrid();
68   virtual ~vtkMedCurvilinearGrid();
69
70   std::vector<med_int> AxisSize;
71   med_int NumberOfPoints;
72   vtkDataArray* Coordinates;
73
74 private:
75   vtkMedCurvilinearGrid(const vtkMedCurvilinearGrid&); // Not implemented.
76   void operator=(const vtkMedCurvilinearGrid&); // Not implemented.
77
78 };
79
80 #endif //__vtkMedCurvilinearGrid_h_