libnop
libnop copied to clipboard
Could I serialize a class with some "recursive/tree-like" data?
Hi, I am a newbie in C++ and everything...
Could I use this library to serialize my class with some complex data like :
struct BoneNode
{
std::string name;
glm::mat4 transMatrix;
std::vector<BoneNode> children;
int meshBoneId = -1;
int nonMeshBoneId = -1;
};
and
std::unordered_map<std::string, size_t> boneExMap
?
The loading speed of FBX is driving me crazy and forcing me to learn some new words like "binary files" and "serialize"...
And sorry for my poor English...
Hi!
Recursive types are supported. Here's an example based on your code: https://godbolt.org/z/K1WbMdKno
Cheers, Corey