VTK  9.3.20240418
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 
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
a simple class to control print indentation
Definition: vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Reads geometry in proSTAR (STARCD) file format.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkSetFilePathMacro(FileName)
Specify the file name prefix of the cel/vrt files to read.
cellType
The type of material represented by the cell.
double ScaleFactor
The coordinates are multiplied by ScaleFactor when setting them.
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
shapeType
The primitive cell shape.
vtkGetFilePathMacro(FileName)
Specify the file name prefix of the cel/vrt files to read.
~vtkProStarReader() override
static vtkProStarReader * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
char * FileName
The name of the file to be read.
Superclass for algorithms that produce only unstructured grid as output.
dataset represents arbitrary combinations of all possible cell types
#define VTK_DOUBLE_MAX
Definition: vtkType.h:154