Is your feature request related to a problem? Please describe.
In order to implement animations it would be nice to abandon all the std::unique_ptr<S_Joint> usage and use the linear storage method. Also, extend C_Skeleton with get by name and get by id methods.
Describe the solution you'd like
First of we need a faster way to handle bones by name. I suggest some struct with the hash of the name inside. Each bone should have such id stored and the system will use a simple integer comparison to find the bone.
Next, I suggest using std::vector to store bones in the skeleton and build a tree using parent and child indices in joints.
Is your feature request related to a problem? Please describe. In order to implement animations it would be nice to abandon all the
std::unique_ptr<S_Joint>
usage and use the linear storage method. Also, extendC_Skeleton
with get by name and get by id methods.Describe the solution you'd like First of we need a faster way to handle bones by name. I suggest some struct with the hash of the name inside. Each bone should have such id stored and the system will use a simple integer comparison to find the bone. Next, I suggest using
std::vector
to store bones in the skeleton and build a tree using parent and child indices in joints.