VTK
9.1.0
IO
Export
vtkOBJExporter.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkOBJExporter.h
5
6
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7
All rights reserved.
8
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10
This software is distributed WITHOUT ANY WARRANTY; without even
11
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12
PURPOSE. See the above copyright notice for more information.
13
14
=========================================================================*/
47
#ifndef vtkOBJExporter_h
48
#define vtkOBJExporter_h
49
50
#include "
vtkExporter.h
"
51
#include "vtkIOExportModule.h"
// For export macro
52
#include <fstream>
// For ofstream
53
#include <map>
// For map
54
#include <vector>
// For string
55
56
class
vtkActor
;
57
class
vtkTexture
;
58
59
class
VTKIOEXPORT_EXPORT
vtkOBJExporter
:
public
vtkExporter
60
{
61
public
:
62
static
vtkOBJExporter
*
New
();
63
vtkTypeMacro(
vtkOBJExporter
,
vtkExporter
);
64
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
65
67
71
vtkSetFilePathMacro
(FilePrefix);
72
vtkGetFilePathMacro
(FilePrefix);
74
76
79
vtkSetStringMacro(OBJFileComment);
80
vtkGetStringMacro(OBJFileComment);
82
84
87
vtkSetStringMacro(MTLFileComment);
88
vtkGetStringMacro(MTLFileComment);
90
91
protected
:
92
vtkOBJExporter
();
93
~vtkOBJExporter
()
override
;
94
95
void
WriteData
()
override
;
96
void
WriteAnActor
(
97
vtkActor
* anActor, std::ostream& fpObj, std::ostream& fpMat,
std::string
& modelName,
int
&
id
);
98
char
*
FilePrefix
;
99
char
*
OBJFileComment
;
100
char
*
MTLFileComment
;
101
bool
FlipTexture
;
102
std::map<std::string, vtkTexture*>
TextureFileMap
;
103
104
private
:
105
vtkOBJExporter
(
const
vtkOBJExporter
&) =
delete
;
106
void
operator=(
const
vtkOBJExporter
&) =
delete
;
107
};
108
109
#endif
vtkOBJExporter::New
static vtkOBJExporter * New()
vtkOBJExporter::WriteAnActor
void WriteAnActor(vtkActor *anActor, std::ostream &fpObj, std::ostream &fpMat, std::string &modelName, int &id)
vtkOBJExporter::WriteData
void WriteData() override
vtkOBJExporter::OBJFileComment
char * OBJFileComment
Definition:
vtkOBJExporter.h:99
vtkOBJExporter::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkOBJExporter
export a scene into Wavefront format.
Definition:
vtkOBJExporter.h:60
vtkTexture
handles properties associated with a texture map
Definition:
vtkTexture.h:175
vtkActor
represents an object (geometry & properties) in a rendered scene
Definition:
vtkActor.h:155
vtkIndent
a simple class to control print indentation
Definition:
vtkIndent.h:113
vtkX3D::string
@ string
Definition:
vtkX3D.h:496
vtkOBJExporter::vtkOBJExporter
vtkOBJExporter()
vtkExporter
abstract class to write a scene to a file
Definition:
vtkExporter.h:48
vtkOBJExporter::~vtkOBJExporter
~vtkOBJExporter() override
vtkOBJExporter::MTLFileComment
char * MTLFileComment
Definition:
vtkOBJExporter.h:100
vtkExporter.h
vtkOBJExporter::FilePrefix
char * FilePrefix
Definition:
vtkOBJExporter.h:98
vtkOBJExporter::vtkSetFilePathMacro
vtkSetFilePathMacro(FilePrefix)
Specify the prefix of the files to write out.
vtkOBJExporter::FlipTexture
bool FlipTexture
Definition:
vtkOBJExporter.h:101
vtkOBJExporter::TextureFileMap
std::map< std::string, vtkTexture * > TextureFileMap
Definition:
vtkOBJExporter.h:102
vtkOBJExporter::vtkGetFilePathMacro
vtkGetFilePathMacro(FilePrefix)
Specify the prefix of the files to write out.
Generated on Fri Nov 5 2021 00:11:12 for VTK by
1.8.20