VTK
9.3.1
Main Page
Related Pages
Topics
Namespaces
Classes
Files
File List
File Members
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
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
28
VTK_ABI_NAMESPACE_BEGIN
29
class
vtkActor
;
30
class
vtkTexture
;
31
32
class
VTKIOEXPORT_EXPORT
vtkOBJExporter
:
public
vtkExporter
33
{
34
public
:
35
static
vtkOBJExporter
*
New
();
36
vtkTypeMacro(
vtkOBJExporter
,
vtkExporter
);
37
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
38
40
44
vtkSetFilePathMacro
(FilePrefix);
45
vtkGetFilePathMacro
(FilePrefix);
47
49
52
vtkSetStringMacro(OBJFileComment);
53
vtkGetStringMacro(OBJFileComment);
55
57
60
vtkSetStringMacro(MTLFileComment);
61
vtkGetStringMacro(MTLFileComment);
63
64
protected
:
65
vtkOBJExporter
();
66
~vtkOBJExporter
()
override
;
67
68
void
WriteData
()
override
;
69
void
WriteAnActor
(
70
vtkActor
* anActor, std::ostream& fpObj, std::ostream& fpMat, std::string& modelName,
int
&
id
);
71
char
*
FilePrefix
;
72
char
*
OBJFileComment
;
73
char
*
MTLFileComment
;
74
bool
FlipTexture
;
75
std::map<std::string, vtkTexture*>
TextureFileMap
;
76
77
private
:
78
vtkOBJExporter
(
const
vtkOBJExporter
&) =
delete
;
79
void
operator=(
const
vtkOBJExporter
&) =
delete
;
80
};
81
82
VTK_ABI_NAMESPACE_END
83
#endif
vtkActor
represents an object (geometry & properties) in a rendered scene
Definition
vtkActor.h:41
vtkExporter
abstract class to write a scene to a file
Definition
vtkExporter.h:37
vtkIndent
a simple class to control print indentation
Definition
vtkIndent.h:29
vtkOBJExporter
export a scene into Wavefront format.
Definition
vtkOBJExporter.h:33
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:71
vtkOBJExporter::FlipTexture
bool FlipTexture
Definition
vtkOBJExporter.h:74
vtkOBJExporter::~vtkOBJExporter
~vtkOBJExporter() override
vtkOBJExporter::OBJFileComment
char * OBJFileComment
Definition
vtkOBJExporter.h:72
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:73
vtkOBJExporter::TextureFileMap
std::map< std::string, vtkTexture * > TextureFileMap
Definition
vtkOBJExporter.h:75
vtkTexture
handles properties associated with a texture map
Definition
vtkTexture.h:58
vtkExporter.h
Generated on Fri Oct 25 2024 00:00:00 for VTK by
1.12.0