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
19#ifndef vtkOBJExporter_h
20#define vtkOBJExporter_h
21
22#include "vtkExporter.h"
23#include "vtkIOExportModule.h" // For export macro
24#include <fstream> // For ofstream
25#include <map> // For map
26#include <vector> // For string
27
28VTK_ABI_NAMESPACE_BEGIN
29class vtkActor;
30class vtkTexture;
31
32class VTKIOEXPORT_EXPORT vtkOBJExporter : public vtkExporter
33{
34public:
37 void PrintSelf(ostream& os, vtkIndent indent) override;
38
40
47
49
52 vtkSetStringMacro(OBJFileComment);
53 vtkGetStringMacro(OBJFileComment);
55
57
60 vtkSetStringMacro(MTLFileComment);
61 vtkGetStringMacro(MTLFileComment);
63
64protected:
66 ~vtkOBJExporter() override;
67
68 void WriteData() override;
70 vtkActor* anActor, std::ostream& fpObj, std::ostream& fpMat, std::string& modelName, int& id);
75 std::map<std::string, vtkTexture*> TextureFileMap;
76
77private:
78 vtkOBJExporter(const vtkOBJExporter&) = delete;
79 void operator=(const vtkOBJExporter&) = delete;
80};
81
82VTK_ABI_NAMESPACE_END
83#endif
represents an object (geometry & properties) in a rendered scene
Definition vtkActor.h:41
abstract class to write a scene to a file
Definition vtkExporter.h:37
a simple class to control print indentation
Definition vtkIndent.h:29
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:58