2 #ifndef GLTF_COMMON_HEADER_HAS_BEEN_INCLUDED_     3 #define GLTF_COMMON_HEADER_HAS_BEEN_INCLUDED_     5 #define TINYGLTF_NO_INCLUDE_JSON     6 #define TINYGLTF_NO_INCLUDE_STB_IMAGE     7 #define TINYGLTF_NO_INCLUDE_STB_IMAGE_WRITE     8 #include "TinyGltf/tiny_gltf.h"    20     using Accessor = tinygltf::Accessor;
    21     using BufferView = tinygltf::BufferView;
    22     using Buffer = tinygltf::Buffer;
    27         BufferView buffer_view;
    28         std::shared_ptr<const Buffer> bufferPtr = 
nullptr;
    35     enum class DataType : int32_t {
    36         SCALAR = TINYGLTF_TYPE_SCALAR,
    37         VEC2 = TINYGLTF_TYPE_VEC2,
    38         VEC3 = TINYGLTF_TYPE_VEC3,
    39         VEC4 = TINYGLTF_TYPE_VEC4,
    40         MAT2 = TINYGLTF_TYPE_MAT2,
    41         MAT3 = TINYGLTF_TYPE_MAT3,
    42         MAT4 = TINYGLTF_TYPE_MAT4,
    43         INVALID =  std::numeric_limits<int32_t>::max()
    46     enum class ComponentType : int32_t {
    47         BYTE = TINYGLTF_COMPONENT_TYPE_BYTE,
    48         UNSIGNED_BYTE = TINYGLTF_COMPONENT_TYPE_UNSIGNED_BYTE,
    49         SHORT = TINYGLTF_COMPONENT_TYPE_SHORT,
    50         UNSIGNED_SHORT = TINYGLTF_COMPONENT_TYPE_UNSIGNED_SHORT,
    51         INT = TINYGLTF_COMPONENT_TYPE_INT,
    52         UNSIGNED_INT = TINYGLTF_COMPONENT_TYPE_UNSIGNED_INT,
    53         FLOAT = TINYGLTF_COMPONENT_TYPE_FLOAT,
    54         DOUBLE = TINYGLTF_COMPONENT_TYPE_DOUBLE,
    55         INVALID =  std::numeric_limits<int32_t>::max()
    58     struct TypePair{
const DataType data_type = DataType::INVALID; 
const ComponentType component_type = ComponentType::INVALID;};
    60     template <DataType T_dataType = DataType::INVALID>
    62         static inline constexpr 
size_t count() noexcept {
return(0);}
    63         static inline constexpr 
bool isScalar() noexcept {
return(
false);}
    64         static inline constexpr 
bool isVector() noexcept {
return(
false);}
    65         static inline constexpr 
bool isMatrix() noexcept {
return(
false);}
    68     template <ComponentType T_compType>
    74         static inline constexpr 
size_t count() noexcept {
return(1);}
    75         static inline constexpr 
bool isScalar() noexcept {
return(
true);}
    76         static inline constexpr 
bool isVector() noexcept {
return(
false);}
    77         static inline constexpr 
bool isMatrix() noexcept {
return(
false);}
    81         static inline constexpr 
size_t count() noexcept {
return(2);}
    82         static inline constexpr 
bool isScalar() noexcept {
return(
false);}
    83         static inline constexpr 
bool isVector() noexcept {
return(
true);}
    84         static inline constexpr 
bool isMatrix() noexcept {
return(
false);}
    88         static inline constexpr 
size_t count() noexcept {
return(3);}
    89         static inline constexpr 
bool isScalar() noexcept {
return(
false);}
    90         static inline constexpr 
bool isVector() noexcept {
return(
true);}
    91         static inline constexpr 
bool isMatrix() noexcept {
return(
false);}
    95         static inline constexpr 
size_t count() noexcept {
return(4);}
    96         static inline constexpr 
bool isScalar() noexcept {
return(
false);}
    97         static inline constexpr 
bool isVector() noexcept {
return(
true);}
    98         static inline constexpr 
bool isMatrix() noexcept {
return(
false);}
   102         static inline constexpr 
size_t count() noexcept {
return(4);}
   103         static inline constexpr 
bool isScalar() noexcept {
return(
false);}
   104         static inline constexpr 
bool isVector() noexcept {
return(
false);}
   105         static inline constexpr 
bool isMatrix() noexcept {
return(
true);}
   109         static inline constexpr 
size_t count() noexcept {
return(9);}
   110         static inline constexpr 
bool isScalar() noexcept {
return(
false);}
   111         static inline constexpr 
bool isVector() noexcept {
return(
false);}
   112         static inline constexpr 
bool isMatrix() noexcept {
return(
true);}
   116         static inline constexpr 
size_t count() noexcept {
return(16);}
   117         static inline constexpr 
bool isScalar() noexcept {
return(
false);}
   118         static inline constexpr 
bool isVector() noexcept {
return(
false);}
   119         static inline constexpr 
bool isMatrix() noexcept {
return(
true);}
   124         using data_t = int8_t;
   128         using data_t = uint8_t;
   132         using data_t = int16_t;
   136         using data_t = uint16_t;
   140         using data_t = int32_t;
   144         using data_t = uint32_t;
   148         using data_t = float;
   152         using data_t = double;
 Definition: GltfCommon.h:58
Definition: GltfCommon.h:15
Definition: GltfCommon.h:61
Definition: GltfCommon.h:69
Definition: GltfCommon.h:24