VTK  9.7.1
vtkOBJImporter.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
24 #ifndef vtkOBJImporter_h
25 #define vtkOBJImporter_h
26 
27 #include "vtkIOImportModule.h" // For export macro
28 #include "vtkImporter.h"
29 #include "vtkSmartPointer.h" // for ivars
30 #include <string> // for string
31 
32 VTK_ABI_NAMESPACE_BEGIN
33 class vtkRenderWindow;
34 class vtkRenderer;
35 class vtkPolydata;
37 
61 class VTKIOIMPORT_EXPORT vtkOBJImporter : public vtkImporter
62 {
63 public:
64  static vtkOBJImporter* New();
65 
66  vtkTypeMacro(vtkOBJImporter, vtkImporter);
67  void PrintSelf(ostream& os, vtkIndent indent) override;
68 
70 
78  void SetMTLStream(vtkResourceStream* stream);
79  void SetFileNameMTL(VTK_FILEPATH const char* arg);
80  VTK_FILEPATH const char* GetFileNameMTL() const;
82 
84 
91  void SetTextureStreams(std::map<std::string, vtkResourceStream*> streamMap);
92  void SetTexturePath(VTK_FILEPATH const char* path);
93  VTK_FILEPATH const char* GetTexturePath() const;
95 
97 
114  static bool CanReadFile(const std::string& filename);
115  static bool CanReadFile(vtkResourceStream* stream);
117 
122 
126  std::string GetOutputDescription(int idx);
127 
128 protected:
129  vtkOBJImporter();
130  ~vtkOBJImporter() override;
131 
132  int ImportBegin() override /*override*/;
133  void ImportEnd() override /*override*/;
134  void ReadData() override /* override */;
135 
136 private:
137  vtkOBJImporter(const vtkOBJImporter&) = delete;
138  void operator=(const vtkOBJImporter&) = delete;
139 
141 };
142 
143 VTK_ABI_NAMESPACE_END
144 #endif
Abstract class used for custom streams.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
abstract specification for renderers
Definition: vtkRenderer.h:63
Hold a reference to a vtkObjectBase instance.
Definition: vtkMeta.h:23
importer abstract class
Definition: vtkImporter.h:60
virtual int ImportBegin()
Definition: vtkImporter.h:279
a simple class to control print indentation
Definition: vtkIndent.h:28
virtual std::string GetOutputsDescription()
Recover a printable string that let importer implementation Describe their outputs.
Definition: vtkImporter.h:136
#define VTK_FILEPATH
create a window for renderers to draw into
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
import from .obj wavefront files