VTK  9.1.0
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
56class vtkActor;
57class vtkTexture;
58
59class VTKIOEXPORT_EXPORT vtkOBJExporter : public vtkExporter
60{
61public:
64 void PrintSelf(ostream& os, vtkIndent indent) override;
65
67
74
76
79 vtkSetStringMacro(OBJFileComment);
80 vtkGetStringMacro(OBJFileComment);
82
84
87 vtkSetStringMacro(MTLFileComment);
88 vtkGetStringMacro(MTLFileComment);
90
91protected:
93 ~vtkOBJExporter() override;
94
95 void WriteData() override;
97 vtkActor* anActor, std::ostream& fpObj, std::ostream& fpMat, std::string& modelName, int& id);
102 std::map<std::string, vtkTexture*> TextureFileMap;
103
104private:
105 vtkOBJExporter(const vtkOBJExporter&) = delete;
106 void operator=(const vtkOBJExporter&) = delete;
107};
108
109#endif
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:155
abstract class to write a scene to a file
Definition: vtkExporter.h:48
a simple class to control print indentation
Definition: vtkIndent.h:113
export a scene into Wavefront format.
void WriteAnActor(vtkActor *anActor, std::ostream &fpObj, std::ostream &fpMat, std::string &modelName, int &id)
vtkSetFilePathMacro(FilePrefix)
Specify the prefix of the files to write out.
void WriteData() override
~vtkOBJExporter() override
char * OBJFileComment
static vtkOBJExporter * New()
vtkGetFilePathMacro(FilePrefix)
Specify the prefix of the files to write out.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
std::map< std::string, vtkTexture * > TextureFileMap
handles properties associated with a texture map
Definition: vtkTexture.h:175