VTK  9.6.20260204
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
62
63#ifndef vtkOBJImporter_h
64#define vtkOBJImporter_h
65
66#include "vtkIOImportModule.h" // For export macro
67#include "vtkImporter.h"
68#include "vtkSmartPointer.h" // for ivars
69#include <string> // for string
70
71VTK_ABI_NAMESPACE_BEGIN
72class vtkRenderWindow;
73class vtkRenderer;
74class vtkPolydata;
76
100class VTKIOIMPORT_EXPORT vtkOBJImporter : public vtkImporter
101{
102public:
104
106 void PrintSelf(ostream& os, vtkIndent indent) override;
107
109
118 void SetFileNameMTL(VTK_FILEPATH const char* arg);
119 VTK_FILEPATH const char* GetFileNameMTL() const;
121
123
130 void SetTextureStreams(std::map<std::string, vtkResourceStream*> streamMap);
131 void SetTexturePath(VTK_FILEPATH const char* path);
132 VTK_FILEPATH const char* GetTexturePath() const;
134
136
153 static bool CanReadFile(const std::string& filename);
154 static bool CanReadFile(vtkResourceStream* stream);
156
160 std::string GetOutputsDescription() override;
161
165 std::string GetOutputDescription(int idx);
166
167protected:
169 ~vtkOBJImporter() override;
170
171 int ImportBegin() override /*override*/;
172 void ImportEnd() override /*override*/;
173 void ReadData() override /* override */;
174
175private:
176 vtkOBJImporter(const vtkOBJImporter&) = delete;
177 void operator=(const vtkOBJImporter&) = delete;
178
180};
181
182VTK_ABI_NAMESPACE_END
183#endif
a simple class to control print indentation
Definition vtkIndent.h:108
void ReadData() override
std::string GetOutputDescription(int idx)
Get a string describing an output.
std::string GetOutputsDescription() override
Get a printable string describing all outputs.
const char * GetFileNameMTL() const
Specify the name of the file or the stream to read as MTL file.
void SetTexturePath(const char *path)
Set TexturePath or TextureStreams.
void ImportEnd() override
const char * GetTexturePath() const
Set TexturePath or TextureStreams.
static bool CanReadFile(const std::string &filename)
Return true if, after a quick check of file header, it looks like the provided stream can be read.
void SetFileNameMTL(const char *arg)
Specify the name of the file or the stream to read as MTL file.
int ImportBegin() override
static bool CanReadFile(vtkResourceStream *stream)
Return true if, after a quick check of file header, it looks like the provided stream can be read.
~vtkOBJImporter() override
void SetMTLStream(vtkResourceStream *stream)
Specify the name of the file or the stream to read as MTL file.
static vtkOBJImporter * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetTextureStreams(std::map< std::string, vtkResourceStream * > streamMap)
Set TexturePath or TextureStreams.
create a window for renderers to draw into
abstract specification for renderers
Abstract class used for custom streams.
Hold a reference to a vtkObjectBase instance.
#define VTK_FILEPATH