VTK
9.2.6
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
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
=========================================================================*/
31
#ifndef vtkOBJExporter_h
32
#define vtkOBJExporter_h
33
34
#include "
vtkExporter.h
"
35
#include "vtkIOExportModule.h"
// For export macro
36
#include <fstream>
// For ofstream
37
#include <map>
// For map
38
#include <vector>
// For string
39
40
class
vtkActor
;
41
class
vtkTexture
;
42
43
class
VTKIOEXPORT_EXPORT
vtkOBJExporter
:
public
vtkExporter
44
{
45
public
:
46
static
vtkOBJExporter
*
New
();
47
vtkTypeMacro(
vtkOBJExporter
,
vtkExporter
);
48
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
49
51
55
vtkSetFilePathMacro(FilePrefix);
56
vtkGetFilePathMacro(FilePrefix);
58
60
63
vtkSetStringMacro(OBJFileComment);
64
vtkGetStringMacro(OBJFileComment);
66
68
71
vtkSetStringMacro(MTLFileComment);
72
vtkGetStringMacro(MTLFileComment);
74
75
protected
:
76
vtkOBJExporter
();
77
~
vtkOBJExporter
()
override
;
78
79
void
WriteData
()
override
;
80
void
WriteAnActor(
81
vtkActor
* anActor, std::ostream& fpObj, std::ostream& fpMat,
std::string
& modelName,
int
&
id
);
82
char
*
FilePrefix
;
83
char
*
OBJFileComment
;
84
char
*
MTLFileComment
;
85
bool
FlipTexture
;
86
std::map<std::string, vtkTexture*>
TextureFileMap
;
87
88
private
:
89
vtkOBJExporter
(
const
vtkOBJExporter
&) =
delete
;
90
void
operator=(
const
vtkOBJExporter
&) =
delete
;
91
};
92
93
#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:51
vtkExporter::WriteData
virtual void WriteData()=0
vtkOBJExporter::FlipTexture
bool FlipTexture
Definition:
vtkOBJExporter.h:85
vtkX3D::string
Definition:
vtkX3D.h:496
vtkOBJExporter::OBJFileComment
char * OBJFileComment
Definition:
vtkOBJExporter.h:83
vtkIndent
a simple class to control print indentation
Definition:
vtkIndent.h:39
vtkTexture
handles properties associated with a texture map
Definition:
vtkTexture.h:68
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:84
vtkOBJExporter::TextureFileMap
std::map< std::string, vtkTexture * > TextureFileMap
Definition:
vtkOBJExporter.h:86
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:82
vtkOBJExporter
export a scene into Wavefront format.
Definition:
vtkOBJExporter.h:43
Generated on Mon Oct 16 2023 11:19:44 for VTK by
1.8.10