VTK
9.5.20251216
IO
Export
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
37
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
47
VTK_ABI_NAMESPACE_BEGIN
48
class
vtkActor
;
49
class
vtkTexture
;
50
51
class
VTKIOEXPORT_EXPORT
vtkOBJExporter
:
public
vtkExporter
52
{
53
public
:
54
static
vtkOBJExporter
*
New
();
55
vtkTypeMacro(
vtkOBJExporter
,
vtkExporter
);
56
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
57
59
63
vtkSetFilePathMacro
(
FilePrefix
);
64
vtkGetFilePathMacro
(
FilePrefix
);
66
68
71
vtkSetStringMacro(
OBJFileComment
);
72
vtkGetStringMacro(
OBJFileComment
);
74
76
79
vtkSetStringMacro(
MTLFileComment
);
80
vtkGetStringMacro(
MTLFileComment
);
82
83
protected
:
84
vtkOBJExporter
();
85
~vtkOBJExporter
()
override
;
86
87
void
WriteData
()
override
;
88
void
WriteAnActor
(
89
vtkActor
* anActor, std::ostream& fpObj, std::ostream& fpMat, std::string& modelName,
int
&
id
);
90
char
*
FilePrefix
;
91
char
*
OBJFileComment
;
92
char
*
MTLFileComment
;
93
bool
FlipTexture
;
94
std::map<std::string, vtkTexture*>
TextureFileMap
;
95
96
private
:
97
vtkOBJExporter
(
const
vtkOBJExporter
&) =
delete
;
98
void
operator=(
const
vtkOBJExporter
&) =
delete
;
99
};
100
101
VTK_ABI_NAMESPACE_END
102
#endif
vtkActor
represents an object (geometry & properties) in a rendered scene
Definition
vtkActor.h:151
vtkExporter::vtkExporter
vtkExporter()
vtkIndent
a simple class to control print indentation
Definition
vtkIndent.h:108
vtkOBJExporter::WriteAnActor
void WriteAnActor(vtkActor *anActor, std::ostream &fpObj, std::ostream &fpMat, std::string &modelName, int &id)
vtkOBJExporter::vtkSetFilePathMacro
vtkSetFilePathMacro(FilePrefix)
Specify the prefix of the files to write out.
vtkOBJExporter::WriteData
void WriteData() override
vtkOBJExporter::FilePrefix
char * FilePrefix
Definition
vtkOBJExporter.h:90
vtkOBJExporter::FlipTexture
bool FlipTexture
Definition
vtkOBJExporter.h:93
vtkOBJExporter::~vtkOBJExporter
~vtkOBJExporter() override
vtkOBJExporter::OBJFileComment
char * OBJFileComment
Definition
vtkOBJExporter.h:91
vtkOBJExporter::New
static vtkOBJExporter * New()
vtkOBJExporter::vtkGetFilePathMacro
vtkGetFilePathMacro(FilePrefix)
Specify the prefix of the files to write out.
vtkOBJExporter::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkOBJExporter::vtkOBJExporter
vtkOBJExporter()
vtkOBJExporter::MTLFileComment
char * MTLFileComment
Definition
vtkOBJExporter.h:92
vtkOBJExporter::TextureFileMap
std::map< std::string, vtkTexture * > TextureFileMap
Definition
vtkOBJExporter.h:94
vtkTexture
handles properties associated with a texture map
Definition
vtkTexture.h:168
vtkExporter.h
Generated on Tue Dec 16 2025 06:57:28 for VTK by
1.13.2