VTK  9.2.6
vtkOBJImporter.h
Go to the documentation of this file.
1 /*=========================================================================
2  Program: Visualization Toolkit
3  Module: vtkOBJImporter.h
4  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
5  All rights reserved.
6  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
7 
8  This software is distributed WITHOUT ANY WARRANTY; without even
9  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
10  PURPOSE. See the above copyright notice for more information.
11 =========================================================================*/
29 #ifndef vtkOBJImporter_h
30 #define vtkOBJImporter_h
31 
32 #include "vtkIOImportModule.h" // For export macro
33 #include "vtkImporter.h"
34 #include "vtkSmartPointer.h" // for ivars
35 #include <string> // for string
36 
37 class vtkRenderWindow;
38 class vtkRenderer;
39 class vtkPolydata;
41 
65 class VTKIOIMPORT_EXPORT vtkOBJImporter : public vtkImporter
66 {
67 public:
68  static vtkOBJImporter* New();
69 
70  vtkTypeMacro(vtkOBJImporter, vtkImporter);
71  void PrintSelf(ostream& os, vtkIndent indent) override;
72 
74 
77  void SetFileName(VTK_FILEPATH const char* arg);
78  void SetFileNameMTL(VTK_FILEPATH const char* arg);
79  void SetTexturePath(VTK_FILEPATH const char* path);
80  VTK_FILEPATH const char* GetFileName() const;
81  VTK_FILEPATH const char* GetFileNameMTL() const;
82  VTK_FILEPATH const char* GetTexturePath() const;
84 
89 
93  std::string GetOutputDescription(int idx);
94 
95 protected:
97  ~vtkOBJImporter() override;
98 
99  int ImportBegin() override /*override*/;
100  void ImportEnd() override /*override*/;
101  void ReadData() override /* override */;
102 
104 
105 private:
106  vtkOBJImporter(const vtkOBJImporter&) = delete;
107  void operator=(const vtkOBJImporter&) = delete;
108 };
109 
110 #endif
std::string GetFileName(const std::string &fileName) noexcept
Set the appropriate file name based on recognized user input.
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:72
Hold a reference to a vtkObjectBase instance.
Definition: vtkMeta.h:32
importer abstract class
Definition: vtkImporter.h:59
virtual int ImportBegin()
Definition: vtkImporter.h:158
a simple class to control print indentation
Definition: vtkIndent.h:39
virtual std::string GetOutputsDescription()
Recover a printable string that let importer implementation Describe their outputs.
Definition: vtkImporter.h:98
#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