0031332: Data Exchange - RWGltf_CafReader ignores bufferView.byteStride within glTF 2.0
[occt.git] / src / RWGltf / RWGltf_GltfRootElement.hxx
CommitLineData
0a419c51 1// Author: Kirill Gavrilov
2// Copyright (c) 2016-2019 OPEN CASCADE SAS
3//
4// This file is part of Open CASCADE Technology software library.
5//
6// This library is free software; you can redistribute it and/or modify it under
7// the terms of the GNU Lesser General Public License version 2.1 as published
8// by the Free Software Foundation, with special exception defined in the file
9// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
10// distribution for complete text of the license and disclaimer of any warranty.
11//
12// Alternatively, this file may be used under the terms of Open CASCADE
13// commercial license or contractual agreement.
14
15#ifndef _RWGltf_GltfRootElement_HeaderFile
16#define _RWGltf_GltfRootElement_HeaderFile
17
18//! Root elements within glTF JSON document.
19enum RWGltf_GltfRootElement
20{
21 RWGltf_GltfRootElement_Asset, //!< "asset" element, mandatory
22 RWGltf_GltfRootElement_Scenes, //!< "scenes" element, mandatory
23 RWGltf_GltfRootElement_Scene, //!< "scene" element, mandatory
24 RWGltf_GltfRootElement_Nodes, //!< "nodes" element, mandatory
25 RWGltf_GltfRootElement_Meshes, //!< "meshes" element, mandatory
26 RWGltf_GltfRootElement_Accessors, //!< "accessors" element, mandatory
27 RWGltf_GltfRootElement_BufferViews, //!< "bufferViews" element, mandatory
28 RWGltf_GltfRootElement_Buffers, //!< "buffers" element, mandatory
29 RWGltf_GltfRootElement_NB_MANDATORY, //!< number of mandatory elements
30 // optional elements
31 RWGltf_GltfRootElement_Animations = RWGltf_GltfRootElement_NB_MANDATORY, //!< "animations" element
32 RWGltf_GltfRootElement_Materials, //!< "materials" element,
33 RWGltf_GltfRootElement_Programs, //!< "programs" element,
34 RWGltf_GltfRootElement_Samplers, //!< "samplers" element,
35 RWGltf_GltfRootElement_Shaders, //!< "shaders" element,
36 RWGltf_GltfRootElement_Skins, //!< "skins" element,
37 RWGltf_GltfRootElement_Techniques, //!< "techniques" element,
38 RWGltf_GltfRootElement_Textures, //!< "textures" element,
39 RWGltf_GltfRootElement_Images, //!< "images" element,
40 RWGltf_GltfRootElement_ExtensionsUsed, //!< "extensionsUsed" element,
41 RWGltf_GltfRootElement_ExtensionsRequired, //!< "extensionsRequired" element,
42 RWGltf_GltfRootElement_NB //!< overall number of elements
43};
44
45//! Root elements within glTF JSON document - names array.
46inline const char* RWGltf_GltfRootElementName (RWGltf_GltfRootElement theElem)
47{
48 static const char* THE_ROOT_NAMES[RWGltf_GltfRootElement_NB] =
49 {
50 "asset",
51 "scenes",
52 "scene",
53 "nodes",
54 "meshes",
55 "accessors",
56 "bufferViews",
57 "buffers",
58 "animations",
59 "materials",
60 "programs",
61 "samplers",
62 "shaders",
63 "skins",
64 "techniques",
65 "textures",
66 "images",
67 "extensionsUsed",
68 "extensionsRequired"
69 };
70 return THE_ROOT_NAMES[theElem];
71}
72
73#endif // _RWGltf_GltfRootElement_HeaderFile