VTK  9.2.6
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 =========================================================================*/
30 #ifndef vtkVRMLExporter_h
31 #define vtkVRMLExporter_h
32 
33 #include "vtkExporter.h"
34 #include "vtkIOExportModule.h" // For export macro
35 
36 class vtkLight;
37 class vtkActor;
38 class vtkPoints;
39 class vtkDataArray;
41 class vtkPolyData;
42 class vtkPointData;
43 
44 class VTKIOEXPORT_EXPORT vtkVRMLExporter : public vtkExporter
45 {
46 public:
47  static vtkVRMLExporter* New();
48  vtkTypeMacro(vtkVRMLExporter, vtkExporter);
49  void PrintSelf(ostream& os, vtkIndent indent) override;
50 
52 
55  vtkSetFilePathMacro(FileName);
56  vtkGetFilePathMacro(FileName);
58 
60 
63  vtkSetMacro(Speed, double);
64  vtkGetMacro(Speed, double);
66 
71  void SetFilePointer(FILE*);
72 
73 protected:
75  ~vtkVRMLExporter() override;
76 
77  void WriteData() override;
78  void WriteALight(vtkLight* aLight, FILE* fp);
79  void WriteAnActor(vtkActor* anActor, FILE* fp);
80  void WritePointData(vtkPoints* points, vtkDataArray* normals, vtkDataArray* tcoords,
81  vtkUnsignedCharArray* colors, FILE* fp);
82  void WriteShapeBegin(vtkActor* actor, FILE* fileP, vtkPolyData* polyData, vtkPointData* pntData,
84  void WriteShapeEnd(FILE* fileP);
85  char* FileName;
86  FILE* FilePointer;
87  double Speed;
88 
89 private:
90  vtkVRMLExporter(const vtkVRMLExporter&) = delete;
91  void operator=(const vtkVRMLExporter&) = delete;
92 };
93 
94 #endif
abstract class to write a scene to a file
Definition: vtkExporter.h:47
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:51
represent and manipulate point attribute data
Definition: vtkPointData.h:41
virtual void WriteData()=0
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:90
a simple class to control print indentation
Definition: vtkIndent.h:39
a virtual light for 3D rendering
Definition: vtkLight.h:59
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
dynamic, self-adjusting array of unsigned char
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
export a scene into VRML 2.0 format.
represent and manipulate 3D points
Definition: vtkPoints.h:39