VTK  9.3.0
vtkVRMLExporter.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
27 #ifndef vtkVRMLExporter_h
28 #define vtkVRMLExporter_h
29 
30 #include "vtkExporter.h"
31 #include "vtkIOExportModule.h" // For export macro
32 
33 VTK_ABI_NAMESPACE_BEGIN
34 class vtkLight;
35 class vtkActor;
36 class vtkPoints;
37 class vtkDataArray;
39 class vtkPolyData;
40 class vtkPointData;
41 
42 class VTKIOEXPORT_EXPORT vtkVRMLExporter : public vtkExporter
43 {
44 public:
45  static vtkVRMLExporter* New();
46  vtkTypeMacro(vtkVRMLExporter, vtkExporter);
47  void PrintSelf(ostream& os, vtkIndent indent) override;
48 
50 
56 
58 
61  vtkSetMacro(Speed, double);
62  vtkGetMacro(Speed, double);
64 
69  void SetFilePointer(FILE*);
70 
71 protected:
73  ~vtkVRMLExporter() override;
74 
75  void WriteData() override;
76  void WriteALight(vtkLight* aLight, FILE* fp);
77  void WriteAnActor(vtkActor* anActor, FILE* fp);
79  vtkUnsignedCharArray* colors, FILE* fp);
80  void WriteShapeBegin(vtkActor* actor, FILE* fileP, vtkPolyData* polyData, vtkPointData* pntData,
82  void WriteShapeEnd(FILE* fileP);
83  char* FileName;
84  FILE* FilePointer;
85  double Speed;
86 
87 private:
88  vtkVRMLExporter(const vtkVRMLExporter&) = delete;
89  void operator=(const vtkVRMLExporter&) = delete;
90 };
91 
92 VTK_ABI_NAMESPACE_END
93 #endif
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:50
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
abstract class to write a scene to a file
Definition: vtkExporter.h:37
a simple class to control print indentation
Definition: vtkIndent.h:38
a virtual light for 3D rendering
Definition: vtkLight.h:58
represent and manipulate point attribute data
Definition: vtkPointData.h:39
represent and manipulate 3D points
Definition: vtkPoints.h:38
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:89
dynamic, self-adjusting array of unsigned char
export a scene into VRML 2.0 format.
vtkGetFilePathMacro(FileName)
Specify the name of the VRML file to write.
void WriteAnActor(vtkActor *anActor, FILE *fp)
void WriteShapeBegin(vtkActor *actor, FILE *fileP, vtkPolyData *polyData, vtkPointData *pntData, vtkUnsignedCharArray *color)
void SetFilePointer(FILE *)
Set the file pointer to write to.
void WritePointData(vtkPoints *points, vtkDataArray *normals, vtkDataArray *tcoords, vtkUnsignedCharArray *colors, FILE *fp)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
~vtkVRMLExporter() override
void WriteALight(vtkLight *aLight, FILE *fp)
static vtkVRMLExporter * New()
vtkSetFilePathMacro(FileName)
Specify the name of the VRML file to write.
void WriteShapeEnd(FILE *fileP)
void WriteData() override
@ points
Definition: vtkX3D.h:446
@ color
Definition: vtkX3D.h:221