VTK
vtkProStarReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkProStarReader.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
29 #ifndef __vtkProStarReader_h
30 #define __vtkProStarReader_h
31 
33 
35 {
36 public:
37  static vtkProStarReader *New();
39  void PrintSelf(ostream& os, vtkIndent indent);
40 
42 
44  vtkSetStringMacro(FileName);
45  vtkGetStringMacro(FileName);
47 
49 
51  vtkSetClampMacro(ScaleFactor, double, 0, VTK_DOUBLE_MAX);
52  vtkGetMacro(ScaleFactor, double);
54 
56 
57  enum cellType
58  {
59  starcdFluidType = 1,
60  starcdSolidType = 2,
61  starcdBaffleType = 3,
62  starcdShellType = 4,
63  starcdLineType = 5,
64  starcdPointType = 6
65  };
67 
69 
70  enum shapeType
71  {
72  starcdPoint = 1,
73  starcdLine = 2,
74  starcdShell = 3,
75  starcdHex = 11,
76  starcdPrism = 12,
77  starcdTet = 13,
78  starcdPyr = 14,
79  starcdPoly = 255
80  };
82 
83 protected:
86 
89  int RequestData
91 
96  char *FileName;
97 
100  double ScaleFactor;
101 
102 private:
103  //
104  // Internal Classes/Structures
105  //
106  struct idMapping;
107 
108  FILE* OpenFile(const char *ext);
109 
110  bool ReadVrtFile(vtkUnstructuredGrid *output, idMapping& pointMapping);
111  bool ReadCelFile(vtkUnstructuredGrid *output, const idMapping& pointMapping);
112 
113  vtkProStarReader(const vtkProStarReader&); // Not implemented.
114  void operator=(const vtkProStarReader&); // Not implemented.
115 };
116 #endif