Back to index

salome-paravis  6.5.0
vtkMedRegularGrid.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 __vtkMedRegularGrid_h_
00021 #define __vtkMedRegularGrid_h_
00022 
00023 #include "vtkMedGrid.h"
00024 #include "vtkMed.h"
00025 #include "vtkMedSetGet.h"
00026 
00027 #include <vector>
00028 
00029 class vtkDataArray;
00030 
00031 class VTK_EXPORT vtkMedRegularGrid : public vtkMedGrid
00032 {
00033 public :
00034   static vtkMedRegularGrid* New();
00035   vtkTypeRevisionMacro(vtkMedRegularGrid, vtkMedGrid)
00036   void PrintSelf(ostream& os, vtkIndent indent);
00037 
00038   // Description:
00039   // Container of the families in this mesh
00040   vtkGetObjectVectorMacro(AxisCoordinate, vtkDataArray);
00041   vtkSetAbstractObjectVectorMacro(AxisCoordinate, vtkDataArray);
00042 
00043   // Description:
00044   // overloaded to set the number of coordinates arrays.
00045   // Do not allocate each array.
00046   virtual void  SetDimension(med_int);
00047   virtual int GetDimension();
00048 
00049   // Description:
00050   // the size of each dimension of the grid.
00051   // SetDimension has to have been called before
00052   virtual void  SetAxisSize(int axis, med_int size);
00053   virtual med_int GetAxisSize(int dim);
00054 
00055   // Description:
00056   // returns the number of points of this grid.
00057   virtual med_int GetNumberOfPoints();
00058 
00059   virtual void  LoadCoordinates();
00060 
00061   virtual double* GetCoordTuple(med_int index);
00062 
00063   virtual int IsCoordinatesLoaded();
00064 
00065   virtual vtkDataSet* CreateVTKDataSet(vtkMedFamilyOnEntityOnProfile*);
00066 
00067 protected:
00068   vtkMedRegularGrid();
00069   virtual ~vtkMedRegularGrid();
00070 
00071   double CoordTuple[3];
00072 
00073   std::vector<med_int> AxisSize;
00074   //BTX
00075   vtkObjectVector<vtkDataArray>* AxisCoordinate;
00076   //ETX
00077 
00078 private:
00079   vtkMedRegularGrid(const vtkMedRegularGrid&); // Not implemented.
00080   void operator=(const vtkMedRegularGrid&); // Not implemented.
00081 
00082 };
00083 
00084 #endif //__vtkMedRegularGrid_h_