VTK
9.0.1
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
=========================================================================*/
28
#ifndef vtkOBJExporter_h
29
#define vtkOBJExporter_h
30
31
#include "
vtkExporter.h
"
32
#include "vtkIOExportModule.h"
// For export macro
33
#include <fstream>
// For ofstream
34
#include <map>
// For map
35
#include <vector>
// For string
36
37
class
vtkActor
;
38
class
vtkTexture
;
39
40
class
VTKIOEXPORT_EXPORT
vtkOBJExporter
:
public
vtkExporter
41
{
42
public
:
43
static
vtkOBJExporter
*
New
();
44
vtkTypeMacro(
vtkOBJExporter
,
vtkExporter
);
45
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
46
48
52
vtkSetStringMacro(FilePrefix);
53
vtkGetStringMacro(FilePrefix);
55
57
60
vtkSetStringMacro(OBJFileComment);
61
vtkGetStringMacro(OBJFileComment);
63
65
68
vtkSetStringMacro(MTLFileComment);
69
vtkGetStringMacro(MTLFileComment);
71
72
protected
:
73
vtkOBJExporter
();
74
~
vtkOBJExporter
()
override
;
75
76
void
WriteData
()
override
;
77
void
WriteAnActor(
78
vtkActor
* anActor, std::ostream& fpObj, std::ostream& fpMat,
std::string
& modelName,
int
&
id
);
79
char
*
FilePrefix
;
80
char
*
OBJFileComment
;
81
char
*
MTLFileComment
;
82
bool
FlipTexture
;
83
std::map<std::string, vtkTexture*>
TextureFileMap
;
84
85
private
:
86
vtkOBJExporter
(
const
vtkOBJExporter
&) =
delete
;
87
void
operator=(
const
vtkOBJExporter
&) =
delete
;
88
};
89
90
#endif
vtkExporter
abstract class to write a scene to a file
Definition:
vtkExporter.h:47
vtkActor
represents an object (geometry & properties) in a rendered scene
Definition:
vtkActor.h:45
vtkExporter::WriteData
virtual void WriteData()=0
vtkOBJExporter::FlipTexture
bool FlipTexture
Definition:
vtkOBJExporter.h:82
vtkX3D::string
Definition:
vtkX3D.h:496
vtkOBJExporter::OBJFileComment
char * OBJFileComment
Definition:
vtkOBJExporter.h:80
vtkIndent
a simple class to control print indentation
Definition:
vtkIndent.h:33
vtkTexture
handles properties associated with a texture map
Definition:
vtkTexture.h:65
vtkExporter::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkExporter.h
vtkOBJExporter::MTLFileComment
char * MTLFileComment
Definition:
vtkOBJExporter.h:81
vtkOBJExporter::TextureFileMap
std::map< std::string, vtkTexture * > TextureFileMap
Definition:
vtkOBJExporter.h:83
vtkObject::New
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
vtkOBJExporter::FilePrefix
char * FilePrefix
Definition:
vtkOBJExporter.h:79
vtkOBJExporter
export a scene into Wavefront format.
Definition:
vtkOBJExporter.h:40
Generated on Sat Jun 12 2021 02:16:19 for VTK by
1.8.14