VTK  9.3.1
vtkProStarReader.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
18 #ifndef vtkProStarReader_h
19 #define vtkProStarReader_h
20 
21 #include "vtkIOGeometryModule.h" // For export macro
23 
24 VTK_ABI_NAMESPACE_BEGIN
25 class VTKIOGEOMETRY_EXPORT vtkProStarReader : public vtkUnstructuredGridAlgorithm
26 {
27 public:
28  static vtkProStarReader* New();
30  void PrintSelf(ostream& os, vtkIndent indent) override;
31 
33 
37  vtkSetFilePathMacro(FileName);
38  vtkGetFilePathMacro(FileName);
40 
42 
46  vtkSetClampMacro(ScaleFactor, double, 0, VTK_DOUBLE_MAX);
47  vtkGetMacro(ScaleFactor, double);
49 
53  enum cellType
54  {
55  starcdFluidType = 1,
56  starcdSolidType = 2,
57  starcdBaffleType = 3,
58  starcdShellType = 4,
59  starcdLineType = 5,
60  starcdPointType = 6
61  };
62 
66  enum shapeType
67  {
68  starcdPoint = 1,
69  starcdLine = 2,
70  starcdShell = 3,
71  starcdHex = 11,
72  starcdPrism = 12,
73  starcdTet = 13,
74  starcdPyr = 14,
75  starcdPoly = 255
76  };
77 
78 protected:
80  ~vtkProStarReader() override;
81 
84 
91  char* FileName;
92 
97  double ScaleFactor;
98 
99 private:
100  //
101  // Internal Classes/Structures
102  //
103  struct idMapping;
104 
105  FILE* OpenFile(const char* ext);
106 
107  bool ReadVrtFile(vtkUnstructuredGrid* output, idMapping& pointMapping);
108  bool ReadCelFile(vtkUnstructuredGrid* output, const idMapping& pointMapping);
109 
110  vtkProStarReader(const vtkProStarReader&) = delete;
111  void operator=(const vtkProStarReader&) = delete;
112 };
113 VTK_ABI_NAMESPACE_END
114 #endif
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
#define VTK_DOUBLE_MAX
Definition: vtkType.h:154
Store vtkAlgorithm input/output information.
static vtkUnstructuredGridAlgorithm * New()
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
char * FileName
The name of the file to be read.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a simple class to control print indentation
Definition: vtkIndent.h:28
shapeType
The primitive cell shape.
dataset represents arbitrary combinations of all possible cell types
double ScaleFactor
The coordinates are multiplied by ScaleFactor when setting them.
Superclass for algorithms that produce only unstructured grid as output.
Store zero or more vtkInformation instances.
Reads geometry in proSTAR (STARCD) file format.
cellType
The type of material represented by the cell.