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_GltfAccessorLayout_HeaderFile
16 #define _RWGltf_GltfAccessorLayout_HeaderFile
18 #include <Standard_CString.hxx>
20 //! Low-level glTF enumeration defining Accessor layout.
21 //! Similar to Graphic3d_TypeOfData but does not define actual type and includes matrices.
22 enum RWGltf_GltfAccessorLayout
24 RWGltf_GltfAccessorLayout_UNKNOWN, //!< unknown or invalid type
25 RWGltf_GltfAccessorLayout_Scalar, //!< "SCALAR"
26 RWGltf_GltfAccessorLayout_Vec2, //!< "VEC2"
27 RWGltf_GltfAccessorLayout_Vec3, //!< "VEC3"
28 RWGltf_GltfAccessorLayout_Vec4, //!< "VEC4"
29 RWGltf_GltfAccessorLayout_Mat2, //!< "MAT2"
30 RWGltf_GltfAccessorLayout_Mat3, //!< "MAT3"
31 RWGltf_GltfAccessorLayout_Mat4, //!< "MAT4"
34 //! Parse GltfAccessorLayout from string.
35 inline RWGltf_GltfAccessorLayout RWGltf_GltfParseAccessorType (const char* theType)
37 if (IsEqual ("SCALAR", theType))
39 return RWGltf_GltfAccessorLayout_Scalar;
41 else if (IsEqual ("VEC2", theType))
43 return RWGltf_GltfAccessorLayout_Vec2;
45 else if (IsEqual ("VEC3", theType))
47 return RWGltf_GltfAccessorLayout_Vec3;
49 else if (IsEqual ("VEC4", theType))
51 return RWGltf_GltfAccessorLayout_Vec4;
53 else if (IsEqual ("MAT2", theType))
55 return RWGltf_GltfAccessorLayout_Mat2;
57 else if (IsEqual ("MAT3", theType))
59 return RWGltf_GltfAccessorLayout_Mat3;
61 else if (IsEqual ("MAT4", theType))
63 return RWGltf_GltfAccessorLayout_Mat4;
65 return RWGltf_GltfAccessorLayout_UNKNOWN;
68 #endif // _RWGltf_GltfAccessorLayout_HeaderFile