Salome HOME
Merge from BR_PORTING_VTK6 01/03/2013
[modules/paravis.git] / src / Plugins / MedReader / IO / vtkMedRegularGrid.h
1 // Copyright (C) 2010-2011  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 __vtkMedRegularGrid_h_
21 #define __vtkMedRegularGrid_h_
22
23 #include "vtkMedGrid.h"
24 #include "vtkMed.h"
25 #include "vtkMedSetGet.h"
26
27 #include <vector>
28
29 class vtkDataArray;
30
31 class VTK_EXPORT vtkMedRegularGrid : public vtkMedGrid
32 {
33 public :
34   static vtkMedRegularGrid* New();
35   vtkTypeMacro(vtkMedRegularGrid, vtkMedGrid)
36   void PrintSelf(ostream& os, vtkIndent indent);
37
38   // Description:
39   // Container of the families in this mesh
40   vtkGetObjectVectorMacro(AxisCoordinate, vtkDataArray);
41   vtkSetAbstractObjectVectorMacro(AxisCoordinate, vtkDataArray);
42
43   // Description:
44   // overloaded to set the number of coordinates arrays.
45   // Do not allocate each array.
46   virtual void  SetDimension(med_int);
47   virtual int GetDimension();
48
49   // Description:
50   // the size of each dimension of the grid.
51   // SetDimension has to have been called before
52   virtual void  SetAxisSize(int axis, med_int size);
53   virtual med_int GetAxisSize(int dim);
54
55   // Description:
56   // returns the number of points of this grid.
57   virtual med_int GetNumberOfPoints();
58
59   virtual void  LoadCoordinates();
60
61   virtual double* GetCoordTuple(med_int index);
62
63   virtual int IsCoordinatesLoaded();
64
65   virtual vtkDataSet* CreateVTKDataSet(vtkMedFamilyOnEntityOnProfile*);
66
67 protected:
68   vtkMedRegularGrid();
69   virtual ~vtkMedRegularGrid();
70
71   double CoordTuple[3];
72
73   std::vector<med_int> AxisSize;
74   //BTX
75   vtkObjectVector<vtkDataArray>* AxisCoordinate;
76   //ETX
77
78 private:
79   vtkMedRegularGrid(const vtkMedRegularGrid&); // Not implemented.
80   void operator=(const vtkMedRegularGrid&); // Not implemented.
81
82 };
83
84 #endif //__vtkMedRegularGrid_h_