VTK  9.2.6
vtkGLTFWriter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkGLTFWriter.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 =========================================================================*/
42 #ifndef vtkGLTFWriter_h
43 #define vtkGLTFWriter_h
44 
45 #include "vtkIOGeometryModule.h" // For export macro
46 #include "vtkWriter.h"
47 
48 #include <string> // for std::string
49 
51 class VTKIOGEOMETRY_EXPORT vtkGLTFWriter : public vtkWriter
52 {
53 public:
54  static vtkGLTFWriter* New();
55  vtkTypeMacro(vtkGLTFWriter, vtkWriter);
56  void PrintSelf(ostream& os, vtkIndent indent) override;
57 
59 
62  vtkSetStringMacro(FileName);
63  vtkGetStringMacro(FileName);
65 
67 
70  vtkSetStringMacro(TextureBaseDirectory);
71  vtkGetStringMacro(TextureBaseDirectory);
73 
75 
79  vtkGetMacro(InlineData, bool);
80  vtkSetMacro(InlineData, bool);
81  vtkBooleanMacro(InlineData, bool);
83 
85 
91  vtkGetMacro(SaveNormal, bool);
92  vtkSetMacro(SaveNormal, bool);
93  vtkBooleanMacro(SaveNormal, bool);
95 
97 
107  vtkGetMacro(SaveBatchId, bool);
108  vtkSetMacro(SaveBatchId, bool);
109  vtkBooleanMacro(SaveBatchId, bool);
111 
113 
121  vtkGetMacro(SaveTextures, bool);
122  vtkSetMacro(SaveTextures, bool);
123  vtkBooleanMacro(SaveTextures, bool);
125 
127 
136  vtkGetMacro(SaveActivePointColor, bool);
137  vtkSetMacro(SaveActivePointColor, bool);
138  vtkBooleanMacro(SaveActivePointColor, bool);
140 
144  std::string WriteToString();
145 
149  void WriteToStream(ostream& out, vtkDataObject* in);
150 
151 protected:
152  vtkGLTFWriter();
153  ~vtkGLTFWriter() override;
154 
155  void WriteData() override;
156  int FillInputPortInformation(int port, vtkInformation* info) override;
157  void WriteToStreamMultiBlock(ostream& out, vtkMultiBlockDataSet* in);
158 
159  char* FileName;
166 
167 private:
168  vtkGLTFWriter(const vtkGLTFWriter&) = delete;
169  void operator=(const vtkGLTFWriter&) = delete;
170 };
171 
172 #endif
export a scene into GLTF 2.0 format.
Definition: vtkGLTFWriter.h:51
Store vtkAlgorithm input/output information.
bool SaveActivePointColor
abstract class to write data to file(s)
Definition: vtkWriter.h:45
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a simple class to control print indentation
Definition: vtkIndent.h:39
virtual int FillInputPortInformation(int port, vtkInformation *info)
Fill the input port information objects for this algorithm.
Composite dataset that organizes datasets into blocks.
static vtkAlgorithm * New()
virtual void WriteData()=0
char * TextureBaseDirectory
general representation of visualization data
Definition: vtkDataObject.h:65