Back to index

salome-paravis  6.5.0
vtkMedUnstructuredGrid.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 __vtkMedUnstructuredGrid_h_
00021 #define __vtkMedUnstructuredGrid_h_
00022 
00023 #include "vtkMedGrid.h"
00024 #include "vtkMedSetGet.h"
00025 #include "vtkMed.h"
00026 
00027 class vtkDataArray;
00028 class vtkMedEntityArray;
00029 class vtkMedString;
00030 
00031 class VTK_EXPORT vtkMedUnstructuredGrid : public vtkMedGrid
00032 {
00033 public :
00034   static vtkMedUnstructuredGrid* New();
00035   vtkTypeRevisionMacro(vtkMedUnstructuredGrid, vtkMedGrid);
00036   void PrintSelf(ostream& os, vtkIndent indent);
00037 
00038   // Description:
00039   // this array contains the coordinates of the points used by this grid.
00040   virtual void SetCoordinates(vtkDataArray*);
00041   vtkGetObjectMacro(Coordinates, vtkDataArray);
00042 
00043   // Description:
00044   // returns true if the Coordinate array is set and corresponds
00045   // to the number of points
00046   virtual int IsCoordinatesLoaded();
00047 
00048   // Description:
00049   // Initialize the global Ids of the first element of each MedEntityArray
00050   virtual void  InitializeCellGlobalIds();
00051 
00052   // Description:
00053   // Free the memory associated with this grid.
00054   virtual void  ClearMedSupports();
00055 
00056   // Description:
00057   // Set the number of points in the grid.
00058   // no allocation is performed at this points, you have to allocate the Points
00059   // array manually.
00060   vtkSetMacro(NumberOfPoints, med_int);
00061   vtkGetMacro(NumberOfPoints, med_int);
00062 
00063   virtual void  LoadCoordinates();
00064 
00065   virtual double* GetCoordTuple(med_int index);
00066 
00067   virtual vtkDataSet* CreateVTKDataSet(vtkMedFamilyOnEntityOnProfile*);
00068 
00069 protected:
00070   vtkMedUnstructuredGrid();
00071   virtual ~vtkMedUnstructuredGrid();
00072 
00073   vtkDataArray* Coordinates;
00074 
00075   med_int NumberOfPoints;
00076 
00077 private:
00078   vtkMedUnstructuredGrid(const vtkMedUnstructuredGrid&); // Not implemented.
00079   void operator=(const vtkMedUnstructuredGrid&); // Not implemented.
00080 };
00081 
00082 #endif //__vtkMedUnstructuredGrid_h_