OSDN Git Service

FIRST REPOSITORY
[eos/hostdependOTHERS.git] / I386LINUX / util / I386LINUX / include / vtk / vtkBYUReader.h
1 /*=========================================================================
2
3   Program:   Visualization Toolkit
4   Module:    $RCSfile: vtkBYUReader.h,v $
5   Language:  C++
6   Date:      $Date: 2002/10/04 16:53:59 $
7   Version:   $Revision: 1.44 $
8
9   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
10   All rights reserved.
11   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
12
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.
16
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
23 // (.t).
24
25 #ifndef __vtkBYUReader_h
26 #define __vtkBYUReader_h
27
28 #include "vtkPolyDataSource.h"
29
30 class VTK_IO_EXPORT vtkBYUReader : public vtkPolyDataSource 
31 {
32 public:
33   static vtkBYUReader *New();
34
35   vtkTypeRevisionMacro(vtkBYUReader,vtkPolyDataSource);
36   void PrintSelf(ostream& os, vtkIndent indent);
37
38   // Description:
39   // Specify name of geometry FileName.
40   vtkSetStringMacro(GeometryFileName);
41   vtkGetStringMacro(GeometryFileName);
42
43   // Description:
44   // Specify name of geometry FileName (alias).
45   virtual void SetFileName(const char* f) { this->SetGeometryFileName(f); }
46   virtual char* GetFileName() { return this->GetGeometryFileName(); }
47
48   // Description:
49   // Specify name of displacement FileName.
50   vtkSetStringMacro(DisplacementFileName);
51   vtkGetStringMacro(DisplacementFileName);
52
53   // Description:
54   // Specify name of scalar FileName.
55   vtkSetStringMacro(ScalarFileName);
56   vtkGetStringMacro(ScalarFileName);
57
58   // Description:
59   // Specify name of texture coordinates FileName.
60   vtkSetStringMacro(TextureFileName);
61   vtkGetStringMacro(TextureFileName);
62
63   // Description:
64   // Turn on/off the reading of the displacement file.
65   vtkSetMacro(ReadDisplacement,int);
66   vtkGetMacro(ReadDisplacement,int);
67   vtkBooleanMacro(ReadDisplacement,int);
68   
69   // Description:
70   // Turn on/off the reading of the scalar file.
71   vtkSetMacro(ReadScalar,int);
72   vtkGetMacro(ReadScalar,int);
73   vtkBooleanMacro(ReadScalar,int);
74   
75   // Description:
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);
81
82   // Description:
83   // Set/Get the part number to be read.
84   vtkSetClampMacro(PartNumber,int,1,VTK_LARGE_INTEGER);
85   vtkGetMacro(PartNumber,int);
86
87 protected:
88   vtkBYUReader();
89   ~vtkBYUReader();
90
91   void Execute();
92   // This source does not know how to generate pieces yet.
93   int ComputeDivisionExtents(vtkDataObject *output, 
94                              int idx, int numDivisions);
95
96   char *GeometryFileName;
97   char *DisplacementFileName;
98   char *ScalarFileName;
99   char *TextureFileName;
100   int ReadDisplacement;
101   int ReadScalar;
102   int ReadTexture;
103   int PartNumber;
104
105   void ReadGeometryFile(FILE *fp, int &numPts);
106   void ReadDisplacementFile(int numPts);
107   void ReadScalarFile(int numPts);
108   void ReadTextureFile(int numPts);
109 private:
110   vtkBYUReader(const vtkBYUReader&);  // Not implemented.
111   void operator=(const vtkBYUReader&);  // Not implemented.
112 };
113
114 #endif
115
116