OSDN Git Service

FIRST REPOSITORY
[eos/hostdependOTHERS.git] / I386LINUX / util / I386LINUX / include / vtk / vtkVRMLExporter.h
1 /*=========================================================================
2
3   Program:   Visualization Toolkit
4   Module:    $RCSfile: vtkVRMLExporter.h,v $
5   Language:  C++
6   Date:      $Date: 2002/05/27 14:48:16 $
7   Version:   $Revision: 1.34 $
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 vtkVRMLExporter - export a scene into VRML 2.0 format.
19 // .SECTION Description
20 // vtkVRMLExporter is a concrete subclass of vtkExporter that writes VRML 2.0
21 // files. This is based on the VRML 2.0 draft #3 but it should be pretty
22 // stable since we aren't using any of the newer features.
23 //
24 // .SECTION See Also
25 // vtkExporter
26
27
28 #ifndef __vtkVRMLExporter_h
29 #define __vtkVRMLExporter_h
30
31 #include "vtkExporter.h"
32
33 class vtkLight;
34 class vtkActor;
35 class vtkPoints;
36 class vtkDataArray;
37 class vtkUnsignedCharArray;
38
39 class VTK_RENDERING_EXPORT vtkVRMLExporter : public vtkExporter
40 {
41 public:
42   static vtkVRMLExporter *New();
43   vtkTypeRevisionMacro(vtkVRMLExporter,vtkExporter);
44   void PrintSelf(ostream& os, vtkIndent indent);
45
46   // Description:
47   // Specify the name of the VRML file to write.
48   vtkSetStringMacro(FileName);
49   vtkGetStringMacro(FileName);
50
51   // Description:
52   // Specify the Speed of navigation. Default is 4.
53   vtkSetMacro(Speed,float);
54   vtkGetMacro(Speed,float);
55
56   // Description:
57   // Set the file pointer to write to. This will override
58   // a FileName if specified.
59   void SetFilePointer(FILE *);
60   
61 protected:
62   vtkVRMLExporter();
63   ~vtkVRMLExporter();
64
65   void WriteData();
66   void WriteALight(vtkLight *aLight, FILE *fp);
67   void WriteAnActor(vtkActor *anActor, FILE *fp);
68   void WritePointData(vtkPoints *points, vtkDataArray *normals, 
69                       vtkDataArray *tcoords, vtkUnsignedCharArray *colors, 
70                       FILE *fp);
71   char *FileName;
72   FILE *FilePointer;
73   float Speed;
74 private:
75   vtkVRMLExporter(const vtkVRMLExporter&);  // Not implemented.
76   void operator=(const vtkVRMLExporter&);  // Not implemented.
77 };
78
79 #endif
80