1 // Author: Kirill Gavrilov
2 // Copyright (c) 2016-2019 OPEN CASCADE SAS
4 // This file is part of Open CASCADE Technology software library.
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.
12 // Alternatively, this file may be used under the terms of Open CASCADE
13 // commercial license or contractual agreement.
15 #ifndef _RWGltf_GltfArrayType_HeaderFile
16 #define _RWGltf_GltfArrayType_HeaderFile
18 #include <Standard_CString.hxx>
20 //! Low-level glTF enumeration defining Array type.
21 enum RWGltf_GltfArrayType
23 RWGltf_GltfArrayType_UNKNOWN, //!< unknown or invalid type
24 RWGltf_GltfArrayType_Indices, //!< "indices" within "primitive" element
25 RWGltf_GltfArrayType_Position, //!< "POSITION" within "attributes" element
26 RWGltf_GltfArrayType_Normal, //!< "NORMAL" within "attributes" element
27 RWGltf_GltfArrayType_Color, //!< "COLOR" within "attributes" element
28 RWGltf_GltfArrayType_TCoord0, //!< "TEXCOORD_0" within "attributes" element
29 RWGltf_GltfArrayType_TCoord1, //!< "TEXCOORD_1" within "attributes" element
30 RWGltf_GltfArrayType_Joint, //!< "JOINT" within "attributes" element
31 RWGltf_GltfArrayType_Weight, //!< "WEIGHT" within "attributes" element
34 //! Parse GltfArrayType from string.
35 inline RWGltf_GltfArrayType RWGltf_GltfParseAttribType (const char* theType)
37 if (IsEqual ("POSITION", theType))
39 return RWGltf_GltfArrayType_Position;
41 else if (IsEqual ("NORMAL", theType))
43 return RWGltf_GltfArrayType_Normal;
45 else if (IsEqual ("COLOR", theType))
47 return RWGltf_GltfArrayType_Color;
49 else if (IsEqual ("TEXCOORD_0", theType))
51 return RWGltf_GltfArrayType_TCoord0;
53 else if (IsEqual ("TEXCOORD_1", theType))
55 return RWGltf_GltfArrayType_TCoord1;
57 else if (IsEqual ("JOINT", theType))
59 return RWGltf_GltfArrayType_Joint;
61 else if (IsEqual ("WEIGHT", theType))
63 return RWGltf_GltfArrayType_Weight;
65 return RWGltf_GltfArrayType_UNKNOWN;
68 #endif // _RWGltf_GltfArrayType_HeaderFile