I am trying to make my own gltf loader, and I am dealing with animations.
I have the first basic triangle example that makes it rotate. One thing I noticed is that these are the defined types for a gltf file:
#define TINYGLTF_TYPE_VEC2 (2)
#define TINYGLTF_TYPE_VEC3 (3)
#define TINYGLTF_TYPE_VEC4 (4)
#define TINYGLTF_TYPE_MAT2 (32 + 2)
#define TINYGLTF_TYPE_MAT3 (32 + 3)
#define TINYGLTF_TYPE_MAT4 (32 + 4)
#define TINYGLTF_TYPE_SCALAR (64 + 1)
#define TINYGLTF_TYPE_VECTOR (64 + 4)
#define TINYGLTF_TYPE_MATRIX (64 + 16)
More importantly, since all the data is stored as raw buffers, the only information you get about a given model is whether it has animations or not, there doesn;t seem to be afield that explains "this data over here is for rotating the mesh, this one over here is for translating it".
This leads me to the question. Is there any circumstances where a primitive in a mesh has declared an animation, the output animation buffer is of type vec4 but it is not representing quaternion rotations?
And if it is possible to have non quaternion types for an animation buffer, how do I know when the buffer is a rotation and when it is a different type?