feat: support gltf bone rotation as matrix notation

This commit is contained in:
Jan
2024-09-06 21:37:48 +02:00
parent 149a24b544
commit 7eb1714e89
2 changed files with 79 additions and 39 deletions

View File

@ -25,12 +25,13 @@ namespace gltf
std::optional<std::array<float, 3>> translation;
std::optional<std::array<float, 4>> rotation;
std::optional<std::array<float, 3>> scale;
std::optional<std::array<float, 16>> matrix;
std::optional<std::vector<unsigned>> children;
std::optional<unsigned> skin;
std::optional<unsigned> mesh;
};
NLOHMANN_DEFINE_TYPE_EXTENSION(JsonNode, name, translation, rotation, scale, children, skin, mesh);
NLOHMANN_DEFINE_TYPE_EXTENSION(JsonNode, name, translation, rotation, scale, matrix, children, skin, mesh);
class JsonBuffer
{