VTK  9.2.6
vtkBYUReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkBYUReader.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 =========================================================================*/
37 #ifndef vtkBYUReader_h
38 #define vtkBYUReader_h
39 
40 #include "vtkIOGeometryModule.h" // For export macro
41 #include "vtkPolyDataAlgorithm.h"
42 
43 class VTKIOGEOMETRY_EXPORT vtkBYUReader : public vtkPolyDataAlgorithm
44 {
45 public:
46  static vtkBYUReader* New();
47 
49  void PrintSelf(ostream& os, vtkIndent indent) override;
50 
52 
55  vtkSetFilePathMacro(GeometryFileName);
56  vtkGetFilePathMacro(GeometryFileName);
58 
62  virtual void SetFileName(VTK_FILEPATH const char* f) { this->SetGeometryFileName(f); }
63  virtual VTK_FILEPATH VTK_FUTURE_CONST char* GetFileName() VTK_FUTURE_CONST
64  {
65  return this->GetGeometryFileName();
66  }
67 
69 
72  vtkSetFilePathMacro(DisplacementFileName);
73  vtkGetFilePathMacro(DisplacementFileName);
75 
77 
80  vtkSetFilePathMacro(ScalarFileName);
81  vtkGetFilePathMacro(ScalarFileName);
83 
85 
88  vtkSetFilePathMacro(TextureFileName);
89  vtkGetFilePathMacro(TextureFileName);
91 
93 
96  vtkSetMacro(ReadDisplacement, vtkTypeBool);
97  vtkGetMacro(ReadDisplacement, vtkTypeBool);
98  vtkBooleanMacro(ReadDisplacement, vtkTypeBool);
100 
102 
105  vtkSetMacro(ReadScalar, vtkTypeBool);
106  vtkGetMacro(ReadScalar, vtkTypeBool);
107  vtkBooleanMacro(ReadScalar, vtkTypeBool);
109 
111 
115  vtkSetMacro(ReadTexture, vtkTypeBool);
116  vtkGetMacro(ReadTexture, vtkTypeBool);
117  vtkBooleanMacro(ReadTexture, vtkTypeBool);
119 
121 
124  vtkSetClampMacro(PartNumber, int, 1, VTK_INT_MAX);
125  vtkGetMacro(PartNumber, int);
127 
134  static int CanReadFile(VTK_FILEPATH const char* filename);
135 
136 protected:
138  ~vtkBYUReader() override;
139 
141  // This source does not know how to generate pieces yet.
142  int ComputeDivisionExtents(vtkDataObject* output, int idx, int numDivisions);
143 
152 
153  void ReadGeometryFile(FILE* fp, int& numPts, vtkInformation* outInfo);
154  void ReadDisplacementFile(int numPts, vtkInformation* outInfo);
155  void ReadScalarFile(int numPts, vtkInformation* outInfo);
156  void ReadTextureFile(int numPts, vtkInformation* outInfo);
157 
158 private:
159  vtkBYUReader(const vtkBYUReader&) = delete;
160  void operator=(const vtkBYUReader&) = delete;
161 };
162 
163 #endif
read MOVIE.BYU polygon files
Definition: vtkBYUReader.h:44
vtkGetFilePathMacro(TextureFileName)
Specify name of texture coordinates FileName.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
int ComputeDivisionExtents(vtkDataObject *output, int idx, int numDivisions)
vtkSetFilePathMacro(ScalarFileName)
Specify name of scalar FileName.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void ReadTextureFile(int numPts, vtkInformation *outInfo)
char * GeometryFileName
Definition: vtkBYUReader.h:144
vtkSetFilePathMacro(TextureFileName)
Specify name of texture coordinates FileName.
~vtkBYUReader() override
vtkGetFilePathMacro(DisplacementFileName)
Specify name of displacement FileName.
static vtkBYUReader * New()
void ReadDisplacementFile(int numPts, vtkInformation *outInfo)
vtkSetFilePathMacro(GeometryFileName)
Specify name of geometry FileName.
void ReadGeometryFile(FILE *fp, int &numPts, vtkInformation *outInfo)
char * TextureFileName
Definition: vtkBYUReader.h:147
char * ScalarFileName
Definition: vtkBYUReader.h:146
vtkGetFilePathMacro(ScalarFileName)
Specify name of scalar FileName.
char * DisplacementFileName
Definition: vtkBYUReader.h:145
virtual VTK_FILEPATH VTK_FUTURE_CONST char * GetFileName() VTK_FUTURE_CONST
Definition: vtkBYUReader.h:63
vtkTypeBool ReadTexture
Definition: vtkBYUReader.h:150
vtkSetFilePathMacro(DisplacementFileName)
Specify name of displacement FileName.
void ReadScalarFile(int numPts, vtkInformation *outInfo)
vtkGetFilePathMacro(GeometryFileName)
Specify name of geometry FileName.
vtkTypeBool ReadDisplacement
Definition: vtkBYUReader.h:148
virtual void SetFileName(VTK_FILEPATH const char *f)
Specify name of geometry FileName (alias).
Definition: vtkBYUReader.h:62
vtkTypeBool ReadScalar
Definition: vtkBYUReader.h:149
static int CanReadFile(VTK_FILEPATH const char *filename)
Returns 1 if this file can be read and 0 if the file cannot be read.
general representation of visualization data
Definition: vtkDataObject.h:75
a simple class to control print indentation
Definition: vtkIndent.h:49
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only polydata as output.
int vtkTypeBool
Definition: vtkABI.h:69
#define VTK_INT_MAX
Definition: vtkType.h:155
#define VTK_FILEPATH