VTK  9.3.0
vtkOBJExporter.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
28#ifndef vtkOBJExporter_h
29#define vtkOBJExporter_h
30
31#include "vtkExporter.h"
32#include "vtkIOExportModule.h" // For export macro
33#include <fstream> // For ofstream
34#include <map> // For map
35#include <vector> // For string
36
37VTK_ABI_NAMESPACE_BEGIN
38class vtkActor;
39class vtkTexture;
40
41class VTKIOEXPORT_EXPORT vtkOBJExporter : public vtkExporter
42{
43public:
46 void PrintSelf(ostream& os, vtkIndent indent) override;
47
49
56
58
61 vtkSetStringMacro(OBJFileComment);
62 vtkGetStringMacro(OBJFileComment);
64
66
69 vtkSetStringMacro(MTLFileComment);
70 vtkGetStringMacro(MTLFileComment);
72
73protected:
75 ~vtkOBJExporter() override;
76
77 void WriteData() override;
79 vtkActor* anActor, std::ostream& fpObj, std::ostream& fpMat, std::string& modelName, int& id);
84 std::map<std::string, vtkTexture*> TextureFileMap;
85
86private:
87 vtkOBJExporter(const vtkOBJExporter&) = delete;
88 void operator=(const vtkOBJExporter&) = delete;
89};
90
91VTK_ABI_NAMESPACE_END
92#endif
represents an object (geometry & properties) in a rendered scene
Definition vtkActor.h:50
abstract class to write a scene to a file
Definition vtkExporter.h:37
a simple class to control print indentation
Definition vtkIndent.h:38
export a scene into Wavefront format.
void WriteAnActor(vtkActor *anActor, std::ostream &fpObj, std::ostream &fpMat, std::string &modelName, int &id)
vtkSetFilePathMacro(FilePrefix)
Specify the prefix of the files to write out.
void WriteData() override
~vtkOBJExporter() override
static vtkOBJExporter * New()
vtkGetFilePathMacro(FilePrefix)
Specify the prefix of the files to write out.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
std::map< std::string, vtkTexture * > TextureFileMap
handles properties associated with a texture map
Definition vtkTexture.h:67