VTK  9.3.1
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
18 #ifndef vtkVRMLExporter_h
19 #define vtkVRMLExporter_h
20 
21 #include "vtkExporter.h"
22 #include "vtkIOExportModule.h" // For export macro
23 
24 VTK_ABI_NAMESPACE_BEGIN
25 class vtkLight;
26 class vtkActor;
27 class vtkPoints;
28 class vtkDataArray;
30 class vtkPolyData;
31 class vtkPointData;
32 
33 class VTKIOEXPORT_EXPORT vtkVRMLExporter : public vtkExporter
34 {
35 public:
36  static vtkVRMLExporter* New();
37  vtkTypeMacro(vtkVRMLExporter, vtkExporter);
38  void PrintSelf(ostream& os, vtkIndent indent) override;
39 
41 
44  vtkSetFilePathMacro(FileName);
45  vtkGetFilePathMacro(FileName);
47 
49 
52  vtkSetMacro(Speed, double);
53  vtkGetMacro(Speed, double);
55 
60  void SetFilePointer(FILE*);
61 
62 protected:
64  ~vtkVRMLExporter() override;
65 
66  void WriteData() override;
67  void WriteALight(vtkLight* aLight, FILE* fp);
68  void WriteAnActor(vtkActor* anActor, FILE* fp);
69  void WritePointData(vtkPoints* points, vtkDataArray* normals, vtkDataArray* tcoords,
70  vtkUnsignedCharArray* colors, FILE* fp);
71  void WriteShapeBegin(vtkActor* actor, FILE* fileP, vtkPolyData* polyData, vtkPointData* pntData,
73  void WriteShapeEnd(FILE* fileP);
74  char* FileName;
75  FILE* FilePointer;
76  double Speed;
77 
78 private:
79  vtkVRMLExporter(const vtkVRMLExporter&) = delete;
80  void operator=(const vtkVRMLExporter&) = delete;
81 };
82 
83 VTK_ABI_NAMESPACE_END
84 #endif
abstract class to write a scene to a file
Definition: vtkExporter.h:36
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:40
represent and manipulate point attribute data
Definition: vtkPointData.h:29
virtual void WriteData()=0
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:79
a simple class to control print indentation
Definition: vtkIndent.h:28
a virtual light for 3D rendering
Definition: vtkLight.h:48
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:44
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:28