suanPan
vtkBase.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright (C) 2017-2023 Theodore Chang
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <http://www.gnu.org/licenses/>.
16  ******************************************************************************/
30 #ifndef VTKBASE_H
31 #define VTKBASE_H
32 
33 #ifdef SUANPAN_VTK
34 #include <Recorder/OutputType.h>
35 #include <armadillo/armadillo>
36 #include <vtkCell.h>
37 #include <vtkDoubleArray.h>
38 #include <vtkPoints.h>
39 #include <vtkSmartPointer.h>
40 
41 using arma::mat;
42 #endif
43 
44 class vtkBase {
45 #ifdef SUANPAN_VTK
46 
47 protected:
48  vtkSmartPointer<vtkCell> vtk_cell;
49 
50 public:
51  vtkBase() = default;
52  virtual ~vtkBase() = default;
53 
54  virtual void Setup();
55 
56  virtual void GetData(vtkSmartPointer<vtkDoubleArray>&, OutputType);
57  virtual mat GetData(OutputType);
58 
59  virtual void SetDeformation(vtkSmartPointer<vtkPoints>&, double);
60 
61  [[nodiscard]] virtual const vtkSmartPointer<vtkCell>& GetCell() const;
62 #endif
63 };
64 
65 #endif
66 
OutputType
Definition: OutputType.h:23
The vtkBase class.
Definition: vtkBase.h:44