Back to index

salome-paravis  6.5.0
vtkMedCurvilinearGrid.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 __vtkMedCurvilinearGrid_h_
00021 #define __vtkMedCurvilinearGrid_h_
00022 
00023 #include "vtkMedGrid.h"
00024 #include "vtkMed.h"
00025 
00026 class vtkDataArray;
00027 #include <vector>
00028 
00029 class VTK_EXPORT vtkMedCurvilinearGrid : public vtkMedGrid
00030 {
00031 public :
00032   static vtkMedCurvilinearGrid* New();
00033   vtkTypeRevisionMacro(vtkMedCurvilinearGrid, vtkMedGrid)
00034   void PrintSelf(ostream& os, vtkIndent indent);
00035 
00036   // Description:
00037   // overloaded to allocate memory for the grid size
00038   virtual void  SetDimension(int);
00039   virtual int GetDimension();
00040 
00041   // Description:
00042   // The number of nodes of this grid. This method do not
00043   // perform any allocation.
00044   vtkSetMacro(NumberOfPoints, med_int);
00045   vtkGetMacro(NumberOfPoints, med_int);
00046 
00047   // Description:
00048   // this array contains the coordinates of the points used by this grid.
00049   virtual void  SetCoordinates(vtkDataArray*);
00050   vtkGetObjectMacro(Coordinates, vtkDataArray);
00051 
00052   // Description:
00053   // Set/Get the size of each axis.
00054   // Note that the number of points must match the product of the
00055   // size of each axis.
00056   virtual void  SetAxisSize(int axis, med_int size);
00057   virtual med_int GetAxisSize(int axis);
00058 
00059   virtual void  LoadCoordinates();
00060   virtual int IsCoordinatesLoaded();
00061 
00062   virtual double* GetCoordTuple(med_int index);
00063 
00064   virtual vtkDataSet* CreateVTKDataSet(vtkMedFamilyOnEntityOnProfile*);
00065 
00066 protected:
00067   vtkMedCurvilinearGrid();
00068   virtual ~vtkMedCurvilinearGrid();
00069 
00070   std::vector<med_int> AxisSize;
00071   med_int NumberOfPoints;
00072   vtkDataArray* Coordinates;
00073 
00074 private:
00075   vtkMedCurvilinearGrid(const vtkMedCurvilinearGrid&); // Not implemented.
00076   void operator=(const vtkMedCurvilinearGrid&); // Not implemented.
00077 
00078 };
00079 
00080 #endif //__vtkMedCurvilinearGrid_h_