1 /*=========================================================================
3 Program: Visualization Toolkit
4 Module: $RCSfile: vtkBYUReader.h,v $
6 Date: $Date: 2002/10/04 16:53:59 $
7 Version: $Revision: 1.44 $
9 Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen
11 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
13 This software is distributed WITHOUT ANY WARRANTY; without even
14 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 PURPOSE. See the above copyright notice for more information.
17 =========================================================================*/
18 // .NAME vtkBYUReader - read MOVIE.BYU polygon files
19 // .SECTION Description
20 // vtkBYUReader is a source object that reads MOVIE.BYU polygon files.
21 // These files consist of a geometry file (.g), a scalar file (.s), a
22 // displacement or vector file (.d), and a 2D texture coordinate file
25 #ifndef __vtkBYUReader_h
26 #define __vtkBYUReader_h
28 #include "vtkPolyDataSource.h"
30 class VTK_IO_EXPORT vtkBYUReader : public vtkPolyDataSource
33 static vtkBYUReader *New();
35 vtkTypeRevisionMacro(vtkBYUReader,vtkPolyDataSource);
36 void PrintSelf(ostream& os, vtkIndent indent);
39 // Specify name of geometry FileName.
40 vtkSetStringMacro(GeometryFileName);
41 vtkGetStringMacro(GeometryFileName);
44 // Specify name of geometry FileName (alias).
45 virtual void SetFileName(const char* f) { this->SetGeometryFileName(f); }
46 virtual char* GetFileName() { return this->GetGeometryFileName(); }
49 // Specify name of displacement FileName.
50 vtkSetStringMacro(DisplacementFileName);
51 vtkGetStringMacro(DisplacementFileName);
54 // Specify name of scalar FileName.
55 vtkSetStringMacro(ScalarFileName);
56 vtkGetStringMacro(ScalarFileName);
59 // Specify name of texture coordinates FileName.
60 vtkSetStringMacro(TextureFileName);
61 vtkGetStringMacro(TextureFileName);
64 // Turn on/off the reading of the displacement file.
65 vtkSetMacro(ReadDisplacement,int);
66 vtkGetMacro(ReadDisplacement,int);
67 vtkBooleanMacro(ReadDisplacement,int);
70 // Turn on/off the reading of the scalar file.
71 vtkSetMacro(ReadScalar,int);
72 vtkGetMacro(ReadScalar,int);
73 vtkBooleanMacro(ReadScalar,int);
76 // Turn on/off the reading of the texture coordinate file.
77 // Specify name of geometry FileName.
78 vtkSetMacro(ReadTexture,int);
79 vtkGetMacro(ReadTexture,int);
80 vtkBooleanMacro(ReadTexture,int);
83 // Set/Get the part number to be read.
84 vtkSetClampMacro(PartNumber,int,1,VTK_LARGE_INTEGER);
85 vtkGetMacro(PartNumber,int);
92 // This source does not know how to generate pieces yet.
93 int ComputeDivisionExtents(vtkDataObject *output,
94 int idx, int numDivisions);
96 char *GeometryFileName;
97 char *DisplacementFileName;
99 char *TextureFileName;
100 int ReadDisplacement;
105 void ReadGeometryFile(FILE *fp, int &numPts);
106 void ReadDisplacementFile(int numPts);
107 void ReadScalarFile(int numPts);
108 void ReadTextureFile(int numPts);
110 vtkBYUReader(const vtkBYUReader&); // Not implemented.
111 void operator=(const vtkBYUReader&); // Not implemented.