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_GltfArrayType_HeaderFile
0016 #define _RWGltf_GltfArrayType_HeaderFile
0017 
0018 #include <Standard_CString.hxx>
0019 
0020 //! Low-level glTF enumeration defining Array type.
0021 enum RWGltf_GltfArrayType
0022 {
0023   RWGltf_GltfArrayType_UNKNOWN,  //!< unknown or invalid type
0024   RWGltf_GltfArrayType_Indices,  //!< "indices"    within "primitive"  element
0025   RWGltf_GltfArrayType_Position, //!< "POSITION"   within "attributes" element
0026   RWGltf_GltfArrayType_Normal,   //!< "NORMAL"     within "attributes" element
0027   RWGltf_GltfArrayType_Color,    //!< "COLOR"      within "attributes" element
0028   RWGltf_GltfArrayType_TCoord0,  //!< "TEXCOORD_0" within "attributes" element
0029   RWGltf_GltfArrayType_TCoord1,  //!< "TEXCOORD_1" within "attributes" element
0030   RWGltf_GltfArrayType_Joint,    //!< "JOINT"      within "attributes" element
0031   RWGltf_GltfArrayType_Weight,   //!< "WEIGHT"     within "attributes" element
0032 };
0033 
0034 //! Parse GltfArrayType from string.
0035 inline RWGltf_GltfArrayType RWGltf_GltfParseAttribType (const char* theType)
0036 {
0037   if (IsEqual ("POSITION", theType))
0038   {
0039     return RWGltf_GltfArrayType_Position;
0040   }
0041   else if (IsEqual ("NORMAL", theType))
0042   {
0043     return RWGltf_GltfArrayType_Normal;
0044   }
0045   else if (IsEqual ("COLOR", theType))
0046   {
0047     return RWGltf_GltfArrayType_Color;
0048   }
0049   else if (IsEqual ("TEXCOORD_0", theType))
0050   {
0051     return RWGltf_GltfArrayType_TCoord0;
0052   }
0053   else if (IsEqual ("TEXCOORD_1", theType))
0054   {
0055     return RWGltf_GltfArrayType_TCoord1;
0056   }
0057   else if (IsEqual ("JOINT", theType))
0058   {
0059     return RWGltf_GltfArrayType_Joint;
0060   }
0061   else if (IsEqual ("WEIGHT", theType))
0062   {
0063     return RWGltf_GltfArrayType_Weight;
0064   }
0065   return RWGltf_GltfArrayType_UNKNOWN;
0066 }
0067 
0068 #endif // _RWGltf_GltfArrayType_HeaderFile