Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:04:42

0001 // Author: Kirill Gavrilov
0002 // Copyright (c) 2016-2019 OPEN CASCADE SAS
0003 //
0004 // This file is part of Open CASCADE Technology software library.
0005 //
0006 // This library is free software; you can redistribute it and/or modify it under
0007 // the terms of the GNU Lesser General Public License version 2.1 as published
0008 // by the Free Software Foundation, with special exception defined in the file
0009 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0010 // distribution for complete text of the license and disclaimer of any warranty.
0011 //
0012 // Alternatively, this file may be used under the terms of Open CASCADE
0013 // commercial license or contractual agreement.
0014 
0015 #ifndef _RWGltf_GltfAccessorLayout_HeaderFile
0016 #define _RWGltf_GltfAccessorLayout_HeaderFile
0017 
0018 #include <Standard_CString.hxx>
0019 
0020 //! Low-level glTF enumeration defining Accessor layout.
0021 //! Similar to Graphic3d_TypeOfData but does not define actual type and includes matrices.
0022 enum RWGltf_GltfAccessorLayout
0023 {
0024   RWGltf_GltfAccessorLayout_UNKNOWN, //!< unknown or invalid type
0025   RWGltf_GltfAccessorLayout_Scalar,  //!< "SCALAR"
0026   RWGltf_GltfAccessorLayout_Vec2,    //!< "VEC2"
0027   RWGltf_GltfAccessorLayout_Vec3,    //!< "VEC3"
0028   RWGltf_GltfAccessorLayout_Vec4,    //!< "VEC4"
0029   RWGltf_GltfAccessorLayout_Mat2,    //!< "MAT2"
0030   RWGltf_GltfAccessorLayout_Mat3,    //!< "MAT3"
0031   RWGltf_GltfAccessorLayout_Mat4,    //!< "MAT4"
0032 };
0033 
0034 //! Parse GltfAccessorLayout from string.
0035 inline RWGltf_GltfAccessorLayout RWGltf_GltfParseAccessorType (const char* theType)
0036 {
0037   if (IsEqual ("SCALAR", theType))
0038   {
0039     return RWGltf_GltfAccessorLayout_Scalar;
0040   }
0041   else if (IsEqual ("VEC2", theType))
0042   {
0043     return RWGltf_GltfAccessorLayout_Vec2;
0044   }
0045   else if (IsEqual ("VEC3", theType))
0046   {
0047     return RWGltf_GltfAccessorLayout_Vec3;
0048   }
0049   else if (IsEqual ("VEC4", theType))
0050   {
0051     return RWGltf_GltfAccessorLayout_Vec4;
0052   }
0053   else if (IsEqual ("MAT2", theType))
0054   {
0055     return RWGltf_GltfAccessorLayout_Mat2;
0056   }
0057   else if (IsEqual ("MAT3", theType))
0058   {
0059     return RWGltf_GltfAccessorLayout_Mat3;
0060   }
0061   else if (IsEqual ("MAT4", theType))
0062   {
0063     return RWGltf_GltfAccessorLayout_Mat4;
0064   }
0065   return RWGltf_GltfAccessorLayout_UNKNOWN;
0066 }
0067 
0068 #endif // _RWGltf_GltfAccessorLayout_HeaderFile