VTK
vtkVRMLExporter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkVRMLExporter.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 vtkVRMLExporter_h
30 #define vtkVRMLExporter_h
31 
32 #include "vtkIOExportModule.h" // For export macro
33 #include "vtkExporter.h"
34 
35 class vtkLight;
36 class vtkActor;
37 class vtkPoints;
38 class vtkDataArray;
40 class vtkPolyData;
41 class vtkPointData;
42 
44 {
45 public:
46  static vtkVRMLExporter *New();
48  void PrintSelf(ostream& os, vtkIndent indent);
49 
51 
52  vtkSetStringMacro(FileName);
53  vtkGetStringMacro(FileName);
55 
57 
58  vtkSetMacro(Speed,double);
59  vtkGetMacro(Speed,double);
61 
64  void SetFilePointer(FILE *);
65 
66 protected:
68  ~vtkVRMLExporter();
69 
70  void WriteData();
71  void WriteALight(vtkLight *aLight, FILE *fp);
72  void WriteAnActor(vtkActor *anActor, FILE *fp);
73  void WritePointData(vtkPoints *points, vtkDataArray *normals,
74  vtkDataArray *tcoords, vtkUnsignedCharArray *colors,
75  FILE *fp);
76  void WriteShapeBegin(vtkActor* actor, FILE *fileP,
77  vtkPolyData *polyData,vtkPointData *pntData,
79  void WriteShapeEnd( FILE *fileP );
80  char *FileName;
81  FILE *FilePointer;
82  double Speed;
83 private:
84  vtkVRMLExporter(const vtkVRMLExporter&); // Not implemented.
85  void operator=(const vtkVRMLExporter&); // Not implemented.
86 };
87 
88 #endif
89 
abstract class to write a scene to a file
Definition: vtkExporter.h:45
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:50
represent and manipulate point attribute data
Definition: vtkPointData.h:36
virtual void WriteData()=0
#define VTKIOEXPORT_EXPORT
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:83
a simple class to control print indentation
Definition: vtkIndent.h:38
a virtual light for 3D rendering
Definition: vtkLight.h:60
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
dynamic, self-adjusting array of unsigned char
void PrintSelf(ostream &os, vtkIndent indent)
static vtkObject * New()
export a scene into VRML 2.0 format.
represent and manipulate 3D points
Definition: vtkPoints.h:38