VTK  9.1.0
vtkGLTFWriterUtils.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkGLTFWriterUtils.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=========================================================================*/
15
26#ifndef vtkGLTFWriterUtils_h
27#define vtkGLTFWriterUtils_h
28
29#include "vtkIOGeometryModule.h" // For export macro
30#include "vtkWrappingHints.h"
31
32#include "vtk_jsoncpp_fwd.h" // For Json forward declaration
33#include <ostream>
34
36class vtkCellArray;
37class vtkDataArray;
38
39class VTKIOGEOMETRY_EXPORT vtkGLTFWriterUtils
40{
41public:
42 VTK_WRAPEXCLUDE static void WriteValues(vtkDataArray* ca, std::ostream& myFile);
44 VTK_WRAPEXCLUDE static void WriteBufferAndView(vtkDataArray* inda, const char* fileName,
45 bool inlineData, Json::Value& buffers, Json::Value& bufferViews);
46 VTK_WRAPEXCLUDE static void WriteBufferAndView(vtkCellArray* ca, const char* fileName,
47 bool inlineData, Json::Value& buffers, Json::Value& bufferViews);
48};
49
50// gltf uses hard coded numbers to represent data types
51// they match the definitions from gl.h but for your convenience
52// some of the common values we use are listed below to make
53// the code more readable without including gl.h
54
55#define GL_BYTE 0x1400
56#define GL_UNSIGNED_BYTE 0x1401
57#define GL_SHORT 0x1402
58#define GL_UNSIGNED_SHORT 0x1403
59#define GL_INT 0x1404
60#define GL_UNSIGNED_INT 0x1405
61#define GL_FLOAT 0x1406
62
63#define GL_CLAMP_TO_EDGE 0x812F
64#define GL_REPEAT 0x2901
65
66#define GL_NEAREST 0x2600
67#define GL_LINEAR 0x2601
68
69#endif
70
71// VTK-HeaderTest-Exclude: vtkGLTFWriterUtils.h
Writes base64-encoded output to a stream.
object to represent cell connectivity
Definition: vtkCellArray.h:290
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:159
static VTK_WRAPEXCLUDE void WriteBufferAndView(vtkDataArray *inda, const char *fileName, bool inlineData, Json::Value &buffers, Json::Value &bufferViews)
static VTK_WRAPEXCLUDE void WriteValues(vtkDataArray *ca, std::ostream &myFile)
static VTK_WRAPEXCLUDE void WriteValues(vtkDataArray *ca, vtkBase64OutputStream *ostr)
static VTK_WRAPEXCLUDE void WriteBufferAndView(vtkCellArray *ca, const char *fileName, bool inlineData, Json::Value &buffers, Json::Value &bufferViews)
#define VTK_WRAPEXCLUDE