VTK  9.4.20250206
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
38#ifndef vtkOBJExporter_h
39#define vtkOBJExporter_h
40
41#include "vtkExporter.h"
42#include "vtkIOExportModule.h" // For export macro
43#include <fstream> // For ofstream
44#include <map> // For map
45#include <vector> // For string
46
47VTK_ABI_NAMESPACE_BEGIN
48class vtkActor;
49class vtkTexture;
50
51class VTKIOEXPORT_EXPORT vtkOBJExporter : public vtkExporter
52{
53public:
56 void PrintSelf(ostream& os, vtkIndent indent) override;
57
59
66
68
71 vtkSetStringMacro(OBJFileComment);
72 vtkGetStringMacro(OBJFileComment);
74
76
79 vtkSetStringMacro(MTLFileComment);
80 vtkGetStringMacro(MTLFileComment);
82
83protected:
85 ~vtkOBJExporter() override;
86
87 void WriteData() override;
89 vtkActor* anActor, std::ostream& fpObj, std::ostream& fpMat, std::string& modelName, int& id);
94 std::map<std::string, vtkTexture*> TextureFileMap;
95
96private:
97 vtkOBJExporter(const vtkOBJExporter&) = delete;
98 void operator=(const vtkOBJExporter&) = delete;
99};
100
101VTK_ABI_NAMESPACE_END
102#endif
represents an object (geometry & properties) in a rendered scene
Definition vtkActor.h:151
abstract class to write a scene to a file
Definition vtkExporter.h:37
a simple class to control print indentation
Definition vtkIndent.h:108
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:168