vtkVRMLSource.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
11 #ifndef vtkVRMLSource_h
12 #define vtkVRMLSource_h
13 
15 #include "vtkPVVTKExtensionsIOGeneralModule.h" //needed for exports
16 
18 class vtkVRMLImporter;
19 
21 {
22 public:
24  void PrintSelf(ostream& os, vtkIndent indent) override;
25  static vtkVRMLSource* New();
26 
28 
31  vtkSetStringMacro(FileName);
32  vtkGetStringMacro(FileName);
34 
36 
40  vtkSetMacro(Color, vtkTypeBool);
41  vtkGetMacro(Color, vtkTypeBool);
42  vtkBooleanMacro(Color, vtkTypeBool);
44 
46 
50  vtkSetMacro(Append, vtkTypeBool);
51  vtkGetMacro(Append, vtkTypeBool);
52  vtkBooleanMacro(Append, vtkTypeBool);
54 
55  static int CanReadFile(const char* filename);
56 
57 protected:
58  vtkVRMLSource();
59  ~vtkVRMLSource() override;
60 
62 
63  // Forwards the file name to the vtkVRMLImporter and calls Update() on it.
64  void InitializeImporter();
65 
66  // Copies the output of the vtkVRMLImporter to the output of this source. This is
67  // where the bulk of the work is done in this class.
68  void CopyImporterToOutputs(vtkMultiBlockDataSet*);
69 
70 private:
71  vtkVRMLSource(const vtkVRMLSource&) = delete;
72  void operator=(const vtkVRMLSource&) = delete;
73 
74  char* FileName = nullptr;
75  vtkTypeBool Color = 1;
76  vtkTypeBool Append = 1;
77 
78  vtkNew<vtkVRMLImporter> Importer;
79 };
80 
81 #endif
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
static vtkMultiBlockDataSetAlgorithm * New()
int vtkTypeBool
Color
#define VTKPVVTKEXTENSIONSIOGENERAL_EXPORT
Wrapper around the vtkVRMLImporter that makes it availalable as a data source.
Definition: vtkVRMLSource.h:20
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
void operator=(const vtkObjectBase &)